zoukankan      html  css  js  c++  java
  • InfoPath窗体事件列表说明和示例使用

    InfoPath窗体事件列表说明和示例使用

    一、事件列表:

    Name

    Event handlers

    Description

    DataDOMEvent object

    OnBeforeChange

    OnValidate

    OnAfterChange

    Returns a reference to a form's underlying XML document, the return status, and other properties that contain information about the XML node during an XML Document Object Model (DOM) change. Also includes a method for raising an error.

    DocActionEvent object

    OnClick

    Returns a reference to a form's underlying XML document, the return status, and the source XML node during a button click in the form area.

    DocContextChangeEvent object

    OnContextChange

    Returns information about the XML Document Object Model (DOM) node that is the current context of the form's underlying XML document.

    DocEvent object

    OnSwitchView

    OnAfterImport

    Returns a reference to a form's underlying XML document during a switch view or form merge operation.

    DocReturnEvent object

    OnLoad

    OnSubmitRequest

    Returns a reference to a form's underlying XML document and the return status during the loading or submission of a form.

    MergeEvent object

    OnMergeRequest

    Returns properties and methods that can be used during an OnMergeRequest event to programmatically interact with a form's underlying XML document and to determine merge properties such as the number of files being merged.

    SaveEvent object

    OnSaveRequest

    Returns a number of properties and methods that can be used during a save operation from the OnSaveRequest event handler to programmatically interact with a form's underlying XML document, determine save properties, and perform the save operation.

    SignEvent object

    OnSign

    Used to add additional data to the digital signature.

    VersionUpgradeEvent object

    OnVersionUpgrade

    Returns a reference to a form's underlying XML document, the return status, and the document and solution version numbers during the version upgrade operation.

    二、使用示例:

    //=======

    // The following function handler is created by Microsoft Office InfoPath.

    // Do not modify the name of the function or the name and number of arguments.

    //=======

    function XDocument::OnLoad(eventObj)

    {

       // Write your code here.

    }

    function msoxd__myField_attr::OnBeforeChange(eventObj)

    {

       // Determine whether there is a new value.

       if (eventObj.NewValue == "")

       {

          // The value is blank, so display an error message and roll back the changes.

          eventObj.ReturnMessage = "You must supply a value for this field.";

          eventObj.ReturnStatus = false;

          return;

       }

    }

  • 相关阅读:
    java int转byte数组
    业务网关-操作手册
    业务网关-配置
    H2数据库的导入、导出(CSV)
    sequelize踩坑处理:时间格式化
    引入koa-static处理静态资源
    MySql利用case when实现批量更新多条记录的不同值实现方法
    Sequelize增删改查及批量新增或批量更新(bulkCreate的updateOnDuplicate)等常用接口
    数据结构队列、双端队列、队列系算法题解析
    配置webpack中externals来减少打包后vendor.js的体积
  • 原文地址:https://www.cnblogs.com/xh831213/p/470992.html
Copyright © 2011-2022 走看看