< action />
View Element Reference
< action />
An
action
element creates a user interface button. The
action
element may be used to place a button in the panel titlebar or adjacent to a form field. The
action
element typically contains command elements, which represent operations that are performed when the
user clicks on the button:
<action id="save">
<title translatable="true">Save</title>
<tooltip>Save Record</tooltip>
<command type="saveForm"/>
<command type="showPanel" panelId="projects_list"/>
</action>
Alternatively, the control may use the
onclick
attribute to call a JavaScript function by name. The
onclick
attribute can also take inline JavaScript fragments:
<action onclick="copyValues">
<title translatable="true">Copy Values</title>
</action> <action onclick="alert('Copying Values'); copyValues();">
<title translatable="true">Copy Values</title>
</action>
Enclosing Element
This tag may be used as a direct child of a <panel> or the <field> element.
Encloses
This tag may enclose a <title>, <tooltip> and one or more <command> child elements.
Attributes
Attribute | Description | Valid Values | Optional |
---|---|---|---|
id | An identifier for the UI control (e.g., button). | free text, must be unique within the axvw view file | yes |
imageName | Image file to replace button text | path to image file | yes |
onClick | The function to be called when the user clicks on the UI control | a valid, available, function name | yes |
enabled | Typically used with a condition to dynamically enable or disable an action button |
a
condition that evaluates to
Typically using a binding expression such as ${!user.isMemberOfGroup('FIM')} which compares the current user with an established security group |
yes |
hidden | Allows for the use of an expression to conditionally hide the control |
an
expression evaluating to true or false. Typically uses a record-accessing
binding expression such as
${record[project.status] == 'Created'}
|
yes |
cssClass | A CSS class to be used for styling the constructed UI control | a valid CCS class name available in the standard or user-developed stylesheets | yes |