- 1. The Ties That Bind: Examples of XPages Data Binding
2. Michael McGarel
- Blog:http://www.bleedyellow.com/blogs/McGarelGramming/
- LinkedIn:http://www.linkedin.com/in/mikemcgarel
- Twitter:http://www.twitter.com/mmcgarel
- Mike is a full-time developer for Czarnowski, a North American
exhibit services company. A specialist in Web-based collaboration
and workflow, he has been concentrating on XPages development for
all new projects. Mike is an active member of the IBM/Lotus
developer community and is currently the Vice President of GRANITE,
the Chicago-based IBM/Lotus user group, where he is a regular
presenter. He has beenplayingworking with Notes and Domino for over
twelve years, starting with version 4.6.
3. Roy Rumaner
- Blog:http://rrumaner.blogspot.com/
- Blog:http://rrumaner.wordpress.com/
- LinkedIn:http://www.linkedin.com/in/royrumaner
- Twitter:http://twitter.com/rrumaner
- With over twenty five years experience in software development,
Roy has spent the past 19 years working with Lotus Notes. He has
co-authored two books on Lotus Notes, taught beginning XPages
classes for the GRANITE User Group, writes about Notes and local
restaurants on his blogs, holds a CLP in Development and is an IBM
Business Partner. He is currently working for a national bank,
converting all their Notes applications into XPages.
4. Agenda
-
- Steps For Form Data Binding
5. Data Binding 6. What is Data Binding?
- In XPages, the user interface is completely separate from the
data
- You need a way to access the data.
- XPages aretiedto traditional Domino forms and views through
Data Binding.
- Data Binding is the use of Server-side JavaScript (SSJS) or
Expression Language (EL) to connect the backend Notes data to the
XPage.
7. What Can Be Bound
- NotesViewEntryCollections
8. Examples of Data Binding 9. Current Client Application 10.
Steps for Form Data Binding First we need to create a blank Custom
Control 11. Steps for Form Data Binding Step 1: Select the Data
Properties Step 2: Select Add. In this case we are going to create
a new form sochoose Domino Document 12. Steps for Form Data Binding
Step 3: After selecting Domino Document, the right side of the
properties opens up. The default name for your data source is
document1. 13. Steps for Form Data Binding Step 4: Change the
default name to something meaningful. We chose dataDoc for this
one. 14. Steps for Form Data Binding Step 5: Next you need to bind
the Custom Control to (in this case) a form. Every form in the
database is available from this menu. 15. Steps for Form Data
Binding Step 6: We chose the Library Reference form. 16. Steps for
Form Data Binding Step 7: Next select the default action when this
form is accessed. 17. Steps for Form Data Binding Step 8: We chose
Open Document for this form 18. Steps for Form Data Binding Step 9:
Now that you have identified the proper form, a list of all
available fields will appear in the Data Controls box (upper right)
Step 10: We want all the fields exceptCheckedOut. Highlight them
and drag the list to the design window. 19. Steps for Form Data
Binding 20. Steps for Form Data Binding Step 11: All the fields you
selected are now available for initial set up. 21. Steps for Form
Data Binding Step 12: Change the Date field to a DateTime Picker.
Material and Categories to List Boxes and Location to a Combo Box.
22. New Xpage(based on previous data binding) 23. Setting the Date
Field Step 13: Even though the Date Published field was created as
a DateTime, you still need to set it to display properly. 24. Steps
for Form Data Binding Step 14: Now the Date Published field shows
as a date field. 25. Steps for Form Data Binding 26. Steps for Form
Data Binding 27. View Data Binding 28. View Data Binding 29. View
Data Binding 30. Data Binding In a Repeat
@DbColumn(@DbName(),'ByCategories',1) 31. Data Binding In a Repeat
32. Data Binding In a Repeat 33. SSJS Syntax
- # indicates dynamic Recalculates every time the section of the
page with the code reloads
"#{javascript:doc.getItemValueString('Status')}"
- $ static after page load Calculates only on page load
"${javascript:@Subset(@DbName(),1)}"
34. Resources
- Application Development Wiki
http://www-10.lotus.com/ldd/ddwiki.nsf
- Julian Buss' XPages Wiki htttp://xpageswiki.com
- XPages forum http://www-10.lotus.com/ldd/xpagesforum.nsf
- MWLUG 2011 Workshop (on presentations page)
http://www.mwlug.com/mwlug/mwlug2011.nsf/uxpages/presentations.uxp
35. Summary
- XPages allow you to reuse your current application data and
present a new UI.
- Remember that XPages separates data from the UI.
- Data binding allows for more flexibility in presenting
data.
- You can have multiple data sources on an Xpage.
- It is not difficult to establish simple data binding. The code
is written for you.
36. Thank You For Attending
- The authors would appreciate any feedback or comments you care
to give. Please contact either one at their respective email
addresses.