XForm showDialog ,dialogReturnValue 用法

来源:互联网 发布:电脑小说阅读软件 编辑:程序博客网 时间:2024/06/05 05:43

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
oApplicationDefinitionRequired. Denotes the Application Definition of the dialog to be opened.oDataOptional. Denotes the data to be passed to the dialog window while it loads.fpApplicationCallbackOptional. Denotes the function to be called after opening theoApplicationDefinitionparameter.fpCallBackHandlerOptional. Denotes the function to be called when the dialog closes with the return value.bOnCordysRootOptional. 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;}



Like
  • None
  • Edit Labels

1 Comment

Hide/Show Comments
  1. 13 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

0 0