viewPanel - View

Displays data from documents in rows and columns.

Category

Container Controls

Syntax

<xp:viewPanel attributes>
	<xp:this.facets>
		<xp:pager attributes></xp:pager>
	</xp:this.facets>
	<xp:this.data>
		<xp:dominoView attributes></xp:dominoView>
	</xp:this.data>
	<xp:viewColumn attributes">
		<xp:viewColumnHeader attributes></xp:viewColumnHeader>
	</xp:viewColumn>
	...
</xp:viewPanel>
Table 1. Essential properties
Property Description
id (viewPanel) Defaults to viewPanel1, viewPanel2, and so on.

(viewColumn) Defaults to viewColumn1, viewColumn2, and so on.

(viewColumnHeader) Defaults to viewColumnHeader1, viewColumnHeader2, and so on.

rows (viewPanel) This is the number of rows displayed at once which is 30 by default.
data (viewPanel) Binds a Domino® view to the control.
pageName (viewPanel) By default the XPage associated with the document's form is used to open a selected document when a column item is a link. Here a specified XPage can be used.
columnName (viewColumn) The column names from the data source are set up through the view creation dialog and can be changed later.
displayAs, (viewColumn) By default items display as text. Specify displayAs="link" to change these items to links to the underlying documents.
value (viewColumnHeader) This is the label for the column header.
Table 2. All properties (viewPanel)
Category Properties
accessibility caption, role, summary, title
Note: The role property is obsolete starting with 9.0.1. By default the appropriate compliant value is generated. For compliance with accessibility standards, do not specify a value for this property. See the usage section for further information on accessibility compliance.
basics attrs, binding, dir, id, lang, loaded, partialExecute, partialRefresh, refreshId, rendered, rendererType, rowAttrs, target
data data, first, indexVar, pageName, rows, value, var
format cellpadding, cellspacing, height, showColumnHeader, showUnreadMarks, width
styling captionStyleClass, columnClasses, dataTableStyle, dataTableStyleClass, disableTheme, readMarksClass, rowClasses, themeId, unreadMarksClass, viewStyle, viewStyleClass
Table 3. All properties (viewColumn)
Category Properties
accessibility role
basics attrs, binding, columnName, displayAs, htmlFilter, id, loaded, rendered, rendererType, width
data converter, openDocAsReadonly, pageUrl, value
events onClick
format collapsedImage, contentType, expandedImage, iconAlt, iconSrc, indentResponses, showCheckbox
styling disableTheme, style, styleClass, themeId
Table 4. All properties (viewColumnHeader)
Category Properties
accessibility role
basics attrs, binding, htmlFilter, id, loaded, rendered, rendererType, sortable, value
format contentType, iconAlt, iconSrc, showCheckbox
styling disableTheme, style, styleClass, themeId

Pagers

A facets region containing a pager or pagers is part of the view depending on Design specifications. You can place other controls, such as panels, in the facet region. Use Source mode to work within the facet region.

Here is a sample facet for pager controls:

<xp:this.facets>
	<xp:pager partialRefresh="true" layout="Previous Group Next"
		xp:key="headerPager" id="pager1">
	</xp:pager>
	<xp:viewTitle xp:key="viewTitle" id="viewTitle1" value="View Title"></xp:viewTitle>
	<xp:pager partialRefresh="true" layout="Previous Group Next"
		xp:key="footerPager" id="pager2">
	</xp:pager>
</xp:this.facets>
The following boxes on the Display tab under Properties affect the facet content as follows:
  • Show pager in header (selected by default) generates a pager control of key headerPager. No facets regions is generated if this is cleared.
  • Show pager in footer (cleared by default) generates a pager control of key footerPager.
  • Show title (cleared by default) generates the viewTitle control.

Usage

A View control essentially displays a Domino view. In Design mode, you provide the name of the bound Domino view and other information in a dialog when you create the viewPanel control. After creation, you can right-click or use the menu to add insert, append, and delete columns.

When you configure views to display categories of data, users can expand and collapse (toggle) the categories at run time. Categories are collapsed by default. When users toggle categories, the XPage reloads sothat the data on the XPage stays synchronized with the server.

For paging, a collapsed category counts as one row. For example, if you have configured a pager to navigate five rows and there are five collapsed rows of data in the view, each time a user clicks the back or forward button, the pager counts five categories, not individual hidden rows. Also, the toggle state of categories persists as users navigate back and forth through the pages of data.

These controls are not tested against the latest accessibility standards. The recommended accessible path is the Data View control.

Examples

This View Panel control has two columns.
<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="view2" 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="fruit" id="viewColumn2">
		<xp:viewColumnHeader value="fruit" id="viewColumnHeader2"></xp:viewColumnHeader>
	</xp:viewColumn>
</xp:viewPanel>