table - Table

Contains cells arranged as rows and columns. Each cell can contain other controls (including tables) and text.

Category

Container Controls

Syntax

<xp:table attributes>
	<xp:tr attributes>
			<xp:td attributes>cell content</xp:td>
			...
	</xp:tr>
	...
</xp:table>
Table 2. All properties (tr)
Category Properties
accessibility role, title
basics binding, dir, id, lang, loaded, rendered, rendererType
dojo dojoAttributes, dojoType
events onclick, ondblclick, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup
format align, valign
styling disableTheme, style, styleClass, themeId

Usage

At run time, the table appears on the page. The user can access the table a cell at a time.
When you insert a table on an XPage in Design mode, a dialog requests the number of rows and the number of columns. Once the table is created, you can:
  • Add and delete rows and columns.
  • Merge cells.
  • Select cells and multiple cells.
  • Add and delete cell content.

Use this control to present text and images in a visually appealing layout. By default, the role property is presentation. For accessibility compliance, do not use this control for purposes other than visual layout and do not change role to other than presentation. For tabular data, use the Data Table control.

Examples

This table contains 4 cells arranged in 2 rows and 2 columns.
<xp:table>
	<xp:tr>
		<xp:td>
			<xp:label id="label1" value="row 1, column 1"></xp:label>
		</xp:td>
		<xp:td>
			<xp:label value="row 1, column 2" id="label3"></xp:label>
		</xp:td>
	</xp:tr>
	<xp:tr>
		<xp:td>
			<xp:label value="row 2, column 1" id="label2"></xp:label>
		</xp:td>
		<xp:td>
			<xp:label value="row 2, column 2" id="label4"></xp:label>
		</xp:td>
	</xp:tr>
</xp:table>