showDialog() Method |
|
This method displays a dialog box that contains parameters of the specified application definition.
Syntax
application.showDialog(oApplicationDefinition,oData,fpApplicationCallback, fpCallBackHandler, bOnCordysRoot);
Parameters
|
Parameter
|
Description
|
|---|---|
| oApplicationDefinition | Required. Denotes the Application Definition of the dialog to be opened. |
| oData | Optional. Denotes the data to be passed to the dialog window while it loads. |
| fpApplicationCallback | Optional. Denotes the function to be called after opening theoApplicationDefinitionparameter. |
| fpCallBackHandler | Optional. Denotes the function to be called when the dialog closes with the return value. |
| bOnCordysRoot | Optional. Boolean that if set to True displays the dialog on the CordysRoot. By default, it is set to False. |
Return Value
It does not return a value.
Remarks
The application that is opened as a dialog box should have thedialogReturnValue()method. This method should return data to the calling application.
The dialog boxes that appear are resizable, by default. To disable the resizing of dialog boxes, set theresizableproperty to Off in thefeaturesattribute ofoApplicationDefinition.
Example
function showDialog ()
{
var data = newObject();
data.property1 = "property1";
data.property2 = "property2";
application.showDialog(newApplication.documentElement, data, null, closeHandler, false);
}
function closeHandler(dialogReturnValue)
{
//The logic to handle the dialogReturnValue goes here.
}
<xml id="newApplication">
<Application>
<url>Application URL </url>
<id>Application Id</id>
<caption>Application caption</caption>
<description>Application description</description>
<frame>main</frame>
<data/>
</Application>
</xml>
The following is a sample implementation of thedialogReturnValue()function.
function dialogReturnValue()
{
var data = newObject();
data.oldValue = input1.value;
data.newValue = input2.value;
returndata;
}
|
本文详细介绍了showDialog()方法的使用方式,包括语法、参数说明及返回值等,并提供了具体的实现示例。此外还讲解了如何通过dialogReturnValue()方法从对话框中返回数据。
3249







1 Comment
Hide/Show Comments13 Mar 2015
Chen David
The function should be "dialogReturnValue" ,On closing child form, the dialogReturnValue() is called automatically and returns data object to parent form