XForm showDialog ,dialogReturnValue 用法

showDialog() Method


This method displays a dialog box that contains parameters of the specified application definition.

Syntax


application.showDialog(oApplicationDefinition,oData,fpApplicationCallbackfpCallBackHandlerbOnCordysRoot);

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
  1. 13 Mar 2015

    The function should be "dialogReturnValue" ,On closing child form, the dialogReturnValue() is called automatically and returns data object to parent form

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值