Option
An option is an action that can be executed by the user. It can be a link to another view, a command executed on the server, or a link to an external resource.
Attributes
All attributes are optional.
name- name of the option; defaultd+ positiontitle- title associated with the namelabel- label of the option- element value (text or CDATA) - URL or command to be executed when the option is selected
- server-side variables
[[variable]]are available; see server-side variables - client-side parameters are available as
{parameter}, replaced in order of priority:- client-side parameters passed to the SRS
- query string parameters
- server-side variables
acl- permission required for the optioncss- CSS class for stylingscope- limits the option to a command in the user interface; comma-separated values are allowed, for examplescope="orders,items"; an option scoped to a command that is not in the result is removedopts- extra options that modify the behavior of the option on the client sideuimenu- for av_type: renders the component directly in the options bar instead of a button that opens a side modal
type- default (empty): a plain link to the URLpa_post- sends one POST request per selected row (row object as the body); requiresopts="uiclipboard"on the commandpa_post_many- sends one POST request with an array of the selected rows; several URLs separated by|are called one after anotherpa_post_clipboard- sends one POST request with the current parameters and the selected rows in theclipboardproperty; when the URL containsfilename=, the response is downloaded as a file with that namepa_post_single- sends one POST request with the current parameters, then reloads the SRSpa_post_blank- sends a POST request without a body, then reloads the SRSpa_blink- opens an external link in a new windowpa_elink- opens an external link in the same browser tab, replacing the current contentpa_mlink- opens a modal dialog within the application; typically used to display content or perform actions without navigating away from the current viewpa_download- downloads a file from an external link; the download starts automatically without user interactionpa_info- displays a simple message; a value is requiredv_(Name_of_the_component)- opens the specified Vue component in a side modal; the type name must start with thev_prefix; see Display a custom component
Examples
pa_post
Type pa_post requires opts="uiclipboard" on the command.
| XML | |
|---|---|
| XML | |
|---|---|
pa_mlink, pa_elink, pa_blink, pa_download
These types are used to open links in different ways.
- URL can be a relative or absolute path.
- Server-side variables
[[variable]]are available; see server-side variables. - Client-side parameters are available as
{parameter}, replaced in order of priority:- client-side parameters passed to the SRS
- query string parameters
| XML | |
|---|---|
Display a custom component
The type attribute must start with the v_ prefix and contain the name of the component.
- the element value is an optional JSON object with component props; it is passed to the component as the
paramsprop (withopts="uimenu", the keys are also bound as props) - the component also receives
parameters(SRSdef),table,optionandclipboard_items; areload-eventemitted by the component reloads the table
| XML | |
|---|---|
See v_form_auto.