Open Page (Simple actions)

Replaces the current page.

Defined in

Simple actions

Type of simple action

Basic (Server)

Syntax

Note: This is the XSP source code. The UI presents the simple action as a dialog with a box for each argument.
openPage name="string" target="string" documentId="string"
Arguments Description UI presentation
name Name of a page in the component. The replacement page takes the format of the component page specified here. A list of existing component pages plus the diamond icon. You can select from the list or click the diamond to dynamically compute the value.
target Target document mode for populating the replacement page. One of the following:
  • newDocument does not populate the page. The page can be edited.
  • openDocument populates the page from an existing document. The page cannot be edited.
  • editDocument populates the page from an existing document. The page can be edited.
A list as shown below plus the diamond icon. You can select from the list or click the diamond to dynamically compute the value.
  • New document
  • Open document
  • Edit document
documentId ID of an existing document. Required for openDocument and editDocument modes. An edit box plus the diamond icon. You can enter the value in the box or click the diamond to dynamically compute the value.

Examples

Note: These examples present XSP source code which can be inserted under the Source tab taking care to keep the XML well formed. To use the UI, select or enter the arguments in the simple action dialog.
(1) This button opens a page for page0 in New document mode.
<xp:button id="button1" value="open new">
<xp:eventHandler event="onclick" submit="true" refreshMode="complete">
<xp:this.action>
	<xp:openPage name="/page0.xsp" target="newDocument"></xp:openPage>
</xp:this.action></xp:eventHandler></xp:button>
(2) This button opens a page for page0 in Open document mode. The document whose ID is sessionScope.y populates the page. The sessionScope variable must be previously set.
<xp:button id="button1" value="open new">
<xp:eventHandler event="onclick" submit="true" refreshMode="complete">
<xp:this.action>
	<xp:openPage name="/page0.xsp" target="openDocument" 
	documentId="#{javascript:sessionScope.y}"></xp:openPage>
</xp:this.action></xp:eventHandler></xp:button>
(3) This button opens a page for page0 in Edit document mode. The document whose ID is sessionScope.y populates the page. The sessionScope variable must be previously set.
<xp:button id="button1" value="open new">
<xp:eventHandler event="onclick" submit="true" refreshMode="complete">
<xp:this.action>
	<xp:openPage name="/page0.xsp" target="editDocument" 
	documentId="#{javascript:sessionScope.y}"></xp:openPage>
</xp:this.action></xp:eventHandler></xp:button>