Skip to main content

Notifications

Community site session details

Community site session details

Session Id :

Dialog

Hossein.K Profile Picture Hossein.K 6,648
This method builds a dialog and initializes the fields that will be used to capture
data from the user. These variables can be automatically initialized with the same
data selected in the last run.
Typically, developers initialize the dialog object by a call to
super() and then add
fields and other controls, afterward. The
dialog() method for this example has the
following contents.



 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
protected Object dialog()
{
DialogRunBase dialog;
DialogGroup groupPeriod;
dialog = super();
dialogAccount =
dialog.addFieldValue(extendedTypeStr(CustAccount),
custAccount);
groupPeriod = dialog.addGroup("Period");
dialogFromDate =
dialog.addFieldValue(extendedTypeStr(FromDate), fromDate,
"Period from");
dialogToDate =
dialog.addFieldValue(extendedTypeStr(ToDate), toDate,
"Period to");
return dialog;
}

Visual elements are added to the dialog design using the add*() methods on the
Dialog object. This code first adds one field of type
CustAccount, and references
the
custAccount variable (the value of which will be used as the default for the
field, if it has a value). Then, a group is added to the design, with a caption
"Period". The two fields added after that will be included in the just created
group (by default). These two fields also reference class variables, and include a
third text parameter to override the label on the fields.
When the dialog is rendered, it will appear as follows.




Best Regards,
Hossein Karimi

Comments

*This post is locked for comments