I'm doing some prototyping to determine if we can use GXT's provided FormPanel/FormField validation.
I've run across several issues that I can't seem to fix or workaround. I am running with GXT 2.1.1 and GWT 2.0.3.
I've attached a fairly compact set of code to demonstrate the issue; the main classes are in the .tar file along with a couple screenshots.
I basically have a FormPanel underlying a TabPanel with multiple tabs. When I hit the Save button, I want the fields on all the tabs to be validated (and marked invalid if they're not valid). And when I hit the Reset Button I want the original values restored (and any fields that were marked invalid should have those errors cleared). Pretty basic really.
Here's the issues I am seeing when I run the attached code:
1. The error icons on the fields in tabs that are not currently visible are displayed in the wrong place when I visit the other tab. (i.e. in the example, bring up the app, hit Save, then go to the 2nd tab where you can see that the error icons are not displayed properly to the right of the field.) I have attached a screenshot of this in FF 3.5.9. It happens in IE8 as well - the icons are just a little further right, but still in the middle of the Field).
I figured out that I had to do a tabPanel.setDeferredRender(false); in order to render all the tabs immediately so that fields in tabs not currently showing would get marked as invalid, but I can't figure out how to fix this placement issue.
2. The error icons for CheckBoxGroup and RadioGroup fields are not cleared when I do a formPanel.reset()
(i.e. in the example, bring up the app, go to the 2nd tab, hit Save, then hit Reset and you can see that the error icons are not cleared on the 'Music' CheckBoxGroup or the 'Favorite Color' RadioGroup)
3. Lastly, the Events.Invalid event is being fired during a formPanel.reset(). It seems like that should only be fired during the formPanel.isValid() call? If I'm resetting fields and removing their validation errors using a formPanel.reset() call, I would not expect to get an Events.Invalid events on those fields. Seems odd?
Any help much appreciated,