Action Model Reference

The action model is a complex mechanism for generating menus dynamically. In particular, menus in Ad Hoc must be generated programmatically based on the contents of the reports, for example the context menu on a column. The following high-level steps explain how menus are generated:

When generating menus, the Ad Hoc Editor follows these steps:

1. Whenever a page with menus is to be displayed for the first time, the server looks up the corresponding action model XML definition and uses JDOM (Java-based Document Object Model for XML) to build and cache a Document.
2. Subsequent viewings reference the cached Document.
3. After the page is modified (usually triggered by an Ajax Request) the server generates a client side action model in the form of a JSON expression. Based on the current page state, the client model is a filtered version of the full action model in which internationalized names and generated options are resolved, and so forth.
4. Every time a menu is requested on the client, the server looks up the context in the JSON model, and for each action, clones the appropriate HTML template for the menu and tweaks its attributes accordingly.

Some pages have mostly static menus that don’t change based on page contents. Other pages, such as the Ad Hoc Editor, have dynamic menus that are updated in this way in response to changes the user makes on a page.

The following sections document the XML elements used in the action model definition files. In particular, you can define various conditions at several levels so menus appear only to certain users or based on the current state of the page.

Context

Each context represents a distinct menu type and refers to the part of the design page that launches that menu. Examples are reportLevel, columnLevel, fieldLevel. They're directly equivalent to the menu levels defined in the popup-style JSP files used in previous releases.

Condition

A condition element invokes the specified server side test as a method on the view model. The enclosed actions are included in the client action model only if the test returns true.

If the test has a leading exclamation point (!), the condition tests for false:

test – The name of the java method to be invoked on the view model.
testArgs – Array of parameters to be passed to the above test, expressed as a comma-separated string.

Actions

Each defined action produces one or more rows in the generated menu. The following tables describe the several action types.

