4.21 Button
An interface element that the user can touch or press to perform an action.
Attribute | Default Value | Type | Description | |
---|---|---|---|---|
Common | id | null | String | Unique identifier of the component. If it doesn't have an id, it is assigned with the nomenclature ${tag}${num}. |
render | true | Boolean or JEXLExpression | EL expression to evaluate if the component should be displayed. | |
onBeforeRender | null | String | JS method to execute before the current component is rendered. | |
onAfterRender | null | String | JS method that will be executed once the current component is rendered. | |
action | null | String | Identifier of the action to perform when the user interacts with this component. | |
allowsPartialRestore | false | Boolean | If the state of the current component should be restored when the user returns to the view. | |
label | null | String | Label to be displayed. | |
route | null | String | Identifier of the target form that will open when the user clicks on a button. | |
readonly | false | Boolean or JEXLExpression | Evaluates whether the component should be read-only or not. | |
readonlyMessage | null | String | Text displayed when clicking the button, and it is in readonly mode, meaning the action will not be executed. | |
confirmation | false | Boolean or JEXLExpression | Evaluates whether the confirmation panel for the action should be shown. | |
labelConfirmation | null | String | Text displayed in the confirmation panel. | |
action | null | String | Action to be performed when the button is pressed: add, create, update, save, cancel, delete, nav, js. See 4.27 Action for details. |
<button label="Button readonly" route="formLink-list" readonly="true" readonlyMessage="No puede realizar esta acción"/>
<button label="Button confirmation" route="formLink-list" confirmation="true" labelConfirmation="¿Desea realizar esta acción?"/>
4.21.1 Action
Ver 4.27. Action