I have a client side only DataSource that I have several forms and widgets binding to. I want to be able to have the interested UI components listen for changes to the DataSource so they can update themselves when needed.
For example, I have a form that I call myForm.saveData() on. I am expecting the DataSource.updateData method to fire and so have wired an observer to listen for this. It never does.
The data does actually get put into the DataSource, at least these changes are reflected in any widget/form that is created after the data is saved. The changes are not reflected in any control that already exists. The Dev Console looks like this:
Note: Charles, while on site here, advised that the code be done like this when I only had two forms at the time...
When it was only these two forms, in the same js file, that was fine. Now that I have multiple components wanting notification of changed data, which can change from multiple places, it doesn't work.
Please advise. Thanks,
TT
For example, I have a form that I call myForm.saveData() on. I am expecting the DataSource.updateData method to fire and so have wired an observer to listen for this. It never does.
The data does actually get put into the DataSource, at least these changes are reflected in any widget/form that is created after the data is saved. The changes are not reflected in any control that already exists. The Dev Console looks like this:
Code:
Global Log Priorities updated: Logging messages at priority 'Debug' and above for category 'RPCManager'. 10:44:26.327:MUP7:DEBUG:RPCManager:Grabbed prompt from first request that defined one: Saving form... 10:44:30.347:TMR4:DEBUG:RPCManager:Result string for transaction 33: undef 10:44:34.346:TMR4:INFO:RPCManager:rpcResponse(unstructured) results -->{status: 0}<-- 10:44:42.396:MUP6:DEBUG:RPCManager:Grabbed prompt from first request that defined one: Saving form... 10:44:46.412:MUP6:DEBUG:RPCManager:Grabbed prompt from first request that defined one: Saving form... 10:44:50.421:TMR2:DEBUG:RPCManager:Result string for transaction 34: undef 10:44:54.439:TMR2:INFO:RPCManager:rpcResponse(unstructured) results -->{status: 0}<-- 10:44:58.396:TMR3:DEBUG:RPCManager:Result string for transaction 35: undef 10:45:02.366:TMR3:INFO:RPCManager:rpcResponse(unstructured) results -->{status: 0}<--
Code:
editableForm.saveData(); staticForm.setValues( editableForm.getValues() );
Please advise. Thanks,
TT
Comment