simpleAction
                        </p>
                    </td>
                </tr>
            </thead>
            <tbody>
                <tr class="TableStyle-Table-Body-Body1">
                    <td colspan="2" class="TableStyle-Table-BodyD-Column1-Body1">
                        <p>A standalone menu action that, when clicked, fires the specified JavaScript method.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body2" data-mc-pattern="2">
                    <td colspan="2" class="TableStyle-Table-BodyD-Column1-Body2">
                        <p>Attributes</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>id</pre>
                    </td>
                    <td>
                        <p>The ID of the menu row DOM object.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>disabled</pre>
                    </td>
                    <td>
                        <p>If set to <span class="Code">true</span>, disable this row initially (shows a gray block instead).</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>labelKey</pre>
                    </td>
                    <td>
                        <p>The text the menu should display. If it corresponds to an localization bundle key it is translated, otherwise it is displayed as is.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>labelCondition</pre>
                    </td>
                    <td>
                        <p>Sometimes the label value is contingent on the current state. The label condition references a Java method on the view model and should return a Boolean. A <span class="Code">labelCondition</span> defines two <span class="Code">labelOption</span> sub elements (see below).</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>clientTest</pre>
                    </td>
                    <td>
                        <p>Only generate a row for this action if it passes the specified JavaScript method.</p>
                        <p>If the <span class="Code">clientTest</span> has a leading exclamation point (!), tests for false.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>clientTestArgs</pre>
                    </td>
                    <td>
                        <p>An array of parameters pass to the above test, expressed as a comma delimited string.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>action</pre>
                    </td>
                    <td>
                        <p>The JavaScript method to be fired when the action is taken.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>actionArgs</pre>
                    </td>
                    <td>
                        <p>An array of parameters to be passed to the above test, expressed as a string delimited by the @@ string constant.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>leaveMenuOpen</pre>
                    </td>
                    <td>
                        <p>If true the menu stays displayed after action.</p>
                    </td>
                </tr>
            </tbody>
        </table>
        <table class="TableStyle-Table"  cellspacing="0">
            <col width="163px" class="TableStyle-Table-Column-Column1" />
            <col width="461px" class="TableStyle-Table-Column-Column1" />
            <thead>
                <tr class="TableStyle-Table-Head-Header1">
                    <td colspan="2" class="TableStyle-Table-HeadD-Column1-Header1">
                        <p><strong>separator</strong>
                        </p>
                    </td>
                </tr>
            </thead>
            <tbody>
                <tr class="TableStyle-Table-Body-Body1">
                    <td colspan="2" class="TableStyle-Table-BodyD-Column1-Body1">
                        <p>Not strictly an action. Outputs a separator bar. The style of the bar automatically adjusts to the current nesting level.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body2" data-mc-pattern="2">
                    <td colspan="2" class="TableStyle-Table-BodyD-Column1-Body2">
                        <p>Attributes</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>attributesclientTest</pre>
                    </td>
                    <td>
                        <p>Only generate a row for this action if it passes the specified JavaScript method.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>clientTestArgs</pre>
                    </td>
                    <td>
                        <p>An array of parameters to be passed to the above test, expressed as a string delimited by the @@ string constant.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>disabled</pre>
                    </td>
                    <td>
                        <p>Disable this row initially (shows a gray block instead).</p>
                    </td>
                </tr>
            </tbody>
        </table>
        <table class="TableStyle-Table"  cellspacing="0">
            <col width="163px" class="TableStyle-Table-Column-Column1" />
            <col width="461px" class="TableStyle-Table-Column-Column1" />
            <thead>
                <tr class="TableStyle-Table-Head-Header1">
                    <td colspan="2" class="TableStyle-Table-HeadD-Column1-Header1">
                        <p><strong>selectAction</strong>
                        </p>
                    </td>
                </tr>
            </thead>
            <tbody>
                <tr class="TableStyle-Table-Body-Body1">
                    <td colspan="2" class="TableStyle-Table-BodyD-Column1-Body1">
                        <p><a name="kanchor31"></a>A drop down (roll down) parent. Selectors can be nested up to three levels deep. The menu automatically renders the roll-downs in a nested fashion.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body2" data-mc-pattern="2">
                    <td colspan="2" class="TableStyle-Table-BodyD-Column1-Body2">
                        <p>Attributes</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>attributesdisabled</pre>
                    </td>
                    <td>
                        <p>If set to <span class="Code">true</span>, disable this row initially (shows a gray block instead).</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>opened</pre>
                    </td>
                    <td>
                        <p>If set to <span class="Code">true</span>, selector is opened initially.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>labelKey</pre>
                    </td>
                    <td>
                        <p>The text for the menu to display. If it corresponds to an localization bundle key it is translated, otherwise it is displayed as is.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>labelCondition</pre>
                    </td>
                    <td>
                        <p>Sometimes the label value is contingent on the current state. The label condition references a java method on the view model and should return a Boolean. A <span class="Code">labelCondition</span> defines two <span class="Code">labelOption</span> sub elements (see below).</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>clientTest</pre>
                    </td>
                    <td>
                        <p>Only generate a row for this action if it passes the specified JavaScript method.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>clientTestArgs</pre>
                    </td>
                    <td>
                        <p>An array of parameters to be passed to the above test, expressed as a string delimited by the @@ string constant.</p>
                    </td>
                </tr>
            </tbody>
        </table>
        <h4><a name="customizing_1073381483_1116584"></a>Options</h4>
        <p>Some actions can have child elements, as described in the following tables.</p>
        <table class="TableStyle-Table"  cellspacing="0">
            <col width="163px" class="TableStyle-Table-Column-Column1" />
            <col width="461px" class="TableStyle-Table-Column-Column1" />
            <thead>
                <tr class="TableStyle-Table-Head-Header1">
                    <td colspan="2" class="TableStyle-Table-HeadD-Column1-Header1">
                        <p><strong>option</strong>
                        </p>
                    </td>
                </tr>
            </thead>
            <tbody>
                <tr class="TableStyle-Table-Body-Body1">
                    <td colspan="2" class="TableStyle-Table-BodyD-Column1-Body1">
                        <p>Child of <span class="Code">selectAction</span>. Defines a static menu option. Use this when you can't define options programmatically.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body2" data-mc-pattern="2">
                    <td colspan="2" class="TableStyle-Table-BodyD-Column1-Body2">
                        <p>Attributes</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>id</pre>
                    </td>
                    <td>
                        <p>The ID of the menu row DOM object.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>disabled</pre>
                    </td>
                    <td>
                        <p>If set to <span class="Code">true</span>, disable this row initially (shows a gray block instead).</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>button</pre>
                    </td>
                    <td>
                        <p>If set to <span class="Code">true</span> the option displayed as a button (as in formula builder).</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>labelKey</pre>
                    </td>
                    <td>
                        <p>The text for the menu to display. If it corresponds to an localization bundle key it is translated, otherwise it is displayed as is.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>labelCondition</pre>
                    </td>
                    <td>
                        <p>Sometimes the label value is contingent on the current state. The label condition references a java method on the view model and should return a Boolean. A <span class="Code">labelCondition</span> defines two <span class="Code">labelOption</span> sub elements (see below).</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>clientTest</pre>
                    </td>
                    <td>
                        <p>Only generate a row for this action if it passes the specified JavaScript method.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>clientTestArgs</pre>
                    </td>
                    <td>
                        <p>An array of parameters to be passed to the above test, expressed as a comma delimited string.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>allowsInputTest</pre>
                    </td>
                    <td>
                        <p>Show an input box in this option if it passes the specified JavaScript method.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>allowsInputTestArgs</pre>
                    </td>
                    <td>
                        <p>An array of parameters to be passed to the above test, expressed as a string delimited by the @@ string constant.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>action</pre>
                    </td>
                    <td>
                        <p>The JavaScript method to be fired when the action is taken.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>actionArgs</pre>
                    </td>
                    <td>
                        <p>An array of parameters to be passed to the above test, expressed as a comma delimited string.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>isSelectedTest</pre>
                    </td>
                    <td>
                        <p>Indicate a check mark next to this option if it passes the specified JavaScript method.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>isSelectedTestArgs</pre>
                    </td>
                    <td>
                        <p>An array of parameters to be passed to the above test, expressed as a string delimited by the @@ string constant.</p>
                    </td>
                </tr>
            </tbody>
        </table>
        <table class="TableStyle-Table"  cellspacing="0">
            <col width="163px" class="TableStyle-Table-Column-Column1" />
            <col width="461px" class="TableStyle-Table-Column-Column1" />
            <thead>
                <tr class="TableStyle-Table-Head-Header1">
                    <td colspan="2" class="TableStyle-Table-HeadD-Column1-Header1">
                        <p><strong>generatedOptions</strong>
                        </p>
                    </td>
                </tr>
            </thead>
            <tbody>
                <tr class="TableStyle-Table-Body-Body1">
                    <td colspan="2" class="TableStyle-Table-BodyD-Column1-Body1">
                        <p>Child of <span class="Code">selectAction</span>. Defines a set of dynamically-defined options.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body2" data-mc-pattern="2">
                    <td colspan="2" class="TableStyle-Table-BodyD-Column1-Body2">
                        <p>Reserved Variables (in addition to standard reserved variables)</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>${optionId}</pre>
                    </td>
                    <td>
                        <p>Programmatically assigned ID. If function returns a Map this is the key part of each key-value pair, if it returns a Collection it is the <span class="Code">toString</span> value of each element.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>${optionValue}</pre>
                    </td>
                    <td>
                        <p>Programmatically assigned display value. If function returns a Map this is the value part of each key-value pair, if it returns a Collection it is the <span class="Code">toString</span> value of each element.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>$R{<String>}</pre>
                    </td>
                    <td>
                        <p>When used in a label expression attempts to internationalize the enclosed String and if it fails it returns the literal value.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body2" data-mc-pattern="2">
                    <td colspan="2" class="TableStyle-Table-BodyD-Column1-Body2">
                        <p>Attributes</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>id</pre>
                    </td>
                    <td>
                        <p>The ID of the menu row DOM object.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>function</pre>
                    </td>
                    <td>
                        <p>The name of the java method to invoke on the view model that is used to generate the options. The function can return either a Map or a Collection. The type of object returned affects how the <span class="Code">${optionValue}</span> and <span class="Code">${optionId}</span> reserved variables are interpreted (see above).</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>functionArgs</pre>
                    </td>
                    <td>
                        <p>An array of parameters to pass to the above test, expressed as a string delimited by the @@ string constant.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>labelKey</pre>
                    </td>
                    <td>
                        <p>The text for the menu to display. If it corresponds to an localization bundle key it is translated, otherwise it is displayed as is.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>labelCondition</pre>
                    </td>
                    <td>
                        <p>Sometimes the label value is contingent on the current state. The label condition references a java method on the view model and should return a Boolean. A <span class="Code">labelCondition</span> defines two <span class="Code">labelOption</span> sub elements (see below).</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>labelExpression</pre>
                    </td>
                    <td>
                        <p>Allows a custom label to be defined and allows full use of all reserved variables. (for example, labelExpression="${optionValue}")  $R{ADH_252_DATA_ROWS}").</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>clientTest</pre>
                    </td>
                    <td>
                        <p>Only generate a row for this action if it passes the specified JavaScript method.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>clientTestArgs</pre>
                    </td>
                    <td>
                        <p>An array of parameters to be passed to the above test, expressed as a string delimited by the @@ string constant. If no actionArgs are specified, the ${optionId} variable is automatically assigned as an argument.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>allowsInputTest</pre>
                    </td>
                    <td>
                        <p>Show an input box in this option if it passes the specified JavaScript method.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>allowsInputTestArgs</pre>
                    </td>
                    <td>
                        <p>An array of parameters to be passed to the above test, expressed as a string delimited by the @@ string constant. If no actionArgs are specified, the ${optionId} variable is automatically assigned as an argument.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>action</pre>
                    </td>
                    <td>
                        <p>The JavaScript method to be fired when the action is taken.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>actionArgs</pre>
                    </td>
                    <td>
                        <p>An array of parameters to be passed to the above test, expressed as a comma delimited string. If no actionArgs are specified, the ${optionId} variable is automatically be assigned as an argument.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>leaveMenuOpen</pre>
                    </td>
                    <td>
                        <p>If true the menu stays displayed after action (for all generated options).</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>isSelectedTest</pre>
                    </td>
                    <td>
                        <p>Indicate a check mark next to this option if it passes the specified JavaScript method.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>isSelectedTestArgs</pre>
                    </td>
                    <td>
                        <p>An array of parameters to be passed to the above test, expressed as a string delimited by the @@ string constant. If no actionArgs are specified, the ${optionId} variable is automatically assigned as an argument.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body2" data-mc-pattern="2">
                    <td colspan="2" class="TableStyle-Table-BodyD-Column1-Body2">
                        <p>Default Settings (DOM attributes set automatically on each generated Option)</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>id</pre>
                    </td>
                    <td>
                        <p>If not specified as an a attribute defaults to the ${optionId} variable.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>clientTestArgs</pre>
                    </td>
                    <td>
                        <p>If not specified as an a attribute defaults to the ${optionId} variable.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>actionArgs</pre>
                    </td>
                    <td>
                        <p>If not specified as an a attribute defaults to the ${optionId} variable.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>isSelectedArgs</pre>
                    </td>
                    <td>
                        <p>If not specified as an a attribute defaults to the ${optionId} variable.</p>
                    </td>
                </tr>
            </tbody>
        </table>
        <table class="TableStyle-Table"  cellspacing="0">
            <col width="163px" class="TableStyle-Table-Column-Column1" />
            <col width="461px" class="TableStyle-Table-Column-Column1" />
            <thead>
                <tr class="TableStyle-Table-Head-Header1">
                    <td colspan="2" class="TableStyle-Table-HeadD-Column1-Header1">
                        <p><strong>labelOption</strong>
                        </p>
                    </td>
                </tr>
            </thead>
            <tbody>
                <tr class="TableStyle-Table-Body-Body1">
                    <td colspan="2" class="TableStyle-Table-BodyD-Column1-Body1">
                        <p>Child of <span class="Code">labelFunction</span>. Every <span class="Code">labelFunction</span> element should have two <span class="Code">labelOption</span> elements as children. One of them is used to define the action label depending on the result of the <span class="Code">labelCondition</span>.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td colspan="2" class="TableStyle-Table-BodyD-Column1-Body1">
                        <p>Attributes</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>attributesfunction<br />Response</pre>
                    </td>
                    <td>
                        <p>A Boolean string. If the parent <span class="Code">labelCondition</span> result matches this Boolean value, this <span class="Code">labelOption</span> is used.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>labelKey</pre>
                    </td>
                    <td>
                        <p>The text for the menu to display. If it corresponds to an localization bundle key it is translated, otherwise it is displayed as <span class="Code">isgenerateFromTemplate</span>.</p>
                    </td>
                </tr>
            </tbody>
        </table>
        <table class="TableStyle-Table"  cellspacing="0">
            <col width="163px" class="TableStyle-Table-Column-Column1" />
            <col width="461px" class="TableStyle-Table-Column-Column1" />
            <thead>
                <tr class="TableStyle-Table-Head-Header1">
                    <td colspan="2" class="TableStyle-Table-HeadD-Column1-Header1">
                        <p><strong>generateFromTemplate</strong>
                        </p>
                    </td>
                </tr>
            </thead>
            <tbody>
                <tr class="TableStyle-Table-Body-Body1">
                    <td colspan="2" class="TableStyle-Table-BodyD-Column1-Body1">
                        <p>Programmatically generates multiple actions by specifying a function to iterate over the enclosed template. The template can be any valid action structure, it can include multiple actions and/or nested actions.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body2" data-mc-pattern="2">
                    <td colspan="2" class="TableStyle-Table-BodyD-Column1-Body2">
                        <p>Reserved Variables (in addition to standard reserved variables)</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>${templateInjection<br />Index}</pre>
                    </td>
                    <td>
                        <p>The zero-based index of the current iteration.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>${templateInjection<br />Id}</pre>
                    </td>
                    <td>
                        <p>Programmatically assigned ID. If function returns a Map this is the key part of each key-value pair, if it returns a Collection it is the <span class="Code">toString</span> value of each element.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>${templateInjection<br />Value}</pre>
                    </td>
                    <td>
                        <p>Programmatically assigned value. If function returns a Map this is the value part of each key-value pair, if it returns a Collection it is the <span class="Code">toString</span> value of each element.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body2" data-mc-pattern="2">
                    <td colspan="2" class="TableStyle-Table-BodyD-Column1-Body2">
                        <p>Attributes</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>function</pre>
                    </td>
                    <td>
                        <p>The name of the java method to be invoked on the view model that is used as the template iterator. The function can return either a Map or a Collection. The type of object returned affects how the reserved variables <span class="Code">${templateInjectionId}</span> and <span class="Code">${templateInjectionValue}</span> are interpreted (see above).</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>functionArgs</pre>
                    </td>
                    <td>
                        <p>An array of parameters to be passed to the above test, expressed as a string delimited by the @@ string constant.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body2" data-mc-pattern="2">
                    <td colspan="2" class="TableStyle-Table-BodyD-Column1-Body2">
                        <p>Child Elements</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td colspan="2" class="TableStyle-Table-BodyA-Column1-Body1">
                        <p>Any valid action structure, which is used as the template.</p>
                    </td>
                </tr>
            </tbody>
        </table>
        <h4><a name="customizing_1073381483_1117050"></a>Special Expressions</h4>
        <p>The following special expressions are converted to built-in variable values when used as arguments for client functions:</p>
        <table class="TableStyle-Table"  cellspacing="0">
            <col width="163px" class="TableStyle-Table-Column-Column1" />
            <col width="461px" class="TableStyle-Table-Column-Column1" />
            <thead>
                <tr class="TableStyle-Table-Head-Header1">
                    <td>
                        <p>Expression</p>
                    </td>
                    <td>
                        <p>Definition</p>
                    </td>
                </tr>
            </thead>
            <tbody>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>${selected}</pre>
                    </td>
                    <td>
                        <p>The JavaScript array of selected objects on the client.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>${event}</pre>
                    </td>
                    <td>
                        <p>The JavaScript event object.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>${label}</pre>
                    </td>
                    <td>
                        <p>The generated label for this menu.</p>
                    </td>
                </tr>
            </tbody>
        </table>
        <h4><a name="customizing_1073381483_1116842"></a>Menu DHTML API</h4>
        <p><a name="kanchor32"></a>This is a set of JavaScript functions defined on actionModel.js to dynamically manipulate a menu’s look and feel after it's been displayed. You can use them to change the Ad Hoc Editor menus in run-time. Most of them take the <span class="Code">menuRow</span> or the <span class="Code">menuRow</span>’s identifier as arguments. Some have additional arguments as well. For more information about the additional arguments, refer to the code itself.</p>
        <table class="TableStyle-Table"  cellspacing="0">
            <col width="163px" class="TableStyle-Table-Column-Column1" />
            <col width="461px" class="TableStyle-Table-Column-Column1" />
            <thead>
                <tr class="TableStyle-Table-Head-Header1">
                    <td>
                        <p>Function</p>
                    </td>
                    <td>
                        <p>Description</p>
                    </td>
                </tr>
            </thead>
            <tbody>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>hideInputForOption</pre>
                    </td>
                    <td>
                        <p>Hide the input box on the option.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>showInputForOption</pre>
                    </td>
                    <td>
                        <p>Show the input box on the option.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>setRowColor</pre>
                    </td>
                    <td>
                        <p> Set the <span class="Code">backgroundColor</span> to the specified color.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>resetRowColor</pre>
                    </td>
                    <td>
                        <p>Restore original background color.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>getLabel</pre>
                    </td>
                    <td>
                        <p>Return the current label for this row.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>setLabel</pre>
                    </td>
                    <td>
                        <p>Set the label for this row.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>disableRow</pre>
                    </td>
                    <td>
                        <p>Grey out the row.</p>
                    </td>
                </tr>
                <tr class="TableStyle-Table-Body-Body1">
                    <td><pre>enableRow</pre>
                    </td>
                    <td>
                        <p>Restore the row to active state.</p>
                    </td>
                </tr>
            </tbody>
        </table>
 
 
Version: 
Feedback
randomness