SmartClient Version: v9.0p_2013-09-14/PowerEdition Deployment (built 2013-09-14)
There has been prior discussion in this forum around server-side validators being called multiple times and the reasoning behind this (for example: http://forums.smartclient.com/showthread.php?t=15764&page=2).
However, we found today a difference in behavior between a DynamicForm and ValuesManager that we cannot explain and were hoping you could help.
The scenario is essentially quite simple: we have a data source which contains several fields that have one or more server-side validators on them. If we edit the datasource on a DynamicForm and then perform form.submitData(), we see a single "add" RPC request in the console.
If instead we edit the datasource via a ValuesManager and perform vm.submitData() we see as many "validate" RPC requests as there are fields with server-side validators on them, followed by an "add" request. So, if we have four fields with server-side validators on them we see four corresponding "validate" requests. These "validate" requests have "validationMode":"full" and so all our server-side validations (some of which are quite expensive) are executed multiple times.
Can you explain why there is a difference in how validations are performed for a DynamicForm vs. ValuesManager (why does the former not make any explicit validation requests, and why does the latter make multiple), and is there any way that we can avoid this behavior?
Thanks,
Gary O'Donnell
There has been prior discussion in this forum around server-side validators being called multiple times and the reasoning behind this (for example: http://forums.smartclient.com/showthread.php?t=15764&page=2).
However, we found today a difference in behavior between a DynamicForm and ValuesManager that we cannot explain and were hoping you could help.
The scenario is essentially quite simple: we have a data source which contains several fields that have one or more server-side validators on them. If we edit the datasource on a DynamicForm and then perform form.submitData(), we see a single "add" RPC request in the console.
If instead we edit the datasource via a ValuesManager and perform vm.submitData() we see as many "validate" RPC requests as there are fields with server-side validators on them, followed by an "add" request. So, if we have four fields with server-side validators on them we see four corresponding "validate" requests. These "validate" requests have "validationMode":"full" and so all our server-side validations (some of which are quite expensive) are executed multiple times.
Can you explain why there is a difference in how validations are performed for a DynamicForm vs. ValuesManager (why does the former not make any explicit validation requests, and why does the latter make multiple), and is there any way that we can avoid this behavior?
Thanks,
Gary O'Donnell
Comment