What steps will reproduce the problem?
1. Wrap a MCheckBox with a FormPanel
2. change the state of MCheckBox
2. Call FormPanel.reset()
3. MCheckBox stays in the changed state
What is the expected output? What do you see instead?
MCheckBox should go to default value, instead the value does not change
What version of the product are you using? On what operating system?
m-gwt-1.1.2, developing under Windows 7, testing in Firefox Dev Mode and iPad
Retina Super Dev Mode
Please provide any additional information below.
Well this is no big surprise since MCheckBox is not a real form element, which
would be cleared on form.reset(). Unfortunately, the browser only notifies the
form on reset, not the child elements so there is no chance to register for
this event (yet).
And more unfortunately, GWT does not support to add an event on form.reset(),
but I created a feature request on that:
https://code.google.com/p/google-web-toolkit/issues/detail?id=8215
Once this event handler is available in GWT, you could crawl up the widget
hierarchy to see if the MCheckBox is wrapped by a FormPanel and register a
reset event handler which resets the MCheckBox.
The background here is that I reuse my forms instead of creating new ones when
the same activity shows a new set of data and calling FormPanel.reset() is a
very convenient way of resetting the view, at least its form parts. For now I
always need to reset MCheckBoxes separately.
Since you are in the GWT steering committee this may be a good example for the
reset event handler feature request :)
Thanks in advance!
Original issue reported on code.google.com by sebastia...@gmail.com on 20 Jun 2013 at 10:44
Original issue reported on code.google.com by
sebastia...@gmail.com
on 20 Jun 2013 at 10:44