Skip to end of metadata
Go to start of metadata

The content of each widget is automatically synchronized into its corresponding widget model on each keystroke. In the event methods programmed by you, you can be sure the model contains exactly the same data as the widget. The only exception of this rule is if the validator does not accept the user input. In this case the value of the model is unchanged. The model will contain the last valid input.

Do not allow RPCs while there are any validations errors on the page. This is best achieved by disabling all controls with corresponding event methods that execute remote procedure calls.

Of course a "cancel" or "reset" button should be always enabled. If you just leave the page there is no problem. But if you want to reload the data from the server and stay on the page, you have to be aware of the following problem:
Normally XMA transfers only changed models. This is called delta synchronization and saves network bandwidth. If the user entered only invalid input into a widget, its corresponding model will still contain the original value. The model is unchanged and will not be transferred over the network. Since it is considered unchanged in the RPC, it is not written back to the widget either. So invalid widget content may not disappear automatically if you reset its model value. To make sure all widgets are set back to their valid model value, you have to call DialogPage.overrideErrorsFromModel().

Labels
  • None