Change Dynamic Content (Simple actions)

Changes dynamic content so that a specified facet displays.

Defined in

Extension Library

Type of simple action

Basic (Server)

Syntax

<xe:changeDynamicContentAction facetName="display" for="dynamic" loaded="true|false"><xe:this.parameters><xp:parameter name="name" value="value" loaded="true|false"</xp:parameter>...</xe:this.parameters></xe:changeDynamicContentAction>
Table 1. Attributes
Attribute Description
facetName="display" Name of the facet to display.
for="dynamic" Name of the dynamic control containing the facet.
loaded="true|false" Creates a tag instance when the control is loaded, or not. Defaults to true.
this.parameters Names and values of parameters passed as is.

Usage

For more information, see dynamicContent - Dynamic Content (Extension Library - control) and Dynamic content

Examples

This Dynamic Content control contains two facets. Each facet contains a panel and each panel contains a button and a Domino(r)® view. By default, the mainView facet appears at page load. Clicking the button in the mainView facet displays the subjectView facet. Clicking the button in the subjectView facet displays the mainView facet.
<xe:dynamicContent id="dynamicContent1" defaultFacet="mainView">
	<xp:this.facets>
		<xp:panel xp:key="subjectView">
			<xp:button value="Switch to main view" id="button1">
				<xp:eventHandler event="onclick" submit="true" refreshMode="partial" refreshId="dynamicContent1">
					<xp:this.action>
						<xe:changeDynamicContentAction facetName="mainView" for="dynamicContent1">
						</xe:changeDynamicContentAction>
					</xp:this.action>
				</xp:eventHandler>
			</xp:button>
			<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="subject"></xp:dominoView>
				</xp:this.data>
				<xp:viewColumn columnName="subject" id="viewColumn1">
					<xp:viewColumnHeader value="subject" id="viewColumnHeader1"></xp:viewColumnHeader>
				</xp:viewColumn>
				<xp:viewColumn columnName="number" id="viewColumn2">
					<xp:viewColumnHeader value="number" id="viewColumnHeader2"></xp:viewColumnHeader>
				</xp:viewColumn>
				<xp:viewColumn columnName="$2" id="viewColumn3">
					<xp:viewColumnHeader value="last modified" id="viewColumnHeader3"></xp:viewColumnHeader>
				</xp:viewColumn>
			</xp:viewPanel>
		</xp:panel>
		<xp:panel xp:key="mainView">
			<xp:button value="Switch to subject view" id="button2">
				<xp:eventHandler event="onclick" submit="true" refreshMode="partial" refreshId="dynamicContent1">
					<xp:this.action>
						<xe:changeDynamicContentAction
							facetName="subjectView" for="dynamicContent1">
						</xe:changeDynamicContentAction>
					</xp:this.action>
				</xp:eventHandler>
			</xp:button>
			<xp:viewPanel rows="30" id="viewPanel2">
				<xp:this.facets>
					<xp:pager partialRefresh="true"
						layout="Previous Group Next" xp:key="headerPager" id="pager2">
					</xp:pager>
				</xp:this.facets>
				<xp:this.data>
					<xp:dominoView var="view2" viewName="main"></xp:dominoView>
				</xp:this.data>
				<xp:viewColumn columnName="category" id="viewColumn4">
					<xp:viewColumnHeader value="category" id="viewColumnHeader4"></xp:viewColumnHeader>
				</xp:viewColumn>
				<xp:viewColumn columnName="subject" id="viewColumn5">
					<xp:viewColumnHeader value="subject" id="viewColumnHeader5"></xp:viewColumnHeader>
				</xp:viewColumn>
				<xp:viewColumn columnName="number" id="viewColumn6">
					<xp:viewColumnHeader value="number" id="viewColumnHeader6"></xp:viewColumnHeader>
				</xp:viewColumn>
				<xp:viewColumn columnName="$2" id="viewColumn7">
					<xp:viewColumnHeader value="last modified" id="viewColumnHeader7"></xp:viewColumnHeader>
				</xp:viewColumn>
			</xp:viewPanel>
		</xp:panel>
	</xp:this.facets>
</xe:dynamicContent>