Domino Designer XPages Extension Library
First Edition
Published December 2011
© Copyright IBM Corporation 1993, 2011
First Edition
Published December 2011
© Copyright IBM Corporation 1993, 2011
In keeping with IBM's commitment to accessibility, this edition of the product documentation is accessible.
You can save a local copy of this document from your browser. Each browser has different menus and menu options. Consult the browser help if you need assistance saving the document locally.
If you would like to provide feedback about this document, see the Lotus Documentation Feedback Web site.
The XPages Extension Library provides additional controls ready to use. The controls include an application layout object, an improved dialog, pickers, in place forms, Dojo components, dynamic content, and much more. The controls support enhancements to the Domino® templates.
The XPages Extension Library is provided as an open source project at http://extlib.openntf.org/ and includes the source code.
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GS ADP Schedule Contract with IBM Corp.
This product is built on Eclipse (www.eclipse.org).
IBM, the IBM logo, and ibm.com® are trademarks or registered trademarks of International Business Machines Corporation in the United States, other countries, or both. If these and other IBM trademarked terms are marked on their first occurrence in this information with a trademark symbol (® or ™), these symbols indicate U.S. registered or common law trademarks owned by IBM at the time this information was published.
Such trademarks may also be registered or common law trademarks in other countries. A current list of IBM trademarks is available on the Web in Copyright and trademark information at www.ibm.com/legal/copytrade.shtml.
Intel and Pentium are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States, other countries, or both.
Adobe and PostScript are registered trademarks of Adobe Systems Incorporated in the United States, other countries, or both.
Google, Google Desktop and Google Gadget are trademarks of Google Inc. in the United States, other countries, or both.
Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both.
Java and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or its affiliates.
Microsoft, Windows, and the Windows logo are trademarks of Microsoft Corporation in the United States, other countries, or both.
UNIX is a registered trademark of The Open Group in the United States and other countries.
Other company, product, or service names may be trademarks or service marks of others.
Yahoo! is a trademark of Yahoo! Inc.
Install the extension library on Domino Designer to provide the necessary plug-ins at design time, and on Domino server and Notes® client to use the plug-ins at runtime.
Alternatively you can get the plug-ins from http://extlib.openntf.org and manually install them, for example, to obtain experimental features beyond UP1. However, an http://extlib.openntf.org install is not supported. Applying the upgrade pack to 8.5.3 is the recommended process unless experimental features are desired.
Do not install both the upgrade pack and the plug-ins from OpenNTF. If you later want to install an experimental update from OpenNTF over an upgrade pack, uninstall the upgrade pack first.
You must install the plug-ins from http://extlib.openntf.org if you are running Lotus Domino 8.5.2.
You must go to http://extlib.openntf.org for the sample database XPagesExt.nsf. Download the kit and extract the sample database.
These instructions are for using the library as is. If your goal is to contribute to the library, you must install a development environment and connect to the Subversion repository. See the XPages Extension Library Documentation.pdf included in the http://extlib.openntf.org kit.
The upgrade pack for Domino and Notes is available from Passport Advantage®.
The upgrade pack adjusts existing installs of Domino Designer and Notes. The Domino Designer upgrade includes the Notes upgrade - do not install both on one machine.
The upgrade pack adjusts the existing install of a Domino server.
Here are recommendations for mass deployment with tools such as System Center Configuration Manager (SCCM) and Systems Management Server (SMS).
The binary files are available as an OpenNTF project.
The library is provided as an Eclipse update site which should be installed using the Eclipse update manager.
You must unpack the updateSiteOpenNTF.zip to any Domino server on which the extension library runs.
Install the demo application on a Domino Designer workstation or a Domino server.


