ui.Dialog.setActionAttribute

Set an action attribute to configure a dynamic dialog.

Syntax

setActionAttribute(
   action STRING,
   attribute STRING,
   value STRING )
  1. name is the name of the dialog action.
  2. attrName is the name of the action attribute (as in .4ad file).
  3. attrValue is the value of the action attribute (as in .4ad file).

Usage

When creating a dynamic dialog, the setActionAttribute() method can be used to define functional action attributes (such as VALIDATE=NO), and decoration attributes for default action views (such as TEXT, COMMENT, IMAGE).

When defining a static dialog instruction, you can specify action options with the ATTRIBUTES() clause:
INPUT BY NAME ...
   ON ACTION show_help ATTRIBUTES( TEXT="Help", VALIDATE=NO )
When creating a dynamic dialog, call the setActionAttribute() method after adding an "ON ACTION action-name" trigger, to configure the action attributes:
LET d = ui.Dialog.createInputByName(fields)
...
CALL d.addTrigger("ON ACTION show_help")
CALL d.setActionAttribute("show_help","text","Help")
CALL d.setActionAttribute("show_help","validate","no")
Table 1. Attribute names for dynamic dialog actions
Attribute name Possible values Description ON ACTION equivalent
acceleratorName string Defines the first accelerator key for the action. ACCELERATOR
comment string Defines the bubble hint / tooltip help of the action. COMMENT
contextMenu "yes", "no", "auto" Indicates if the action must be shown in the context menu of the form. CONTEXTMENU
defaultView "yes", "no", "auto" Indicates if the default action view must appear. DEFAULTVIEW
image string Defines the icon for the action view. IMAGE
text string Defines the label for the action view. TEXT
validate "yes", "no" Indicates if the action implies validation of current field input. VALIDATE