ui.Dialog.addConstructByName
Adds a sub-dialog of type CONSTRUCT BY NAME
to an
existing ui.Dialog
dynamic dialog.
Syntax
ui.Dialog.addConstructByName(
fields DYNAMIC ARRAY OF RECORD
name STRING,
type STRING
END RECORD,
name STRING
)
- fields is the list of form fields controlled by the dialog. This must be a
DYNAMIC ARRAY
ofRECORD
structure, with aname
andtype
member of typeSTRING
. - name is the sub-dialog identifier. This name is used to identify the sub-dialog in dialog events and API calls.
Usage
The ui.Dialog.addConstructByName()
class method adds a sub-dialog equivalent to
a CONSTRUCT BY NAME
block, to the dynamic multiple dialog created with ui.Dialog.createMultipleDialog.
The method takes a list of field definitions as parameter, as described in Field definition for Dynamic Dialogs.
This second parameter will be used to identify the sub-dialog.
Static CONSTRUCT
dialog instructions use the data types of
the fields defined in the .per form specification file. Unlike static
CONSTRUCT, the dynamic construct uses the data type provided in the dynamic
array defining the list of fields.
A dynamic dialog can be configured with the setDialogAttribute()
method.
Example
DEFINE fields DYNAMIC ARRAY OF RECORD
name STRING,
type STRING
END RECORD
DEFINE d ui.Dialog
...
LET d = ui.Dialog.createMultipleDialog()
...
CALL d.addConstructByName(fields,"const1")
...