Contains cells arranged as rows and columns associated with a data source. Each cell can contain other controls (including tables) and text.
<xp:dataTable attributes>
<xp:column attributes>content </xp:column>
...
</xp:dataTable>
| Property | Description |
|---|---|
| id | (dataTable) Defaults
to dataTable1, dataTable2, and so
on. (column) Defaults to column1, column2, and so on. |
| value | (dataTable) Typically the data binding is to a collection of elements, for example, a NotesDocumentCollection object. |
| var | (dataTable) Typically this variable refers to one member of the bound data collection, for example, a NotesDocument object if the binding is to a NotesDocumentCollection object. |
| Category | Properties |
|---|---|
| accessibility | caption, role, summary, title |
| basics | attrs, binding, dir, disabled, id, lang, loaded, partialExecute, partialRefresh, refreshId, rendered, rendererType, rules |
| data | data, first, indexVar, rows, value, var |
| events | onclick, ondblclick, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup |
| format | bgcolor, border, cellpadding, cellspacing, frame, showUnreadMarks, width |
| styling | captionStyleClass, columnClasses, disableTheme, footerClass, headerClass, readMarksClass, rowClasses, style, styleClass, themeId, unreadMarksClass |
| Category | Properties |
|---|---|
| accessibility | role |
| basics | binding, id, loaded, rendered, rendererType |
| styling | disableTheme, style, styleClass, themeId |
Here is a sample facet for pager controls:
<xp:this.facets>
<xp:pager partialRefresh="true" layout="Previous Group Next"
xp:key="header" id="pager1">
</xp:pager>
</xp:this.facets>
The following boxes on the Display tab
under Properties affect the facet content as
follows:Once a data table is created, you can add and delete rows and columns.
The content of each column is one, two, or three values representing the header, middle, and footer rows in the table. The middle row is rendered as a variable number of rows depending on the number of elements in the data source.
For Domino® view capabilities such as categories, totals, response documents, and sorting, prefer a View control. A View control incorporates the capabilities of its source Domino view.
Prefer this control where you need capabilities beyond those of a View control. This control allows the user to edit within columns whereas a View control does not. With this control, you can embed and bind other controls (for example, images) of your choice whereas a View control is constrained by the design of the source Domino view.
<xp:dataTable id="dataTable1" rows="30"
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:column id="column2">
<xp:this.facets>
<xp:label value="fruit" id="label2" xp:key="header" style="font-weight:bold"></xp:label>
</xp:this.facets>
<xp:text escape="true" id="computedField2"><xp:this.value>
<![CDATA[#{javascript:return rowdoc.getItemValueString("fruit")}]]>
</xp:this.value></xp:text>
</xp:column>
</xp:dataTable>