Refreshing Process Blocks

Top  Previous  Next

The records of ProcessBlocks can be refreshed with AjaxMgr.refreshBlocks() method call as follows

  AjaxMgr.refreshBlocks({  
    actionName      : 'RefreshBlocksAction1'
    ,targetBlocks   : 'TargetBlock1,TargetBlock2'
    ,requestParams  : {ID:id}
    ,fieldMap       : 'ID:CUSTOMER_ID'
    ,busyImage      : 'BI1'
    ,callbackFunc   : CallMeAfter
    ,userData       : {userdata1:data1}
    ,errorHandler   : MyErrorHandler
  })

 

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

Warning: The recordManip properties of the Process Blocks must be set to true and additionally all the elements in the block must be Ajax compatible Process Fields.

actionParams configuration for RefreshBlocksAction:

  <actionParams name="RefreshBlocksAction1">
    <param name="dataSources">cats,products</param>
    <param name="nodesToEncrypt">ID</param>
    <param name="responseHandler">AjaxMgr.refreshBlocksResponseHandler</param>
  </actionParams>

Parameters

dataSources (Accepts MScript)

The names of the data source definitions that are configured with dataSource configuration elements. The data source names have to be separated with commas.

nodesToEncrypt (Accepts MScript)

The names of the nodes (separated with commas) whose values to be encrypted. If more than one data sources are used then the nodes belonging to the different data sources should be separated with a semi-column.
 
e.g.: ID;ID,PRODUCT_ID

responseHandler (Accepts MScript)

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

targetBlocks (Accepts MScript)

Target blocks elements to refresh. It can be a single String that contains the HTML ids of the target elements separated with commas or an Array of elements.