Command Syntax
Command Syntax
Commands are defined in AXVW as <command> XML elements. Each command has a type attribute that identifies the main function that the command performs:
<command type="saveForm"/>
Most commands have additional attributes to specify additional options:
<command type="openDialog" viewName="ab-em-edit.axvw"/>
Commands can be attached to:
- Panel-level action buttons in any panel type:
<panel type="html">
<action id="">
<title>Search</title>
<command type="workflowRule" ruleId="AbReservations-loadTimeline"/>
</action>
</panel>
- Field-level action buttons in edit form panels:
<panel type="form">
<field name="created_by">
<action id="...">
<title>Lookup</title
<command type="selectValue" fieldNames="reserve.created_by"
selectFieldNames="em.em_id"/>
</action>
</field>
</panel>
- Data grid cells, in columns that display buttons or links:
<panel type="grid">
<field name="rm_id" controlType="button">
<title>Details</title>
<command type="openDialog" viewName="ab-rr-room-details.axvw"/>
</field>
</panel>
Commands can be chained together. Chained commands are executed in the order in which they are defined. If any command fails during execution, the rest of the command chain is not executed.
<action id="finish">
<title>Finish</title>
<command type="workflowRule" workflowRuleId="AbReservations-saveRoomReservation"/>
<command type="selectTabPage" tabPageName="my-reservations"/>
</action>