Refreshing Process Fields and Form Elements

Top  Previous  Next

The values or other attributes of the ProcessFields or ordinary form elements can be refreshed with AjaxMgr.refreshFields() method call as follows.

  AjaxMgr.refreshFields({
    actionName          : 'RefreshFieldsAction1'
    ,dataNodes          : 'ID,NAME,PRICE'
    ,targetElements     : 'ID_id,NAME_id,PRICE_id'
    ,targetElementAttrs : 'value,value,value'
    ,requestParams      : {ID:id}
    ,busyImage          : 'BI1'
    ,callbackFunc       : CallMeAfter
    ,userData           : {elm:elm}
    ,errorHandler       : MyErrorHandler
  })

 

See AjaxMgr.refreshFields() method call in MoreMotion Face API.

 
actionParams configuration for RefreshFieldsAction:

  <actionParams name="RefreshFieldsAction1">
    <param name="dataSource">products</param>
    <param name="nodesToEncrypt">ID</param>
    <param name="responseHandler">AjaxMgr.refreshFieldsResponseHandler</param>
  </actionParams>

Parameters

dataSource (Accepts MScript)

The name of the data source definition that is configured with dataSource configuration element. The data source should supply only one record ("item" node) that contains the data nodes for the target fields.

nodesToEncrypt (Accepts MScript)

The names of the data nodes (separated with commas) of the data source whose values have to be encrypted.

responseHandler (Accepts MScript)

The name of the response handler Javascript function that will receive the AjaxResponse and manage the refreshing of the fields. Unless a very special treatment is required the value of this element can be left to its default which is AjaxMgr.refreshFieldsResponseHandler.