Understanding facets

A facet defines a region in a control for the placement of other controls.

A control may or may not render a facet depending on the control and the content of the facet.

A special use for facets is the placement of pagers in views. A general use for facets is the placement of panels in other controls. Here is sample source code for a view. Notice that the facets region appears as an attribute of the parent control and contains the other control.
<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>

The xp:key specification is a facets artifact not a property of the other control. The value shown is appropriate for pager in a view. For a panel, use one of the following values to specify the location of the other control in the parent: east, west, south, north, southwest, southeast, northwest, and northeast.

The following sample code contains a panel that displays two links (Inbox and Outbox) and an image. The first link provides an onclick event.
<xp:viewPanel>
	<xp:this.facets>
		<xp:panel xp:key="west">
			<xp:link text="Inbox" >
				<xp:eventHandler event="onclick" submit="true">
					<xp:this.action>
					</xp:this.action>
				</xp:eventHandler>
			</xp:link>
			<xp:br/>
			<xp:link  text="Outbox" />
			<xp:br/>
			<xp:image id="viewPickerImage"
				value="/images/sampleViewPicker.gif" />
		</xp:panel>
	</xp:this.facets>
<xp:viewPanel>

Facets are not visible in Design mode. You must use Source mode to directly create and modify facets.