Simple actions (JavaScript)

A simple action performs a pre-programmed activity that can be modified by arguments.

Simple actions reside in the Events view for a page or control. There are separate sets of simple actions for Client and Server.

For example, a button that loads another page to the browser is implemented by first selecting onclick, Server, and Simple Actions in the Events view. Then click Add Action and fill in the Add Simple Action dialog box.

The types of simple actions are as follows:
  • Basic
  • Component
  • Advanced
The following table lists the Client simple actions:
Name Syntax Description
Execute Client Script executeClientScript ![CDATA[JavaScript]] (Basic) Executes a client-side script.
Publish Component Property publishValue name="eventname" value="value" type="type" (Component) Publishes a component event.
Publish View Column publishViewColumn name="eventname" columnName="columnname" type="type" (Component) Publishes the value of a view column as a component event.
The following table lists the Server simple actions:
Name Syntax Description
Change Document Mode changeDocumentMode mode="string" (Document) Changes the access mode for the current page.
Confirm Action confirm message="string" (Basic) Confirms an action.
Create Response Document createResponse name="string" parentID="string" (Document) Creates a response document and opens it as a new document.
Delete Document deleteDocument name="string" message="string" (Document) Deletes the current document and opens a new page.
Delete Selected Documents deleteSelectedDocuments view="string" "message=string" (Document) Deletes documents selected in a view.
Execute Script executeScript script=#{javascript:<JavaScript>}

executeScript script=#{xpath:<XPath_expression>}

executeScript script=#{<EL_expression>}
(Basic) Executes a script, XPath expression, or EL expression.
In Place From Action inPlaceFormAction for="in_place_form_ID" formAction="action_name" (Document) Shows or hides In Place Form controls that are commonly used for the in place editing of an individual document - directly within a Repeat control that lists multiple documents.
Modify Field modifyField name="string" value="generic" (Document) Modifies a field in the current document.
Open Page openPage name="string" target="string" documentId="string" (Basic) Replaces the current page.
Save Data Sources save "name=string" (Basic) Saves all the data sources on the current page and opens a new page.
Save Document saveDocument (Document) Saves the current document.
Send Mail sendMail from="name" to="name" cc="name" bcc="name" subject="string" bodyHtml="string" bodyPlain="string" embeddedFormat="JSON|XML" htmlUrl="string" gadgetUrl="string" <xp:this.eeContext> <xp:parameter name="name" value="string"></xp:parameter> ... </xp:this.eeContext> (Basic) Sends a mail message.
Set Component Mode Action setComponentMode cancel="true" mode="edit" (Component) Changes the mode of a component.
Set Value setValue binding=javax.faces.el.ValueBinding object value="generic" (Basic) Sets the value of a computed expression.

This documentation refers to the following products: HCL Domino®, HCL Domino® Designer, HCL Notes®, HCL iNotes®, and HCL Traveler.