A Deep Dive On Building Notes/Domino Applications With XPages
A Deep Dive On Building Notes/Domino Applications With XPages
A Deep Dive On Building Notes/Domino Applications With XPages
● DOJO
● Managed Beans
● Q&A
Speaker Introductions
Martin Donnelly Software Architect: IBM Ireland
▬ IBM Lotus® Domino® Designer 8.5.x / IBM Lotus® Domino® XPages
▬ IBM Lotus® Component Designer 6.0
▬ JavaServer™ Faces (JSF) Tooling IBM® Rational® Application Developer
▬ Java Visual Editor extensions for IBM® Rational® Application Developer
- Performance/Stability Improvements
- New editors
Later... Notes/Domino next
- New Extensibility APIs • - XPages next generation
- NO CHARGE Designer Download !!! • - Consumes/generates REST services
• - Generates Dojo based UI
- Rebased to Eclipse platform
- New XPage & Custom Control 2010 Notes/Domino 8.5.x • - Advanced set of Web controls
• - Full client integration
design elements • - Mobile devices support
- Fully integrated XPages • - Integration with other Lotus products
development environment
• - Quickr, Connections, Sametime
• - Stability/performance
2009 Notes/Domino 8.5.1 improvements
• - More data sources (RDBMS...)
• - iWidget consumption
• - Runs within the Notes client • - Better client integration
Notes/Domino 8.5 • - Generates iWidget • - Fixing pending issues/requests
• - First release of XPages • - Active Content Filtering • - Extensibility
• - Runs on the Domino server • - Performance/scalability
improvements XPages Runtime
The information on the new product is intended to outline our general product direction and it should not be relied on in making a purchasing decision. The information on the new product is for informational purposes on
and may not be incorporated into any contract. The information on the new product is not a commitment, promise, or legal obligation to deliver any material, code or functionality. The development, release, and timing o
any features or functionality described for our products remains at our sole discretion
XPages Birthday
developerWorks/Lotus wikis
www.ibm.com/developerworks/lotus/commu
nity/wikis.html
Select the Lotus Notes and Domino Application Designer wiki
● Visual Design Page, Source Page, Control Palette, Outline View etc
XPages Architecture
NSF files
NSF replication
Eclipse
Workspace
Eclipse directly reads/writes to the NSF
thanks to a custom EFS
XPages Architecture - 8.5/8.5.1 NSF Applications
NSF Applications
XPages Extensions
OSGi bundles
XPages Extensions
provided as jar files
Profile XPages
+Web Container Runtime
XPages
Runtime
OSGi Runtime
18
XPages XML File format
● Each tag in the XML file represents a control or a complex property (an
object attached to a control)
▬ All the standard XPages controls are in a single, reserved, namespace
▬ Each tag in the XML file represents a control or a complex property
▬ There is one root tag, called <xp:view>
● Pass-through tags
▬ Tags without a namespace are passed “as is” to the browser, without any further processing
XPages Files
● XPages and Custom controls are defined as:
▬ An pure XML file defining the page content
▬ A xsp-config file is defining the content of a custom control
▬ Ex: list of controls properties, icon, palette category...
http://www.ibm.com/developerworks/java/library/j-jsf2/
Page Rendering
JSF Markup – XML + HTML JSF Hierarchy of Components
Rendering Phase
JSF Render-kit
HTML Markup
Can use Dojo
library/widgets Mobile devices
Notes Client
Browser
XPages
Deep Dive Demos
XPages Introductory Demo
Ideally view this demo first
https://www14.software.ibm.com/webapp/iwm/web/preLogin.do?
lang=en_US&source=dw-c-wcsdp&S_PKG=051410A
Data Sources
What Are Data Sources?
● Data sources are XPages artifact for connecting the UI controls to the data
▬ Data is well separated from the UI
▬ An XPage is not linked to a single document or a view – Can connect to multiple data sources at the
same time!
● Simple Tag
▬ <xp:dominoView var="dominoView” viewName="xpAllDocuments">
Views Are Also About Folders
● UI support in Lotus Domino Designer 8.5.x is for Notes view data sources
only
▬ But... The XPages runtime system supports both Views and Folders
▬ And... It's on the list of things to be added for 8.5.x
▬ View name is editable, type in folder name into “View” editbox.
▬ Type name of column into “View Column” field (or, compute it!) editable
Summary On View Data Sources
● How do I work with data in Domino Folders?
▬ You can use a folder name anywhere you use viewName
<xp:dominoView var="dominoFolder" viewName="My Folder">
● Construct a URL using the prefix to uniquely identify the data source
▬ http://localhost/d080905a.nsf/p02.xsp?custdocumentId=662F287DE0738485802574B
E002E8A8A &custaction=openDocument
● The data table repeats through the collection and create one body row per
occurrence
● The body row contains controls that will be repeated
▬ Those controls can be editable, when the data source supports it
▬ Limitations: domino views are not editable
Data Table vs View Panel
● The view panel has extended, simplified data binding
▬ It displays data in read only mode
▬ The column data binding doesn't require controls to be added to the body
▬ A column name is generally used for easy data binding
▬ A 'value' property can also be used to compute the column value
▬ Controls added to the body are supported if needed
● The repeat control, as well as the data table, have convenience methods
to set the current position (8.5.2)
▬ gotoFirstPage(), gotoNextPage()...
"The information on the new product is intended to outline our general product direction and it should not be relied on in making a purchasing decision. The information on the new product is for informational purposes
only and may not be incorporated into any contract. The information on the new product is not a commitment, promise, or legal obligation to deliver any material, code or functionality. The development, release,
and timing of any features or functionality described for our products remains at our sole discretion"
Creating a Custom Pager
● How the pager works?
▬ It connects to FacesDataIterator components, like a dynamic repeat control, a data table or a view
panel
▬ The items being displayed by the FacesDataIterator are defined by 2 property
▬ first: the index of the first item being displayed (0 to count-1)
▬ rows: the number of rows being displayed
▬ When displaying itself, the pager grabs the value of those properties and displays the pages and the
action links
▬ When clicking on the pager links, the pager adjusts the first property of the FacesDataIterator
▬ getComponent()
▬ Returns the JSF component
based on its id.
▬ See control snippets
for available methods
▬ Save()
▬ Saves all the data sources in the page
JavaScript Libraries
● JavaScript code can be located in different places
▬ In the XPages themselves
▬ No need for agents!
▬ In libraries of reusable code (.jss)
● EL syntax
▬ Used to access object properties
▬ myobject, myobject.property, myobject[“property”]
▬ http://developers.sun.com/docs/jscreator/help/jsp-jsfel/jsf_expression_language_intro.html#syntax
Advanced Uses of Expressions
● Sometimes, when computing a string property, it can be useful to compute
different parts of the value separately
▬ The XPages expression engine supports an expression that is a mix of expressions and static strings
▬ Ex: computing the style property
style=”background: #{o.bg}; font-family: #{o.font}”
● Dojo Modules
▬ Dojo modules can be defined in a page or in a custom control. Gerenates a dojo.require()
statement in the HTML
● Warnings
▬ The ':' character used to compose the final client id, is not CSS friendly – This is a JSF design flaw
▬ Client ids are not easily predictable To make them predictable, be sure that their ids are designed in
Designer, else the runtime will generate random _idxxx ids. As a good practice, do not rely on client
ids in your code. Use dedicated functions instead.
Calculating a Control Client Id
● Computing a client id for a control can be done by:
▬ Calling the getClientId() global function in server side JavaScript
Notes Client:
Client Themes
Ability to customize application user experience for the Notes Client
XPages Toolbar
Navigation, Clear Cache / Refresh Page, View Source, Print / Page Setup
enableModifiedFlag
Prompt to save any modified content
Bookmarking XPages
Failover Support
Customization of XPages in Notes
SWT Dialogs instead of JavaScript™ Alert / Confirm Dialogs
Applying enableModifiedFlag
Can be applied to any input control
disableModifiedFlag flag allows an input control to explicitly “opt out” of the process
Component
A new 8.5.1 Component design element
Define Publish & Receive Events for interaction with other components
Define Parameters to conditionalize component behavior
Managed Browser
Symphony Containers
Widgets...
Google
Widget
Notes Mail
View
XPages & Composite Applications
Two Part Online Video Shows Full Details
www-10.lotus.com/ldd/ddwiki.nsf/dx/XPage_Components_in_Notes_851_Videos.htm
www-
10.lotus.com/ldd/ddwiki.nsf/dx/XPages_Components_in_the_Notes_8.5.1_Client_De
monstration_Video
A Glimpse of the Future
Designer & XPages are central to the Notes/Domino App Dev Vision
We continue to invest on these technologies
The information on the new product is intended to outline our general product direction and it should not be relied on in making a purchasing decision. The information on the new product is for informational purposes on
and may not be incorporated into any contract. The information on the new product is not a commitment, promise, or legal obligation to deliver any material, code or functionality. The development, release, and timing o
any features or functionality described for our products remains at our sole discretion
XPages Extensibility APIs
Let people create deployable XPages libraries
Deployed as Eclipse plug-ins in the Notes client and the Domino server
Shared by all the applications!
The information on the new product is intended to outline our general product direction and it should not be relied on in making a purchasing decision. The information on the new product
is for informational purposes only and may not be incorporated into any contract. The information on the new product is not a commitment, promise, or legal obligation to deliver any
material, code or functionality. The development, release, and timing of any features or functionality described for our products remains at our sole discretion
XPages Runtime in Notes/Domino (cont.)
CKEditor for rich text editing
Replaces DOJO rich text editor as default RTE
Domino Server + Notes Client (Windows, MacOS and Linux)
DOJO editor still available – set dojoType=ibm.xsp.widget.layout.RichText
Added Features
Embedded Images, Tables, Links, Emoticons, Find/Replace, Maximize
Customizable Toolbar
Slim, Medium, Large
The information on the new product is intended to outline our general product direction and it should not be relied on in making a purchasing decision. The information on the new product
is for informational purposes only and may not be incorporated into any contract. The information on the new product is not a commitment, promise, or legal obligation to deliver any
material, code or functionality. The development, release, and timing of any features or functionality described for our products remains at our sole discretion
XPages Runtime in Notes/Domino (cont.)
New back-end classes capability
Running agents on top of in-memory documents
Support for multiple levels of categorization
cat1\cat2 ... finally !
View Data Source startKeys property
Not a filter, an actual starting point for the view contents
Data collection Pager can force “last” option to be presented
Has performance implications to consider
Document Data Source
Supports “soft delete” through a new property
Data Validation
Documents can be saved without validation
New property disableValidators="true"
Use case = Save As Draft
The information on the new product is intended to outline our general product direction and it should not be relied on in making a purchasing decision. The information on the new product
is for informational purposes only and may not be incorporated into any contract. The information on the new product is not a commitment, promise, or legal obligation to deliver any
material, code or functionality. The development, release, and timing of any features or functionality described for our products remains at our sole discretion
XPiNC – What YOU said YOU want!
● We have started to address some of these points in 8.5.x
"The information on the new product is intended to outline our general product direction and it should not be relied on in making a purchasing decision. The information on the new product is for informational purposes
only and may not be incorporated into any contract. The information on the new product is not a commitment, promise, or legal obligation to deliver any material, code or functionality. The development, release,
and timing of any features or functionality described for our products remains at our sole discretion"
XPiNC – Client Consistent Behaviors
Enabling appropriate Menu items
File \ Replicate, Open in Designer etc
8.5.1 8.5.x
"The information on the new product is intended to outline our general product direction and it should not be relied on in making a purchasing decision. The information on the new product is for informational purposes
only and may not be incorporated into any contract. The information on the new product is not a commitment, promise, or legal obligation to deliver any material, code or functionality. The development, release,
and timing of any features or functionality described for our products remains at our sole discretion"
Link Handling & Document Interoperability
XPages & CD|MIME Interoperability
XPages arrival in the Note Client 8.5.1 resurfaced old CD|MIME issues
XPages apps use MIME rich text format everywhere (web & client)
Lossy editing experience when moving client apps to XPages
Round tripping Doc, View & DB links between MIME and native CD
Image resources also adversely affected
XPages 8.5.1 runtime did some work to minimize CD/MIME conflicts
In memory massaging of HAPI Domino server dependent links
e.g. Transient conversion to “notes://” when running on client
Not all use cases addressed
Link Handling & Document Interoperability
8.5.2 Enhancements for CD/MIME
Worked with HAPI team to define new API options
Generate links that are easier to identify, parse and convert
Include replica ids instead of literal NSF names
Take advantage of NSF layer functionality to resolve link
Added new property allowing app developer to define how links are saved
Notes format is the default
Images no longer embedded in link, e.g.
Similar to iNotes behaviour
Simplifies portability
No broken links on client
Window Management Client Behaviors
Window Management
Lift single-window restriction on XPages client applications
e.g. Allow documents to be opened in new window like traditional Notes client apps
Dictate behavior by preference settings
Leverage existing client preferences
Enable this option for
Links
Page navigations
View column selections
"The information on the new product is intended to outline our general product direction and it should not be relied on in making a purchasing decision. The information on the new product is for informational purposes
only and may not be incorporated into any contract. The information on the new product is not a commitment, promise, or legal obligation to deliver any material, code or functionality. The development, release,
and timing of any features or functionality described for our products remains at our sole discretion"
XPages Next Generation
XPages stateless mode
Generates HTML without the server side life cycle
Rich HTML interfaces – Dojo dijits
Still leverages XPages strengths
Component/renderkit model, Page composition, Localization, i18n, Security,
Dynamic page generation, Simple actions, Script languages for business
logic…
Take Action
Visit IBM Rational
http://www.ibm.com/rational
The information contained in this publication is provided for informational purposes only. While efforts were made to verify the completeness and accuracy of the information contained in this publication, it is provided AS
IS without warranty of any kind, express or implied. In addition, this information is based on IBM’s current product plans and strategy, which are subject to change by IBM without notice. IBM shall not be responsible for
any damages arising out of the use of, or otherwise related to, this publication or any other materials. Nothing contained in this publication is intended to, nor shall have the effect of, creating any warranties or
representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software.
References in this presentation to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or capabilities referenced in this
presentation may change at any time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way. Nothing
contained in these materials is intended to, nor shall have the effect of, stating or implying that any activities undertaken by you will result in any specific sales, revenue growth or other results.
If the text contains performance statistics or references to benchmarks, insert the following language; otherwise delete:
Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual throughput or performance that any user will experience will vary depending upon many
factors, including considerations such as the amount of multiprogramming in the user's job stream, the I/O configuration, the storage configuration, and the workload processed. Therefore, no assurance can be given
that an individual user will achieve results similar to those stated here.
If the text includes any customer examples, please confirm we have prior written approval from such customer and insert the following language; otherwise delete:
All customer examples described are presented as illustrations of how those customers have used IBM products and the results they may have achieved. Actual environmental costs and performance characteristics
may vary by customer.
Please review text for proper trademark attribution of IBM products. At first use, each product name must be the full name and include appropriate trademark symbols (e.g., IBM Lotus® Sametime® Unyte™).
Subsequent references can drop “IBM” but should include the proper branding (e.g., Lotus Sametime Gateway, or WebSphere Application Server). Please refer to http://www.ibm.com/legal/copytrade.shtml for guidance
on which trademarks require the ® or ™ symbol. Do not use abbreviations for IBM product names in your presentation. All product names must be used as adjectives rather than nouns. Please list all of the trademarks
that you use in your presentation as follows; delete any not included in your presentation.
IBM, the IBM logo, Lotus, Lotus Notes, Notes, Domino, Quickr, Sametime, WebSphere, UC2, PartnerWorld and Lotusphere are trademarks of International Business Machines Corporation in the United States, other
countries, or both. Unyte is a trademark of WebDialogs, Inc., in the United States, other countries, or both.
If you reference Adobe® in the text, please mark the first use and include the following; otherwise delete:
Adobe, the Adobe logo, PostScript, and the PostScript logo are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States, and/or other countries.
If you reference Java™ in the text, please mark the first use and include the following; otherwise delete:
Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.
If you reference Microsoft® and/or Windows® in the text, please mark the first use and include the following, as applicable; otherwise delete:
Microsoft and Windows are trademarks of Microsoft Corporation in the United States, other countries, or both.
If you reference Intel® and/or any of the following Intel products in the text, please mark the first use and include those that you use as follows; otherwise delete:
Intel, Intel Centrino, Celeron, Intel Xeon, Intel SpeedStep, Itanium, and Pentium are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries.
If you reference UNIX® in the text, please mark the first use and include the following; otherwise delete:
UNIX is a registered trademark of The Open Group in the United States and other countries.
If you reference Linux® in your presentation, please mark the first use and include the following; otherwise delete:
Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both.