Here are guidelines for running the mobile demo application in Domino 8.5.2. For Domino 8.5.3, use the Mobile Apps controls.
The best test is always an actual device. If you don't have this or if you need to debug your application, you can use different browser and simulators.
The mobile controls can be run in Firefox since there is a compatible module that simulates the missing webkit functionality. This allows using Firebug to debug network transactions, using the console, debugging client-side JavaScript, and so on.
Safari and Chrome can be used too and they come closer to the actual experience since both are webkit based.
Simulators often come closer to the actual experience and allow taking good screen shots and videos. The different SDKs all provide simulators. Another good simulator is Genuitec MobiOne that you can get here: http://www.genuitec.com/mobile/download.html.
Here are guidelines for using some of the controls in the XPages Extension Library.
The XPages Extension Library must be enabled in each application. You can do this automatically the first time you use a control from the library.
When you first use a control from the XPages Extension Library in an application, a dialog asks if you want to enable the library. Click Continue.
To manually enable or disable the library, open Application Properties for the application, select the Advanced tab, and select or deselect com.ibm.xsp.extlib.library under XPage Libraries.
The XPages Extension Library controls require an additional namespace which is automatically inserted in design mode. In source mode, insert the namespace manually.
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
</xp:view>
If you add a control from the XPages Extension Library in design mode, Domino Designer adds a namespace
for xe. <xp:view xmlns:xp="http://www.ibm.com/xsp/core"
xmlns:xe="http://www.ibm.com/xsp/coreex">
If you are working
in source mode, make this adjustment manually.Data Access controls expose data access services.
| Tag name | Common name | Description | Reference topic |
|---|---|---|---|
| jsonRpcService | Remote Services | Exposes a remote service. | jsonRpcService - Remote Services |
| restService | REST Service | Exposes a REST service. | restService - REST Service |
The Dojo Form controls mimic components from the Dojo toolkit.
| Tag name | Common name | Description | Reference topic |
|---|---|---|---|
| djButton | Dojo Button | Activates an event handler. | djButton - Dojo Button |
| djCheckBox | Dojo Check Box | Accepts a check box as true or false. | djCheckBox - Dojo Check Box |
| djComboBox | Dojo Combo Box | Accepts a selected value. | djComboBox - Dojo Combo Box |
| djCurrencyTextBox | Dojo Currency Text Box | Accepts currency input. | djCurrencyTextBox - Dojo Currency Text Box |
| djDateTextBox | Dojo Date Text Box | Accepts a date value. | djDateTextBox - Dojo Date Text Box |
| djextImageSelect | Image Select | Accepts a value based on a selected image. | djextImageSelect - Dojo Image Select |
| djextLinkSelect | Link Select | Accepts a value based on a selected link. | djextLinkSelect - Dojo Link Select |
| djextListTextBox | List Text Box | Accepts a list of values. | djextListTextBox - List Text Box |
| djextNameTextBox | Name Text Box | Accepts a list of names. | djextNameTextBox - Name Text Box |
| djFilteringSelect | Dojo Filtering Select | Accepts a selected and filtered value. | djFilteringSelect - Dojo Filtering Select |
| djHorizontalSlider | Dojo Horizontal Slider | Accepts a numeric value from a horizontal slider. | djHorizontalSlider - Dojo Horizontal Slider |
| djNumberSpinner | Dojo Number Spinner | Accepts a numeric value that is an increment of a starting value. | djNumberSpinner - Dojo Number Spinner |
| djNumberTextBox | Dojo Number Text Box | Accepts a numeric value. | djNumberTextBox - Dojo Number Text Box |
| djRadioButton | Dojo Radio Button | Accepts the value of a selected radio button. | djRadioButton - Dojo Radio Button |
| djSimpleTextarea | Dojo Simple Text Area | Accepts text input on multiple lines. | djSimpleTextarea - Dojo Simple Text Area |
| djSliderRule | Dojo Slider Rule | Adds a rule (hash marks) for a horizontal or vertical slider. | djSliderRule - Dojo Slider Rule |
| djSliderRuleLabels | Dojo Slider Rule Labels | Adds labels to the rule for a horizontal or vertical slider. | djSliderRuleLabels - Dojo Slider Rule Labels |
| djTextarea | Dojo Text Area | Accepts text input on multiple lines. | djTextarea - Dojo Text Area |
| djTextBox | Dojo Text Box | Accepts text input on one line. | djTextBox - Dojo Text Box |
| djTimeTextBox | Dojo Time Text Box | Accepts a time value. | djTimeTextBox - Dojo Time Text Box |
| djToggleButton | Dojo Toggle Button | Toggles between a checked value and an unchecked value. | djToggleButton - Dojo Toggle Button |
| djValidationTextBox | Dojo Validation Text Box | Accepts a validated value. | djValidationTextBox - Dojo Validation Text Box |
| djVerticalSlider | Dojo Vertical Slider | Accepts a numeric value from a vertical slider. | djVerticalSlider - Dojo Vertical Slider |
The Dojo Grid controls present information in rows and columns.
| Tag name | Common name | Description | Reference topic |
|---|---|---|---|
| djxDataGrid | Dojo Data Grid | Defines a grid of rows and columns. | djxDataGrid - Dojo Data Grid |
| djxDataGridColumn | Dojo Data Grid Column | Defines the content of a column. Can be inserted into a grid or row. | djxDataGridColumn - Dojo Data Grid Column |
| djxDataGridRow | Dojo Data Grid Row | Defines multiple rows. | djxDataGridRow - Dojo Data Grid Row |
The Dojo Layout controls mimic components from the Dojo toolkit.
| Tag name | Common name | Description | Reference topic |
|---|---|---|---|
| djAccordionContainer | Accordion Container | Contains panes that expand to reveal their content. | djAccordionContainer - Accordion Container |
| djAccordionPane | Accordion Pane | Provides content for one pane in an accordion container. | djAccordionPane - Accordion Pane |
| djBorderContainer | Border Container | Contains panes situated at various regions within the container. | djBorderContainer - Border Container |
| djBorderPane | Border Pane | Provides content for one pane in a border container. | djBorderPane - Border Pane |
| djContentPane | Dojo Content Pane | Provides content for a container. | djContentPane - Dojo Content Pane |
| djStackContainer | Stack Container | Contains panes stacked on top of each other. | djStackContainer - Stack Container |
| djStackPane | Stack Pane | Provides content for one pane in a stack container. | djStackPane - Stack Pane |
| djTabContainer | Tab Container | Contains panes on tabs. | djTabContainer - Tab Container |
| djTabPane | Tab Pane | Provides content for one pane in a tab container. | djTabPane - Tab Pane |
Extension Library controls extend the capabilities of the core controls.
| Tag name | Common name | Description | Reference topic |
|---|---|---|---|
| accordion | Accordion | Accordion control allows you to provide multiple panes and display them one at a time. A single pane is usually formed of a Container Node with several Basic Nodes inside it. | To be supplied. |
| applicationLayout | Application Layout | A control that lays out an XPages application. A control that provides layout and positioning for areas in an XPages application. | To be supplied. |
| breadCrumbs | Bread Crumbs | Bread Crumbs control is used for indication of a current page location in regards to an application home page. | To be supplied. |
| dataView | Data View | Displays data as a view. | dataView - Data View |
| dialog | Dialog | Contains a modal dialog. | dialog - Dialog |
| dialogButtonBar | Dialog Button Bar | Contains buttons in a dialog. | dialogButtonBar - Dialog Button Bar |
| dropDownButton | DropDown Button | A drop down button control. | To be supplied. |
| dumpObject | Dump Object | This control dumps out information from an object or a set of objects which allows you to see the properties belonging to that object in a grid display. | To be supplied. |
| dynamicContent | Dynamic Content | Contains dynamic content. | dynamicContent - Dynamic Content |
| dynamicViewPanel | Dynamic View Panel | A view panel that dynamically creates its columns based on the view definition. | To be supplied. |
| firebugLite | Firebug Lite | Inserts Firebug Lite, a debugging tool into the current page. | To be supplied. |
| formColumn | Form Layout Column | Form layout column control. | formColumn - Form Layout Column |
| formRow | Form Layout Row | Form layout row control. | formRow - Form Layout Row |
| formTable | Form Table | Formats controls in rows and columns. Provides header, footer, and message areas. | formTable - Form Table |
| forumPost | Forum Post | Displaying the content of a user post. | To be supplied. |
| forumView | Forum View | A high level control that renders an hierarchical view. | To be supplied. |
| inPlaceForm | In Place Form | Contains a dynamic form. | inPlaceForm - In Place Form |
| keepSessionAlive | Keep Session Alive | Keep the session server alive until the browser page is closed. | To be supplied. |
| linksList | List of Links | A control that displays its children within a basic HTML list. | To be supplied. |
| list | List Container | A list of links control. | To be supplied. |
| listInline | Inline List Container | A control that displays its children within an inline list (on one row with separators between the items). | To be supplied. |
| listSeparator | List Separator | Separator between list entries in a single-line list, where each entry is displayed beside the previous entry, as opposed displaying entries below the previous entry. | To be supplied. |
| multiImage | Multi-image Output | Multi-image control that selects an icon to display from a list, where the icon displayed depends on the current value of the field that the control is bound to. | To be supplied. |
| namePicker | Name Picker | Displays a modal dialog containing name choices. Applies selected names to an associated control. | namePicker - Name Picker |
| navigator | Navigator | A page navigator. Navigator control allows you to make hierarchical tree of page links to navigate to. Particular branch of such tree could be made initially visible, i.e. expanded tree. | To be supplied. |
| outline | Outline | A generic outline control. Outline control behaves similar to Navigator control without ability to use expanding feature. Allows to specify custom Java class via "treeRenderer" to be used for nodes visualization. | To be supplied. |
| pagerAddRows | Pager Add Rows | Adds rows to an iterator control. | pagerAddRows - Pager Add Rows |
| pagerDetail | Pager Show/Hide Details | Shows and hides detail areas of an iterator control. | pagerDetail - Pager Show/Hide Details |
| pagerExpand | Pager Expand/Collapse | Expands or collapses all the rows of an iterator control. | pagerExpand - Pager Expand/Collapse |
| pagerSaveState | Pager Save State | Saves the number of rows displayed by an iterator control if the user navigates away from the page and back. | pagerSaveState - Pager Save State |
| pagerSizes | Pager Sizes | Allows selection of the number of rows displayed by an iterator control. | pagerSizes - Pager Sizes |
| popupMenu | PopupMenu | A pop-up menu control. A pop-up menu to be shown over some text or other controls. Menu content is usually constructed using "xe:basicContainerNode" and "xe:basicLeafNode" elements in "treeNodes" property. Accessibility compatible. | To be supplied. |
| sortLinks | Sort Links | A sort links control. Sort Links control allows you to provide dynamic content associated with a link. Generally it is done via inclusion of a Basic Node where its "href" attribute could be "#content=byauthor" and some facet with "xp:key=byauthor" is provided. | To be supplied. |
| switchFacet | Switch | Displays alternate panels depending on key values. | switchFacet - Switch |
| tagCloud | Tag Cloud | Control that displays a tag cloud. | To be supplied. |
| toolbar | Toolbar | A toolbar control. Toolbar control is used to display a horizontally aligned menu with possible choices to be shown when particular menu item is clicked. | To be supplied. |
| tooltip | Tooltip | Displays data when another control is in focus. | tooltip - Tooltip |
| tooltipDialog | Tooltip Dialog | Displays data when another control is in focus. Allows activation of client-side events when the data is shown and hidden. | tooltipDialog - Tooltip Dialog |
| valuePicker | Value Picker | Displays a modal dialog containing value choices. Applies selected values to an associated control. | valuePicker - Value Picker |
| widgetContainer | Widget Container | A container that displays a widget (in the larger sense). | To be supplied. |
The iNotes® controls support certain views, lists, and stores.
| Tag name | Common name | Description | Reference topic |
|---|---|---|---|
| iCalReadStore | iCal Store | Data Store for iCal Store. | To be supplied. |
| calendarView | iNotes Calendar | A control that displays an iNotes calendar. | To be supplied. |
| listView | iNotes ListView | A control that displays an iNotes ListView. | To be supplied. |
| listViewColumn | ListView Column | Defines the view column as design structure. | To be supplied. |
| notesCalendarStore | Notes Calendar Store | Data Store for Notes Calendar View. | To be supplied. |
| notesListViewDesign | Notes List View Design | Design Store for Notes List View. | To be supplied. |
| notesListViewStore | Notes List View Store | Data Store for Notes List View. | To be supplied. |
The Mobile Apps controls support mobile applications.
| Tag name | Common name | Description | Reference topic |
|---|---|---|---|
| appPage | Mobile Page | Contains one mobile page. Only one page displays at a time. | appPage - Mobile Page |
| djxmHeading | Page Heading | Provides header information and basic navigation. | djxmHeading - Page Heading |
| djxmLineItem | Static line item | Provides a way to link to other mobile pages. | djxmLineItem - Static Line Item |
| djxmRoundRectList | Rounded List | This control displays a rectangle with rounded corners. | djxmRoundRectList - Rounded List |
| djxmSwitch | Mobile Switch | Works as an on/off switch with behavior like a checkbox. | djxmSwitch - Mobile Switch |
| singlePageApp | Single Page Application | Contains a mobile application. Controls its layout and configuration. | singlePageApp - Single Page Application |
| tabBar | Tab Bar | Presents a banner upon which buttons can be placed. | tabBar - Tab Bar |
| tabBarButton | Tab Bar Button | Presents a banner upon which buttons can be placed. | tabBarButton - Tab Bar Button |
An XPage using mobile controls must start with a specified prefix to use the correct themes.
Open the application in Package Explorer ().
xsp.theme.mobile.pagePrefix=mobile
A specified XPage can be launched from a mobile device through a work-around.
<xp:this.afterPageLoad>
<![CDATA[#{javascript:
var uAgent = context.getUserAgent().getUserAgent();
if ((uAgent.match("iPhone") !== null ||
param.platfrom=="iphone") ||
(uAgent.match("Android") !== null ||
param.platfrom=="android") ||
uAgent.match("iPad") !== null)
{
context.redirectToPage("/m_Application.xsp", true);
}
else
{
context.redirectToPage("/allDocuments.xsp", true);
}
}]]>
</xp:this.afterPageLoad>
The XPages Extension Library contains a number of simple actions.
| Tag name | Common name | Description | Reference topic |
|---|---|---|---|
| addRows | Add Rows | Dynamically adds rows to a data iterator. | Add Rows (Simple actions - JavaScript) |
| alertAction | Alert | Displays a message in a modal dialog. | Alert (Simple actions - JavaScript) |
| changeDynamicContentAction | Change Dynamic Content | Changes dynamic content so that a specified facet displays. | Change Dynamic Content (Simple actions - JavaScript) |
| dojoAnimateProperty | Dojo Animation | Applies animation to a control. | Dojo Animation (Simple actions - JavaScript) |
| dojoFadeIn | Dojo Fade In Effect | Causes a target control to fade in. | Dojo Fade In Effect (Simple actions - JavaScript) |
| dojoFadeOut | Dojo Fade Out Effect | Causes a target control to fade out. | Dojo Fade Out Effect (Simple actions - JavaScript) |
| dojofxSlideTo | Dojo Slide To Effect | Causes a target control to slide to a specified position. | Dojo Slide To Effect (Simple actions - JavaScript) |
| dojofxWipeIn | Dojo Wipe In Effect | Causes a target control to be wiped in. | Dojo Wipe In Effect (Simple actions - JavaScript) |
| dojofxWipeOut | Dojo Wipe Out Effect | Causes a target control to be wiped out. | Dojo Wipe Out Effect (Simple actions - JavaScript) |
| moveTo | Move To Mobile Page | Replaces the current page using a slick web movement. | Move To Mobile Page (Simple actions - JavaScript) |
Extended versions of the discussion and team room templates are provided.
Specified here are the XPages Extension Library simple actions.
Dynamically adds rows to a data iterator.
<xe:addRows rowCount="number" for="id" disableId="id" state="true|false" loaded="true|false"></xe:addRows>
| Attribute | Description |
|---|---|
| disableId="id" | Identifies a control that is hidden if the iterator has no more rows. Typically this is the control that activates this action. |
| for="id" | Identifies the iterator control. If this simple action is nested in a repeating control, that control is the default. |
| loaded="true|false" | Creates a tag instance when the control is loaded, or not. Defaults to true. |
| rowCount="number" | Number of rows to add. Defaults to the number of rows displayed on each page of the iterator. |
| state="true|false" | If the server state should be saved after getting the AJAX request. |
<xp:dataTable id="dataTable1" rows="10" value="#{javascript:return database.getAllDocuments()}" var="rowdoc">
<xp:column id="column1">
<xp:this.facets>
<xp:label value="subject" id="label1" xp:key="header" style="font-weight:bold"></xp:label>
</xp:this.facets>
<xp:text escape="true" id="computedField1">
<xp:this.value>
<![CDATA[#{javascript:return rowdoc.getItemValueString("subject")}]]>
</xp:this.value>
</xp:text>
</xp:column>
</xp:dataTable>
<xp:button value="Add 3 rows" id="button1">
<xp:eventHandler event="onclick" submit="false">
<xp:this.script>
<xe:addRows rowCount="3" for="dataTable1" disableId="button1" state="true"></xe:addRows>
</xp:this.script>
</xp:eventHandler>
</xp:button>
Displays a message in a modal dialog.
<xe:alertAction text="message" loaded="true|false"</xe:alertAction>
| Attribute | Description |
|---|---|
| loaded="true|false" | Creates a tag instance when the control is loaded, or not. Defaults to true. |
| text="text" | Text of the alert message. |
<xp:div id="div1"
style="font-size:16pt;font-weight:bold;text-align:center">
Testing testing testing
</xp:div>
<xp:button value="Slide To" id="button3">
<xp:eventHandler event="onclick" submit="false">
<xp:this.script>
<xp:scriptGroup>
<xe:alertAction text="Sliding text to position 100, 100"></xe:alertAction>
<xe:dojofxSlideTo node="div1" duration="1500" left="100" top="100"></xe:dojofxSlideTo>
</xp:scriptGroup>
</xp:this.script>
</xp:eventHandler>
</xp:button>
Changes dynamic content so that a specified facet displays.
<xe:changeDynamicContentAction facetName="display" for="dynamic" loaded="true|false"><xe:this.parameters><xp:parameter name="name" value="value" loaded="true|false"</xp:parameter>...</xe:this.parameters></xe:changeDynamicContentAction>
| Attribute | Description |
|---|---|
| facetName="display" | Name of the facet to display. |
| for="dynamic" | Name of the dynamic control containing the facet. |
| loaded="true|false" | Creates a tag instance when the control is loaded, or not. Defaults to true. |
| this.parameters | Names and values of parameters passed as is. |
<xe:dynamicContent id="dynamicContent1" defaultFacet="mainView">
<xp:this.facets>
<xp:panel xp:key="subjectView">
<xp:button value="Switch to main view" id="button1">
<xp:eventHandler event="onclick" submit="true" refreshMode="partial" refreshId="dynamicContent1">
<xp:this.action>
<xe:changeDynamicContentAction facetName="mainView" for="dynamicContent1">
</xe:changeDynamicContentAction>
</xp:this.action>
</xp:eventHandler>
</xp:button>
<xp:viewPanel rows="30" id="viewPanel1">
<xp:this.facets>
<xp:pager partialRefresh="true"
layout="Previous Group Next" xp:key="headerPager" id="pager1">
</xp:pager>
</xp:this.facets>
<xp:this.data>
<xp:dominoView var="view1" viewName="subject"></xp:dominoView>
</xp:this.data>
<xp:viewColumn columnName="subject" id="viewColumn1">
<xp:viewColumnHeader value="subject" id="viewColumnHeader1"></xp:viewColumnHeader>
</xp:viewColumn>
<xp:viewColumn columnName="number" id="viewColumn2">
<xp:viewColumnHeader value="number" id="viewColumnHeader2"></xp:viewColumnHeader>
</xp:viewColumn>
<xp:viewColumn columnName="$2" id="viewColumn3">
<xp:viewColumnHeader value="last modified" id="viewColumnHeader3"></xp:viewColumnHeader>
</xp:viewColumn>
</xp:viewPanel>
</xp:panel>
<xp:panel xp:key="mainView">
<xp:button value="Switch to subject view" id="button2">
<xp:eventHandler event="onclick" submit="true" refreshMode="partial" refreshId="dynamicContent1">
<xp:this.action>
<xe:changeDynamicContentAction
facetName="subjectView" for="dynamicContent1">
</xe:changeDynamicContentAction>
</xp:this.action>
</xp:eventHandler>
</xp:button>
<xp:viewPanel rows="30" id="viewPanel2">
<xp:this.facets>
<xp:pager partialRefresh="true"
layout="Previous Group Next" xp:key="headerPager" id="pager2">
</xp:pager>
</xp:this.facets>
<xp:this.data>
<xp:dominoView var="view2" viewName="main"></xp:dominoView>
</xp:this.data>
<xp:viewColumn columnName="category" id="viewColumn4">
<xp:viewColumnHeader value="category" id="viewColumnHeader4"></xp:viewColumnHeader>
</xp:viewColumn>
<xp:viewColumn columnName="subject" id="viewColumn5">
<xp:viewColumnHeader value="subject" id="viewColumnHeader5"></xp:viewColumnHeader>
</xp:viewColumn>
<xp:viewColumn columnName="number" id="viewColumn6">
<xp:viewColumnHeader value="number" id="viewColumnHeader6"></xp:viewColumnHeader>
</xp:viewColumn>
<xp:viewColumn columnName="$2" id="viewColumn7">
<xp:viewColumnHeader value="last modified" id="viewColumnHeader7"></xp:viewColumnHeader>
</xp:viewColumn>
</xp:viewPanel>
</xp:panel>
</xp:this.facets>
</xe:dynamicContent>
Causes a target control to fade in.
<xe:dojoFadeIn node="target" duration="ms" loaded="true|false" easing="function" var="name"><xe:this.attributes><xp:parameter name="name" value="value" loaded="true|false"</xp:parameter>...</xe:this.attributes></xe:dojoFadeIn>
| Attribute | Description |
|---|---|
| attributes="json" | List of JSON formatted values passed as is. |
| duration="ms" | Duration of the animation in milliseconds. Defaults to 350. |
| easing="function" | Function that returns the rate of change of the animation over its duration. |
| loaded="true|false" | Creates a tag instance when the control is loaded, or not. Defaults to true. |
| node="target" | Identifier of the control to which the animation is applied. |
| var="name" | Variable name to identify the animation. |
<xp:div id="div1"
style="font-size:16pt;font-weight:bold;text-align:center">
Testing testing testing
</xp:div>
<xp:button value="Fade Out" id="button2">
<xp:eventHandler event="onclick" submit="false">
<xp:this.script>
<xe:dojoFadeOut node="div1" duration="1500"></xe:dojoFadeOut>
</xp:this.script>
</xp:eventHandler></xp:button>
<xp:button value="Fade In" id="button1">
<xp:eventHandler event="onclick" submit="false">
<xp:this.script>
<xe:dojoFadeIn node="div1" duration="1000"></xe:dojoFadeIn>
</xp:this.script>
</xp:eventHandler>
</xp:button>
Causes a target control to fade out.
<xe:dojoFadeOut node="target" duration="ms" loaded="true|false" easing="function" var="name"><xe:this.attributes><xp:parameter name="name" value="value" loaded="true|false"</xp:parameter>...</xe:this.attributes></xe:dojoFadeOut>
| Attribute | Description |
|---|---|
| attributes="json" | List of JSON formatted values passed as is. |
| duration="ms" | Duration of the animation in milliseconds. Defaults to 350. |
| easing="function" | Function that returns the rate of change of the animation over its duration. |
| loaded="true|false" | Creates a tag instance when the control is loaded, or not. Defaults to true. |
| node="target" | Identifier of the control to which the animation is applied. |
| var="name" | Variable name to identify the animation. |
<xp:div id="div1"
style="font-size:16pt;font-weight:bold;text-align:center">
Testing testing testing
</xp:div>
<xp:button value="Fade Out" id="button2">
<xp:eventHandler event="onclick" submit="false">
<xp:this.script>
<xe:dojoFadeOut node="div1" duration="1500"></xe:dojoFadeOut>
</xp:this.script>
</xp:eventHandler></xp:button>
<xp:button value="Fade In" id="button1">
<xp:eventHandler event="onclick" submit="false">
<xp:this.script>
<xe:dojoFadeIn node="div1" duration="1000"></xe:dojoFadeIn>
</xp:this.script>
</xp:eventHandler>
</xp:button>
Causes a target control to slide to a specified position.
<xe:dojofxSlideTo node="target" duration="ms" loaded="true|false" easing="function" left="pixels" top="pixels" var="name"><xe:this.attributes><xp:parameter name="name" value="value" loaded="true|false"</xp:parameter>...</xe:this.attributes></xe:dojofxSlideTo>
| Attribute | Description |
|---|---|
| attributes="json" | List of JSON formatted values passed as is. |
| duration="ms" | Duration of the animation in milliseconds. Defaults to 350. |
| easing="function" | Function that returns the rate of change of the animation over its duration. |
| left="pixels" | Left position to which the target slides in pixels. |
| loaded="true|false" | Creates a tag instance when the control is loaded, or not. Defaults to true. |
| node="target" | Identifier of the control to which the animation is applied. |
| top="pixels" | Top position to which the target slides in pixels. |
| var="name" | Variable name to identify the animation. |
<xp:div id="div1"
style="font-size:16pt;font-weight:bold;text-align:center">
Testing testing testing
</xp:div>
<xp:button value="Slide To" id="button3">
<xp:eventHandler event="onclick" submit="false">
<xp:this.script>
<xe:dojofxSlideTo node="div1" duration="1500" left="100" top="100"></xe:dojofxSlideTo>
</xp:this.script>
</xp:eventHandler>
</xp:button>
Causes a target control to be wiped in.
<xe:dojofxWipeIn node="target" duration="ms" loaded="true|false" easing="function" var="name"><xe:this.attributes><xp:parameter name="name" value="value" loaded="true|false"</xp:parameter>...</xe:this.attributes></xe:dojofxWipeIn>
| Attribute | Description |
|---|---|
| attributes="json" | List of JSON formatted values passed as is. |
| duration="ms" | Duration of the animation in milliseconds. Defaults to 350. |
| easing="function" | Function that returns the rate of change of the animation over its duration. |
| loaded="true|false" | Creates a tag instance when the control is loaded, or not. Defaults to true. |
| node="target" | Identifier of the control to which the animation is applied. |
| var="name" | Variable name to identify the animation. |
<xp:div id="div1"
style="font-size:16pt;font-weight:bold;text-align:center">
Testing testing testing
</xp:div>
<xp:button value="Wipe Out" id="button2">
<xp:eventHandler event="onclick" submit="false">
<xp:this.script>
<xe:dojofxWipeOut node="div1" duration="1500"></xe:dojofxWipeOut>
</xp:this.script>
</xp:eventHandler></xp:button>
<xp:button value="Wipe In" id="button1">
<xp:eventHandler event="onclick" submit="false">
<xp:this.script>
<xe:dojofxWipeIn node="div1" duration="1000"></xe:dojofxWipeIn>
</xp:this.script>
</xp:eventHandler>
</xp:button>
Causes a target control to be wiped out.
<xe:dojofxWipeOut node="target" duration="ms" loaded="true|false" easing="function" var="name"><xe:this.attributes><xp:parameter name="name" value="value" loaded="true|false"</xp:parameter>...</xe:this.attributes></xe:dojofxWipeOut>
| Attribute | Description |
|---|---|
| attributes="json" | List of JSON formatted values passed as is. |
| duration="ms" | Duration of the animation in milliseconds. Defaults to 350. |
| easing="function" | Function that returns the rate of change of the animation over its duration. |
| loaded="true|false" | Creates a tag instance when the control is loaded, or not. Defaults to true. |
| node="target" | Identifier of the control to which the animation is applied. |
| var="name" | Variable name to identify the animation. |
<xp:div id="div1"
style="font-size:16pt;font-weight:bold;text-align:center">
Testing testing testing
</xp:div>
<xp:button value="Wipe Out" id="button5">
<xp:eventHandler event="onclick" submit="false">
<xp:this.script>
<xe:dojofxWipeOut duration="1500" node="div1"></xe:dojofxWipeOut>
</xp:this.script>
</xp:eventHandler>
</xp:button>
<xp:button value="Wipe In" id="button6">
<xp:eventHandler event="onclick" submit="false">
<xp:this.script>
<xe:dojofxWipeIn duration="1500" node="div1"></xe:dojofxWipeIn>
</xp:this.script>
</xp:eventHandler>
</xp:button>
Replaces the current page using a slick web movement.
<xe:moveTo direction="Left to Right|Right to Left" forceFullRefresh="true|false" loaded="true|false" saveDocument="true|false" targetPage="pagename" transitionType="slide|fade|flip"></xe:moveTo>
<xe:tabBarButton id="tabBarButtonSave" label="Save" rendered="#{javascript:document1.isEditable()}">
<xp:eventHandler event="onclick" submit="true" refreshMode="complete">
<xp:this.action>
<xe:moveTo forceFullRefresh="true" saveDocument="true"
targetPage="viewPage" transitionType="slide" direction="Left to Right">
</xe:moveTo>
</xp:this.action>
</xp:eventHandler>
</xe:tabBarButton>
Specified here are the XPages Extension Library controls.
Contains one mobile page. Only one page displays at a time.
<xe:appPage attributes>content</xe:appPage>
| Property | Description |
|---|---|
| id | Defaults to appPage1, appPage2, and so on. |
| pageName | Identifies the page for initial loading and navigation. Overrides id. |
| resetContent | Recreates page contents on each display if true. |
| preload | Forces the mobile page to load when the XPage loads. |
| Category | Properties |
|---|---|
| basics | autoCreate, binding, id, keepScrollPos, loaded, pageName, preload, rendered, rendererType, resetContent |
| styling | disableTheme, themeId |
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xe="http://www.ibm.com/xsp/coreex">
<xe:singlePageApp id="xpagesMobileApp"
selectedPageName="homePage">
<xe:appPage id="appPage1" pageName="homePage" >
<xe:djxmHeading id="homePageHeading" label="Home"></xe:djxmHeading>
</xe:appPage>
</xe:singlePageApp>
</xp:view>
Displays data as a view.
<xe:dataView attributes>content</xe:dataView>
| Property | Description |
|---|---|
| id | Defaults to dataView1, dataView2, and so on. |
| data | Identifies the data source, usually a Domino view, and specifies attributes for its display. |
| summaryColumn | Defines a column that provides links to the underlying documents. |
| multiColumnCount | Specifies the number of number of documents displayed on each row. Defaults to one document per row. |
| Category | Properties |
|---|---|
| accessibility | role |
| basics | attrs, binding, detailsOnClient, expandedDetail, id, loaded, pageName, partialExecute, partialRefresh, refreshId, removeRepeat, rendered, rendererType, repeatControls |
| data | data, first, indexVar, openDocAsReadOnly, rows, value, var |
| format | categoryColumn, collapsibleCategory, collapsibleDetail, collapsibleRows, columnTitles, disableHideRow, extraColumns, iconColumn, multiColumnCount, showCheckbox, showHeadrCheckbox, showItemsFlat, summaryColumn |
| styling | disableTheme, rowStyle, rowStyleClass, style, styleClass, themeId |
<xe:dataView id="dataView1" rows="20"
collapsibleDetail="true" collapsibleRows="true" expandedDetail="true"
multiColumnCount="4" showItemsFlat="true">
<xe:this.data>
<xp:dominoView var="view1" viewName="main"></xp:dominoView>
</xe:this.data>
<xe:this.summaryColumn>
<xe:viewSummaryColumn columnName="subject">
</xe:viewSummaryColumn>
</xe:this.summaryColumn>
</xe:dataView>
Contains a modal dialog.
<xe:dialog attributes>content</xe:dialog>
| Property | Description |
|---|---|
| id | Defaults to dialog1, dialog2, and so on. |
| title | Specifies the content of the title bar. (Also used for accessibility.) |
| Category | Properties |
|---|---|
| accessibility | title, waiRole, waiState |
| basics | binding, dir, errorMessage, extractContent, href, id, keepComponents, lang, loaded, loadingMessage, partialRefresh, preload, preventCache, refreshOnShow, rendered, rendererType |
| dojo | dojoAttributes, dojoType, dragRestriction, parseOnLoad, tooltip |
| events | afterContentLoad, beforeContentLoad, onBlur, onClick, onClose, onContentError, onDblClick, onDownloadEnd, onDownloadError, onDownloadStart, onFocus, onHide, onKeyDown, onKeyPress, onKeyUp, onLoad, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onShow, onUnload |
| styling | disableTheme, style, styleClass, themeId |
getComponent("dialog1").show()
To
activate the dialog in a client-side script, execute the following
code:XSP.openDialog("#{id:dialog1}")
The control
is modal meaning the user must dismiss it before proceeding.XSP.closeDialog('#{id:dialog1}')
See Modal dialogs for additional information.
<xp:button value="Display time client-side" id="button4">
<xp:eventHandler event="onclick" submit="false">
<xp:this.script><![CDATA[XSP.openDialog("#{id:dialog1}")]]></xp:this.script>
</xp:eventHandler>
</xp:button>
<xp:button value="Display time server-side" id="button5">
<xp:eventHandler event="onclick" submit="true"
refreshMode="complete">
<xp:this.action><![CDATA[#{javascript:getComponent("dialog1").show()}]]></xp:this.action>
</xp:eventHandler>
</xp:button>
<xe:dialog id="dialog1" title="Current Time">
<xp:text escape="true" id="computedField1">
<xp:this.value><![CDATA[#{javascript:var dt:NotesDateTime = session.createDateTime("Today");
dt.setNow();
return dt.getLocalTime();}]]></xp:this.value>
</xp:text>
<xe:dialogButtonBar id="dialogButtonBar1">
<xp:button value="OK" id="button6">
<xp:eventHandler event="onclick" submit="false">
<xp:this.script><![CDATA[XSP.closeDialog('#{id:dialog1}')]]></xp:this.script>
</xp:eventHandler>
</xp:button>
<xp:button value="Cancel" id="button7">
<xp:eventHandler event="onclick" submit="false">
<xp:this.script><![CDATA[XSP.closeDialog('#{id:dialog1}')]]></xp:this.script>
</xp:eventHandler>
</xp:button>
</xe:dialogButtonBar>
</xe:dialog>
The Dialog control displays dynamic content and accepts input in a modal dialog.
The dialog content is defined as child controls. The controls are not actually created until the dialog is displayed. This ensures the best performance as no controls are initially created and no data sources are initially opened.

<xe:dialog id="inPlaceDialog1" title="Edit User" >
<xp:panel>
<xp:this.data>
<xp:dominoDocument
var="document1" formName="Contact" action="editDocument"
documentId="#{ javascript:row.getNoteID() }"
ignoreRequestParams="true" >
</xp:dominoDocument>
</xp:this.data>
XSP.openDialog('#{id:inPlaceDialog1}')
When this is called, an Ajax request is submitted to the server to create the dialog content in the JSF tree. A Dojo dialog window is created, displaying the result of the Ajax call.

var c = getComponent("inPlaceDialog1")
c.hide()
Generally a button event should partially refresh another part of the page. This is particularly true when the OK button is clicked, as it means that some data was modified and the page should reflect the changes. Unfortunately, it is not as simple as setting the button onclick partial refresh target, as the dialog should not be closed, nor the refresh happen, if the OK action wasn't executed properly (after a validation failure, for example). In that case, the dialog should be refreshed.
var c = getComponent("inPlaceDialog1")
c.hide("repeat1")
The first parameter is the identifier of the control to refresh. It can also feature a map of parameters to be used when emitting the partial refresh request. This might be used in rare cases.
Note that the hide() method generates client-side code that closes the dialog and optionally executes a partial refresh. The JSF controls are also properly removed from the JSF tree.
The dialog can also be closed by the user clicking the close button in the dialog title bar. In this case, no request is sent to the server thus leaving the tree with the dialog controls inserted. They are automatically removed the next time the page is rendered.
Contains buttons in a dialog.
<xe:dialogButtonBar attributes>content</xe:dialogButtonBar>
| Property | Description |
|---|---|
| id | Defaults to dialogButtonBar1, dialogButtonBar2, and so on. |
| Category | Properties |
|---|---|
| basics | binding, id, loaded, rendered, rendererType |
| styling | disableTheme, style, styleClass, themeId |
See Modal dialogs for additional information.
<xp:button value="Display time client-side" id="button4">
<xp:eventHandler event="onclick" submit="false">
<xp:this.script><![CDATA[XSP.openDialog("#{id:dialog1}")]]></xp:this.script>
</xp:eventHandler>
</xp:button>
<xp:button value="Display time server-side" id="button5">
<xp:eventHandler event="onclick" submit="true"
refreshMode="complete">
<xp:this.action><![CDATA[#{javascript:getComponent("dialog1").show()}]]></xp:this.action>
</xp:eventHandler>
</xp:button>
<xe:dialog id="dialog1" title="Current Time">
<xp:text escape="true" id="computedField1">
<xp:this.value><![CDATA[#{javascript:var dt:NotesDateTime = session.createDateTime("Today");
dt.setNow();
return dt.getLocalTime();}]]></xp:this.value>
</xp:text>
<xe:dialogButtonBar id="dialogButtonBar1">
<xp:button value="OK" id="button6">
<xp:eventHandler event="onclick" submit="false">
<xp:this.script><![CDATA[XSP.closeDialog('#{id:dialog1}')]]></xp:this.script>
</xp:eventHandler>
</xp:button>
<xp:button value="Cancel" id="button7">
<xp:eventHandler event="onclick" submit="false">
<xp:this.script><![CDATA[XSP.closeDialog('#{id:dialog1}')]]></xp:this.script>
</xp:eventHandler>
</xp:button>
</xe:dialogButtonBar>
</xe:dialog>
Contains panes that expand to reveal their content.
<xe:djAccordionContainer attributes>content</xe:djAccordionContainer>
| Property | Description |
|---|---|
| id | Defaults to ddjAccordionContainer1, djAccordionContainer2, and so on. |
| title | This appears on the pane tab. |
| style | Set the width and height. |
| Category | Properties |
|---|---|
| accessibility | title, waiRole, waiState |
| dojo | dojoAttributes, dojoType, dragRestriction, tooltip |
| basics | binding, dir, duration, id, lang, loaded, rendered, rendererType, selectedTab |
| events | onBlur, onClick, onClose, onDblClick, onFocus, onHide, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onShow |
| styling | disableTheme, style, styleClass, themeId |
An Accordion Container control holds any number of Accordion Pane controls. At any one time, one pane is open. The user opens a pane by clicking its title bar.
<xe:djAccordionContainer id="djAccordionContainer1"
style="width:400px; height:100px;">
<xe:djAccordionPane id="djAccordionPane1"
title="Application title">
<xp:text escape="true" id="computedField1" value="#{javascript:database.getTitle()}"></xp:text>
</xe:djAccordionPane>
<xe:djAccordionPane id="djAccordionPane2"
title="Application file path">
<xp:text escape="true" id="computedField2"
value="#{javascript:database.getFilePath()}">
</xp:text>
</xe:djAccordionPane>
<xe:djAccordionPane id="djAccordionPane3"
title="Application creation date">
<xp:text escape="true" id="computedField3"
value="#{javascript:database.getCreated().getLocalTime()}">
</xp:text>
</xe:djAccordionPane>
</xe:djAccordionContainer>
Provides content for one pane in an accordion container.
<xe:djAccordionPane attributes>content</xe:djAccordionPane>
| Property | Description |
|---|---|
| id | Defaults to djAccordionPane1, djAccordionPane2, and so on. |
| title | Applies a label to the pane. Use tooltip for accessibility. |
| Category | Properties |
|---|---|
| accessibility | title, waiRole, waiState |
| basics | binding, dir, errorMessage, extractContent, href, id, lang, loaded, loadingMessage, partialRefresh, preload, preventCache, refreshOnShow, rendered, rendererType |
| dojo | dojoAttributes, dojoType, dragRestriction, parseOnLoad, tooltip |
| events | onBlur, onClick, onClose, onContentError, onDblClick, onDownloadEnd, onDownloadError, onDownloadStart, onFocus, onHide, onKeyDown, onKeyPress, onKeyUp, onLoad, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onShow, onUnload |
| styling | disableTheme, style, styleClass, themeId |
An Accordion Container control holds any number of Accordion Pane controls. At any one time, one pane is open. The user opens a pane by clicking its title bar.
<xe:djAccordionContainer id="djAccordionContainer1"
style="width:400px; height:100px;">
<xe:djAccordionPane id="djAccordionPane1"
title="Application title">
<xp:text escape="true" id="computedField1" value="#{javascript:database.getTitle()}"></xp:text>
</xe:djAccordionPane>
<xe:djAccordionPane id="djAccordionPane2"
title="Application file path">
<xp:text escape="true" id="computedField2"
value="#{javascript:database.getFilePath()}">
</xp:text>
</xe:djAccordionPane>
<xe:djAccordionPane id="djAccordionPane3"
title="Application creation date">
<xp:text escape="true" id="computedField3"
value="#{javascript:database.getCreated().getLocalTime()}">
</xp:text>
</xe:djAccordionPane>
</xe:djAccordionContainer>
Contains panes situated at various regions within the container.
<xe:djBorderContainer attributes>content</xe:djBorderContainer>
| Property | Description |
|---|---|
| id | Defaults to djBorderContainer1, djBorderContainer2, and so on. |
| style | Set the width and height. |
| Category | Properties |
|---|---|
| accessibility | title, waiRole, waiState |
| basics | binding, design, dir, gutters, id, lang, liveSplitters, loaded, persist, rendered, rendererType |
| dojo | dojoAttributes, dojoType, dragRestriction, tooltip |
| events | onBlur, onClick, onClose, onDblClick, onFocus, onHide, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onShow |
| styling | disableTheme, style, styleClass, themeId |
A Border Container control holds Border Pane controls. Each pane covers a specified region in the container.
<xe:djBorderContainer id="djBorderContainer1" style="width:400px; height:200px;">
<xe:djBorderPane id="djBorderPane1" region="top">top</xe:djBorderPane>
<xe:djBorderPane id="djBorderPane2" region="center">center</xe:djBorderPane>
<xe:djBorderPane id="djBorderPane3" region="bottom">bottom</xe:djBorderPane>
<xe:djBorderPane id="djBorderPane4" region="left">left</xe:djBorderPane>
<xe:djBorderPane id="djBorderPane5" region="right">right</xe:djBorderPane>
</xe:djBorderContainer>
Provides content for one pane in a border container.
<xe:djBorderPane attributes>content</xe:djBorderPane>
| Property | Description |
|---|---|
| id | Defaults to djBorderPane1, djBorderPane2, and so on. |
| region | Specify as top, bottom, leading, trailing, left, right, or center. |
| Category | Properties |
|---|---|
| accessibility | title, waiRole, waiState |
| basics | binding, dir, errorMessage, extractContent, href, id, lang, loaded, loadingMessage, maxSize, minSize, partialRefresh, preload, preventCache, refreshOnShow, rendered, rendererType, splitter |
| dojo | dojoAttributes, dojoType, dragRestriction, parseOnLoad, tooltip |
| events | onBlur, onClick, onClose, onContentError, onDblClick, onDownloadEnd, onDownloadError, onDownloadStart, onFocus, onHide, onKeyDown, onKeyPress, onKeyUp, onLoad, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onShow, onUnload |
| format | layoutPriority, region |
| styling | disableTheme, style, styleClass, themeId |
A BorderContainer control holds BorderPane controls. Each pane covers a specified region in the container.
<xe:djBorderContainer id="djBorderContainer1" style="width:400px; height:200px;">
<xe:djBorderPane id="djBorderPane1" region="top">top</xe:djBorderPane>
<xe:djBorderPane id="djBorderPane2" region="center">center</xe:djBorderPane>
<xe:djBorderPane id="djBorderPane3" region="bottom">bottom</xe:djBorderPane>
<xe:djBorderPane id="djBorderPane4" region="left">left</xe:djBorderPane>
<xe:djBorderPane id="djBorderPane5" region="right">right</xe:djBorderPane>
</xe:djBorderContainer>
Activates an event handler.
<xe:djButton attributes>content</xe:djButton>
| Property | Description |
|---|---|
| id | Defaults to djButton1, djButton2, and so on. |
| onClick | Specifies an action to be taken when the button is clicked. |
| Category | Properties |
|---|---|
| accessibility | alt, tabIndex, title, waiRole, waiState |
| basics | autoComplete, binding, dir, disabled, id, immediate, label, lang, loaded, multipleSeparator, multipleTrim, readOnly, rendered, rendererType, required, showLabel, type |
| data | converter, defaultValue, disableClientSideValidation, disableModifiedFlag, disableValidators,showReadOnlyAsDisabled, store, validator, validators, value, valueChangeListener, valueChangeListeners |
| dojo | dojoAttributes, dojoType, dragRestriction, intermediateChanges, tooltip |
| events | onBlur, onChange, onClick, onClose, onDblClick, onFocus, onHide, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onShow |
| styling | disableTheme, style, styleClass, themeId |
At run time, the user clicks the button to activate its onClick event handler.
<xp:table>
<xp:tr>
<xp:td>Button</xp:td>
<xp:td>
<xe:djButton id="djButton1" label="say hello"
defaultValue="blue">
<xp:eventHandler event="onClick" submit="false">
<xe:this.script><![CDATA[alert("Hello, world!")]]></xe:this.script>
</xp:eventHandler>
</xe:djButton>
</xp:td>
</xp:tr>
</xp:table>
Accepts a check box as true or false.
<xe:djCheckBox attributes>content</xe:djCheckBox>
| Property | Description |
|---|---|
| id | Defaults to djCheckBox1, djCheckBox2, and so on. |
| value | Binds the control to a data element. |
| Category | Properties |
|---|---|
| accessibility | alt, tabIndex, title, waiRole, waiState |
| basics | binding, dir, disabled, id, immediate, label, lang, loaded, multipleSeparator, multipleTrim, readOnly, rendered, rendererType, required, showLabel, type |
| data | checkedValue, converter, defaultValue, disableClientSideValidation, disableModifiedFlag, disableValidators, showReadOnlyAsDisabled, uncheckedValue, validator, validators, value, valueChangeListener, valueChangeListeners |
| dojo | dojoAttributes, dojoType, dragRestriction, intermediateChanges, tooltip |
| events | onBlur, onChange, onClick, onClose, onDblClick, onFocus, onHide, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onShow |
| styling | disableTheme, iconClass, style, styleClass, themeId |
At run time, a check box appears on the page. If the user selects the box, its value is true. Otherwise its value is false.
<xp:table>
<xp:tr>
<xp:td>Check Box</xp:td>
<xp:td>
<xe:djCheckBox id="djCheckBox1" value="#{sessionScope.djCheckBox1}"></xe:djCheckBox>
</xp:td>
</xp:tr>
<xp:tr>
<xp:td>
<xp:button value="submit" id="button1">
<xp:eventHandler event="onclick" submit="true" refreshMode="complete" immediate="false" save="true">
</xp:eventHandler></xp:button>
</xp:td>
<xp:td></xp:td>
</xp:tr>
<xp:tr>
<xp:td>Value</xp:td>
<xp:td><xp:text escape="true" id="computedField1"><xp:this.value>
<![CDATA[#{javascript:return "The box is " + (sessionScope.djCheckBox1 ? "" : "not ") + "checked."}]>
</xp:this.value></xp:text></xp:td>
</xp:tr>
</xp:table>
Accepts a selected value.
<xe:djComboBox attributes>content</xe:djComboBox>
| Property | Description |
|---|---|
| id | Defaults to djComboBox1, djComboBox2, and so on. |
| value | Binds the control to a data element. |
| Category | Properties |
|---|---|
| accessibility | alt, tabIndex, title, waiRole, waiState |
| basics | autoComplete, binding, dir, disabled, hasDownArrow, id, ignoreCase, immediate, lang, loaded, maxLength, multipleSeparator, multipleTrim, queryExp, readOnly, rendered, rendererType, required, searchAttr, searchDelay, trim, type, validatorExt |
| data | converter, defaultValue, disableClientSideValidation, disableModifiedFlag, disableValidators, invalidMessage, pageSize, promptMessage, regExp, regExpGen, showReadOnlyAsDisabled, store, validator, validators, value, valueChangeListener, valueChangeListeners |
| dojo | dojoAttributes, dojoType, dragRestriction, intermediateChanges, tooltip |
| events | onBlur, onChange, onClick, onClose, onDblClick, onFocus, onHide, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onShow |
| format | displayMessageExt, lowercase, propercase, tooltipPosition, uppercase |
| styling | disableTheme, style, styleClass, themeId |
At run time, a dropdown box appears on the page presenting itemLabel choices and returning the selected one. Use embedded selectItem controls or an embedded selectItems control to specify the pairs of labels.
<xp:table>
<xp:tr>
<xp:td>Combo Box</xp:td>
<xp:td>
<xe:djComboBox id="djComboBox1"
value="#{sessionScope.djComboBox1}">
<xp:selectItem itemLabel="Maine"></xp:selectItem>
<xp:selectItem itemLabel="New Hampshire"></xp:selectItem>
<xp:selectItem itemLabel="Vermont"></xp:selectItem>
<xp:selectItem itemLabel="Massachusetts"></xp:selectItem>
<xp:selectItem itemLabel="Rhode Island"></xp:selectItem>
<xp:selectItem itemLabel="Connecticut"></xp:selectItem>
</xe:djComboBox></xp:td>
</xp:tr>
<xp:tr>
<xp:td>
<xp:button value="submit" id="button1">
<xp:eventHandler event="onclick" submit="true" refreshMode="complete" immediate="false" save="true">
</xp:eventHandler></xp:button>
</xp:td>
<xp:td></xp:td>
</xp:tr>
<xp:tr>
<xp:td>Value</xp:td>
<xp:td><xp:text escape="true" id="computedField1" value="#{sessionScope.djComboBox1}"></xp:text></xp:td>
</xp:tr>
</xp:table>
Provides content for a container.
<xe:djContentPane attributes>content</xe:djContentPane>
| Property | Description |
|---|---|
| id | Defaults to djContentPane1, djContentPane2, and so on. |
| Category | Properties |
|---|---|
| accessibility | title, waiRole, waiState |
| basics | binding, dir, errorMessage, extractContent, href, id, lang, loaded, loadingMessage, partialRefresh, preload, preventCache, refreshOnShow, rendered, rendererType |
| dojo | dojoAttributes, dojoType, dragRestriction, parseOnLoad, tooltip |
| events | onBlur, onClick, onClose, onContentError, onDblClick, onDownloadEnd, onDownloadError, onDownloadStart, onFocus, onHide, onKeyDown, onKeyPress, onKeyUp, onLoad, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onShow, onUnload |
| styling | disableTheme, style, styleClass, themeId |
This control simply renders its content.
<xe:djContentPane id="djContentPane1">IBM content pane
<xe:this.rendered>
<![CDATA[#{javascript:session.getUserNameObject().getOrganization() == "IBM"}]]>
</xe:this.rendered>
</xe:djContentPane>
<xe:djContentPane id="djContentPane2">Non-IBM content pane
<xe:this.rendered>
<![CDATA[#{javascript:session.getUserNameObject().getOrganization() != "IBM"}]]>
</xe:this.rendered>
</xe:djContentPane>
Accepts currency input.
<xe:djCurrencyTextBox attributes>content</xe:djCurrencyTextBox>
| Property | Description |
|---|---|
| id | Defaults to djCurrencyTextBox1, djCurrencyTextBox2, and so on. |
| value | Binds the control to a data element. |
| Category | Properties |
|---|---|
| accessibility | alt, tabIndex, title, waiRole, waiState |
| basics | binding, dir, disabled, id, immediate, lang, loaded, maxLength, multipleSeparator, multipleTrim, readOnly, rendered, rendererType, required, trim, type, validatorExt |
| data | constraints, converter, defaultValue, disableClientSideValidation, disableModifiedFlag, disableValidators, invalidMessage, promptMessage, rangeMessage, regExp, regExpGen, showReadOnlyAsDisabled, validator, validators, value, valueChangeListener, valueChangeListeners |
| dojo | dojoAttributes, dojoType, dragRestriction, intermediateChanges, tooltip |
| events | onBlur, onChange, onClick, onClose, onDblClick, onFocus, onHide, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onShow |
| format | displayMessageExt, lowercase, propercase, tooltipPosition, uppercase |
| styling | disableTheme, style, styleClass, themeId |
At run time, a text box appears on the page. The user can enter a currency value. On invalid input, a tooltip appears.
<xp:table>
<xp:tr>
<xp:td>Currency Text Box</xp:td>
<xp:td>
<xe:djCurrencyTextBox id="djCurrencyTextBox1" value="#{sessionScope.djCurrencyTextBox1}"></xe:djCurrencyTextBox>
</xp:td>
</xp:tr>
<xp:tr>
<xp:td>
<xp:button value="submit" id="button1">
<xp:eventHandler event="onclick" submit="true" refreshMode="complete" immediate="false" save="true">
</xp:eventHandler></xp:button>
</xp:td>
<xp:td></xp:td>
</xp:tr>
<xp:tr>
<xp:td>Value</xp:td>
<xp:td><xp:text escape="true" id="computedField1" value="#{sessionScope.djCurrencyTextBox1}"></xp:text></xp:td>
</xp:tr>
</xp:table>
Accepts a date value.
<xe:djDateTextBox attributes>content</xe:djDateTextBox>
| Property | Description |
|---|---|
| id | Defaults to djDateTextBox1, djDateTextBox2, and so on. |
| value | Binds the control to a data element. |
| Category | Properties |
|---|---|
| accessibility | alt, tabIndex, title, waiRole, waiState |
| basics | binding, dir, disabled, id, immediate, lang, loaded, maxLength, multipleSeparator, multipleTrim, readOnly, rendered, rendererType, required, trim, type, validatorExt |
| data | constraints, converter, defaultValue, disableClientSideValidation, disableModifiedFlag, disableValidators, invalidMessage, promptMessage, rangeMessage, regExp, regExpGen, showReadOnlyAsDisabled, validator, validators, value, valueChangeListener, valueChangeListeners |
| dojo | dojoAttributes, dojoType, dragRestriction, intermediateChanges, tooltip |
| events | onBlur, onChange, onClick, onClose, onDblClick, onFocus, onHide, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onShow |
| format | displayMessageExt, lowercase, propercase, tooltipPosition, uppercase |
| styling | disableTheme, style, styleClass, themeId |
At run time, a text box appears on the page. When the user selects the box, a calendar appears. The user can enter a date value. On invalid input, a tooltip appears.
<xp:table>
<xp:tr>
<xp:td>Date Text Box</xp:td>
<xp:td>
<xe:djDateTextBox id="djDateTextBox1" value="#{sessionScope.djDateTextBox1}"></xe:djDateTextBox>
</xp:td>
</xp:tr>
<xp:tr>
<xp:td>
<xp:button value="submit" id="button1">
<xp:eventHandler event="onclick" submit="true" refreshMode="complete" immediate="false" save="true">
</xp:eventHandler></xp:button>
</xp:td>
<xp:td></xp:td>
</xp:tr>
<xp:tr>
<xp:td>Value</xp:td>
<xp:td><xp:text escape="true" id="computedField1" value="#{sessionScope.djDateTextBox1}"></xp:text></xp:td>
</xp:tr>
</xp:table>
Accepts a value based on a selected image.
<xe:djextImageSelect attributes>content</xe:djextImageSelect>
| Property | Description |
|---|---|
| id | Defaults to djextImageSelect1, djextImageSelect2, and so on. |
| value | Binds the control to a data element. |
| imageValues | Specifies image choices. Contains imageValues which contains any number of embedded selectImage controls. Essential properties are image, selectedImage, and selectedValue. |
| Category | Properties |
|---|---|
| accessibility | alt, tabIndex, title, waiRole, waiState |
| basics | autoComplete, binding, dir, disabled, id, imageValues, immediate, lang, loaded, multipleSeparator, multipleTrim, readOnly, rendered, rendererType, required, type |
| data | converter, defaultValue, disableClientSideValidation, disableModifiedFlag, disableValidators, showReadOnlyAsDisabled, validator, validators, value, valueChangeListener, valueChangeListeners |
| dojo | dojoAttributes, dojoType, dragRestriction, intermediateChanges, tooltip |
| events | onBlur, onChange, onClick, onClose, onDblClick, onFocus, onHide, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onShow |
| styling | disableTheme, style, styleClass, themeId |
At run time, images appear. The user can select one which causes the value to be set.
<xp:table>
<xp:tr>
<xp:td>Image Select</xp:td>
<xp:td>
<xe:djextImageSelect id="djextImageSelect1"
value="#{sessionScope.djextImageSelect1}">
<xe:this.imageValues>
<xe:selectImage image="/folder.gif"
selectedValue="folder" selectedImage="/folder.gif">
</xe:selectImage>
<xe:selectImage image="/link.gif"
selectedImage="/link.gif" selectedValue="link">
</xe:selectImage>
<xe:selectImage image="/binary.gif"
selectedImage="/binary.gif" selectedValue="binary">
</xe:selectImage>
</xe:this.imageValues>
</xe:djextImageSelect>
</xp:td>
</xp:tr>
<xp:tr>
<xp:td></xp:td>
<xp:td>
<xp:button value="submit" id="button1"><xp:eventHandler event="onclick" submit="true" refreshMode="complete" immediate="false" save="true"></xp:eventHandler></xp:button></xp:td>
</xp:tr>
<xp:tr>
<xp:td>Value</xp:td>
<xp:td>
<xp:text escape="true" id="computedField1"
value="#{sessionScope.djextImageSelect1}">
</xp:text>
</xp:td>
</xp:tr>
</xp:table>
Accepts a value based on a selected link.
<xe:djextLinkSelect attributes>content</xe:djextLinkSelect>
| Property | Description |
|---|---|
| id | Defaults to djextLinkSelect1, djextLinkSelect2, and so on. |
| value | Binds the control to a data element. |
| dataProvider | Specifies choices for the value selection:
|
| Category | Properties |
|---|---|
| accessibility | alt, tabIndex, title, waiRole, waiState |
| basics | binding, dataProvider, dir, disabled, id, immediate, lang, loaded, multipleSeparator, multipleTrim, readOnly, rendered, rendererType, required, type |
| data | converter, defaultValue, disableClientSideValidation, disableModifiedFlag, disableValidators, showReadOnlyAsDisabled, validator, validators, value, valueChangeListener, valueChangeListeners |
| dojo | dojoAttributes, dojoType, dragRestriction, intermediateChanges, tooltip |
| events | onBlur, onChange, onClick, onClose, onDblClick, onFocus, onHide, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onShow |
| styling | disableTheme, firstItemStyle, firstItemStyleClass, itemStyle, itemStyleClass, lastItemStyle, lastItemStyleClass, style, styleClass, themeId |
At run time, the link values appear. The user can select one which causes the bound value to be set.
<xp:table>
<xp:tr>
<xp:td>Link Select</xp:td>
<xp:td>
<xe:djextLinkSelect id="djextLinkSelect1"
value="#{sessionScope.djextLinkSelect1}">
<xe:this.dataProvider>
<xe:simpleValuePicker valueListSeparator=","
valueList="red,blue,green">
</xe:simpleValuePicker>
</xe:this.dataProvider>
</xe:djextLinkSelect>
</xp:td>
</xp:tr>
<xp:tr>
<xp:td></xp:td>
<xp:td>
<xp:button value="submit" id="button1"><xp:eventHandler event="onclick" submit="true"
refreshMode="complete" immediate="false" save="true"></xp:eventHandler></xp:button></xp:td>
</xp:tr>
<xp:tr>
<xp:td>Value</xp:td>
<xp:td>
<xp:text escape="true" id="computedField1"
value="#{sessionScope.djextLinkSelect1}">
</xp:text>
</xp:td>
</xp:tr>
</xp:table>
Accepts a list of values.
<xe:djextListTextBox attributes>content</xe:djextListTextBox>
| Property | Description |
|---|---|
| id | Defaults to djextListTextBox1, djextListTextBox2, and so on. |
| value | Binds the control to a data element. |
| dataProvider | Specifies choices for the value selection:
|
| multipleSeparator | Specify for multi-value elements. |
| Category | Properties |
|---|---|
| accessibility | alt, tabIndex, title, waiRole, waiState |
| basics | binding, dataProvider, dir, disabled, displayLabel, id, immediate, lang, loaded, multipleSeparator, multipleTrim, readonly, rendered, rendererType, required, type |
| data | converter, defaultValue, disableClientSideValidation, disableModifiedFlag, disableValidators, showReadonlyAsDisabled, validator, validators, value, valueChangeListener, valueChangeListeners |
| dojo | dojoAttributes, dojoType, dragRestriction, intermediateChanges, tooltip |
| events | onBlur, onChange, onClick, onClose, onDblClick, onFocus, onHide, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onShow |
| styling | disableTheme, style, styleClass, themeId |
Use this control in conjunction with valuePicker - Value Picker.
<xp:table>
<xp:tr>
<xp:td>
<xp:label value="Categories" id="label1"></xp:label>
</xp:td>
<xp:td>
<xe:djextListTextBox id="djextListTextBox1"
value="#{requestScope.category}" multipleTrim="true"
multipleSeparator=",">
</xe:djextListTextBox>
<xe:valuePicker id="valuePicker1"
for="djextListTextBox1" dialogTitle="Category"
dojoType="extlib.dijit.PickerCheckbox">
<xe:this.dataProvider>
<xe:simpleValuePicker valueList="red,green,blue"
valueListSeparator=",">
</xe:simpleValuePicker>
</xe:this.dataProvider>
</xe:valuePicker>
</xp:td>
</xp:tr>
</xp:table>
Accepts a list of names.
<xe:djextnametextbox attributes>content</xe:djextnametextbox>
| Property | Description |
|---|---|
| id | Defaults to djextNameTextBox1, djextNameTextBox2, and so on. |
| value | Binds the control to a data element. |
| multipleSeparator | Specify for multi-value elements. |
| Category | Properties |
|---|---|
| accessibility | alt, tabIndex, title, waiRole, waiState |
| basics | binding, dir, disabled, id, immediate, lang, loaded, multipleSeparator, multipleTrim, readOnly, rendered, rendererType, required, type |
| data | converter, defaultValue, disableClientSideValidation, disableModifiedFlag, disableValidators, showReadonlyAsDisabled, validator, validators, value, valueChangeListener, valueChangeListeners |
| dojo | dojoAttributes, dojoType, dragRestriction, intermediateChanges, tooltip |
| events | onBlur, onChange, onClick, onClose, onDblClick, onFocus, onHide, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onShow |
| styling | disableTheme, style, styleClass, themeId |
Use this control in conjunction with namePicker - Name Picker.
<xp:table>
<xp:tr>
<xp:td>
<xp:label value="Names" id="label2"></xp:label>
</xp:td>
<xp:td>
<xe:djextNameTextBox id="djextNameTextBox1"
value="#{requestScope.name}" multipleSeparator=","
multipleTrim="true">
</xe:djextNameTextBox>
<xe:namePicker id="namePicker1" for="djextNameTextBox1"
dojoType="extlib.dijit.PickerCheckbox">
<xe:this.dataProvider>
<xe:dominoNABNamePicker
addressBookSel="all-public">
</xe:dominoNABNamePicker>
</xe:this.dataProvider>
</xe:namePicker>
</xp:td>
</xp:tr>
</xp:table>
Accepts a selected and filtered value.
<xe:djFilteringSelect attributes>content</xe:djFilteringSelect>
| Property | Description |
|---|---|
| id | Defaults to djFilteringSelect1, djFilteringSelect2, and so on. |
| value | Binds the control to a data element. |
| Category | Properties |
|---|---|
| accessibility | alt, tabIndex, title, waiRole, waiState |
| basics | autoComplete, binding, dir, disabled, hasDownArrow, id, ignoreCase, immediate, lang, loaded, maxLength, multipleSeparator, multipleTrim, queryExp, readOnly, rendered, rendererType, required, searchAttr, searchDelay, trim, type, validatorExt |
| data | converter, defaultValue, disableClientSideValidation, disableModifiedFlag, disableValidators, invalidMessage, pageSize, promptMessage, regExp, regExpGen, showReadOnlyAsDisabled, store, validator, validators, value, valueChangeListener, valueChangeListeners |
| dojo | dojoAttributes, dojoType, dragRestriction, intermediateChanges, tooltip |
| events | onBlur, onChange, onClick, onClose, onDblClick, onFocus, onHide, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onShow |
| format | displayMessageExt, labelAttr, labelFunc, labelType, lowercase, propercase, tooltipPosition, uppercase |
| styling | disableTheme, style, styleClass, themeId |
At run time, a dropdown box appears on the page presenting itemLabel choices and returning the itemValue that corresponds to the selected itemLabel. Use embedded selectItem controls or an embedded selectItems control to specify the pairs of labels and values.
<xp:table>
<xp:tr>
<xp:td>Filtering Select</xp:td>
<xp:td>
<xe:djFilteringSelect id="djFilteringSelect1" value="#{sessionScope.djFilteringSelect1}">
<xp:selectItem itemLabel="Maine" itemValue="ME"></xp:selectItem>
<xp:selectItem itemLabel="New Hampshire" itemValue="NH"></xp:selectItem>
<xp:selectItem itemLabel="Vermont" itemValue="VT"></xp:selectItem>
<xp:selectItem itemLabel="Massachusetts" itemValue="MA"></xp:selectItem>
<xp:selectItem itemLabel="Rhode Island" itemValue="RI"></xp:selectItem>
<xp:selectItem itemLabel="Connecticut" itemValue="CT"></xp:selectItem>
</xe:djFilteringSelect></xp:td>
</xp:tr>
<xp:tr>
<xp:td>
<xp:button value="submit" id="button1">
<xp:eventHandler event="onclick" submit="true" refreshMode="complete" immediate="false" save="true">
</xp:eventHandler></xp:button>
</xp:td>
<xp:td></xp:td>
</xp:tr>
<xp:tr>
<xp:td>Value</xp:td>
<xp:td><xp:text escape="true" id="computedField1" value="#{sessionScope.djFilteringSelect1}"></xp:text></xp:td>
</xp:tr>
</xp:table>
Accepts a numeric value from a horizontal slider.
<xe:djHorizontalSlider attributes>content</xe:djHorizontalSlider>
| Property | Description |
|---|---|
| id | Defaults to djHorizontalSlider1, djHorizontalSlider2, and so on. |
| value | Binds the control to a data element. |
| style | Provides dimensions for the slider. |
| discreteValues | Specifies the number of values on the slider. |
| minimum | Specifies the starting value of the slider. |
| maximum | Specifies the ending value of the slider. |
| Category | Properties |
|---|---|
| accessibility | alt, tabIndex, title, waiRole, waiState |
| basics | binding, clickSelect, dir, disabled, discreteValues, id, immediate, lang, loaded, maximum, minimum, multipleSeparator, multipleTrim, pageIncrement, readOnly, rendered, rendererType, required, showButtons, slideDuration, type |
| data | converter, defaultValue, disableClientSideValidation, disableModifiedFlag, disableValidators, showReadOnlyAsDisabled, validator, validators, value, valueChangeListener, valueChangeListeners |
| dojo | dojoAttributes, dojoType, dragRestriction, intermediateChanges, tooltip |
| events | onBlur, onChange, onClick, onClose, onDblClick, onFocus, onHide, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onShow |
| styling | disableTheme, style, styleClass, themeId |
At run time, a horizontal slider appears on the page. The user can slide the slider to select a numeric value.
Use djSliderRule - Dojo Slider Rule and djSliderRuleLabels - Dojo Slider Rule Labels to add rules (hash marks) and labels.
<xp:table>
<xp:tr>
<xp:td>Horizontal Slider</xp:td>
<xp:td>
<xe:djHorizontalSlider id="djHorizontalSlider1" style="margin: 5px;width:200px; height: 20px;"
value="#{sessionScope.djHorizontalSlider1}" discreteValues="1000"
maximum="999" minimum="0">
<xe:djSliderRuleLabels id="djSliderRuleLabels1"
container="topDecoration"
style="height:10px;font-size:75%;color:gray;">
<xe:this.labelsList>
<xe:djSliderRuleLabel label="0"></xe:djSliderRuleLabel>
<xe:djSliderRuleLabel label="999"></xe:djSliderRuleLabel>
</xe:this.labelsList>
</xe:djSliderRuleLabels>
<xe:djSliderRule id="djSliderRule1"
container="topDecoration" style="height:5px;" count="11">
</xe:djSliderRule>
<xe:djSliderRule id="djSliderRule2" style="height:5px;"
count="11" container="bottomDecoration">
</xe:djSliderRule>
<xe:djSliderRuleLabels id="djSliderRuleLabels2"
container="bottomDecoration" style="height:10px;font-size:75%;color:gray;">
</xe:djSliderRuleLabels>
</xe:djHorizontalSlider>
</xp:td>
</xp:tr>
<xp:tr>
<xp:td>
<xp:button value="submit" id="button1">
<xp:eventHandler event="onclick" submit="true" refreshMode="complete" immediate="false" save="true">
</xp:eventHandler></xp:button>
</xp:td>
<xp:td></xp:td>
</xp:tr>
<xp:tr>
<xp:td>Value</xp:td>
<xp:td><xp:text escape="true" id="computedField1" value="#{sessionScope.djHorizontalSlider1}"></xp:text></xp:td>
</xp:tr>
</xp:table>
Accepts a numeric value that is an increment of a starting value.
<xe:djNumberSpinner attributes>content</xe:djNumberSpinner>
| Property | Description |
|---|---|
| id | Defaults to djNumberSpinner1, djNumberSpinner2, and so on. |
| value | Binds the control to a data element. |
| defaultValue | Specifies the initial value of the spinner. Do not omit. |
| smallDelta | Increment when the user clicks up and down arrows to the right of the box, or the up and down keys, |
| largeDelta | Increment when the user clicks the PgUp and PgDn keys. |
| Category | Properties |
|---|---|
| accessibility | alt, tabIndex, title, waiRole, waiState |
| basics | binding, defaultTimeout, dir, disabled, id, immediate, lang, loaded, maxLength, multipleSeparator, multipleTrim, readOnly, rendered, rendererType, required, timeChangeRate, trim, type, validatorExt |
| data | constraints, converter, defaultValue, disableClientSideValidation, disableModifiedFlag, disableValidators, invalidMessage, javaType, largeDelta, promptMessage, rangeMessage, regExp, regExpGen, showReadOnlyAsDisabled, smallDelta, validator, validators, value, valueChangeListener, valueChangeListeners |
| dojo | dojoAttributes, dojoType, dragRestriction, intermediateChanges, tooltip |
| events | onBlur, onChange, onClick, onClose, onDblClick, onFocus, onHide, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onShow |
| format | displayMessageExt, lowercase, propercase, tooltipPosition, uppercase |
| styling | disableTheme, style, styleClass, themeId |
At run time, a text box with a spinner appears on the page with a numeric value. The user can adjust the value by clicking up and down arrows to the right of the box, the up and down keys, and the PgUp and PgDn keys.
<xp:table>
<xp:tr>
<xp:td>Number Spinner</xp:td>
<xp:td>
<xe:djNumberSpinner id="djNumberSpinner1"
value="#{sessionScope.djNumberSpinner1}" defaultValue="0.1"
smallDelta="0.1" largeDelta="1">
</xe:djNumberSpinner>
</xp:td>
</xp:tr>
<xp:tr>
<xp:td>
<xp:button value="submit" id="button1">
<xp:eventHandler event="onclick" submit="true" refreshMode="complete" immediate="false" save="true">
</xp:eventHandler></xp:button>
</xp:td>
<xp:td></xp:td>
</xp:tr>
<xp:tr>
<xp:td>Value</xp:td>
<xp:td><xp:text escape="true" id="computedField1" value="#{sessionScope.djNumberSpinner1}"></xp:text></xp:td>
</xp:tr>
</xp:table>
Accepts a numeric value.
<xe:djNumberTextBox attributes>content</xe:djNumberTextBox>
| Property | Description |
|---|---|
| id | Defaults to djNumberTextBox1, djNumberTextBox2, and so on. |
| value | Binds the control to a data element. |
| Category | Properties |
|---|---|
| accessibility | alt, tabIndex, title, waiRole, waiState |
| basics | binding, dir, disabled, id, immediate, lang, loaded, maxLength, multipleSeparator, multipleTrim, readOnly, rendered, rendererType, required, trim, type, validatorExt |
| data | constraints, converter, defaultValue, disableClientSideValidation, disableModifiedFlag, disableValidators, invalidMessage, javaType, promptMessage, regExp, regExpGen, showReadOnlyAsDisabled, validator, validators, value, valueChangeListener, valueChangeListeners |
| dojo | dojoAttributes, dojoType, dragRestriction, intermediateChanges, tooltip |
| events | onBlur, onChange, onClick, onClose, onDblClick, onFocus, onHide, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onShow |
| format | displayMessageExt, lowercase, propercase, tooltipPosition, uppercase |
| styling | disableTheme, style, styleClass, themeId |
At run time, a text box appears on the page. The user can enter a numeric value. On invalid input, a tooltip appears.
<xp:table>
<xp:tr>
<xp:td>Number Text Box</xp:td>
<xp:td>
<xe:djNumberTextBox id="djNumberTextBox1" value="#{sessionScope.djNumberTextBox1}"></xe:djNumberTextBox>
</xp:td>
</xp:tr>
<xp:tr>
<xp:td>
<xp:button value="submit" id="button1">
<xp:eventHandler event="onclick" submit="true" refreshMode="complete" immediate="false" save="true">
</xp:eventHandler></xp:button>
</xp:td>
<xp:td></xp:td>
</xp:tr>
<xp:tr>
<xp:td>Value</xp:td>
<xp:td><xp:text escape="true" id="computedField1" value="#{sessionScope.djNumberTextBox1}"></xp:text></xp:td>
</xp:tr>
</xp:table>
Accepts the value of a selected radio button.
<xe:djRadioButton attributes>content</xe:djRadioButton>
| Property | Description |
|---|---|
| id | Defaults to djRadioButton1, djRadioButton2, and so on. |
| value | Binds the control to a data element. |
| label | Specifies text that appears with the radio button. |
| selectedValue | Specifies the value of the button when it is selected. |
| groupName | Associates a radio button with a group such that only one button in the group can be selected at once. |
| defaultValue | Initially selects the radio button whose selectedValue matches this value. In a group, you should not specify more than one default value. |
| Category | Properties |
|---|---|
| accessibility | alt, tabIndex, title, waiRole, waiState |
| basics | binding, dir, disabled, id, immediate, label, lang, loaded, multipleSeparator, multipleTrim, readOnly, rendered, rendererType, required, showLabel, type |
| data | converter, defaultValue, disableClientSideValidation, disableModifiedFlag, disableValidators, groupName, showReadOnlyAsDisabled, skipContainers, validator, validators, value, valueChangeListener, valueChangeListeners |
| dojo | dojoAttributes, dojoType, dragRestriction, intermediateChanges, tooltip |
| events | onBlur, onChange, onClick, onClose, onDblClick, onFocus, onHide, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onShow |
| styling | disableTheme, iconClass, style, styleClass, themeId |
At run time, a radio button appears on the page. If the user selects the button, its selected value becomes the button value. A radio buttons belong to the same group, only one button in the group can be selected at once..
<xp:table>
<xp:tr>
<xp:td>Radio button</xp:td>
<xp:td>
<xe:djRadioButton id="djRadioButton1"
value="#{sessionScope.djRadioButton1}" label="blue"
defaultValue="blue" selectedValue="blue" groupName="color">
</xe:djRadioButton>
<xe:djRadioButton id="djRadioButton2"
value="#{sessionScope.djRadioButton1}" label="red"
selectedValue="red" groupName="color">
</xe:djRadioButton>
<xe:djRadioButton id="djRadioButton3"
value="#{sessionScope.djRadioButton1}" label="green"
selectedValue="green" groupName="color">
</xe:djRadioButton></xp:td>
</xp:tr>
<xp:tr>
<xp:td>
<xp:button value="submit" id="button1">
<xp:eventHandler event="onclick" submit="true"
refreshMode="complete" immediate="false" save="true">
</xp:eventHandler></xp:button>
</xp:td>
<xp:td></xp:td>
</xp:tr>
<xp:tr>
<xp:td>Value</xp:td>
<xp:td><xp:text escape="true" id="computedField1"><xp:this.value><![CDATA[#
{javascript://return "The box is " + (sessionScope.djRadioButton1 ? "" : "not ") + "checked."
return sessionScope.djRadioButton1}]]></xp:this.value></xp:text></xp:td>
</xp:tr>
</xp:table>
Accepts text input on multiple lines.
<xe:djSimpleTextarea attributes>content</xe:djSimpleTextarea>
| Property | Description |
|---|---|
| id | Defaults to djSimpleTextarea1, djSimpleTextarea2, and so on. |
| value | Binds the control to a data element. |
| Category | Properties |
|---|---|
| accessibility | alt, tabIndex, title, waiRole, waiState |
| basics | binding, dir, disabled, id, immediate, lang, loaded, maxLength, multipleSeparator, multipleTrim, readOnly, rendered, rendererType, required, trim, type |
| data | converter, defaultValue, disableClientSideValidation, disableModifiedFlag, disableValidators, showReadOnlyAsDisabled, validator, validators, value, valueChangeListener, valueChangeListeners |
| dojo | dojoAttributes, dojoType, dragRestriction, intermediateChanges, tooltip |
| events | onBlur, onChange, onClick, onClose, onDblClick, onFocus, onHide, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onShow |
| format | cols, lowercase, propercase, rows, uppercase |
| styling | disableTheme, style, styleClass, themeId |
At run time, a text box appears on the page. The user can enter multiple lines of text in the box. A vertical slider is added as needed.
<xp:table>
<xp:tr>
<xp:td>Text Area</xp:td>
<xp:td>
<xe:djSimpleTextarea value="#{sessionScope.djSimpleTextarea1}"></xe:djSimpleTextarea>
</xp:td>
</xp:tr>
<xp:tr>
<xp:td>
<xp:button value="submit" id="button1">
<xp:eventHandler event="onclick" submit="true" refreshMode="complete" immediate="false" save="true">
</xp:eventHandler></xp:button>
</xp:td>
<xp:td></xp:td>
</xp:tr>
<xp:tr>
<xp:td>Value</xp:td>
<xp:td><xp:text escape="true" id="computedField1" value="#{sessionScope.djSimpleTextarea1}"></xp:text></xp:td>
</xp:tr>
</xp:table>
Adds a rule (hash marks) for a horizontal or vertical slider.
<xe:djSliderRule attributes>content</xe:djSliderRule>
| Property | Description |
|---|---|
| id | Defaults to djSliderRule1, djSliderRule2, and so on. |
| style | Provides dimensions for the rule. |
| container | Specifies the location of the rule: topDecoration, bottomDecoration, leftDecoration, or rightDecoration. |
| count | Specifies the number of hash marks. |
| Category | Properties |
|---|---|
| accessibility | title, waiRole, waiState |
| basics | binding, count, dir, id, lang, loaded, rendered, rendererType |
| dojo | dojoAttributes, dojoType, dragRestriction, tooltip |
| events | onBlur, onChange, onClick, onClose, onDblClick, onFocus, onHide, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onShow |
| format | container |
| styling | disableTheme, ruleStyle, style, styleClass, themeId |
At run time, the labels appear outside the slider rule.
<xp:table>
<xp:tr>
<xp:td>Horizontal Slider</xp:td>
<xp:td>
<xe:djHorizontalSlider id="djHorizontalSlider1" style="margin: 5px;width:200px; height: 20px;"
value="#{sessionScope.djHorizontalSlider1}" discreteValues="1000"
maximum="999" minimum="0">
<xe:djSliderRuleLabels id="djSliderRuleLabels1"
container="topDecoration"
style="height:10px;font-size:75%;color:gray;">
<xe:this.labelsList>
<xe:djSliderRuleLabel label="0"></xe:djSliderRuleLabel>
<xe:djSliderRuleLabel label="999"></xe:djSliderRuleLabel>
</xe:this.labelsList>
</xe:djSliderRuleLabels>
<xe:djSliderRule id="djSliderRule1"
container="topDecoration" style="height:5px;" count="11">
</xe:djSliderRule>
<xe:djSliderRule id="djSliderRule2" style="height:5px;"
count="11" container="bottomDecoration">
</xe:djSliderRule>
<xe:djSliderRuleLabels id="djSliderRuleLabels2"
container="bottomDecoration" style="height:10px;font-size:75%;color:gray;">
</xe:djSliderRuleLabels>
</xe:djHorizontalSlider>
</xp:td>
</xp:tr>
<xp:tr>
<xp:td>
<xp:button value="submit" id="button1">
<xp:eventHandler event="onclick" submit="true" refreshMode="complete" immediate="false" save="true">
</xp:eventHandler></xp:button>
</xp:td>
<xp:td></xp:td>
</xp:tr>
<xp:tr>
<xp:td>Value</xp:td>
<xp:td><xp:text escape="true" id="computedField1" value="#{sessionScope.djHorizontalSlider1}"></xp:text></xp:td>
</xp:tr>
</xp:table>
Adds labels to the rule for a horizontal or vertical slider.
<xe:djSliderRuleLabels attributes>content</xe:djSliderRuleLabels>
| Property | Description |
|---|---|
| id | Defaults to djSliderRuleLabels1, djSliderRuleLabels2, and so on. |
| style | Provides dimensions for the labels. |
| container | Specifies the location of the labels: topDecoration, bottomDecoration, leftDecoration, or rightDecoration. |
| count, labels, labelsList | Specifies the labels as a count of percentages or as the actual labels. |
| Category | Properties |
|---|---|
| accessibility | title, waiRole, waiState |
| basics | binding, constraints, count, dir, id, labels, labelsList, lang, loaded, maximum, minimum, numericMargin, rendered, rendererType |
| dojo | dojoAttributes, dojoType, dragRestriction, tooltip |
| events | onBlur, onChange, onClick, onClose, onDblClick, onFocus, onHide, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onShow |
| format | container |
| styling | disableTheme, labelStyle, ruleStyle, style, styleClass, themeId |
At run time, the labels appear outside the slider rule.
<xp:table>
<xp:tr>
<xp:td>Horizontal Slider</xp:td>
<xp:td>
<xe:djHorizontalSlider id="djHorizontalSlider1" style="margin: 5px;width:200px; height: 20px;"
value="#{sessionScope.djHorizontalSlider1}" discreteValues="1000"
maximum="999" minimum="0">
<xe:djSliderRuleLabels id="djSliderRuleLabels1"
container="topDecoration"
style="height:10px;font-size:75%;color:gray;">
<xe:this.labelsList>
<xe:djSliderRuleLabel label="0"></xe:djSliderRuleLabel>
<xe:djSliderRuleLabel label="999"></xe:djSliderRuleLabel>
</xe:this.labelsList>
</xe:djSliderRuleLabels>
<xe:djSliderRule id="djSliderRule1"
container="topDecoration" style="height:5px;" count="11">
</xe:djSliderRule>
<xe:djSliderRule id="djSliderRule2" style="height:5px;"
count="11" container="bottomDecoration">
</xe:djSliderRule>
<xe:djSliderRuleLabels id="djSliderRuleLabels2"
container="bottomDecoration" style="height:10px;font-size:75%;color:gray;">
</xe:djSliderRuleLabels>
</xe:djHorizontalSlider>
</xp:td>
</xp:tr>
<xp:tr>
<xp:td>
<xp:button value="submit" id="button1">
<xp:eventHandler event="onclick" submit="true" refreshMode="complete" immediate="false" save="true">
</xp:eventHandler></xp:button>
</xp:td>
<xp:td></xp:td>
</xp:tr>
<xp:tr>
<xp:td>Value</xp:td>
<xp:td><xp:text escape="true" id="computedField1" value="#{sessionScope.djHorizontalSlider1}"></xp:text></xp:td>
</xp:tr>
</xp:table>
Contains panes stacked on top of each other.
<xe:djStackContainer attributes>content</xe:djStackContainer>
| Property | Description |
|---|---|
| id | Defaults to djStackContainer1, djStackContainer2, and so on. |
| Category | Properties |
|---|---|
| accessibility | title, waiRole, waiState |
| basics | binding, dir, doLayout, id, lang, loaded, persist, rendered, rendererType, selectedTab |
| dojo | dojoAttributes, dojoType, dragRestriction, tooltip |
| events | onBlur, onClick, onClose, onDblClick, onFocus, onHide, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onShow |
| styling | disableTheme, style, styleClass, themeId |
A StackContainer control holds StackPane controls stacked top to bottom in the order of definition.
<xp:button value="toggle" id="button1">
<xp:eventHandler event="onclick" submit="true"
refreshMode="complete">
<xp:this.action><![CDATA[#{javascript:switch(sessionScope.dbinfo) {
case "path" : sessionScope.dbinfo = "created"; break;
case "created" : sessionScope.dbinfo = "title"; break;
default : sessionScope.dbinfo = "path";}}]]>
</xp:this.action>
</xp:eventHandler>
</xp:button>
<xe:djStackContainer id="djStackContainer1">
<xe:djStackPane id="djStackPane1">
<xe:this.rendered>
<![CDATA[#{javascript:sessionScope.dbinfo == null || sessionScope.dbinfo == "title"}]]>
</xe:this.rendered>
<xp:text escape="true" id="computedField1"
value="#{javascript:database.getTitle()}">
</xp:text>
</xe:djStackPane>
<xe:djStackPane id="djStackPane2">
<xe:this.rendered>
<![CDATA[#{javascript:sessionScope.dbinfo == "path"}]]>
</xe:this.rendered>
<xp:text escape="true" id="computedField2"
value="#{javascript:database.getFilePath()}">
</xp:text>
</xe:djStackPane>
<xe:djStackPane id="djStackPane3">
<xp:text escape="true" id="computedField3"
value="#{javascript:database.getCreated().getLocalTime()}">
</xp:text>
</xe:djStackPane>
</xe:djStackContainer>
Provides content for one pane in a stack container.
<xe:djStackPane attributes>content</xe:djStackPane>
| Property | Description |
|---|---|
| id | Defaults to djStackPane1, djStackPane2, and so on. |
| Category | Properties |
|---|---|
| accessibility | title, waiRole, waiState |
| basics | binding, dir, errorMessage, extractContent, href, id, lang, loaded, loadingMessage, partialRefresh, preload, preventCache, refreshOnShow, rendered, rendererType |
| dojo | dojoAttributes, dojoType, dragRestriction, parseOnLoad, tooltip |
| events | onBlur, onClick, onClose, onContentError, onDblClick, onDownloadEnd, onDownloadError, onDownloadStart, onFocus, onHide, onKeyDown, onKeyPress, onKeyUp, onLoad, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onShow, onUnload |
| styling | disableTheme, style, styleClass, themeId |
A Stack Container control holds Stack Pane controls stacked top to bottom in the order of definition.
<xp:button value="toggle" id="button1">
<xp:eventHandler event="onclick" submit="true"
refreshMode="complete">
<xp:this.action><![CDATA[#{javascript:switch(sessionScope.dbinfo) {
case "path" : sessionScope.dbinfo = "created"; break;
case "created" : sessionScope.dbinfo = "title"; break;
default : sessionScope.dbinfo = "path";}}]]>
</xp:this.action>
</xp:eventHandler>
</xp:button>
<xe:djStackContainer id="djStackContainer1">
<xe:djStackPane id="djStackPane1">
<xe:this.rendered>
<![CDATA[#{javascript:sessionScope.dbinfo == null || sessionScope.dbinfo == "title"}]]>
</xe:this.rendered>
<xp:text escape="true" id="computedField1"
value="#{javascript:database.getTitle()}">
</xp:text>
</xe:djStackPane>
<xe:djStackPane id="djStackPane2">
<xe:this.rendered>
<![CDATA[#{javascript:sessionScope.dbinfo == "path"}]]>
</xe:this.rendered>
<xp:text escape="true" id="computedField2"
value="#{javascript:database.getFilePath()}">
</xp:text>
</xe:djStackPane>
<xe:djStackPane id="djStackPane3">
<xp:text escape="true" id="computedField3"
value="#{javascript:database.getCreated().getLocalTime()}">
</xp:text>
</xe:djStackPane>
</xe:djStackContainer>
Contains panes on tabs.
<xe:djTabContainer attributes>content</xe:djTabContainer>
| Property | Description |
|---|---|
| id | Defaults to djTabContainer1, djTabContainer2, and so on. |
| style | Specify width, height, and margin. |
| Category | Properties |
|---|---|
| accessibility | title, waiRole, waiState |
| basics | binding, defaultTabContent, dir, doLayout, id, lang, loaded, persist, rendered, rendererType, selectedTab, tabPosition, tabStrip, useMenu, useSlider |
| dojo | dojoAttributes, dojoType, dragRestriction, tooltip |
| events | onBlur, onClick, onClose, onDblClick, onFocus, onHide, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onShow |
| styling | disableTheme, style, styleClass, themeId |
A Tab Container control holds Tab Pane controls with the content of one tab displayed. The user clicks a tab to display its content.
<xe:djTabContainer id="djTabContainer1" style="width:500px; height:100px; margin:5px;">
<xe:djTabPane id="djTabPane1" title="Title">
<xp:text escape="true" id="computedField1"
value="#{javascript:database.getTitle()}">
</xp:text>
</xe:djTabPane>
<xe:djTabPane id="djTabPane2" title="File path">
<xp:text escape="true" id="computedField2"
value="#{javascript:database.getFilePath()}">
</xp:text>
</xe:djTabPane>
<xe:djTabPane id="djTabPane3" title="Creation date">
<xp:text escape="true" id="computedField3"
value="#{javascript:database.getCreated().getLocalTime()}">
</xp:text>
</xe:djTabPane>
</xe:djTabContainer>
Provides content for one pane in a tab container.
<xe:djTabPane attributes>content</xe:djTabPane>
| Property | Description |
|---|---|
| id | Defaults to djTabPane1, djTabPane2, and so on. |
| title | Applies a label to the tab. Use tooltip for accessibility. |
| Category | Properties |
|---|---|
| accessibility | title, waiRole, waiState |
| basics | binding, closable, dir, errorMessage, extractContent, href, id, lang, loaded, loadingMessage, partialEvents, partialRefresh, preload, preventCache, refreshOnShow, rendered, rendererType, tabUniqueKey |
| dojo | dojoAttributes, dojoType, dragRestriction, parseOnLoad, tooltip |
| events | onBlur, onClick, onClose, onContentError, onDblClick, onDownloadEnd, onDownloadError, onDownloadStart, onFocus, onHide, onKeyDown, onKeyPress, onKeyUp, onLoad, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onShow, onUnload |
| styling | disableTheme, style, styleClass, themeId |
A TabContainer control holds TabPane controls with the content of one tab displayed. The user clicks a tab to display its content.
<xe:djTabContainer id="djTabContainer1" style="width:500px; height:100px; margin:5px;">
<xe:djTabPane id="djTabPane1" title="Title">
<xp:text escape="true" id="computedField1"
value="#{javascript:database.getTitle()}">
</xp:text>
</xe:djTabPane>
<xe:djTabPane id="djTabPane2" title="File path">
<xp:text escape="true" id="computedField2"
value="#{javascript:database.getFilePath()}">
</xp:text>
</xe:djTabPane>
<xe:djTabPane id="djTabPane3" title="Creation date">
<xp:text escape="true" id="computedField3"
value="#{javascript:database.getCreated().getLocalTime()}">
</xp:text>
</xe:djTabPane>
</xe:djTabContainer>
Accepts text input on multiple lines.
<xe:djTextarea attributes>content</xe:djTextarea>
| Property | Description |
|---|---|
| id | Defaults to djTextarea1, djTextarea2, and so on. |
| value | Binds the control to a data element. |
| Category | Properties |
|---|---|
| accessibility | alt, tabIndex, title, waiRole, waiState |
| basics | binding, dir, disabled, id, immediate, lang, loaded, maxLength, multipleSeparator, multipleTrim, readOnly, rendered, rendererType, required, trim, type |
| data | converter, defaultValue, disableClientSideValidation, disableModifiedFlag, disableValidators, showReadOnlyAsDisabled, validator, validators, value, valueChangeListener, valueChangeListeners |
| dojo | dojoAttributes, dojoType, dragRestriction, intermediateChanges, tooltip |
| events | onBlur, onChange, onClick, onClose, onDblClick, onFocus, onHide, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onShow |
| format | cols, lowercase, propercase, rows, uppercase |
| styling | disableTheme, style, styleClass, themeId |
At run time, a text box appears on the page. The user can enter multiple lines of text in the box. The box expands as lines are added.
<xp:table>
<xp:tr>
<xp:td>Text Area</xp:td>
<xp:td>
<xe:djTextarea value="#{sessionScope.djTextarea1}"></xe:djTextarea>
</xp:td>
</xp:tr>
<xp:tr>
<xp:td>
<xp:button value="submit" id="button1">
<xp:eventHandler event="onclick" submit="true" refreshMode="complete" immediate="false" save="true">
</xp:eventHandler></xp:button>
</xp:td>
<xp:td></xp:td>
</xp:tr>
<xp:tr>
<xp:td>Value</xp:td>
<xp:td><xp:text escape="true" id="computedField1" value="#{sessionScope.djTextarea1}"></xp:text></xp:td>
</xp:tr>
</xp:table>
Accepts text input on one line.
<xe:djTextBox attributes>content</xe:djTextBox>
| Property | Description |
|---|---|
| id | Defaults to djTextBox1, djTextBox2, and so on. |
| value | Binds the control to a data element. |
| Category | Properties |
|---|---|
| accessibility | alt, tabIndex, title, waiRole, waiState |
| basics | binding, dir, disabled, id, immediate, lang, loaded, maxLength, multipleSeparator, multipleTrim, readOnly, rendered, rendererType, required, trim, type |
| data | converter, defaultValue, disableClientSideValidation, disableModifiedFlag, disableValidators, showReadOnlyAsDisabled, validator, validators, value, valueChangeListener, valueChangeListeners |
| dojo | dojoAttributes, dojoType, dragRestriction, intermediateChanges, tooltip |
| events | onBlur, onChange, onClick, onClose, onDblClick, onFocus, onHide, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onShow |
| format | lowercase, propercase, uppercase |
| styling | disableTheme, style, styleClass, themeId |
At run time, a text box appears on the page. The user can enter a line of text in the box.
<xp:table>
<xp:tr>
<xp:td>Basic TextBox</xp:td>
<xp:td>
<xe:djTextBox value="#{sessionScope.djTextBox1}" lowercase="true"></xe:djTextBox>
</xp:td>
</xp:tr>
<xp:tr>
<xp:td>
<xp:button value="submit" id="button1">
<xp:eventHandler event="onclick" submit="true" refreshMode="complete" immediate="false" save="true">
</xp:eventHandler></xp:button>
</xp:td>
<xp:td></xp:td>
</xp:tr>
<xp:tr>
<xp:td>Value</xp:td>
<xp:td><xp:text escape="true" id="computedField1" value="#{sessionScope.djTextBox1}"></xp:text></xp:td>
</xp:tr>
</xp:table>
Accepts a time value.
<xe:djTimeTextBox attributes>content</xe:djTimeTextBox>
| Property | Description |
|---|---|
| id | Defaults to djTimeTextBox1, djTimeTextBox2, and so on. |
| value | Binds the control to a data element. |
| Category | Properties |
|---|---|
| accessibility | alt, tabIndex, title, waiRole, waiState |
| basics | binding, dir, disabled, id, immediate, lang, loaded, maxLength, multipleSeparator, multipleTrim, readOnly, rendered, rendererType, required, trim, type, validatorExt |
| data | constraints, converter, defaultValue, disableClientSideValidation, disableModifiedFlag, disableValidators, invalidMessage, promptMessage, rangeMessage, regExp, regExpGen, showReadOnlyAsDisabled, validator, validators, value, valueChangeListener, valueChangeListeners |
| dojo | dojoAttributes, dojoType, dragRestriction, intermediateChanges, tooltip |
| events | onBlur, onChange, onClick, onClose, onDblClick, onFocus, onHide, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onShow |
| format | displayMessageExt, lowercase, propercase, tooltipPosition, uppercase |
| styling | disableTheme, style, styleClass, themeId |
At run time, a text box appears on the page. When the user selects the box, a time slider appears. The user can enter a time value. On invalid input, a tooltip appears.
<xp:table>
<xp:tr>
<xp:td>Time Text Box</xp:td>
<xp:td>
<xe:djTimeTextBox id="djTimeTextBox1" value="#{sessionScope.djTimeTextBox1}"></xe:djTimeTextBox>
</xp:td>
</xp:tr>
<xp:tr>
<xp:td>
<xp:button value="submit" id="button1">
<xp:eventHandler event="onclick" submit="true" refreshMode="complete" immediate="false" save="true">
</xp:eventHandler></xp:button>
</xp:td>
<xp:td></xp:td>
</xp:tr>
<xp:tr>
<xp:td>Value</xp:td>
<xp:td><xp:text escape="true" id="computedField1" value="#{sessionScope.djTimeTextBox1}"></xp:text></xp:td>
</xp:tr>
</xp:table>
Toggles between a checked value and an unchecked value.
<xe:djToggleButton attributes>content</xe:djToggleButton>
| Property | Description |
|---|---|
| id | Defaults to djToggleButton1, djToggleButton2, and so on. |
| value | Binds the control to a data element. |
| label | Specifies the display text on the button. |
| checkedValue | Specifies the value of the button when toggled to the checked position. |
| uncheckedValue | Specifies the value of the button when toggled to the unchecked position. |
| Category | Properties |
|---|---|
| accessibility | alt, tabIndex, title, waiRole, waiState |
| basics | binding, dir, disabled, id, immediate, label, lang, loaded, maxLength, multipleSeparator, multipleTrim, readOnly, rendered, rendererType, required, showLabel, type |
| data | checkedValue, converter, defaultValue, disableClientSideValidation, disableModifiedFlag, disableValidators, showReadOnlyAsDisabled, uncheckedValue, validator, validators, value, valueChangeListener, valueChangeListeners |
| dojo | dojoAttributes, dojoType, dragRestriction, intermediateChanges, tooltip |
| events | onBlur, onChange, onClick, onClose, onDblClick, onFocus, onHide, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onShow |
| styling | disableTheme, iconClass, style, styleClass, themeId |
At run time, a button appears on the page. Clicking the button toggles between the checked value and the unchecked value.
This button does not automatically submit to the server. It toggles its value on the client.
<xp:table>
<xp:tr>
<xp:td>Toggle Button</xp:td>
<xp:td>
<xe:djToggleButton id="djToggleButton1"
value="#{sessionScope.djToggleButton1}" checkedValue="blue"
uncheckedValue="red"
label="#{javascript:sessionScope.djToggleButton1}">
</xe:djToggleButton>
</xp:td>
</xp:tr>
<xp:tr>
<xp:td></xp:td>
<xp:td>
<xp:button value="submit" id="button1"><xp:eventHandler event="onclick" submit="true"
refreshMode="complete" immediate="false" save="true"></xp:eventHandler></xp:button></xp:td>
</xp:tr>
<xp:tr>
<xp:td>Value</xp:td>
<xp:td>
<xp:text escape="true" id="computedField1"
value="#{sessionScope.djToggleButton1}">
</xp:text>
</xp:td>
</xp:tr>
</xp:table>
Accepts a validated value.
<xe:djValidationTextBox attributes>content</xe:djValidationTextBox>
| Property | Description |
|---|---|
| id | Defaults to djValidationTextBox1, djValidationTextBox2, and so on. |
| value | Binds the control to a data element. |
| Category | Properties |
|---|---|
| accessibility | alt, tabIndex, title, waiRole, waiState |
| basics | binding, dir, disabled, id, immediate, lang, loaded, maxLength, multipleSeparator, multipleTrim, readOnly, rendered, rendererType, required, trim, type, validatorExt |
| data | converter, defaultValue, disableClientSideValidation, disableModifiedFlag, disableValidators, invalidMessage, promptMessage, regExp, regExpGen, showReadOnlyAsDisabled, validator, validators, value, valueChangeListener, valueChangeListeners |
| dojo | dojoAttributes, dojoType, dragRestriction, intermediateChanges, tooltip |
| events | onBlur, onChange, onClick, onClose, onDblClick, onFocus, onHide, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onShow |
| format | displayMessageExt, lowercase, propercase, tooltipPosition, uppercase |
| styling | disableTheme, style, styleClass, themeId |
At run time, a text box appears on the page. On invalid input, a tooltip appears.
<xp:table>
<xp:tr>
<xp:td>Validation Text Box</xp:td>
<xp:td>
<xe:djValidationTextBox id="djValidationTextBox1"
value="#{sessionScope.djValidationTextBox1}">
<xe:this.regExp><![CDATA[[a-zA-Z]*]]></xe:this.regExp>
</xe:djValidationTextBox>
</xp:td>
</xp:tr>
<xp:tr>
<xp:td>
<xp:button value="submit" id="button1">
<xp:eventHandler event="onclick" submit="true" refreshMode="complete" immediate="false" save="true">
</xp:eventHandler></xp:button>
</xp:td>
<xp:td></xp:td>
</xp:tr>
<xp:tr>
<xp:td>Value</xp:td>
<xp:td><xp:text escape="true" id="computedField1" value="#{sessionScope.djValidationTextBox1}"></xp:text></xp:td>
</xp:tr>
</xp:table>
Accepts a numeric value from a vertical slider.
<xe:djVerticalSlider attributes>content</xe:djVerticalSlider>
| Property | Description |
|---|---|
| id | Defaults to djVerticalSlider1, djVerticalSlider2, and so on. |
| value | Binds the control to a data element. |
| style | Provides dimensions for the slider. |
| discreteValues | Specifies the number of values on the slider. |
| minimum | Specifies the starting value of the slider. |
| maximum | Specifies the ending value of the slider. |
| Category | Properties |
|---|---|
| accessibility | alt, tabIndex, title, waiRole, waiState |
| basics | binding, clickSelect, dir, disabled, discreteValues, id, immediate, lang, loaded, maximum, minimum, multipleSeparator, multipleTrim, pageIncrement, readOnly, rendered, rendererType, required, showButtons, slideDuration, type |
| data | converter, defaultValue, disableClientSideValidation, disableModifiedFlag, disableValidators, showReadOnlyAsDisabled, validator, validators, value, valueChangeListener, valueChangeListeners |
| dojo | dojoAttributes, dojoType, dragRestriction, intermediateChanges, tooltip |
| events | onBlur, onChange, onClick, onClose, onDblClick, onFocus, onHide, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onShow |
| styling | disableTheme, style, styleClass, themeId |
At run time, a vertical slider appears on the page. The user can slide the slider to select a numeric value.
Use djSliderRule - Dojo Slider Rule and djSliderRuleLabels - Dojo Slider Rule Labels to add rules (hash marks) and labels.
<xp:table>
<xp:tr>
<xp:td>Vertical Slider</xp:td>
<xp:td>
<xe:djVerticalSlider id="djVerticalSlider1" style="margin: 5px;width:75px;
height: 200px;"
value="#{sessionScope.djVerticalSlider1}" discreteValues="1000"
maximum="999" minimum="0">
<xe:djSliderRuleLabels id="djSliderRuleLabels1"
container="leftDecoration"
style="width:20px;font-size:75%;color:gray;">
<xe:this.labelsList>
<xe:djSliderRuleLabel
label="0"></xe:djSliderRuleLabel>
<xe:djSliderRuleLabel
label="999"></xe:djSliderRuleLabel>
</xe:this.labelsList>
</xe:djSliderRuleLabels>
<xe:djSliderRule id="djSliderRule1"
container="leftDecoration" style="width:5px;" count="11">
</xe:djSliderRule>
<xe:djSliderRule id="djSliderRule2" style="width:5px;"
count="11" container="rightDecoration">
</xe:djSliderRule>
<xe:djSliderRuleLabels id="djSliderRuleLabels2"
container="rightDecoration" style="width:5px;font-
size:75%;color:gray;">
</xe:djSliderRuleLabels>
</xe:djVerticalSlider>
</xp:td>
</xp:tr>
<xp:tr>
<xp:td>
<xp:button value="submit" id="button1">
<xp:eventHandler event="onclick" submit="true"
refreshMode="complete" immediate="false" save="true">
</xp:eventHandler></xp:button>
</xp:td>
<xp:td></xp:td>
</xp:tr>
<xp:tr>
<xp:td>Value</xp:td>
<xp:td><xp:text escape="true" id="computedField1" value="#
{sessionScope.djVerticalSlider1}"></xp:text></xp:td>
</xp:tr>
</xp:table>
Defines a grid of rows and columns.
<xe:djxDataGrid attributes>content</xe:djxDataGrid>
| Property | Description |
|---|---|
| id | Defaults to djxDataGrid1, djxDataGrid2, and so on. |
| store | JavaScript variable that identifies a Dojo data store object. |
| storeComponentId | REST service control identifier. Supersedes store. |
| Category | Properties |
|---|---|
| accessibility | title, waiRole, waiState |
| basics | autoHeight, binding, dir, errorMessage, escapeHTMLInData, headerMenu, id, jsId, lang, loaded, loadingMessage, query, rendered, rendererType, rowsPerPage, selectable, selectionMode, singleClickEdit |
| data | store, storeComponentId, updateDelay |
| dojo | dojoAttributes, dojoType, dragRestriction, tooltip |
| events | onBlur, onChange, onClick, onClose, onDblClick, onFocus, onHide, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onRowClick, onRowContextMenu, onRowDblClick, onShow, onStyleRow |
| format | initialWidth, rowSelector |
| styling | disableTheme, style, styleClass, themeId |
<xp:this.data>
<xp:dominoView var="view1" viewName="subject"></xp:dominoView>
</xp:this.data>
<xp:panel>
<xe:restService id="restService1">
<xe:this.service>
<xe:viewItemFileService viewName="subject" var="entry"
defaultColumns="true" contentType="application/json">
<xe:this.columns>
<xe:restViewColumn columnName="subject"
name="subject">
<xe:this.value><![CDATA[#{javascript:return entry.getColumnValue("subject")}]]></xe:this.value>
</xe:restViewColumn>
</xe:this.columns>
</xe:viewItemFileService>
</xe:this.service>
</xe:restService>
<xp:br></xp:br>
<xe:djxDataGrid id="djxDataGrid1"
storeComponentId="restService1">
<xe:djxDataGridColumn id="djxDataGridColumn1"
field="subject" width="auto" editable="true">
</xe:djxDataGridColumn>
</xe:djxDataGrid>
</xp:panel>
Defines the content of a column. Can be inserted into a grid or row.
<xe:djxDataGridColumn attributes>content</xe:djxDataGridColumn>
| Property | Description |
|---|---|
| id | Defaults to djxDataGridColumn1, djxDataGridColumn2, and so on. |
| field | Name of a field in the data store. |
| Category | Properties |
|---|---|
| basics | binding, cellType, editable, hidden, id, label, loaded, options, rendered, rendererType |
| data | field, formatter, get |
| format | width |
| styling | disableTheme, themeId |
<xp:this.data>
<xp:dominoView var="view1" viewName="subject"></xp:dominoView>
</xp:this.data>
<xp:panel>
<xe:restService id="restService1">
<xe:this.service>
<xe:viewItemFileService viewName="subject" var="entry"
defaultColumns="true" contentType="application/json">
<xe:this.columns>
<xe:restViewColumn columnName="subject"
name="subject">
<xe:this.value><![CDATA[#{javascript:return entry.getColumnValue("subject")}]]></xe:this.value>
</xe:restViewColumn>
</xe:this.columns>
</xe:viewItemFileService>
</xe:this.service>
</xe:restService>
<xp:br></xp:br>
<xe:djxDataGrid id="djxDataGrid1"
storeComponentId="restService1">
<xe:djxDataGridColumn id="djxDataGridColumn1"
field="subject" width="auto" editable="true">
</xe:djxDataGridColumn>
</xe:djxDataGrid>
</xp:panel>
Defines multiple rows.
<xe:djxDataGridRow attributes>content</xe:djxDataGridRow>
| Property | Description |
|---|---|
| id | Defaults to djxDataGridRow1, djxDataGridRow2, and so on. |
| Category | Properties |
|---|---|
| basics | binding, id, label, loaded, rendered, rendererType |
| styling | disableTheme, themeId |
Provides header information and basic navigation.
<xe:djxmHeading attributes>content</xe:djxmHeading>
| Property | Description |
|---|---|
| id | Defaults to djxmHeading1, djxmHeading2, and so on. |
| back | Specifies a label for the navigational control to return to the previous view. |
| moveTo | Specifies a target view when the next control is pressed in the current view. |
| Category | Properties |
|---|---|
| accessibility | title |
| basics | back, binding, dir, href, id, label, lang, loaded, moveTo, rendered, rendererType, transition |
| dojo | dojoAttributes, dojoType, tooltip |
| styling | disableTheme, style, styleClass, themeId |
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xe="http://www.ibm.com/xsp/coreex">
<xe:singlePageApp id="xpagesMobileApp"
selectedPageName="homePage">
<xe:appPage id="appPage1" pageName="homePage" >
<xe:djxmHeading id="homePageHeading" label="Home"></xe:djxmHeading>
</xe:appPage>
</xe:singlePageApp>
</xp:view>
Provides a way to link to other mobile pages.
<xe:djxmLineItem attributes>content</xe:djxmLineItem>
| Property | Description |
|---|---|
| id | Defaults to djxmLineItem1, djxmLineItem2, and so on. |
| label | Specifies a visible label. |
| moveTo | Links to another page. |
| Category | Properties |
|---|---|
| accessibility | title |
| basics | binding, dir, icon, id, label, lang, loaded, moveTo, rendered, rendererType, transition |
| dojo | dojoAttributes, dojoType, tooltip |
| styling | disableTheme, style, styleClass, themeId |
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xe="http://www.ibm.com/xsp/coreex">
<xe:singlePageApp id="xpagesMobileApp"
selectedPageName="homePage">
<xe:appPage id="appPage1" pageName="homePage" resetContent="false">
<xe:djxmHeading id="homePageHeading" label="Home"></xe:djxmHeading>
<xe:djxmLineItem id="djxmLineItem1"
moveTo="#viewPage" label="All Documents">
</xe:djxmLineItem>
</xe:appPage>
</xe:singlePageApp>
</xp:view>
Displays a rectangle with rounded corners.
<xe:djxmRoundRectList attributes>content</xe:djxmRoundRectList>
| Property | Description |
|---|---|
| id | Defaults to djxmRoundRectList1, djxmRoundRectList2, and so on. |
| back | Specifies a label for the navigational control to return to the previous view. |
| moveTo | Specifies a target view when the next control is pressed in the current view. |
| Category | Properties |
|---|---|
| accessibility | title |
| basics | binding, dir, iconBase, iconPos, id, lang, loaded rendered, rendererType, transition |
| dojo | dojoAttributes, dojoType, tooltip |
| styling | disableTheme, style, styleClass, themeId |
<xe:appPage id="appPage4" pageName="newDocumentPage"
preload="true" resetContent="true">
<xe:djxmHeading id="newDocumentPageHeading" label="New Document"
back="Cancel" moveTo="viewPage">
</xe:djxmHeading>
<xp:panel>
<xp:this.data>
<xp:dominoDocument var="document1" formName="MainTopic" computeWithForm="onsave">
</xp:dominoDocument>
</xp:this.data>
<xe:tabBar id="newDocumentTabBar" barType="segmentedControl">
<xe:tabBarButton id="tabBarButtonSubmit" label="Submit">
<xp:eventHandler event="onclick" submit="true"
refreshMode="complete">
<xp:this.action>
<xe:moveTo forceFullRefresh="true" saveDocument="true"
targetPage="viewPage" transitionType="slide" direction="Left to Right">
</xe:moveTo>
</xp:this.action>
</xp:eventHandler>
</xe:tabBarButton>
</xe:tabBar>
<xe:djxmRoundRectList id="djxmRoundRectList1">
<xp:label value="Subject: " id="labelSubject2"></xp:label>
<xp:inputText id="inputTextSubject2" value="#{document1.Subject}"></xp:inputText>
<xp:br />
<xp:label value="Category: " id="labelCategory2"></xp:label>
<xp:inputText id="inputTextCategory2" value="#{document1.NewCats}"></xp:inputText>
<xp:br />
<xp:inputTextarea id="inputTextareaBody" value="#{document1.Body}" cols="40" rows="10">
</xp:inputTextarea>
</xe:djxmRoundRectList>
</xp:panel>
</xe:appPage>
Works as an on/off switch with behavior like a checkbox.
<xe:djxmSwitch attributes>content</xe:djxmSwitch>
| Property | Description |
|---|---|
| id | Defaults to djxmSwitch1, djxmSwitch2, and so on. |
| back | Specifies a label for the navigational control to return to the previous view. |
| moveTo | Specifies a target view when the next control is pressed in the current view. |
| Category | Properties |
|---|---|
| accessibility | title |
| basics | binding, dir, id, lang, leftLabel, loaded rendered, rendererType, rightLabel, value |
| dojo | dojoAttributes, dojoType, tooltip |
| styling | disableTheme, style, styleClass, themeId |
Contains dynamic content.
<xe:dynamicContent attributes>
<xp:this.facets>
<xp:panel xp:key="facetID">content</panel>
...
</xp:this.facets>
</xe:dynamicContent>
| Property | Description |
|---|---|
| id | Defaults to dynamicContent1, dynamicContent2, and so on. |
| Category | Properties |
|---|---|
| basics | binding, defaultFacet, id, loaded, partialEvents, rendered, rendererType, useHash |
| events | afterContentLoad, beforeContentLoad |
| styling | disableTheme, themeId |
getComponent("dynamicContent1").show("key_1")
Alternatively you can use a simple action. See Change Dynamic Content (Simple actions - JavaScript).
The Dynamic Content control can initially load a facet by identifying it as the default:defaultFacet="key_1"
See Dynamic content for additional information.
<xe:dynamicContent id="dynamicContent1" defaultFacet="mainView">
<xp:this.facets>
<xp:panel xp:key="subjectView">
<xp:button value="Switch to main view" id="button4">
<xp:eventHandler event="onclick" submit="true" refreshMode="partial"
refreshId="dynamicContent1">
<xp:this.action>
<![CDATA[#{javascript:getComponent("dynamicContent1").show("mainView")}]]>
</xp:this.action>
</xp:eventHandler>
</xp:button>
<xp:viewPanel rows="30" id="viewPanel1">
<xp:this.facets>
<xp:pager partialRefresh="true" layout="Previous Group Next"
xp:key="headerPager" id="pager1">
</xp:pager>
</xp:this.facets>
<xp:this.data>
<xp:dominoView var="view1" viewName="subject"></xp:dominoView>
</xp:this.data>
<xp:viewColumn columnName="subject" id="viewColumn1">
<xp:viewColumnHeader value="subject" id="viewColumnHeader1"></xp:viewColumnHeader>
</xp:viewColumn>
<xp:viewColumn columnName="number" id="viewColumn2">
<xp:viewColumnHeader value="number" id="viewColumnHeader2"></xp:viewColumnHeader>
</xp:viewColumn>
<xp:viewColumn columnName="$2" id="viewColumn3">
<xp:viewColumnHeader value="last modified" id="viewColumnHeader3"></xp:viewColumnHeader>
</xp:viewColumn>
</xp:viewPanel>
</xp:panel>
<xp:panel xp:key="mainView">
<xp:button value="Switch to subject view" id="button3">
<xp:eventHandler event="onclick" submit="true" refreshMode="partial"
refreshId="dynamicContent1">
<xp:this.action>
<![CDATA[#{javascript:getComponent("dynamicContent1").show("subjectView")}]]>
</xp:this.action>
</xp:eventHandler>
</xp:button>
<xp:viewPanel rows="30" id="viewPanel2">
<xp:this.facets>
<xp:pager partialRefresh="true" layout="Previous Group Next"
xp:key="headerPager" id="pager2">
</xp:pager>
</xp:this.facets>
<xp:this.data>
<xp:dominoView var="view2" viewName="main"></xp:dominoView>
</xp:this.data>
<xp:viewColumn columnName="category" id="viewColumn4">
<xp:viewColumnHeader value="category" id="viewColumnHeader4"></xp:viewColumnHeader>
</xp:viewColumn>
<xp:viewColumn columnName="subject" id="viewColumn5">
<xp:viewColumnHeader value="subject" id="viewColumnHeader5"></xp:viewColumnHeader>
</xp:viewColumn>
<xp:viewColumn columnName="number" id="viewColumn6">
<xp:viewColumnHeader value="number" id="viewColumnHeader6"></xp:viewColumnHeader>
</xp:viewColumn><xp:viewColumn columnName="$2" id="viewColumn7">
<xp:viewColumnHeader value="last modified" id="viewColumnHeader7"></xp:viewColumnHeader>
</xp:viewColumn>
</xp:viewPanel>
</xp:panel>
</xp:this.facets>
</xe:dynamicContent>
The Dynamic Content control contains alternate sets of content that can be presented as desired.
Here is an example where the control can either display a view or a form when the user clicks a link. The browser in fact stays on the same page as the click triggers a partial refresh of the content of the control. On the server side, the dynamic content control is replacing its children.
Here is the page after the user clicks All Contacts View:

Here is the page after the user clicks Edit First Contact:

<xe:dynamicContent id="dynp" defaultFacet="view" useHash="true" >
<xp:this.facets>
<xp:panel xp:key="view" id="panel1" >
<xp:viewPanel rows="10" id="viewPanel1" var="row" >
...
</xp:viewPanel>
</xp:panel>
<xp:panel xp:key="contact" id="panel2" >
<xp:this.data>
<xp:dominoDocument var="document1" formName="Contact" >
</xp:dominoDocument>
</xp:this.data>
...
</xp:panel>
</xp:this.facets>
</xe:dynamicContent>
var c = getComponent("dynp")
c.show("view")
var c = getComponent("dynp")
c.show("contact",{action:'editDocument'
,documentId:dataAccess.firstContactID})
A typical link implementation calls the show() method and partially refreshes the Dynamic Content control.
partialExecute false

useHash true
http://.../XPagesExt.nsf/Core_DynamicPage.xsp#content=contact&action=editDocument&documentId=8FA
A Dojo listener is also installed for tracking the URL changes by the user (going to a bookmark or using the back or next button). When a change is detected, an Ajax request is automatically sent to the server and the content is updated.
XSP.showContent("#{id:dynp}","view")
#content=view
On the server side, the parameters from the hash are automatically added to the requestMap or the requestParameterMap, making it transparent to the data sources and other controls.

var c = getComponent("dynp")
c.show("view")
The button event should do a partial refresh on the Dynamic Content control:

var c = getComponent("dynp")
var id = row.getNoteID()
c.show("contact",{action:'editDocument',documentId:id})
Divides a form table or a layout row into columns.
<xe:formColumn attributes>content</xe:formColumn>
| Property | Description |
|---|---|
| id | Defaults to formColumn1, formColumn2, and so on. |
| colSpan | Spans columns starting at the current column. The default 1 means no span, and 0 means span to the last column. |
| Category | Properties |
|---|---|
| basics | binding, colSpan, id, loaded, rendered, rendererType |
| styling | disableTheme, style, styleClass, themeId |
<xe:formTable id="formTable1" formTitle="Subject and number"
formDescription="Provide your input in the boxes below.">
<xe:formColumn>
<xe:formRow id="formRow1" label="Subject" for="inputText1">
<xp:inputText id="inputText1"
value="#{document1.subject}">
</xp:inputText>
</xe:formRow>
</xe:formColumn>
<xe:formColumn>
<xe:formRow id="formRow2" label="Number" for="inputText2">
<xp:inputText id="inputText2"
value="#{document1.number}">
</xp:inputText>
</xe:formRow>
</xe:formColumn>
<xp:this.facets>
<xp:panel xp:key="footer" id="panel1">
<xp:button value="Save" id="button1">
<xp:eventHandler event="onclick" submit="true"
refreshMode="complete" immediate="false" save="true">
</xp:eventHandler>
</xp:button>
<xp:button value="Cancel" id="button2">
<xp:eventHandler event="onclick" submit="true"
refreshMode="complete" immediate="true" save="false">
</xp:eventHandler>
</xp:button>
</xp:panel>
</xp:this.facets>
</xe:formTable>
Specifies a row of content in a form layout column or the layout table itself.
<xe:formRow attributes>content</xe:formRow>
| Property | Description |
|---|---|
| id | Defaults to formRow1, formRow2, and so on. |
| for | Identifies the control to which the row applies. Not needed if the control is contained in the row. |
| label | Associates a label with the control. |
| labelPosition | Specifies the position of the label in relation to the control: left, above, none, or inherit from the parent table (the table default is left). |
| Category | Properties |
|---|---|
| basics | binding, for, helpId, id, label, labelWidth, loaded, rendered, rendererType |
| format | labelPosition |
| styling | disableTheme, style, styleClass, themeId |
<xe:formTable id="formTable1" formTitle="Subject and number"
formDescription="Provide your input in the boxes below.">
<xe:formColumn>
<xe:formRow id="formRow1" label="Subject" for="inputText1">
<xp:inputText id="inputText1"
value="#{document1.subject}">
</xp:inputText>
</xe:formRow>
</xe:formColumn>
<xe:formColumn>
<xe:formRow id="formRow2" label="Number" for="inputText1">
<xp:inputText id="inputText2"
value="#{document1.number}">
</xp:inputText>
</xe:formRow>
</xe:formColumn>
<xp:this.facets>
<xp:panel xp:key="footer" id="panel1">
<xp:button value="Save" id="button1">
<xp:eventHandler event="onclick" submit="true"
refreshMode="complete" immediate="false" save="true">
</xp:eventHandler>
</xp:button>
<xp:button value="Cancel" id="button2">
<xp:eventHandler event="onclick" submit="true"
refreshMode="complete" immediate="true" save="false">
</xp:eventHandler>
</xp:button>
</xp:panel>
</xp:this.facets>
</xe:formTable>
Formats input controls in rows and columns. Provides header, footer, and message areas.
<xe:formTable attributes>content</xe:formTable>
| Property | Description |
|---|---|
| id | Defaults to formTable1, formTable2, and so on. |
| formTitle | Specifies a title for the top of the table. |
| formDescription | Specifies text to be placed under the title. |
| labelPosition | Specifies the default position for labels in rows in relation to the control: left (default), above, or none. |
| Category | Properties |
|---|---|
| accessibility | legend |
| basics | binding, disableErrorSummary, disableRowError, errorSummaryText, fieldHelp, formDescription, formTitle, id, labelWidth, loaded, rendered, rendererType |
| format | disableRequiredMarks, labelPosition |
| styling | disableTheme, style, styleClass |
<xe:formTable id="formTable1" formTitle="Subject and number"
formDescription="Provide your input in the boxes below.">
<xe:formColumn>
<xe:formRow id="formRow1" label="Subject" for="inputText1">
<xp:inputText id="inputText1"
value="#{document1.subject}">
</xp:inputText>
</xe:formRow>
</xe:formColumn>
<xe:formColumn>
<xe:formRow id="formRow2" label="Number" for="inputText2">
<xp:inputText id="inputText2"
value="#{document1.number}">
</xp:inputText>
</xe:formRow>
</xe:formColumn>
<xp:this.facets>
<xp:panel xp:key="footer" id="panel1">
<xp:button value="Save" id="button1">
<xp:eventHandler event="onclick" submit="true"
refreshMode="complete" immediate="false" save="true">
</xp:eventHandler>
</xp:button>
<xp:button value="Cancel" id="button2">
<xp:eventHandler event="onclick" submit="true"
refreshMode="complete" immediate="true" save="false">
</xp:eventHandler>
</xp:button>
</xp:panel>
</xp:this.facets>
</xe:formTable>
Contains a dynamic form.
<xe:inPlaceForm attributes>content</xe:inPlaceForm>
| Property | Description |
|---|---|
| id | Defaults to inPlaceForm1, inPlaceForm2, and so on. |
| Category | Properties |
|---|---|
| basics | binding, id, loaded, partialEvents, rendered, rendererType |
| events | afterContentLoad, beforeContentLoad |
| styling | disableTheme, themeId |
getComponent("inPlaceForm1").show()
getComponent("inPlaceForm1").hide()
To
show or hide the form depending on the current state, execute the
following code:getComponent("inPlaceForm1").toggle()
See In place editing for additional information.
<xp:this.data>
<xp:dominoView var="view1" viewName="subject"></xp:dominoView>
</xp:this.data>
<xp:repeat id="repeat1" rows="30" value="#{view1}" var="row">
<xp:text escape="true" id="computedField1" value="#{row.subject}"></xp:text>
<xp:link escape="true" id="link1"><xp:this.text>
<![CDATA[#{javascript:var c = getComponent("inPlaceForm1")
if(c.isVisible()) {
return "Close";
} else {
return "Edit"
}}]]></xp:this.text>
 
<xp:eventHandler event="onclick" submit="true"
refreshMode="partial" refreshId="repeat1">
<xp:this.action>
<![CDATA[#{javascript:getComponent("inPlaceForm1").toggle()}]]>
</xp:this.action>
</xp:eventHandler>
</xp:link>
<xp:br></xp:br>
<xp:panel>
<xe:inPlaceForm id="inPlaceForm1" partialEvents="true">
<xp:inputText id="inputText1" value="#{document1.subject}"></xp:inputText>
 
<xp:button value="OK" id="button1">
<xp:eventHandler event="onclick" submit="true"
refreshMode="partial" refreshId="repeat1">
<xp:this.action>
<xp:actionGroup>
<xp:saveDocument></xp:saveDocument>
<xp:executeScript>
<xp:this.script>
<![CDATA[#{javascript:getComponent("inPlaceForm1").hide()}]]>
</xp:this.script>
</xp:executeScript>
</xp:actionGroup>
</xp:this.action>
</xp:eventHandler>
</xp:button>
</xe:inPlaceForm>
<xp:this.data>
<xp:dominoDocument var="document1" action="editDocument"
documentId="#{javascript:row.getNoteID()}" formName="main">
</xp:dominoDocument>
</xp:this.data>
</xp:panel>
</xp:repeat>
In place editing dynamically shows an entry form containing data, typically in response to a user click. The user can enter data and close the form.
For example, the user may see a list of names followed by links:

Clicking a link opens a form that lets the user edit that entry:


var c = getComponent("inPlaceForm1") // inPlaceForm1 being the ID of the control
c.show()
c.hide()
c.toggle()
The control automatically creates and inserts the child controls into the JSF tree, or deletes them, as necessary. The control can be located with a repeat and maintains a list of contexts in which it is visible. The controls are removed from the JSF tree when there is no longer valid contexts.
The show() and toggle() methods have an optional map to emulate URL parameters. The content of the map is temporarily pushed to the requestScope and removed after the request is processed.
The content of an inPlaceForm control is not loaded unless the form is used, minimizing the runtime cost.

var c = getComponent("inPlaceForm1")
c.hide()
Have the onclick event do a partial refresh of the edited value. The refresh ID should contain the entire form plus the edited value.
If the form is editing a row within the repeat control, refresh the entire repeat control:

<xe:inPlaceForm id="inPlaceForm1">
<xp:panel>
<xp:this.data>
<xp:dominoDocument
var="document1" formName="Contact" action="editDocument"
documentId="#{ javascript:row.getNoteID() }"
ignoreRequestParams="true" >
</xp:dominoDocument>
</xp:this.data>
To force the data source to use the computed properties and prevent it from using the actual requests parameters, specify ignoreRequestParams="true".
Exposes a remote service.
<xe:jsonRpcService attributes>content</xe:jsonRpcService>
| Property | Description |
|---|---|
| id | Defaults to jsonRpcService1, jsonRpcService2, and so on. |
| pathInfo | Identifies the location of the service
relative to the XPage. The URL for accessing the service takes the
following form:
|
| serviceName | Name of the client-side JavaScript service. Overrides the pathInfo property. |
| methods | One or more remoteMethod properties each of which has the following properties: arguments, loaded, name, and script. |
| Category | Properties |
|---|---|
| basics | binding, id, loaded, pathInfo, rendered, rendererType, serviceName, state |
| methods | |
| styling | disableTheme, themeId |
<xe:jsonRpcService id="jsonRpcService1" serviceName="userinfo">
<xe:this.methods>
<xe:remoteMethod name="getUserName">
<xe:this.script><![CDATA[return @UserName()]]></xe:this.script>
</xe:remoteMethod>
<xe:remoteMethod name="add" script="return arg1 + arg2">
<xe:this.arguments>
<xe:remoteMethodArg name="arg1"></xe:remoteMethodArg>
<xe:remoteMethodArg name="arg2"></xe:remoteMethodArg>
</xe:this.arguments>
</xe:remoteMethod>
</xe:this.methods>
</xe:jsonRpcService>
<xp:button value="Display the user" id="button3">
<xp:eventHandler event="onclick" submit="false">
<xp:this.script><![CDATA[var deferred = userinfo.getUserName()
deferred.addCallback(function(result) {
alert(result)
});]]>
</xp:this.script>
</xp:eventHandler>
</xp:button>
Displays a modal dialog containing name choices. Applies selected names to an associated control.
<xe:namePicker attributes>content</xe:namePicker>
| Property | Description |
|---|---|
| id | Defaults to namePicker1, namePicker2, and so on. |
| for | Specifies the control to which selected names are applied. |
| dataProvider | Specifies choices for the name selection:
|
| Category | Properties |
|---|---|
| basics | binding, dataProvider, dialogTitle, for, id, listHeight, listWidth, loaded, pickerIcon, pickerText, rendered, rendererType |
| dojo | dojoAttributes, dojoType |
| styling | disableTheme, themeId |
See Value and name pickers for additional information.
<xp:this.data>
<xp:dominoDocument var="document1" formName="main"></xp:dominoDocument>
</xp:this.data>
<xp:inputText id="inputText3" value="#{document1.subject}"></xp:inputText>
<xe:namePicker id="namePicker1" for="inputText3">
<xe:this.dataProvider>
<xe:dominoNABNamePicker addressBookSel="db-name"
addressBookDb="names.nsf">
</xe:dominoNABNamePicker>
</xe:this.dataProvider>
</xe:namePicker>
A value picker lets the user choose one or multiple values from a list. A name picker lets the user choose one or multiple names from a list. The value or values are applied to an associated control. Both pickers work similarly.

The picker is associated with another control through the for property. The picker uses the value, if any, of the associated control for its initial selection. When the user closes the picker dialog with the OK button, the picker applies selected values to the associated control.
The picker knows if the associated control accepts single or multiple values and adapts its behavior accordingly. The picker also recognizes the character used to separate the multiple values if appropriate.
The pickers can display data from various sources and have different renderings.

This list shows the default providers and is extensible on a global or application basis.
The name picker also allows the user to choose from multiple directories. This is done by using a data provider aggregator, which is a custom data provider that delegates to other concrete implementations. This example provides data from both a Domino address book and a view in the current database:

The values returned by the data providers can have optional labels. The picker displays the label and stores the value.

Other user interfaces can be assigned using the dojoType and dojoAttributes properties. For example, a checkbox dialog can be applied by setting the following values :

<xp:typeAhead mode="partial" minChars="1" preventFiltering="true">
The preventFiltering property ensures that typeahead lets the data provider filter the data. This is not required but makes the control perform better. The mode="partial" property ensures that only the typeahead control is triggered when a typeahead request occurs.
Specify the typeahead suggestions formula to get its input from the picker:

The data provider implementation allows a developer to execute server-side JavaScript. To keep the JavaScript simple, this provider can only return string values without associated labels.

var a = new Array("a","b","c","d","e","f","g","h")
return a
return "a,b,c,d,e,f,g,h"
dlgTitle: the title of dialog
control: the client id of the associated input text
url: the REST service URL
sources: an optional array of source (directory list)
This can be extended by using custom picker renderers. For more information, look at the PickerCheckbox.js file, which defines the simplest dijit. It shows how the REST service should be called, how it communicates with the input text and how it creates check boxes based on the data list.
Adds rows to an iterator control.
<xe:pagerAddRows attributes>content</xe:pagerAddRows>
| Property | Description |
|---|---|
| id | Defaults to pagerAddRows1, pagerAddRows2, and so on. |
| for | Identifies the iterator control. Not needed if this control is a facet of the iterator control. |
| rowCount | Specifies the number of rows to add on each click. |
| Category | Properties |
|---|---|
| basics | binding, for, id, loaded, partialExecute, partialRefresh, refreshId, refreshPage, rendered, rendererType, rowCount, state, text |
| format | disabledFormat |
| styling | disableTheme, style, styleClass, themeId |
<xp:dataTable id="dataTable1" rows="10"
value="#{javascript:return database.getAllDocuments()}" var="rowdoc">
<xp:column id="column1">
<xp:this.facets>
<xp:label value="subject" id="label1" xp:key="header"
style="font-weight:bold">
</xp:label>
</xp:this.facets>
<xp:text escape="true" id="computedField1">
<xp:this.value>
<![CDATA[#{javascript:return rowdoc.getItemValueString("subject")}]]>
</xp:this.value>
</xp:text>
</xp:column>
</xp:dataTable>
<xe:pagerAddRows id="pagerAddRows1" for="dataTable1" rowCount="3"></xe:pagerAddRows>
Shows and hides detail areas of an iterator control.
<xe:pagerDetail attributes>content</xe:pagerDetail>
| Property | Description |
|---|---|
| id | Defaults to pagerDetail1, pagerDetail2, and so on. |
| for | Identifies the iterator control. Not needed if this control is a facet of the iterator control. |
| Category | Properties |
|---|---|
| basics | binding, for, hideText, id, loaded, partialExecute, partialRefresh, refreshId, rendered, rendererType, showText |
| styling | disableTheme, style, styleClass, themeId |
The user clicks the Pager Show/Hide Details control to toggle display of a detail area.
<xe:dataView id="dataView1" columnTitles="true"
collapsibleDetail="true" collapsibleRows="true" expandedDetail="true" var="entry">
<xp:this.facets>
<xp:panel xp:key="detail">
<xp:label value="Number: " id="label1"></xp:label>
<xp:text escape="true" id="computedField1">
<xp:this.value>
<![CDATA[#{javascript:return entry.getColumnValue("number")}]]>
</xp:this.value>
</xp:text>
</xp:panel>
<xe:pagerDetail id="pagerDetail1"
xp:key="pagerBottomLeft">
</xe:pagerDetail>
</xp:this.facets>
<xe:this.data>
<xp:dominoView var="view1" viewName="main"
expandLevel="2">
</xp:dominoView>
</xe:this.data>
<xe:this.summaryColumn>
<xe:viewSummaryColumn columnName="subject"
columnTitle="subject">
</xe:viewSummaryColumn>
</xe:this.summaryColumn>
</xe:dataView>
Expands or collapses all the rows of an iterator control.
<xe:pagerExpand attributes>content</xe:pagerExpand>
| Property | Description |
|---|---|
| id | Defaults to pagerExpand1, pagerExpand2, and so on. |
| for | Identifies the iterator control. Not needed if this control is a facet of the iterator control. |
| Category | Properties |
|---|---|
| basics | binding, collapseText, expandText, for, id, loaded, partialExecute, partialRefresh, refreshId, rendered, rendererType |
| styling | disableTheme, style, styleClass, themeId |
<xe:dataView id="dataView1" columnTitles="true"
collapsibleDetail="true" collapsibleRows="true" expandedDetail="true" var="entry">
<xp:this.facets>
<xe:pagerExpand id="pagerExpand1"
xp:key="pagerBottomLeft">
</xe:pagerExpand>
</xp:this.facets>
<xe:this.data>
<xp:dominoView var="view1" viewName="main"
expandLevel="2">
</xp:dominoView>
</xe:this.data>
<xe:this.summaryColumn>
<xe:viewSummaryColumn columnName="subject"
columnTitle="subject">
</xe:viewSummaryColumn>
</xe:this.summaryColumn>
</xe:dataView>
Saves the number of rows displayed by an iterator control if the user navigates away from the page and back.
<xe:pagerSaveState attributes>content</xe:pagerSaveState>
| Property | Description |
|---|---|
| id | Defaults to pagerSaveState1, pagerSaveState2, and so on. |
| for | Identifies the iterator control. Not needed if this control is a facet of the iterator control. |
| Category | Properties |
|---|---|
| basics | binding, for, globalRows, id, loaded, partialExecute, partialRefresh, refreshId, rendered, rendererType |
| styling | disableTheme, style, styleClass, themeId |
<xe:pagerSaveState id="pagerSaveState1" for="dataView1"
globalRows="true">
</xe:pagerSaveState>
<xe:dataView id="dataView1" columnTitles="true" collapsibleRows="true">
<xp:this.facets>
<xe:pagerSizes id="pagerSizes1" xp:key="pagerTopLeft"
sizes="4|8|all">
</xe:pagerSizes>
</xp:this.facets>
<xe:this.data>
<xp:dominoView var="view1" viewName="main"
expandLevel="2">
</xp:dominoView>
</xe:this.data>
<xe:this.summaryColumn>
<xe:viewSummaryColumn columnName="subject"
columnTitle="subject">
</xe:viewSummaryColumn>
</xe:this.summaryColumn>
</xe:dataView>
Allows selection of the number of rows displayed by an iterator control.
<xe:pagerSizes attributes>content</xe:pagerSizes>
| Property | Description |
|---|---|
| id | Defaults to pagerSizes1, pagerSizes2, and so on. |
| for | Identifies the iterator control. Not needed if this control is a facet of the iterator control. |
| sizes | Specifies the choices for the number of rows. Separate choices with the vertical bar (|) character. The keyword all means all rows. |
| Category | Properties |
|---|---|
| basics | binding, for, id, loaded, partialExecute, partialRefresh, refreshId, rendered, rendererType, sizes, text |
| styling | disableTheme, style, styleClass, themeId |
<xe:dataView id="dataView1" columnTitles="true" collapsibleRows="true">
<xp:this.facets>
<xe:pagerSizes id="pagerSizes1" xp:key="pagerTopLeft"
sizes="4|8|all">
</xe:pagerSizes>
</xp:this.facets>
<xe:this.data>
<xp:dominoView var="view1" viewName="main"
expandLevel="2">
</xp:dominoView>
</xe:this.data>
<xe:this.summaryColumn>
<xe:viewSummaryColumn columnName="subject"
columnTitle="subject">
</xe:viewSummaryColumn>
</xe:this.summaryColumn>
</xe:dataView>
Exposes a REST service.
<xe:restService attributes>content</xe:restService>
| Property | Description |
|---|---|
| id | Defaults to restService1, restService2, and so on. |
| pathInfo | Identifies the location of the service
relative to the XPage. The URL for accessing the service takes the
following form:
|
| service | The service being exposed. One of the
following:
|
| Category | Properties |
|---|---|
| basics | binding, id, ignoreRequestParams, jsld, loaded, pathInfo, preventDojoStore, rendered, rendererType, service, state |
| styling | disableTheme, themeId |
<xe:restService id="restService1" pathInfo="dbPathInfo">
<xe:this.service>
<xe:databaseCollectionJsonService></xe:databaseCollectionJsonService></xe:this.service>
</xe:restService>
<xp:button id="button1" value="Database Collection">
<xp:eventHandler event="onclick" submit="true">
<xp:this.action><![CDATA[#{javascript:
facesContext.getExternalContext().getResponse().sendRedirect(@FullUrl("restService.xsp/dbPathInfo"))
}]]></xp:this.action>
</xp:eventHandler>
</xp:button>
Provides an item for user selection, for example, in a check box.
<xp:selectItem attributes>content</xp:selectItem>
| itemLabel | Provides text for display to the user. Required. |
| itemValue | Provides a value for the parent control if the user selects this item. Required. |
| basics | attrs, binding, id, itemDescription, itemDisabled, itemLabel, rendered, rendererType |
| data | itemValue, value |
| format | disableTheme, themeId |
In Design mode, put focus on the control that is to contain the item selection and click the Values tab under Properties. Use Add item and Import List to create selectItem controls.
To see the item selection properties under All properties, you must switch to Source mode and put focus on the embedded selectItem control (as opposed to the parent control).
<xp:checkBoxGroup id="checkBoxGroup1" value="#{document1.fruit}">
<xp:selectItem itemLabel="Apples" itemValue="apples"></xp:selectItem>
<xp:selectItem itemLabel="Oranges" itemValue="oranges"></xp:selectItem>
</xp:checkBoxGroup>
Provides one or more items for user selection, for example, in a check box.
<xp:selectItems attributes>content</xp:selectItems>
| value | Provides labels, values, descriptions, and disable flags for one or more description items. A value here is different from data binding. See below. |
| basics | attrs, binding, id, loaded, rendered, rendererType |
| data | value |
| format | disableTheme, themeId |
In Design mode, put focus on the control that is to contain the item selection and click the Values tab under Properties. Use Add formula item to create a selectItems control.
To see the item selection properties under All properties, you must switch to Source mode and put focus on the embedded selectItems control (as opposed to the parent control).
label|value|description|disabled
Where only label is required. The vertical bars
are part of the syntax.If value is not specified, it defaults to label. Specify disabled as true to disable (gray out) the selection item.
For the return value, you can explode (@Explode) the result of @DbColumn or @DbLookup.
<xp:checkBoxGroup id="checkBoxGroup1" value="#{document1.fruit}">
<xp:selectItems>
<xp:this.value>
<![CDATA[#{javascript:return new Array("Apples", "Oranges")}]]>
</xp:this.value>
</xp:selectItems>
</xp:checkBoxGroup>
<xp:checkBoxGroup id="checkBoxGroup1" value="#{document1.fruit}">
<xp:selectItems>
<xp:this.value>
<![CDATA[#{javascript:return new Array("Apples|apples", "Oranges|oranges")}]]>
</xp:this.value>
</xp:selectItems>
</xp:checkBoxGroup>
<xp:checkBoxGroup id="checkBoxGroup1" value="#{document1.fruit}">
<xp:selectItems>
<xp:this.value>
<![CDATA[#{javascript:return new Array("Apples|apples||true", "Oranges|oranges")}]]>
</xp:this.value>
</xp:selectItems>
</xp:checkBoxGroup>
<xp:checkBoxGroup id="checkBoxGroup1" value="#{document1.fruit}">
<xp:selectItems>
<xp:this.value>
<![CDATA[#{javascript:var list = @DbColumn("", "fruits", 1);
return @Explode(list,",")}]]>
</xp:this.value>
</xp:selectItems>
</xp:checkBoxGroup>
Contains a mobile application. Controls its layout and configuration.
<xe:singlePageApp attributes>content</xe:singlePageApp>
| Property | Description |
|---|---|
| id | Defaults to singlePageApp1, singlePageApp2, and so on. |
| selectedPageName | Identifies by pageName the appPage control that is displayed when the XPage loads. |
| Category | Properties |
|---|---|
| basics | binding, id, loaded, rendered, rendererType, selectedPageName |
| styling | disableTheme, themeId |
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xe="http://www.ibm.com/xsp/coreex">
<xe:singlePageApp id="xpagesMobileApp"
selectedPageName="homePage">
<xe:appPage id="appPage1" pageName="homePage" >
<xe:djxmHeading id="homePageHeading" label="Home"></xe:djxmHeading>
</xe:appPage>
</xe:singlePageApp>
</xp:view>
Displays alternate panels depending on key values.
<xe:switchFacet attributes>content</xe:switchFacet>
| Property | Description |
|---|---|
| id | Defaults to switchFacet1, switchFacet2, and so on. |
| selectedFacet | Specifies the key of the display panel. |
| defaultFacet | Specifies the key of the display panel if no display panel matches selectedFacet. |
| Category | Properties |
|---|---|
| basics | binding, defaultFacet,id, loaded, rendered, rendererType, selectedFacet |
| styling | disableTheme, themeId |
What do you want to buy?>
<xp:comboBox id="comboBox1">
<xp:selectItem itemLabel="Select an item..." itemValue=""></xp:selectItem>
<xp:selectItem itemLabel="A Car" itemValue="car"></xp:selectItem>
<xp:selectItem itemLabel="A Motorbike" itemValue="moto"></xp:selectItem>
<xp:selectItem itemLabel="A Moped" itemValue="moped"></xp:selectItem>
<xp:selectItem itemLabel="I don't know!" itemValue="dunno"></xp:selectItem>
<xp:eventHandler event="onchange" submit="true" refreshMode="partial" refreshId="panel1"> </xp:eventHandler>
</xp:comboBox><xp:br></xp:br>
<xp:panel id="panel1">
<xe:switchFacet id="switchFacet1" defaultFacet="else">
<xe:this.selectedFacet>
<![CDATA[#{javascript:return getComponent("comboBox1").getValue()}]]>
</xe:this.selectedFacet>
<xp:this.facets>
<xp:panel xp:key="car">What about a Ford?></xp:panel>
<xp:panel xp:key="moto">Hum, a nice <u>Harley</u> or a Japanese sports one?></xp:panel>
<xp:panel xp:key="moped">Do you prefer <u>Peugeot</u> or <u>Piaggio</u>?</xp:panel>
<xp:panel xp:key="else">
<xp:label id="label1">
<xp:this.value>
<![CDATA[#{javascript:var v = getComponent("comboBox1").getValue();
if(v) {
return "Please select another option"
} else {
return ""
}}]]>
</xp:this.value>
</xp:label>
</xp:panel>
</xp:this.facets>
</xe:switchFacet>
</xp:panel>
Presents a banner upon which buttons can be placed.
<xe:tabBar attributes>content</xe:tabBar>
| Property | Description |
|---|---|
| id | Defaults to tabBar1, tabBar2, and so on. |
| tabBar | Specify as segmentedControl to display tab bar buttons together as one though separated into individual buttons. |
| inHeading | Specify as true to position the bar inside the heading. |
| Category | Properties |
|---|---|
| accessibility | title |
| basics | barType, binding, dir, id, inHeading, lang, loaded, rendered, rendererType |
| dojo | dojoAttributes, dojoType, tooltip |
| styling | disableTheme, style, styleClass, themeId |
<xe:tabBar id="documentTabBar" barType="segmentedControl">
<xe:tabBarButton id="tabBarButtonCancel" label="Cancel">
<xp:eventHandler event="onclick" submit="true" refreshMode="complete" immediate="true" save="false">
<xp:this.action>
<xe:moveTo targetPage="viewPage" transitionType="slide" direction="Right to Left"></xe:moveTo>
</xp:this.action>
</xp:eventHandler>
</xe:tabBarButton>
<xe:tabBarButton id="tabBarButtonEdit" label="Edit" rendered="#{javascript:!document1.isEditable()}">
<xp:eventHandler event="onclick" submit="true" refreshMode="complete">
<xp:this.action>
<xp:changeDocumentMode mode="edit" var="document1"></xp:changeDocumentMode>
</xp:this.action>
</xp:eventHandler>
</xe:tabBarButton>
<xe:tabBarButton id="tabBarButtonSave" label="Save" rendered="#{javascript:document1.isEditable()}">
<xp:eventHandler event="onclick" submit="true" refreshMode="complete">
<xp:this.action>
<xe:moveTo forceFullRefresh="true" saveDocument="true"
targetPage="viewPage" transitionType="slide" direction="Left to Right">
</xe:moveTo>
</xp:this.action>
</xp:eventHandler>
</xe:tabBarButton>
</xe:tabBar>
Presents a banner upon which buttons can be placed.
<xe:tabBarButton attributes>content</xe:tabBarButton>
| Property | Description |
|---|---|
| id | Defaults to tabBarButton1, tabBarButton2, and so on. |
| onClick | Specifies the action when the button is clicked. |
| Category | Properties |
|---|---|
| accessibility | title |
| basics | binding, dir, icon1, icon2, iconPos1, iconPos2, id, label, lang, loaded, rendered, rendererType, selected, selectOne, transition |
| dojo | dojoAttributes, dojoType, tooltip |
| events | onClick |
| styling | disableTheme, style, styleClass, themeId |
<xe:tabBar id="documentTabBar" barType="segmentedControl">
<xe:tabBarButton id="tabBarButtonCancel" label="Cancel">
<xp:eventHandler event="onclick" submit="true" refreshMode="complete" immediate="true" save="false">
<xp:this.action>
<xe:moveTo targetPage="viewPage" transitionType="slide" direction="Right to Left"></xe:moveTo>
</xp:this.action>
</xp:eventHandler>
</xe:tabBarButton>
<xe:tabBarButton id="tabBarButtonEdit" label="Edit" rendered="#{javascript:!document1.isEditable()}">
<xp:eventHandler event="onclick" submit="true" refreshMode="complete">
<xp:this.action>
<xp:changeDocumentMode mode="edit" var="document1"></xp:changeDocumentMode>
</xp:this.action>
</xp:eventHandler>
</xe:tabBarButton>
<xe:tabBarButton id="tabBarButtonSave" label="Save" rendered="#{javascript:document1.isEditable()}">
<xp:eventHandler event="onclick" submit="true" refreshMode="complete">
<xp:this.action>
<xe:moveTo forceFullRefresh="true" saveDocument="true"
targetPage="viewPage" transitionType="slide" direction="Left to Right">
</xe:moveTo>
</xp:this.action>
</xp:eventHandler>
</xe:tabBarButton>
</xe:tabBar>
Displays data when another control is in focus.
<xe:tooltip attributes>content</xe:tooltip>
| Property | Description |
|---|---|
| id | Defaults to tooltip1, tooltip2, and so on. |
| for | Specifies the control to which the tooltip applies. |
| label | Specifies the content of the tooltip. |
| dynamicContent | Set to true. |
| Category | Properties |
|---|---|
| basics | binding, dynamicContent, for, id, label, loaded, rendered, rendererType, showDelay |
| dojo | dojoAttributes, dojoType |
| events | afterContentLoad, beforeContentLoad |
| layout | position |
| styling | disableTheme, themeId |
See Dynamic tooltips for additional information.
<xp:this.data>
<xp:dominoView var="view1" viewName="subject"></xp:dominoView>
</xp:this.data>
<xp:repeat id="repeat1" rows="30" value="#{view1}" var="row">
<xp:text escape="true" id="computedField1"
value="#{row.subject}">
</xp:text><xp:br></xp:br>
<xe:tooltip id="tooltip1" for="computedField1"
dynamicContent="true">
<xe:this.label>
<![CDATA[#{javascript:var doc:NotesDocument = row.getDocument();
return "Last modified on " + doc.getLastModified().getLocalTime()}]]>
</xe:this.label>
</xe:tooltip>
</xp:repeat>
<xp:this.data>
<xp:dominoView var="view1" viewName="subject"></xp:dominoView>
</xp:this.data>
<xp:repeat id="repeat1" rows="30" value="#{view1}" var="row">
<xp:text escape="true" id="computedField1" value="#{row.subject}"></xp:text>
<xp:br></xp:br>
<xe:tooltip id="tooltip1" for="computedField1" dynamicContent="true">
<xp:panel>
<xp:table>
<xp:tr>
<xp:td>Category</xp:td>
<xp:td><xp:text escape="true" id="computedField2">
<xp:this.value>
<![CDATA[#{javascript:var doc:NotesDocument = row.getDocument();
return doc.getItemValueString("category")}]]>
</xp:this.value></xp:text>
</xp:td>
</xp:tr>
<xp:tr>
<xp:td>Last modified</xp:td>
<xp:td><xp:text escape="true" id="computedField3">
<xp:this.value>
<![CDATA[#{javascript:var doc:NotesDocument = row.getDocument();
return doc.getLastModified().getLocalTime()}]]>
</xp:this.value></xp:text>
</xp:td>
</xp:tr>
</xp:table>
</xp:panel>
</xe:tooltip>
</xp:repeat>
The Tooltip control displays dynamic content when the user mouses over an associated control.
From a rendering standpoint, this control uses Dojo tooltip dijits and it gets its content from an Ajax request.
As a tooltip is read only, the server-side controls used to render the tooltip are created when the request comes in and are discarded right after they are rendered. This ensures that the JSF tree stays as clean and small as possible.
The Tooltip control gets its children directly from the control content or label.

Its dynamicContent property must be set to true to make sure the content is created dynamically:
<xe:tooltip id="tooltip2" for="computedField2" dynamicContent="true">
<xp:panel>
<xp:this.data>
<xp:dominoDocument var="document1"
formName="Contact" action="editDocument"
documentId="#{ javascript:row.getNoteID() }"
ignoreRequestParams="true" >
</xp:dominoDocument>
Displays data when another control is in focus. Allows activation of client-side events when the data is shown and hidden.
<xe:tooltipDialog attributes>content</xe:tooltipDialog>
| Property | Description |
|---|---|
| id | Defaults to tooltipDialog1, tooltipDialog2, and so on. |
| onShow | Use this for a client-side event (no submission) when the control is activated. |
| onHide | Use this for a client-side event (no submission) when the control is deactivated. |
| Category | Properties |
|---|---|
| accessibility | title, waiRole, waiState |
| basics | binding, dir, errorMessage, id, keepComponents, lang, loaded, loadingMessage, extractContent, href, partialRefresh, preload, preventCache, refreshOnShow, rendered, rendererType |
| dojo | dojoAttributes, dojoType, dragRestriction, parseOnLoad, tooltip |
| events | afterContentLoad, beforeContentLoad, onBlur, onClick, onClose, onContentError, onDblClick, onDownloadEnd, on DownloadError, onDownloadStart, onFocus, onHide, onKeyDown, onKeyPress, onKeyUp, onLoad, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onShow, onUnload |
| styling | disableTheme, style, styleClass, themeId |
XSP.openTooltipDialog("#{id:tooltipDialog1}",'#{id:button1}')
<xp:button value="Display a TooltipDialog with onShow/onHide events" id="button20">
<xp:eventHandler event="onclick" submit="false">
<xp:this.script><![CDATA[XSP.openTooltipDialog("#{id:tooltipDialog1}",'#{id:button20}')]]></xp:this.script>
</xp:eventHandler>
</xp:button><xp:br></xp:br>
<xe:tooltipDialog id="tooltipDialog1" title="This is a tooltip dialog">
<xp:panel>Are you seeing the events?</xp:panel>
<xp:eventHandler event="onShow" submit="false">
<xp:this.script><![CDATA[alert('TooltipDialog: OnShow - EventHandler')]]></xp:this.script>
</xp:eventHandler>
<xp:eventHandler event="onHide" submit="false">
<xp:this.script><![CDATA[alert('TooltipDialog: OnHide - EventHandler')]]></xp:this.script>
</xp:eventHandler>
</xe:tooltipDialog>
Displays a modal dialog containing value choices. Applies selected values to an associated control.
<xe:valuePicker attributes>content</xe:valuePicker>
| Property | Description |
|---|---|
| id | Defaults to valuePicker1, valuePicker2, and so on. |
| for | Specifies the control to which selected values are applied. |
| dataProvider | Specifies choices for the value selection:
|
| Category | Properties |
|---|---|
| basics | binding, dataProvider, dialogTitle, for, id, listHeight, listWidth, loaded, pickerIcon, pickerText, rendered, rendererType |
| dojo | dojoAttributes, dojoType |
| styling | disableTheme, themeId |
See Value and name pickers for additional information.
<xp:this.data>
<xp:dominoDocument var="document1" formName="main"></xp:dominoDocument>
</xp:this.data>
<xp:inputText id="inputText1" value="#{document1.category}"></xp:inputText>
<xe:valuePicker id="valuePicker1" for="inputText1" dialogTitle="Select a category">
<xe:this.dataProvider>
<xe:simpleValuePicker>
<xe:this.valueList><![CDATA[red
green
blue]]>
</xe:this.valueList>
</xe:simpleValuePicker>
</xe:this.dataProvider>
</xe:valuePicker>
<xp:this.data>
<xp:dominoDocument var="document1" formName="main"></xp:dominoDocument>
</xp:this.data>
<xp:inputText id="inputText2" value="#{document1.subject}"></xp:inputText>
<xe:valuePicker id="valuePicker2" for="inputText2" dialogTitle="Select a subject">
<xe:this.dataProvider>
<xe:dominoViewValuePicker databaseName="Article.nsf"
viewName="subject" labelColumn="subject">
</xe:dominoViewValuePicker>
</xe:this.dataProvider>
</xe:valuePicker>
Specified here are the XPages Extension Library properties.
Specifies text to display when an image cannot be rendered.
alt="text"
Adds attributes to a control. Use this property only where attributes are not available as properties.
<xp:this.attrs>
<xp:attr attributename="attributevalue" ...</xp:attr>
...
</xp:this.attrs>
|
Creates the attribute when the page is loaded (default) or not. |
|
Minimizes the attribute in the HTML, rendering only the name and not the value, or not (default). |
|
The name of a valid HTML attribute. |
|
Renders (default) or does not render the attribute. |
|
Treats value as a URI or not (default). A URI value without a protocol (for example, http://) is relative to the current application. URL encoding is in effect so use %20 for a space. |
|
The value of the attribute. Not rendered if minimized is true. |
<xp:inputText id="inputText3">
<xp:this.attrs>
<xp:attr name="autofocus" value="autofocus" minimized="true"></xp:attr>
</xp:this.attrs>
</xp:inputText>
<xp:inputText id="inputText3" type="email">
<xp:this.attrs>
<xp:attr name="placeholder" value="a@b.com"></xp:attr>
</xp:this.attrs>
</xp:inputText>
Specifies an expression that binds the control to a control property.
binding="expression"
Defines data format if it is not string.
<xp:this.converter>
converter
</xp:this.converter>
Where converter is
one of the following:<xp:convertNumber attributes>content</xp:convertNumber>
<xp:convertDateTime attributes>content</xp:convertDateTime>
<xp:convertMask attributes>content</xp:convertMask>
<xp:customConverter></xp:customConverter>
|
(convertMask) Whether to remove data other than masked input. Defaults to false. |
|
(convertNumber) ISO 4712 currency code, for example, USD. |
|
(convertNumber) Currency symbol. |
|
(convertDateTime) Predefined formatting for a date value. |
|
(convertNumber) Whether grouping separators are used. Defaults to true. |
|
(convertDateTime) Whether to ignore the user time zone in favor of the platform time zone. |
|
(convertNumber) Whether the value is truncated to an integer. Defaults to false. |
|
(convertDateTime, convertMask, convertNumber) Whether to create a tag instance at page load. Defaults to true. |
|
(convertDateTime, convertNumber) A language and country code, for example, en_US. |
|
(convertMask) Mask characters where # is a digit placeholder and ? is a letter placeholder. |
|
(convertNumber) Maximum digits in the fractional part of a number. |
|
(convertNumber) Maximum digits in the integer part of a number. |
|
(convertNumber) Minimum digits in the fractional part of a number. |
|
(convertNumber) Minimum digits in the integer part of a number. |
|
(convertDateTime, convertNumber) Pattern for formatting the converted date-time or number value. |
|
(convertDateTime) Predefined formatting for a time value. |
|
(convertDateTime) Time zone for formatted value, for example, US/Eastern. |
|
(convertDateTime) Which part or parts to format. Defaults to the date. |
|
(convertNumber) Formatting for conversion. Defaults to a plain number. |
<xp:inputText id="inputText1">
<xp:this.converter>
<xp:convertNumber type="number"></xp:convertNumber>
</xp:this.converter>
</xp:inputText>
Specifies an initial value for a bound data element.
defaultValue="value"
If you specify a value not compatible with the data element, and the user does not change it, submission will fail with a type error.
<xp:inputText id="inputText1" value="#{document1.subject}" defaultValue="my subject">
</xp:inputText>
Specifies text direction for a control that does not inherit its direction.
dir="ltr|rtl"
Where ltr means
left to right and rtl means right to left.<xp:inputText id="inputText1" value="#{document1.subject}"
title="Subject edit box" autocomplete="off" dir="rtl">
</xp:inputText>
Disables or enables client side validation.
disableClientSideValidation="true|false"
By default, client side validation is enabled.
<xp:inputText id="inputText1" value="#{document1.subject}"
disableClientSideValidation="true">
</xp:inputText>
Disables a control or not.
disabled="true|false"
In Design mode, click the top tab under Properties and look for Disabled, or click All Properties and look for disabled under basics.
By default, a control is enabled.
<xp:inputText id="inputText1" value="#{document1.subject}">
<xp:this.disabled>
<![CDATA[#{javascript:session.getCommonUserName() != "Joe Bar"}]]>
</xp:this.disabled>
</xp:inputText>
Disables or enables modified notifications for a control.
disableModifiedFlag="true|false"
By default, modified notifications are enabled.
<xp:inputText id="inputText1" value="#{document1.subject}"
disableModifiedFlag="true">
</xp:inputText>
Disables the theme or not.
disableTheme="true|false"
In Design mode, click All Properties and look for disableTheme under styling.
By default, the theme is enabled.
If you compute this value, return a boolean value where true disables the theme.
Disables execution of validators or not.
disableValidators="true|false"
By default, validators are enabled.
The full JSF life cycle is processed (unlike immediate) but the validators are not executed. The converters are executed and can generate validation errors.
You might think of this as a "save as draft" mode.
Specifies a list of Dojo attributes.
<xp:this.dojoAttributes>
attribute ...
</xp:this.dojoAttributes>
Where attribute is:<xp:dojoAttribute name="name"
value="value">
</xp:dojoAttribute>
You can adjust the toolbar that a rich text control renders by specifying an attribute named toolbarType with a value of lite, medium (default), or full.
You can specify a list of CSS classes to be applied when an icon is rendered by specifying an attribute named iconClass whose value specifies class names separated with spaces.
<xp:inputRichText id="inputRichText1" value="#{document1.body}">
<xp:this.dojoAttributes>
<xp:dojoAttribute name="toolbarType" value="full"></xp:dojoAttribute>
</xp:this.dojoAttributes>
</xp:inputRichText>
Specifies the default Dojo type for creating a control.
dojoType="type"
The CKEditor (http://ckeditor.com) is the default rich text editor for a rich text control. To change to the Dojo rich text editor, set this property to ibm.xsp.widget.layout.RichText.
<xp:inputRichText id="inputRichText1"
value="#{document1.body}" dojoType="ibm.xsp.widget.layout.RichText">
</xp:inputRichText>
Specifies scripts and simple actions to be executed when a control event occurs.
<xp:eventHandler event="eventname" submit="true|false"
refreshMode="complete|partial|norefresh" refreshId="controlid"
immediate="true|false" execMode="partial|full">
<xp:this.action>
<!--For a script:-->
<![CDATA[#{javascript:script}]]> <!--where script is the text of the script-->
<!--For a simple action:-->
<xp:simpleactionname attributes>content</xp:simpleactionname>
<!--For a simple action group:-->
</xp:this.action>
<xp:actionGroup condition="#{javascript:script}">
<xp:simpleactionname attributes>content</xp:simpleactionname>
...
<!--Can embed simple action groups-->
</xp:actionGroup>
<xp:this.parameters>
<xp:parameter name="name" value="value"></xp:parameter>
...
</xp:this.parameters>
</xp:eventHandler>
For a client event:<xp:eventHandler event="eventname" submit="false">
<xp:this.script>
<!--For a script:-->
<![CDATA[script]]> <!--where script is the text of the script-->
<!--For a simple action:-->
<xp:simpleactionname attributes>content</xp:simpleactionname>
<!--For a simple action group:-->
<xp:scriptGroup conditionScript="script">
<xp:simpleactionname attributes>content</xp:simpleactionname>
...
<!--Can embed simple action groups-->
</xp:scriptGroup>
</xp:this.script>
</xp:eventHandler>
Where:In Design mode with focus on the control or the page, click the Events tab. Events are treated as properties and appear on All Properties under Properties. However best practice is to not create or modify an event from All Properties.
<xp:button value="Create document" id="button4">
<xp:eventHandler event="onclick" submit="true" refreshMode="complete">
<xp:this.action>
<![CDATA[#{javascript:var doc = database.createDocument();
doc.replaceItemValue("subject", requestScope.subject);
doc.save();
requestScope.subject = null}]]>
</xp:this.action>
</xp:eventHandler>
</xp:button>
<xp:button id="button5" value="Main page">
<xp:eventHandler event="onclick" submit="true" refreshMode="complete">
<xp:this.action>
<xp:openPage name="/main.xsp" target="newDocument"></xp:openPage>
</xp:this.action>
</xp:eventHandler>
</xp:button>
<xp:button value="Create document" id="button6">
<xp:eventHandler event="onclick" submit="true" refreshMode="complete">
<xp:this.action>
<xp:actionGroup condition="#{javascript:true}">
<xp:executeScript>
<xp:this.script><![CDATA[#{javascript:var doc = database.createDocument();
doc.replaceItemValue("subject", requestScope.subject);
doc.save();
requestScope.subject = null}]]>
</xp:this.script>
</xp:executeScript>
<xp:openPage name="/main.xsp" target="newDocument"></xp:openPage>
</xp:actionGroup>
</xp:this.action>
</xp:eventHandler>
</xp:button>
<xp:inputText id="inputText2" value="#{requestScope.subject}">
<xp:eventHandler event="onblur" submit="true" refreshMode="complete">
<xp:this.script>
<![CDATA[var e = window.document.getElementById("#{id:inputText2}");
if(e.value.indexOf(" ") > -1) {
window.alert("You should not have spaces in this value.")}]]>
</xp:this.script>
</xp:eventHandler>
</xp:inputText>
Redirects focus to another control on the XPage.
for="id"
Where id is
the identifier of a control on the XPage.When the user clicks or otherwise puts focus on this control, focus goes to the target control.
<xp:label
value="#{javascript:session.getCommonUserName()}"
id="label1" style="color:rgb(0,0,255)" for="inputText1">
</xp:label>
Identifies a control uniquely among all controls on a page.
id="name"
Most controls receive a default identifier consisting of the control tag plus an integer, for example, inputText1 and inputText2. You can change or remove the identifier although the simplest practice is to leave it as is.
Assigning an identifier that duplicates the identifier of another control on the page is illegal.
The identifier must be a static value.
<xp:inputText id="inputText1" value="#{document1.subject}"></xp:inputText>
Notifies listeners or converts and validates data immediately during the Apply Request Values phase rather than later during the Invoke Application or Process Validation phase.
immediate="true|false"
Where true acts
immediately.By default, notification or validation is later.
<xp:inputText id="inputText1" value="#{document1.subject}"
immediate="true">
</xp:inputText>
Describes a selection item.
itemDescription="description"
<xp:checkBoxGroup id="checkBoxGroup1" value="#{document1.fruit}">
<xp:selectItem itemLabel="Apples" itemValue="apples"
itemDescription="Select if apples are desired.">
</xp:selectItem>
<xp:selectItem itemLabel="Oranges" itemValue="oranges"></xp:selectItem>
</xp:checkBoxGroup>
Describes a selection item.
itemDisabled="true"
Where
this specification disables item selection. To enable item selection,
do not specify this property.A disabled selection item appears grayed out and cannot be selected.
<xp:checkBoxGroup id="checkBoxGroup1" value="#{document1.fruit}">
<xp:selectItem itemLabel="Apples" itemValue="apples">
<xp:this.itemDisabled>
<![CDATA[#{javascript:if (session.getCommonUserName() == "Anonymous") return "true"}]]>
</xp:this.itemDisabled>
</xp:selectItem>
<xp:selectItem itemLabel="Oranges" itemValue="oranges"></xp:selectItem>
</xp:checkBoxGroup>
Displays text for a selection item.
itemLabel="label"
<xp:checkBoxGroup id="checkBoxGroup1" value="#{document1.fruit}">
<xp:selectItem itemLabel="Apples" itemValue="apples"></xp:selectItem>
<xp:selectItem itemLabel="Oranges" itemValue="oranges"></xp:selectItem>
</xp:checkBoxGroup>
Specifies a value to return to the parent control when the user selects an item.
itemValue="value"
<xp:checkBoxGroup id="checkBoxGroup1" value="#{document1.fruit}">
<xp:selectItem itemLabel="Apples" itemValue="apples"></xp:selectItem>
<xp:selectItem itemLabel="Oranges" itemValue="oranges"></xp:selectItem>
</xp:checkBoxGroup>
Specifies a language and country code.
lang="name"
Where name is
a language and country code, for example, en_US.<xp:inputText id="inputText1" value="#{document1.subject}"
lang="en_US">
</xp:inputText>
Creates a control when the page is loaded or not.
loaded="true|false"
By default, a control is loaded.
<xp:inputText id="inputText1" value="#{document1.subject}"
loaded="false">
</xp:inputText>
Specifies a maximum number of characters that the user can enter into a control.
maxlength="n"
Where n is
an integer.If you compute this value, make the script Compute on Page Load and return an integer value.
<xp:inputText id="inputText1" value="#{document1.subject}">
<xp:this.maxlength>
<![CDATA[${javascript:if (session.getCommonUserName() == "anonymous") {
return 24
} else {
return 80
}}]]>
</xp:this.maxlength>
</xp:inputText>
Specifies the character that separates elements of input for a control bound to a multi-value element.
multipleSeparator="character"
<xp:inputText id="inputText3" multipleSeparator=","></xp:inputText>
Removes leading and trailing white space from each element of multi-value input.
multipleTrim="true|false"
By default, white space is removed.
This property is effective only when a multiple separator is specified.
<xp:inputText id="inputText3" multipleSeparator=","
multipleTrim="false">
</xp:inputText>
Activates an event handler when a control loses focus.
<xp:eventHandler event="onblur" attributes>content</xp:eventHandler>
<xp:inputText id="inputText1" value="#{requestScope.status}">
<xp:eventHandler event="onblur" submit="false">
<xp:this.script>
<![CDATA[var e = window.document.getElementById("#{id:inputText1}");
e.value = e.value.toUpperCase()]]>
</xp:this.script>
</xp:eventHandler>
</xp:inputText>
Activates an event handler when a control loses focus and its value changed since last gaining focus.
<xp:eventHandler event="onchange" attributes>content</xp:eventHandler>
<xp:inputText id="inputText1" value="#{requestScope.status}">
<xp:eventHandler event="onchange" submit="false">
<xp:this.script>
<![CDATA[var e = window.document.getElementById("#{id:inputText1}");
e.value = e.value.toUpperCase()]]>
</xp:this.script>
</xp:eventHandler>
</xp:inputText>
Activates an event handler when a mouse click occurs.
<xp:eventHandler event="onclick" attributes>content</xp:eventHandler>
<xp:button value="Click" id="button1">
<xp:eventHandler event="onclick" submit="true"
refreshMode="complete">
<xp:this.action>
<![CDATA[#{javascript:requestScope.status = "Button clicked"}]]>
</xp:this.action>
<xp:this.script>
<![CDATA[return confirm("Do you want to submit?")]]>
</xp:this.script>
</xp:eventHandler>
</xp:button>
Activates an event handler when a mouse double click occurs.
<xp:eventHandler event="ondblclick" attributes>content</xp:eventHandler>
<xp:inputText id="inputText1" value="#{requestScope.status}">
<xp:eventHandler event="ondblclick" submit="true"
refreshMode="complete">
<xp:this.action>
<![CDATA[#{javascript:requestScope.status = "Input box double clicked"}]]>
</xp:this.action>
<xp:this.script>
<![CDATA[return confirm ("Do you want to submit?")]]>
</xp:this.script>
</xp:eventHandler>
</xp:inputText>
Activates an event handler when a control gains focus.
<xp:eventHandler event="onfocus" attributes>content</xp:eventHandler>
<xp:inputText id="inputText2">
<xp:eventHandler event="onfocus" submit="true"
refreshMode="complete">
<xp:this.action>
<![CDATA[#{javascript:requestScope.status = "Input box on focus"}]]>
</xp:this.action>
<xp:this.script>
<![CDATA[return confirm("Do you want to submit?")]]>
</xp:this.script>
</xp:eventHandler>
</xp:inputText>
Activates an event handler when a control receives a key press.
<xp:eventHandler event="onkeydown" attributes>content</xp:eventHandler>
To identify the key, you can use the keyCode property for thisEvent. Other useful properties are altKey, ctrlKey, and shiftKey.
<xp:button value="Add keystroke" id="button1">
<xp:eventHandler event="onkeydown" submit="false">
<xp:this.script>
<![CDATA[var e = window.document.getElementById("#{id:inputText1}");
var k = thisEvent.keyCode;
if (k >= 48 && k <= 57) {
e.value = e.value + String.fromCharCode(k)
}]]>
</xp:this.script>
</xp:eventHandler>
</xp:button>
Activates an event handler when a control receives a key press and release.
<xp:eventHandler event="onkeypress" attributes>content</xp:eventHandler>
<xp:button value="Test" id="button2">
<xp:eventHandler event="onkeypress" submit="false">
<xp:this.script>
<![CDATA[window.alert("This control does not accept keystrokes.")]]>
</xp:this.script>
</xp:eventHandler>
</xp:button>
Activates an event handler when a control receives a key release.
<xp:eventHandler event="onkeyup" attributes>content</xp:eventHandler>
<xp:button value="Test" id="button2">
<xp:eventHandler event="onkeyup" submit="false">
<xp:this.script>
<![CDATA[window.alert("This control does not accept keystrokes.")]]>
</xp:this.script>
</xp:eventHandler>
</xp:button>
Activates an event handler when a control receives a mouse press.
<xp:eventHandler event="onmousedown" attributes>content</xp:eventHandler>
<xp:button value="Test" id="button1">
<xp:eventHandler event="onmousedown" submit="false">
<xp:this.script>
<![CDATA[var e = window.document.getElementById("#{id:inputText1}");
e.value = "Mouse down"]]>
</xp:this.script>
</xp:eventHandler>
</xp:button>
Activates an event handler when a control receives a mouse movement.
<xp:eventHandler event="onmousemove" attributes>content</xp:eventHandler>
<xp:button value="Test" id="button1">
<xp:eventHandler event="onmousemove" submit="false">
<xp:this.script>
<![CDATA[var e = window.document.getElementById("#{id:inputText1}");
if (e.value == "Mouse moving") {
e.value = " Mouse moving"
} else {
e.value = "Mouse moving"
}]]>
</xp:this.script>
</xp:eventHandler>
<xp:eventHandler event="onmouseout" submit="false">
<xp:this.script>
<![CDATA[var e = window.document.getElementById("#{id:inputText1}");
e.value = null]]>
</xp:this.script>
</xp:eventHandler>
</xp:button>
Activates an event handler when a control receives a mouse away movement.
<xp:eventHandler event="onmouseout" attributes>content</xp:eventHandler>
<xp:button value="Test" id="button1">
<xp:eventHandler event="onmouseover" submit="false">
<xp:this.script>
<![CDATA[var e = window.document.getElementById("#{id:inputText1}");
e.value = "Click this button to run the test"]]>
</xp:this.script>
</xp:eventHandler>
<xp:eventHandler event="onmouseout" submit="false">
<xp:this.script>
<![CDATA[var e = window.document.getElementById("#{id:inputText1}");
e.value = ""]]>
</xp:this.script>
</xp:eventHandler>
</xp:button>
Activates an event handler when a control receives a mouse over movement.
<xp:eventHandler event="onmouseover" attributes>content</xp:eventHandler>
<xp:button value="Test" id="button1">
<xp:eventHandler event="onmouseover" submit="false">
<xp:this.script>
<![CDATA[var e = window.document.getElementById("#{id:inputText1}");
e.value = "Click this button to run the test"]]>
</xp:this.script>
</xp:eventHandler>
<xp:eventHandler event="onmouseout" submit="false">
<xp:this.script>
<![CDATA[var e = window.document.getElementById("#{id:inputText1}");
e.value = ""]]>
</xp:this.script>
</xp:eventHandler>
</xp:button>
Activates an event handler when a control receives a mouse release.
<xp:eventHandler event="onmouseup" attributes>content</xp:eventHandler>
<xp:button value="Test" id="button1">
<xp:eventHandler event="onmouseup" submit="false">
<xp:this.script>
<![CDATA[var e = window.document.getElementById("#{id:inputText1}");
e.value = "Mouse up"]]>
</xp:this.script>
</xp:eventHandler>
</xp:button>
Makes a control read-only or editable.
readonly="true|false"
By default, a control is editable.
This property affects all contained controls.
<xp:inputText id="inputText1" value="#{document1.subject}">
<xp:this.readonly>
<![CDATA[#{javascript:session.getCommonUserName() != "Joe Bar"}]]>
</xp:this.readonly>
</xp:inputText>
Enforces the submission of a value for a control.
required="true|false"
By default, a control is not required.
When this property is true, the user cannot submit the XPage without entering a value for the control.
<xp:inputText id="inputText1" value="#{document1.subject}"
required="true">
<xp:this.validators>
<xp:validateRequired message="Subject is required"></xp:validateRequired>
</xp:this.validators>
</xp:inputText>
<xp:inputText id="inputText1" value="#{document1.subject}">
<xp:this.validators>
<xp:validateRequired message="Subject is required"></xp:validateRequired>
</xp:this.validators>
<xp:this.required>
<![CDATA[#{javascript:if (session.getCommonUserName() == "Joe Bar") {return true}}]]>
</xp:this.required></xp:inputText>
Makes a control visible or not.
rendered="true|false"
Where false hides
the control.By default, a control is visible.
<xp:inputText id="inputText1" value="#{document1.subject}"
rendered="#{javascript:return document1.isEditable()}">
</xp:inputText>
Specifies a renderer to encode and decode a control.
rendererType="name"
Displays a read-only control as disabled.
showReadonlyAsDisabled="true|false"
By default, a read-only control appears as text.
<xp:inputText id="inputText1" value="#{document1.subject}" showReadonlyAsDisabled="true">
<xp:this.readonly>
<![CDATA[#{javascript:session.getCommonUserName() != "Joe Bar"}]]>
</xp:this.readonly>
</xp:inputText>
Specifies font styles for a control.
style="name:value;..."
Where name and value are
joined by a colon to define one style element. Multiple style elements
are separated by semicolons. The following table specifies the allowed
names and values.| Name | Value | Examples |
|---|---|---|
| height |
|
|
| width |
|
|
| font-family | The name of a font, a comma, and the keyword serif or sans-serif. Either part is optional in which case the comma is omitted. |
|
| font-size | An integer followed by pt for points. |
|
| color | The keyword rgb followed by integer values for red, green, and blue in parentheses separated by commas. |
|
| font-weight | The keyword bold. Otherwise the weight is normal. |
|
| font-style | The keyword italic. Otherwise the style is plain. |
|
| text-decoration | The keyword underline, line-through, or both separated by a space. |
|
| text-align | The keyword left, center, right, or justify. |
|
For the other style specifications, click Font under Properties or click All Properties and look for style under styling. These values are static.
<xp:inputText id="inputText1" value="#{document1.subject}"></xp:inputText style="height:3.75em;width:55.583332em">
This Edit Box control returns computed values for height and width (but static values for the unit).
<xp:inputText id="inputText1" value="#{document1.subject}">
<xp:this.style><![CDATA[height:#{javascript:if (document1.isEditable()) {
return 38 }}px;
width:#{javascript:if (document1.isEditable()) {
return 252}}px]]></xp:this.style>
</xp:inputText>
Specifies a list of CSS classes to be applied when a control is rendered.
styleClass="name ..."
Where name identifies
a class. Separate multiple names with spaces.This value must be passed through as the class attribute on generated markup.
Specifies the order in which a control gets focus when the user presses the Tab key.
tabindex="n"
Where n is
an integer and 1 means first in order.By default, the tab order inherits the browser's default order.
<xp:inputText id="inputText1" value="#{document1.subject}" tabindex="3"></xp:inputText>
Specifies a theme for setting component properties.
themeId="name"
Provides a screen readable title for a control.
title="title"
At run time, the title displays in a box when the user hovers over the control.
<xp:inputText id="inputText1" value="#{document1.subject}"
title="Subject edit box">
/xp:inputText>
Specifies the type of input control.
type="text|color|date|datetime|datetime-local|month|week|time|email|number|range|search|tel|url"
This property defaults to text which is the standard Edit Box control.
You are not restricted to the types listed in the syntax. However, avoid using this property for standard XPage controls. In particular, you should not specify checkbox (Check Box control), file (File Upload control), hidden (Hidden Input control), or radio (Radio Button control).
<xp:inputText id="inputText3" type="email">
<xp:this.attrs>
<xp:attr name="placeholder" value="a@b.com"></xp:attr>
</xp:this.attrs>
</xp:inputText>
Specifies a validator method called during Process Validations of MethodBinding to perform check the value of the control.
validator="#{expression}"
<xp:this.validator>
<![CDATA[#{javascript:script}]]>
</xp:this.validator>
Where expression is
an expression and script is a script. Use $ instead
of # to compute on page load instead of dynamically.This property must evaluate to a public method that takes FacesContext, UIComponent, and Object parameters, and returns void.
Enforces requirements for data entry.
<xp:this.validators>
validator ...
</xp:this.validators>
Where validator is
one of the following:<xp:validateLength attributes>content</xp:validateLength>
<xp:validateRequired attributes>content</xp:validateRequired>
Where n is
an integer greater than minimum. |
(validateLength) The maximum number of characters that a user can enter for string input. |
|
(validateLength, validateRequired) The text of a message returned to the user when validation fails. |
|
(validateLength) The minimum number of characters that a user can enter for string input. |
<xp:inputText id="inputText1" value="#{document1.subject}"
required="true">
<xp:this.validators>
<xp:validateRequired message="Subject is required"></xp:validateRequired>
</xp:this.validators>
</xp:inputText>
<xp:inputText id="inputText1" value="#{document1.subject}">
<xp:this.validators>
<xp:validateLength minimum="1" maximum="8">
<xp:this.message>
<![CDATA[#{javascript:return "Invalid: " + this.validators.value}]]>
</xp:this.message>
</xp:validateLength>
</xp:this.validators>
</xp:inputText>
<xp:inputText id="inputText1" value="#{document1.subject}"
required="true">
<xp:this.validators>
<xp:validateLength maximum="64"
message="Subject cannot exceed 64 characters">
</xp:validateLength>
<xp:validateRequired message="Subject is required"></xp:validateRequired>
</xp:this.validators>
</xp:inputText>
Binds a control to a data element or other value.
value="#{object.node1.moreNodesAsNeeded}"
value="${object.node1.moreNodesAsNeeded}"
<xp:this.value><![CDATA[#{javascript:textOfScript}]]></xp:this.value>
<xp:this.value><![CDATA[${javascript:textOfScript}]]></xp:this.value>
Where object is
the name of a global object representing a data source, for example, document1 or view1,
or the name of a scoped variable. Follow the object name with one
or more node names to drill down to an element of data. And where textOfScript is
Javascript that returns a value.For a discussion of data binding, see Binding and submitting data.
<xp:inputText id="inputText1" value="#{document1.subject}"></xp:inputText>
<xp:inputText id="inputText1" value="#{view1.subject}"></xp:inputText>
<xp:inputText id="inputText1" value="#{sessionScope.scoped1}"></xp:inputText>
<xp:inputText id="inputText1" value="#{componentParameters.Parameter1}"></xp:inputText>
<xp:inputText id="inputText1" value="#{document1.subject}"><xp:this.value><![CDATA[${javascript:document1.getItemValueString("subject")}]]></xp:this.value></xp:inputText>
The data store for XPages is Domino. You can access the data store through Domino forms and views.
The Domino data store contains documents. A document has a universal identifier (UNID) and contains items of data.
An XPage can contain data sources based on Domino forms and views.
The forms and views must already exist. See the Lotus Domino Designer Basic User Guide and Reference for descriptions and instructions.
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<xp:this.data>
<xp:dominoDocument var="document1" formName="main"></xp:dominoDocument>
<xp:dominoView var="view1" viewName="main"></xp:dominoView>
</xp:this.data>
</xp:view>
<xp:dominoDocument var="document1" formName="main"></xp:dominoDocument>
To
have the data source replace an existing document, the action property
must be specified:<xp:dominoDocument var="document1" formName="main" action="editDocument"></xp:dominoDocument>
<xp:this.data>
<xp:dominoView var="view2" viewName="main"></xp:dominoView>
</xp:this.data>
<xp:viewPanel value="#{view2}" id="viewPanel2">
<xp:this.facets>
<xp:pager partialRefresh="true" layout="Previous Group Next"
xp:key="headerPager" id="pager2">
</xp:pager>
</xp:this.facets>
<xp:viewColumn columnName="subject" id="viewColumn3">
<xp:this.facets>
<xp:viewColumnHeader value="Subject" xp:key="header"
id="viewColumnHeader3">
</xp:viewColumnHeader>
</xp:this.facets>
</xp:viewColumn>
<xp:viewColumn columnName="$1" id="viewColumn4">
<xp:this.facets>
<xp:viewColumnHeader value="Last modified"
xp:key="header" id="viewColumnHeader4">
</xp:viewColumnHeader>
</xp:this.facets>
</xp:viewColumn>
</xp:viewPanel>
<xp:viewPanel rows="30" id="viewPanel1">
<xp:this.facets>
<xp:pager partialRefresh="true" layout="Previous Group Next"
xp:key="headerPager" id="pager1">
</xp:pager>
</xp:this.facets>
<xp:this.data>
<xp:dominoView var="view1" viewName="main"></xp:dominoView>
</xp:this.data>
<xp:viewColumn columnName="subject" id="viewColumn1"
<xp:viewColumnHeader value="subject"
id="viewColumnHeader1">
</xp:viewColumnHeader>
</xp:viewColumn>
<xp:viewColumn columnName="$1" id="viewColumn2">
<xp:viewColumnHeader value="last modified"
id="viewColumnHeader2">
</xp:viewColumnHeader>
</xp:viewColumn>
</xp:viewPanel>
You can modify a view column. Put the column in focus and select the Data tab. You can change the binding or the display type. You can compute the value of the column rather than binding it to a Domino view column. You can also redefine a column by dragging an element from the data palette into the column.
To add a column, right-click the View control and specify Insert Column or Append Column. You can the specify the content of the new column by dragging from the data palette or specifying it on the dropdown menu on the Data tab.
All columns in a view must have the same view source.
XPages controls can be bound to elements of data sources.
<xp:inputText value="#{document1.subject}" id="inputText1"></xp:inputText>
Controls
can also be bound to global variables and the return values of scripts.<xp:inputText id="inputText1"></xp:inputText>
Dragging
in the subject item from document1 yields:<xp:inputText id="inputText1" value="#{document1.subject}"></xp:inputText>
If
you drag a data item onto the XPage proper (outside all controls),
an appropriate context is created. For example, dragging the subject item
from document1 onto the XPage proper yields:<xp:table>
<xp:tr> <xp:td>
<xp:label value="Subject:" id="subject_Label1" for="subject1"></xp:label>
</xp:td><xp:td>
<xp:inputText value="#{document1.subject}" id="subject1"></xp:inputText>
</xp:td></xp:tr>
</xp:table>
An input box is set up in column 2 of a
table with a label in column 1.<xp:inputText id="inputText2" value="#{document1.number}" defaultValue="1">
<xp:this.converter>
<xp:convertNumber type="number"></xp:convertNumber>
</xp:this.converter>
</xp:inputText>
Bound data items can be submitted to their data sources as new and replacement documents.
Shown here are the simplest devices for creating, retrieving, and replacing documents. Data can also be manipulated through simple actions and the Domino library in JavaScript. Controls other than views, such as data tables, can be used to retrieve data.
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<xp:this.data>
<xp:dominoDocument var="document1" formName="main"></xp:dominoDocument>
</xp:this.data>
<xp:inputText id="inputText1" value="#{document1.subject}"></xp:inputText>
<xp:br></xp:br>
<xp:button value="submit" id="button1">
<xp:eventHandler event="onclick" submit="true"
refreshMode="complete" immediate="false" save="true">
</xp:eventHandler>
</xp:button>
<xp:button value="cancel" id="button2"></xp:button>
</xp:view>
Clicking the submit button causes a request to be sent to the server. The server processes the request, creating the new document, and sends a response to the client. The default response is to open a fresh copy of the same XPage.
You might also place a Button control of type Cancel on the page. This button sends a request and gets the response, but the server does not process the data.
<xp:viewPanel rows="30" id="viewPanel1" pageName="/replace.xsp">
<xp:this.facets>
<xp:pager partialRefresh="true" layout="Previous Group Next"
xp:key="headerPager" id="pager1">
</xp:pager>
</xp:this.facets>
<xp:this.data>
<xp:dominoView var="view1" viewName="main"></xp:dominoView>
</xp:this.data>
<xp:viewColumn columnName="subject" id="viewColumn1"
displayAs="link">
<xp:viewColumnHeader value="subject"
id="viewColumnHeader1">
</xp:viewColumnHeader>
</xp:viewColumn>
<xp:viewColumn columnName="$1" id="viewColumn2">
<xp:viewColumnHeader value="last modified"
id="viewColumnHeader2">
</xp:viewColumnHeader>
</xp:viewColumn>
</xp:viewPanel>
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<xp:this.data>
<xp:dominoDocument formName="main" var="document1" action="editDocument" />
</xp:this.data>
<xp:inputText id="inputText1" value="#{document1.subject}"></xp:inputText>
<xp:br></xp:br>
<xp:button value="submit" id="button1">
<xp:eventHandler event="onclick" submit="true"
refreshMode="complete" immediate="false" save="true">
</xp:eventHandler>
</xp:button>
<xp:button value="cancel" id="button2">
<xp:eventHandler event="onclick" submit="true"
refreshMode="complete" immediate="true" save="false">
</xp:eventHandler>
</xp:button>
<xp:this.navigationRules>
<xp:navigationRule outcome="xsp-success" viewId="/main.xsp"></xp:navigationRule>
</xp:this.navigationRules>
</xp:view>
At run time, the user clicks a link on the view on the main page. This opens and populates the replace page. The user can make changes on this page. Submitting the page causes the existing document to be replaced and the main page to be opened.
Under All Properties for the page, open the pertinent data source (under ). For the WebQuerySaveAgent property, specify the name of an agent in the current application.
When the user makes a submission to the data source, the agent is called after field values are applied but before the document is saved. The agent can access the in-memory document through DocumentContext in the LotusScript® NotesAgentContext class or getDocumentContext in the Java AgentContext class. The agent can cancel the save operation by appending an item named SaveOptions with a value of 0 (zero). Any other value for SaveOptions results in the document being saved but without the SaveOptions item.
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<xp:this.data>
<xp:dominoDocument var="document1" formName="City"
webQuerySaveAgent="saveAgentJava">
</xp:dominoDocument>
</xp:this.data>
<xp:messages id="messages1"></xp:messages>
<xp:table>
<xp:tr>
<xp:td colspan="2">
<xp:label
value="If the field#1 is empty, then the agent will prevent it from being saved"
id="label0"></xp:label>
</xp:td>
</xp:tr>
<xp:tr>
<xp:td>
<xp:label value="Field1:" id="label1" for="inputText1"></xp:label>
</xp:td>
<xp:td>
<xp:inputText value="#{document1.Field1}" id="inputText1"></xp:inputText>
</xp:td>
</xp:tr>
<xp:tr>
<xp:td>
<xp:label value="Field2:" id="label2" for="inputText2">
</xp:label>
</xp:td>
<xp:td>
<xp:inputText value="#{document1.Field2}" id="inputText2"></xp:inputText>
</xp:td>
</xp:tr>
<xp:tr>
<xp:td>
<xp:label value="Agent calculated Value:" id="label3">
</xp:label>
</xp:td>
<xp:td>
<xp:text escape="true" id="computedField2" value="#{document1.AgentValue}"></xp:text>
</xp:td>
</xp:tr>
<xp:tr>
<xp:td></xp:td>
<xp:td>
<xp:button value="Save" id="button1">
<xp:eventHandler event="onclick" submit="true"
refreshMode="complete">
<xp:this.action>
<xp:saveDocument var="document1"></xp:saveDocument>
</xp:this.action>
</xp:eventHandler>
</xp:button>
</xp:td>
</xp:tr>
</xp:table>
</xp:view>
import lotus.domino.*;
public class JavaAgent extends AgentBase {
public void NotesMain() {
try {
Session session = getSession();
AgentContext agentContext = session.getAgentContext();
// (Your code goes here)
Document doc = agentContext.getDocumentContext();
doc.replaceItemValue("AgentValue", "Processed by Java: "+doc.getItemValueString("Field1")+","+doc.getItemValueString("Field2"));
String field1 = doc.getItemValueString("Field1");
if(field1==null || field1.length()==0) {
doc.replaceItemValue("SaveOptions", Integer.valueOf(0));
}
} catch(Exception e) {
e.printStackTrace();
}
}
}
Specifies a listener method that is notified when a new value is set.
valueChangeListener="#{expression}"
<xp:this.valueChangeListener>
<![CDATA[#{javascript:script}]]>
</xp:this.valueChangeListener>
Where expression is
an expression and script is a script. Use $ instead
of # to compute on page load instead of dynamically.This property must evaluate to a public method that takes a ValueChangeEvent parameter and returns void.
Specifies a collection of value change listeners.
valueChangeListener="#{expression}"
<xp:this.valueChangeListeners>
<xp:valueChangeListener type="listener"></xp:valueChangeListener>
...
</xp:this.valueChangeListeners>
Where listener is
one value change listener.This information was developed for products and services offered in the U.S.A.
IBM may not offer the products, services, or features discussed in this document in other countries. Consult your local IBM representative for information on the products and services currently available in your area. Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe any IBM intellectual property right may be used instead. However, it is the user's responsibility to evaluate and verify the operation of any non-IBM product, program, or service.
IBM Director of Licensing
IBM Corporation
North Castle Drive
Armonk, NY 10504-1785
U.S.A.
Intellectual Property Licensing
Legal and Intellectual Property Law
IBM Japan Ltd.
1623-14, Shimotsuruma, Yamato-shi
Kanagawa 242-8502 Japan
The following paragraph does not apply to the United Kingdom or any other country where such provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain transactions, therefore, this statement may not apply to you.
This information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this publication at any time without notice.
Any references in this information to non-IBM Web sites are provided for convenience only and do not in any manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of the materials for this IBM product and use of those Web sites is at your own risk.
IBM may use or distribute any of the information you supply in any way it believes appropriate without incurring any obligation to you.
IBM Corporation
5 Technology Park Dr.
Westford Technology Park
Westford, MA 01886
U.S.A.
Such information may be available, subject to appropriate terms and conditions, including in some cases, payment of a fee.
The licensed program described in this document and all licensed material available for it are provided by IBM under terms of the IBM Customer Agreement, IBM International Program License Agreement or any equivalent agreement between us.
Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not tested those products and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products.
COPYRIGHT LICENSE:
This information can contain sample application programs in source language, which illustrate programming techniques on various operating platforms. You may copy, modify, and distribute these sample programs in any form without payment to IBM, for the purposes of developing, using, marketing or distributing application programs conforming to the application programming interface for the operating platform for which the sample programs are written. These examples have not been thoroughly tested under all conditions. IBM, therefore, cannot guarantee or imply reliability, serviceability, or function of these programs. The sample programs are provided "AS IS", without warranty of any kind. IBM shall not be liable for any damages arising out of your use of the sample programs.
Each copy or any portion of these sample programs or any derivative work, must include a copyright notice as follows:
© your company name) (year). Portions of this code are derived from IBM Corp. Sample Programs.
© Copyright IBM Corp. _enter the year or years_. All rights reserved.
IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.