I've noticed some behavior about event handlers that is different from what I would expect and wanted to know if this was intended or not.
If I create a FormItem and add a ChangedHandler to it, then set it as the editorType for a DataSourceField, when that item shows up on a form, it has the ChangedHandler I applied.
If I also add a ChangedHandler to the actual FormItem that is drawn in the form, it is ignored in favor of the handler on the editorType.
If I add a ChangedHandler to the FormItem that is drawn in the form, but I do this inside of a FormItemInitHandler, this new handler runs correctly. However, it overwrites my original ChangedHandler that was applied to the editorType.
Each time I call addChangedHandler, is it expected that I am actually adding on a new handler and never replacing an existing handler? If this is known behavior or was intended to be this way, is there a workaround that allow me to add handlers in the situations I mentioned, and have them all work together?
I attached a test case showing these things happening.
Thanks
SmartGWT 3.0 built 2011-12-05, updated version of Chrome
If I create a FormItem and add a ChangedHandler to it, then set it as the editorType for a DataSourceField, when that item shows up on a form, it has the ChangedHandler I applied.
If I also add a ChangedHandler to the actual FormItem that is drawn in the form, it is ignored in favor of the handler on the editorType.
If I add a ChangedHandler to the FormItem that is drawn in the form, but I do this inside of a FormItemInitHandler, this new handler runs correctly. However, it overwrites my original ChangedHandler that was applied to the editorType.
Each time I call addChangedHandler, is it expected that I am actually adding on a new handler and never replacing an existing handler? If this is known behavior or was intended to be this way, is there a workaround that allow me to add handlers in the situations I mentioned, and have them all work together?
I attached a test case showing these things happening.
Thanks
SmartGWT 3.0 built 2011-12-05, updated version of Chrome
Comment