Simple actions
A simple action performs a pre-programmed activity that can be modified by arguments. Simple actions apply to event handlers. Simple actions can be grouped.
Simple actions enumerated
Simple actions are categorized as Basic, Component, and Document.The following simple actions apply to server event handlers:
Change Document Mode(Document) in the HCL Domino® Designer XPages ReferenceConfirm Action(Basic) in the HCL Domino® Designer XPages ReferenceCreate Response Document(Document) in the HCL Domino® Designer XPages ReferenceDelete Document(Document) in the HCL Domino® Designer XPages ReferenceDelete Selected Documents(Document) in the HCL Domino® Designer XPages ReferenceExecute Script(Basic) in the HCL Domino® Designer XPages ReferenceIn Place Form Action(Document) in the HCL Domino® Designer XPages ReferenceModify Field(Document) in the HCL Domino® Designer XPages ReferenceOpen Page(Basic) in the HCL Domino® Designer XPages ReferenceSave Data Sources(Basic) in the HCL Domino® Designer XPages ReferenceSave Document(Document) in the HCL Domino® Designer XPages ReferenceSet Component Mode Action(Component) in the HCL Domino® Designer XPages ReferenceSet Value(Basic) in the HCL Domino® Designer XPages Reference
The following simple actions apply to client event handlers:
Execute Client Script(Basic) in the HCL Domino® Designer XPages ReferencePublish Component Property(Component) in the HCL Domino® Designer XPages ReferencePublish View Column(Component) in the HCL Domino® Designer XPages Reference
See "Simple actions" in the HCL Domino® Designer XPages Reference for the complete reference.
Simple actions by example
The following Source XML examples apply to theonclick event for a button.
For Design mode instructions, see Working with simple actions.- One server-side actionThis event handler executes the server-side
Open Pagesimple action. In the Design mode dialog, you selectOpen Pageas the action,xpage1as the first argument, andNew documentas the second argument.<xp:button id="button1" value="Go back"> <xp:eventHandler event="onclick" submit="true" refreshMode="complete"> <xp:this.action> <xp:openPage name="/xpage1.xsp" target="newDocument"></xp:openPage> </xp:this.action> </xp:eventHandler> </xp:button> - One client-side and one server-side simple actionThis event handler contains both client and server simple actions. The handler first executes the client-side
Execute Client Scriptaction. If the client script returnstrue, the handler executes the server-sideOpen Pagesimple action.<xp:button id="button1" value="Go to page 1"> <xp:eventHandler event="onclick" submit="true" refreshMode="complete"> <xp:this.action> <xp:openPage name="/xpage1.xsp" target="newDocument"></xp:openPage> </xp:this.action> <xp:this.script> <xp:executeClientScript> <xp:this.script> <![CDATA[return window.confirm("Do you really want to go to page 1?")]]> </xp:this.script> </xp:executeClientScript> </xp:this.script> </xp:eventHandler> </xp:button>
Simple action groups by example
Simple actions can be placed in groups to multiple depths. Groups allow multiple client and server actions for an event, and provide for conditional execution. Actions exist for executing scripts so you can group scripts.- One server-side action in a group with a conditionThis event handler executes the server-side
Open Pagesimple action conditionally by placing it in a group.<xp:button id="button1" value="Go to page 1"> <xp:eventHandler event="onclick" submit="true" refreshMode="complete"> <xp:this.action> <xp:actionGroup> <xp:this.condition> <![CDATA[#{javascript:return session.getCommonUserName() != "Anonymous"}]]> </xp:this.condition> <xp:openPage name="/xpage1.xsp" target="newDocument"></xp:openPage> </xp:actionGroup> </xp:this.action> </xp:eventHandler> </xp:button> - Three server-side actions in a groupThis event handler executes the server-side
Confirm Action,Save Document, andOpen Pagesimple actions sequentially by placing them in a group. A return value of false for the first action stops execution of the remaining actions.<xp:button id="button1" value="Go to page 1"> <xp:eventHandler event="onclick" submit="true" refreshMode="complete"> <xp:this.action> <xp:actionGroup> <xp:confirm message="Do you really want to go to page 1?"></xp:confirm> <xp:saveDocument></xp:saveDocument> <xp:openPage name="/xpage1.xsp" target="newDocument"></xp:openPage> </xp:actionGroup> </xp:this.action> </xp:eventHandler> </xp:button>