1. #1
    Ext User
    Join Date
    Jan 2010
    Location
    Colorado Springs
    Posts
    14
    Vote Rating
    0
    jopelkeyca is on a distinguished road

      0  

    Default FormPanel/FormField validation issues (error icon and Events.Invalid problems)

    FormPanel/FormField validation issues (error icon and Events.Invalid problems)


    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,
    Jo
    CA Technologies
    Attached Files

  2. #2
    Ext User
    Join Date
    Jan 2010
    Location
    Colorado Springs
    Posts
    14
    Vote Rating
    0
    jopelkeyca is on a distinguished road

      0  

    Default


    FYI - for the sake of anyone reading this post: I reposted this in the bug forum and got an answer from Sven:
    http://www.sencha.com/forum/showthre...th-error-icons

  3. #3
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Also there is no need to cross post. This just slows things down. Also if you crosspost, post areference to the real thread. Everything else is just double work and dont help anyone.

Similar Threads

  1. Validation error Icon placement
    By ogolushkov in forum Ext GWT: Help & Discussion (1.x)
    Replies: 0
    Last Post: 25 Nov 2008, 7:57 AM
  2. Replies: 0
    Last Post: 7 Jul 2008, 2:24 AM
  3. Error icon and message missing on validation of BasicForm
    By allenyoung in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 12 Jul 2007, 6:23 PM

Thread Participants: 1

Tags for this Thread