Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Let us consider an example where the details of two Fixed Deposit accounts need to be displayed in the Account Summary widget with offline data on the mobile app. The details of the accounts such as, account number, account name, account type, account status, available balance, etc. along with the Widget ID needs to be in beforeDataLoad.
For this example, the beforeDataLoad structure would be as follows:
CWEH.registerHandler('CT_ACC_SUMMARY_WGT1','beforeDataLoad', function (widgetId,paramss,netState,callback) {
var params={
"response": {
"data": {
"ALL_RECORDS": [
{
"UNCLEARED_FUND": "10.0",
"ACCOUNT_NO": "1105926174623",
"CURRENCY": "USD",
"TOTAL_COUNT": "5",
"ACCOUNT_NAME": "TWO",
"OVER_DRAFT_LMT": "0.0",
"AVAI_BALANCE": "571140.12",
"STATUS": "ACTIVE",
"ACCOUNT_TYPE": "FIXED DEPOSIT ACCOUNT"
},
{
"UNCLEARED_FUND": "10.0",
"ACCOUNT_NO": "1105926174662",
"CURRENCY": "USD",
"TOTAL_COUNT": "5",
"ACCOUNT_NAME": "ONE",
"OVER_DRAFT_LMT": "0.0",
"AVAI_BALANCE": "571140.12",
"STATUS": "ACTIVE",
"ACCOUNT_TYPE": "FIXED DEPOSIT ACCOUNT"
}
],
'ADDITIONAL_DATA':{
'MODIFIED_COLUMN_NAMES':{
CURRENCY: "Currency"
}
}
},
syncMode:true,
cancelLoad:false,
dataMerge:true,
uniqueColumn: "ACCOUNT_NO"
}
};
callback.apply(this,[params]);
});
CWEH.registerHandler'<WIDGET_ID>','afterDataLoad', function (widgetId,paramss,netState,callback) {
LOGGER.info('response', response)
});

The following screen shot displays the Account Summary widget with and without internet connectivity. The screen shot on the left-hand side shows the Account Summary Widget with remote data (with Internet) and the right-hand side shows the Account Summary widget with local data (without Internet).

  • No labels