Domino Xpages Workshop: Ibm Software Group
Domino Xpages Workshop: Ibm Software Group
Domino Xpages Workshop: Ibm Software Group
Agenda
Workshop Introduction
What is XPages ?
Domino Discussion template (demo)
Working with XPages in IBM Lotus Domino Designer 8.5
Introduction with Designer 8.5 interface and XPage element
Exercise 1 & 2
The profile application
Other Exercises (3 => 26)
Jacobs Engineering - Real Customer Scenario
Development Model
Deployment/Co-existence Environment
Reuse of existing business logic
XPages Futures...
XPages on the client..
Write once, run on Web and Client
Composite Application integration
*
XPages Workshop – Paris, 5&6 May 2009
IBM Software Group
Materials
Folders :
Starting database = profile00.nsf
*
XPages Workshop – Paris, 5&6 May 2009
IBM Software Group
*
XPages Workshop – Paris, 5&6 May 2009
IBM Software Group
*
XPages Workshop – Paris, 5&6 May 2009
IBM Software Group
Introduction Exercises
*
XPages Workshop – Paris, 5&6 May 2009
IBM Software Group
*
XPages Workshop – Paris, 5&6 May 2009
IBM Software Group
Compilation errors
*
XPages Workshop – Paris, 5&6 May 2009
IBM Software Group
Previewing xpage :
Domino Server
• Security : XPages = agents
*
XPages Workshop – Paris, 5&6 May 2009
IBM Software Group
Create an application
Create a custom control
Create a xpage and include the custom control
*
XPages Workshop – Paris, 5&6 May 2009 1
IBM Software Group
Exercise 2
Tip :
getComponent
•
Global function to access the objects backing up
UI controls
• Methods setValue() & getValue()
New property definition iknowyou
• To hide the editbox
• compositeData object to access
custom properties
− compositeData.iknowyou
*
XPages Workshop – Paris, 5&6 May 2009 1
IBM Software Group
*
XPages Workshop – Paris, 5&6 May 2009 1
IBM Software Group
What is it?
An XPages application that manages user profiles information.
Main features:
Entry page allows a search to be submitted to retrieve profiles
information based on that search:
• A simple “by name” search
Results page lists the retrieved results in a tabular format:
• Drill-down on a selected result will navigate into that profile
Profile information page displays read-only information about the
selected profile
Edit profile page allows a user to edit their own profile
Create profile page allows a new user to fill out their profile
*
XPages Workshop – Paris, 5&6 May 2009 1
IBM Software Group
*
XPages Workshop – Paris, 5&6 May 2009 1
IBM Software Group
*
XPages Workshop – Paris, 5&6 May 2009 1
IBM Software Group
*
XPages Workshop – Paris, 5&6 May 2009 1
IBM Software Group
*
XPages Workshop – Paris, 5&6 May 2009 1
IBM Software Group
Exercise 3
Tips
Use outline to retriew or reorganize elements (nested panels)
*
XPages Workshop – Paris, 5&6 May 2009 1
IBM Software Group
Editable areas are regions that users can modify when the custom
control is placed on an XPage. All other regions that fall outside
of editable areas are read-only and cannot be modified.
*
XPages Workshop – Paris, 5&6 May 2009 1
IBM Software Group
Exercise 4
Tips :
Clic under the tab to see and update tab properties (or outline)
Or right-click on the tab and select « Select Active Tab Contents »
*
XPages Workshop – Paris, 5&6 May 2009 2
IBM Software Group
*
XPages Workshop – Paris, 5&6 May 2009 2
IBM Software Group
Data binding
Simple data : a field
JavaScript : a document, a collection …
Advanced : a variable …
Tip
Watch the data source name
*
XPages Workshop – Paris, 5&6 May 2009 2
IBM Software Group
Exercise 5
Tips
Property «
computeWithForm » to
included computed fields in
the document (ex.21)
Use outline to reorder fields
in table
*
XPages Workshop – Paris, 5&6 May 2009 2
IBM Software Group
Simple actions
Basic actions
Confirm action, execute script, open page, save data sources
Document actions
Change doc mode, create response document, delete (selected)
document, modify field, save doc
*
XPages Workshop – Paris, 5&6 May 2009 2
IBM Software Group
Exercise 6
Tips :
Use the script editor to
choose properties or
methods
• document1 is the
datasource of the form
*
XPages Workshop – Paris, 5&6 May 2009 2
IBM Software Group
Changes :
Case sensitive
Separator , instead of ;
Lists :
Fixed values (or import a list)
Formula (@DbLookup & @DbColumn)
Also used in type ahead (suggestions)
*
XPages Workshop – Paris, 5&6 May 2009 2
IBM Software Group
Exercise 7
Tips :
Use the script editor to choose functions
*
XPages Workshop – Paris, 5&6 May 2009 2
IBM Software Group
View control
Tips
Watch the data source name
“var” properties defines the
request-scope attribute to access
to a row data
*
XPages Workshop – Paris, 5&6 May 2009 2
IBM Software Group
Exercise 8
*
XPages Workshop – Paris, 5&6 May 2009 2
IBM Software Group
Global objects
requestScope
applicationScope
sessionScope
*
XPages Workshop – Paris, 5&6 May 2009 3
IBM Software Group
Exercise 9
Tips
A sessionScope variable is
used to pass search criteria
from one form to another
Can also bind the search
editbox to the sessionScope
*
XPages Workshop – Paris, 5&6 May 2009 3
IBM Software Group
« Classics » events
onBlur, onChange, onClick …
Field Validators
Regular expression
Scripted expression
*
XPages Workshop – Paris, 5&6 May 2009 3
IBM Software Group
*
XPages Workshop – Paris, 5&6 May 2009 3
IBM Software Group
Exercise 10
*
XPages Workshop – Paris, 5&6 May 2009 3
IBM Software Group
Exercise 11
*
XPages Workshop – Paris, 5&6 May 2009 3
IBM Software Group
Exercise 12 (optional)
*
XPages Workshop – Paris, 5&6 May 2009 3
IBM Software Group
Exercise 13
*
XPages Workshop – Paris, 5&6 May 2009 3
IBM Software Group
Exercise 14
Tip
Don’t forget « No data validation » when clicking on tabs
compositeData object to access custom properties
*
XPages Workshop – Paris, 5&6 May 2009 3
IBM Software Group
Exercise 15
Tip
Java perspective can be used to import other elements
*
XPages Workshop – Paris, 5&6 May 2009 3
IBM Software Group
Exercise 16
*
XPages Workshop – Paris, 5&6 May 2009 4
IBM Software Group
*
XPages Workshop – Paris, 5&6 May 2009 4
IBM Software Group
« Classics controls »
To repeat, just place them into the Repeat control
To link to a field, use NotesDocument methods
• friend.getItemValueString("Name")
*
XPages Workshop – Paris, 5&6 May 2009 4
IBM Software Group
Exercise 17
Add a friend part in the profilForm custom
control
To list connected friends or to add a new one
Profiles and friends will be linked by the
NoteID=friendID
*
XPages Workshop – Paris, 5&6 May 2009 4
IBM Software Group
Theme
*
XPages Workshop – Paris, 5&6 May 2009 4
IBM Software Group
Exercise 18
Themes
Explore themes in the discussion database
Create your own theme in profile application
*
XPages Workshop – Paris, 5&6 May 2009 4
IBM Software Group
Exercise 19
Tips
Instruction “#{javascript: xxxxxx}”; is evaluated on server side
• @DbName() only works on server side
*
XPages Workshop – Paris, 5&6 May 2009 4
IBM Software Group
Calling an agent
*
XPages Workshop – Paris, 5&6 May 2009 4
IBM Software Group
Exercise 20
Tips :
Watch the data source name
*
XPages Workshop – Paris, 5&6 May 2009 4
IBM Software Group
Tips :
computeWithForm property
*
XPages Workshop – Paris, 5&6 May 2009 4
IBM Software Group
Exercise 22
*
XPages Workshop – Paris, 5&6 May 2009 5
IBM Software Group
Exercise 24
*
XPages Workshop – Paris, 5&6 May 2009 5
IBM Software Group
Localization (1)
*
XPages Workshop – Paris, 5&6 May 2009 5
IBM Software Group
Localization (2)
*
XPages Workshop – Paris, 5&6 May 2009 5
IBM Software Group
Exercise 25
Localization
*
XPages Workshop – Paris, 5&6 May 2009 5
IBM Software Group
Exercise 26
Create an xPage
Add an editbox control to fill the name
Add a button calling the java class and setting a requestScope
variable
Ad a computed field displaying the requestScope variable
*
XPages Workshop – Paris, 5&6 May 2009 5
IBM Software Group
FAQs
*
XPages Workshop – Paris, 5&6 May 2009 5