on 10-19-2007 9:25 PM
Original thread title: IS_CHANGED_BY_CLIENT and RESET_CHANGED_BY_CLIENT methods / selection change
Does anyone know, why is that the RESET method is recursive, but the IS method isn't?
The problem is, I need to trigger a save of a document only when there is some change made by the user, but to do that i'm being forced to implement myself a recursive method which uses both IS_CHANGED_BY_CLIENT and GET_CHILD_NODES methods. While I simply call the RESET_CHANGED_BY_CLIENT method of the root node and it affects all subnodes.
Another problem is that, the selection changes (e.g. in a dropdownbyindex) don't get accounted as changes by the IS_CHANGED_BY_CLIENT method.
Is there any simpler way to implement this?
Thanks
Hi Alejandro,
i faced same issue and did the same things what you are doing and as per my analysis this is the only way to do this as is_changed_by_client is not recursive.
or other way is you can maintain old data with you and compare old with new data to trigger save.
i tried these two ways only, if you find something new let me know.
Regards
Manish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your comments Manish. I've already programmed the recursive method and it is working ok, seems to be the only way then.
But how did you solve detection of selection changes? Currently i'm thinking of having an event handler for each dropdown, which will mark a flag to be evaluated additionally to the method's result. You did the same, or selection changes didn't matter in your case?
Thank you
Solved: The context change log seems to be a far better alternative, it also detects selection changes.
Check DEMO_CONTEXT_CHANGES example. If you need only to detect changes, you can use just the enable_context_change_log and get_context_change_log methods.
It may be a little bit taxing when the context is large though, I'd like if anyone which has had this experience could comment.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.