Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Ask the XPages Experts

2,686 views

Published on

A panel of XPages experts - Mike McGarel, David Leedy, and Nathan Freeman - each give a short presentation, then answer XPages questions from attendees. For the recording, please visit: https://youtu.be/jBaRSM9Ng_o

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Ask the XPages Experts

  1. 1. ASK THE XPAGES EXPERTS Nov. 17, 2015
  2. 2. Courtney Carter @Teamstudio Howard Greenberg @TLCC Paul Della-Nebbia @PaulDN David Leedy @DavidLeedy Mike McGarel @MMcGarel Nathan Freeman Red Pill Development
  3. 3. Asking Questions Use the “Questions” pane to ask questions.  
  4. 4. AboutTeamstudio •  Manage, modernize, and mobilize business applications with software and services from Teamstudio. o  Easy-to-use tools for Notes and Domino developers and administrators o  Mobilization platform for those who want to mobilize using their own internal resources o  Modernization Services to help mobilize applications •  1600+ active customers, 53 countries •  Offices in US, UK, and Japan
  5. 5. Teamstudio NotesTools •  Manage your Notes applications faster, better, and more easily.
  6. 6. Teamstudio Unplugged •  Mobile application platform that provides organizations with the capability to extend their desktop and Web-based applications to mobile devices, giving users access to data anywhere, anytime, even when they’re offline. •  Template applications: Continuity, CustomerView, OneView, Doc Library, Journal, TeamRoom
  7. 7. Teamstudio XControls •  Set of controls for IBM Domino developers working on XPages apps and Notes app modernization projects •  Full support for PC browser-based user interfaces, as well as mobile interfaces
  8. 8. Teamstudio Services •  Professional services for modernization, Web enablement, project management, development, and administration –  Modernization Services –  Developer Assistance Program –  Application Upgrade Analysis –  Application Complexity Analysis –  Application Usage Auditing
  9. 9. Ask the XPages Experts
  10. 10. 1 #XPages Your Hosts Today: Howard Greenberg TLCC @TLCCLtd Ask an XPages Expert Paul Della-Nebbia TLCC @PaulDN
  11. 11. How can TLCC Help YOU! 2 • Private classes at your location or virtual •XPages Development •Support Existing Apps •Administration • Let us help you become an expert XPages developer! • Delivered via Notes • XPages • Development • Admin • User Self- Paced Courses Mentoring Instructor- Led Classes Application Development and Consulting Free Demo Courses!
  12. 12. Upcoming and Recorded Webinars 3 www.tlcc.com/xpages-webinar View Previous Webinars (use url above) • Using Cool New Frameworks in (Mobile) Domino Apps! with Theo Heselmans – December 16th
  13. 13. Asking Questions – Q and A at the end 4 Use the Orange Arrow button to expand the GoToWebinar panel Then ask your questions in the Questions pane! We will answer your questions verbally at the end of the webinar
  14. 14. Your Presenters Today: 5 #XPages Mike McGarel @mmcgarel Building on Properties Jesse Gallagher @Gidgerby Controller Classes David Leedy @DavidLeedy Time to First Byte Nathan Freeman @NTF Give It a Rest
  15. 15. Building on Properties With one house: Mike McGarel Collaborative Solutions Developer With several (ware)houses: Czarnowski Display Service Inc. With an email address: mcgarelgramming@gmail.com
  16. 16. Building on Properties Agenda Custom Property - Custom Control ✴ Example: single custom control ✴ Example: multiple custom controls ✦ Custom Property - XPage ✴ Example: side menu ✴ Example: bread crumb navigation 2
  17. 17. Building on Properties XPage - Red Properties 3
  18. 18. Building on Properties Setup on Custom Control - String value 4
  19. 19. Building on Properties Color Style Classes .
 .red { background-color: #ff0000; } .green { background-color: #008000; } .blue { background-color: #87ceeb; } 5
  20. 20. Building on Properties Setup on Custom Control - Java object 6
  21. 21. Building on Properties Java Sample - Squares Class 7
  22. 22. Building on Properties Custom Control - Properties Use 8
  23. 23. Building on Properties compositeData Reference to access property Sample: value=“#{compositeData.propertyname}” Custom property map Built-in getters and setters 9
  24. 24. Building on Properties XPage Source - Red Properties Sample 10
  25. 25. Building on Properties XPage - Red Properties 11
  26. 26. Building on Properties Java Sample - Multiple Class private String firstStyleName; private String secondStyleName; private String thirdStyleName; public Multiples() { this.firstStyleName = "red"; this.secondStyleName = "green"; this.thirdStyleName = "blue"; } 12
  27. 27. Building on Properties XPage Source - Multiple Controls Sample 13 <xp:this.beforePageLoad>
 <![CDATA[#{javascript:viewScope.put('currentPage', 
 new com.demo.Multiples());}]]></xp:this.beforePageLoad> <xc:cc_Layout> <xp:this.facets> <xp:div xp:key="facet_1"> <xc:cc_SquaresAdvanced squaresList=“#{Squares.redList}" styleName="#{viewScope.currentPage.firstStyleName}"> </xc:cc_SquaresAdvanced> <xc:cc_SquaresAdvanced squaresList=“#{Squares.greenList}" styleName="#{viewScope.currentPage['secondStyleName']}"> </xc:cc_SquaresAdvanced> <xc:cc_SquaresAdvanced squaresList="#{Squares.blueList}" styleName="#{javascript:viewScope.currentPage().getThirdStyleName() }"> </xc:cc_SquaresAdvanced>
  28. 28. Building on Properties XPage - Multiple Properties 14
  29. 29. Building on Properties XPage Source - Menu Highlight Sample 15 <xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xc="http://www.ibm.com/xsp/custom"> <xp:this.properties> <xp:parameter value="Multiple" name=“menuKey”> </xp:parameter>
 </xp:this.properties>
  30. 30. Building on Properties Custom Control Source - Menu Sample 16 <li> <xp:link text="Multiple" id="link5" disableTheme=“true”> <xp:this.styleClass> <![CDATA[#{javascript: if ('Multiple'.equals(facesContext.getProperty('menuKey'))) { return 'menuButton menuActive'; } else { return 'menuButton'; } }]]></xp:this.styleClass> <xp:this.value><![CDATA[#{javascript:if (!'Multiple'.equals(facesContext.getProperty('menuKey'))) { return '/multiplesquares.xsp'; }}]]></xp:this.value> </xp:link> </li>
  31. 31. Building on Properties XPage - Breadcrumb Navigation (1) 17
  32. 32. Building on Properties XPage - Breadcrumb Navigation (2) 18
  33. 33. Building on Properties XPage - Breadcrumb Navigation (3) 19
  34. 34. Building on Properties XPage Source - Breadcrumb Properties 20 <xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xc="http:// www.ibm.com/xsp/custom" pageTitle="#{javascript:facesContext.getProperty('pageKey')}"> <xp:this.properties> <xp:parameter value="" name="menuKey"></xp:parameter> <xp:parameter value="#{param.name}" name="pageKey"></xp:parameter> <xp:parameter value="#{param.category}" name="categoryKey">
 </xp:parameter> </xp:this.properties>
  35. 35. Building on Properties XPage Source - Breadcrumb (1) 21 <xp:panel tagName="ul" styleClass="nav navbar-nav”> <xp:panel tagName=“li"> <xp:this.styleClass><![CDATA[#{javascript: if 
 ( ('Home').equals(facesContext.getProperty('pageKey')) ) { return 'navHome'; }}]]></xp:this.styleClass> <xp:link escape="true" text="#{config.appTitle}" id="linkHome"> <xp:this.value><![CDATA[#{javascript: if 
 (! ('Home').equals(facesContext.getProperty('pageKey')) ) { return facesContext.getExternalContext().getRequestContextPath(); }}]]></xp:this.value> </xp:link> </xp:panel> <xp:panel tagName=“li" rendered="#{javascript:facesContext.getProperty('categoryKey')}"> <a class=“separator”>&gt;</a> </xp:panel>
  36. 36. Building on Properties XPage Source - Breadcrumb (2) 22 <xp:panel tagName="li" rendered="#{javascript:facesContext.getProperty('categoryKey')}"> <xp:link escape="true"
 text="#{javascript:facesContext.getProperty('categoryKey')}" 
 id=“linkCategory" value="#{javascript:return 
 config.getPageLinks().get(facesContext.getProperty('categoryKey'));}">
 </xp:link> </xp:panel> <xp:panel tagName=“li" rendered="#{javascript:
 !('Home').equals(facesContext.getProperty('pageKey'))}"> <a class="separator">&gt;</a> </xp:panel> <xp:panel tagName="li" styleClass=“navActive" rendered="#{javascript:
 !('Home').equals(facesContext.getProperty('pageKey'))}"> <xp:text escape="true" value="#{javascript:facesContext.getProperty('pageKey')}" tagName="a"> </xp:text> </xp:panel> </xp:panel>
  37. 37. Building on Properties Thank you! 23
  38. 38. NotesIn9.comNotesIn9.com TLCC / Teamstudio Webinar • NotesIn9.com  XPages.TV - episode List  XPagesCheatSheet.com - cheatsheets • XPages.Slack.com  http://xpages-slack-invites.herokuapp.com/ • Jesse Gallagher  Page Controllers - MVC style programming NotesIn9 182, 166-168 • Time to First Byte  StandBy Dialog Custom Control http://openntf.org/XSnippets.nsf/snippet.xsp?id=standby-dialog-custom-control  http://xpagesera.blogspot.com/2012/05/add-ajax-loading-control-in-xpages-for.html 1
  39. 39. Give It a REST Nathan T. Freeman Co-founder, Red Pill Now
  40. 40. Quick fundamentals  REpresentational State Transfer  TypicallyJSON-based  Stateless
  41. 41. Why REST?  Fast  Flexible  Scalable  Uniform
  42. 42. Why DDS?  Apache Wink standard  Already understands Domino context
  43. 43. Some examples from DDS  GET http://{server}/api/data [ { "@title":"Administration Requests", "@filepath":"admin4.nsf", "@replicaid":"8525786A034D582B", "@template":"StdR4AdminRequests", "@href":"http://server/admin4.nsf/api/data/collections" }, { "@title":"Java AgentRunner", "@filepath":"AgentRunner.nsf", "@replicaid":"8525671400725208", "@template":"", "@href":"http://server/AgentRunner.nsf/api/data/collections" }, { "@title":"Article", "@filepath":"Article.nsf", "@replicaid":"8525784E00618FED", "@template":"", "@href":"http://server/Article.nsf/api/data/collections" } ]
  44. 44. Some examples from DDS  GET http://{server}/{database}/api/data/documents/unid/{docunid}?{parameters} { "@href":"http://server/XPagesExt.nsf/api/data/documents/unid/5D006566E919779E852578B7004A6019", "@unid":"5D006566E919779E852578B7004A6019", "@noteid":"906", "@created":"2011-06-22T13:32:22Z", "@modified":"2011-08-21T14:39:31Z", "@authors": ["CN=Robert Perron/OU=Westford/O=IBM","CN=rperronadmin/O=rtest","CN=rperronadmin/O=rtest"], "@form":"Contact", "$UpdatedBy":"CN=Robert Perron/OU=Westford/O=IBM;CN=rperronadmin/O=rtest;Anonymous;CN=rperronadmin/O=rtest", "$Revisions":"06/22/2011 09:32:22 AM;06/22/2011 09:33:17 AM;08/15/2011 12:16:31 PM", "FirstName":"Barney", "LastName":"Bloomberg", "Number":1.75, "Date": ["2011-07-21T20:21:00Z","2011-08-01T14:38:00Z"], "Body": { "contentType":"text/html", "data":"Just <b>sales</b>.", "type":"richtext" } }
  45. 45. Some examples from DDS  PUT http://{server}/{database}/api/data/documents/unid/{docunid}?{parameters} Content-Type: application/json Accept: application/json X-HTTP-Method-Override: PATCH {"FirstName":"Barney", "LastName":"Bloomberg", "EMail":"bbbb@acme.com", "Number":1.75, "Date":["2011-08-21T20:21:00Z", "2011-08-01T14:38:00Z"], "Body":{"contentType":"text/html", "data":"Just <b>sales</b>.", "type":"richtext"}, "City":"new york city"}
  46. 46. DDS Shortcomings  Always delivers ALL document contents  No authenticationfacility  Raw data format  No validation
  47. 47. Extending DDS: The Ingredients  com.ibm.domino.das.service.RestService  REST Resources  javax.ws.rs.*  com.ibm.commons.util.io.json.JsonObject  com.ibm.domino.osgi.core.context.ContextInfo  com.ibm.commons.util.io.json.util.JsonWriter
  48. 48. Extending DDS: RestService  .getClasses()  .getSingletons()  Example: IBM Calendar Service  plugin.xml  Example: IBM Calendar
  49. 49. Extending DDS: REST Resources  javax.ws.rs Annotation-based  @Path defines URL routing for resource class  @GET, @POST, @PUT, @DELETE defines handlers for methods  @Context, @HeaderParam, @PathParam, @QueryParam define attributes for method arguments  Example: GET Calendar Notice Resource  Example: POST Calendar Notice Action Resource @Path("calendar/notices/" + PATH_PARAM_NOTICE + "/action") public class NoticeActionResource { @PUT public Response putNoticeAction(String requestEntity, @HeaderParam("Content-Type") String contentType, @Context UriInfo uriInfo, @PathParam(NOTICE) String id, @QueryParam(URL_PARAM_ACTION_TYPE) String type)
  50. 50. Extending DDS: JSON Adapters  Implement JsonObject  .getJsonProperties()  .getJsonProperty(String)  .putJsonProperty(String)  Example: IBM JSON Alarm Adapter
  51. 51. Extending DDS: ContextInfo  Static context utilities  .getUserSession()  .getUserDatabase();
  52. 52. Extending DDS: Json Writer  Controls JSON output from Java objects  .outObject(Object)  Example: OpenNTF JSON Graph Writer
  53. 53. Thanks for coming!  More details on DDS can be found at http://infolib.lotus.com/resources/domino/8.5.3/doc/designer_up1/en_us/D ominoDataService.html
  54. 54. Questions???? 6 Use the Orange Arrow button to expand the GoToWebinar panel Then ask your questions in the Questions panel! Remember, we will answer your questions verbally
  55. 55. #XPages @DavidLeedy @mmcgarel @Gidgerby @NTF @TLCCLtd @Teamstudio @PaulDN Upcoming Events:  Atlanta User Group – November 19th  Granite LUG Meeting, Chicago – Dec 2nd  Connect, Orlando – Jan. 31 to Feb. 3  IBM InterConnect, Las Vegas, NV - Feb 21 to 25th  Engage, Eindhoven, the Netherlands – Mar. 23 to 24  EntwicklerCamp, Gelsenkirchen, Germany – April 11 to 13 Question and Answer Time! 7 Teamstudio Questions? contactus@teamstudio.com 978-712-0924 TLCC Questions? howardg@tlcc.com paul@tlcc.com 888-241-8522 or 561-953-0095 Howard Greenberg Courtney Carter Mike McGarel Jesse GallagherDavid Leedy Nathan Freeman Paul Della-Nebbia

×