An XPage can contain data sources based on Domino® forms and views.
The forms and views must already exist. See the 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>
See data - Data Source for a description of data sources and additional examples.
<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.