...
Code Block | ||
---|---|---|
| ||
canvas.ns("canvas.form.listeners"); canvas.form.listeners.formComponents = Class(canvas.Observable, { constructor: function(config) { this.fm = config.fm; }, registerHandlers: function() { this.fm.registerHandler("cbxpostformrender", function(fm, event, fieldName,value) { ct.MessageBus.subscribe('BENEFICIARY_SELECTED', "NAMESPACE", '', function(data, eventName) /* ct.MessageBus.subscribe is the function to subscribe for broadcast events of other apps. * Here, the Beneficiary Details Form app is subscribing to the ‘BENEFICIARY_SELECTED’ broadcast * * broadcast event from Beneficiary Details app. The data received from broadcast event is populated to * is *populated to the fields on the Beneficiary Details Form app. */ { /* The data received from broadcast event is populated to the fields on * the Beneficiary Details Form app. */ fm.model.setValue(['BENE_NAME'],data.BENE_NAME); fm.model.setValue(['BENE_ACC_NO'],data.BENE_ACC_NO); fm.model.setValue(['BANK_NAME'],data.BANK_NAME); fm.model.setValue(['BBRANCH_NAME'],data.BRANCH_NAME); fm.model.setValue(['PAYMENT_TYPE'],data.PAYMENT_TYPE); }); }); } }); CFLR.registerListener("TEST_INTERAPP", canvas.form.listeners.formComponents); |
...