Skip navigation
Currently Being Moderated

ValidatorGroupSubscriber fails to refresh so validation is not graphically working

Feb 11, 2011 4:55 AM

When a ValidatorGroupSubscriber is added to a view its react correctly at first VO instanciation/binding but does not "refresh" when the targetted VO is updated. This cause the validation to fail graphically (eg. there's no more red border shown while a field is erroneous)

 

You can easily reproduce the bug with the insync modular example :

1- launch insync shell

2- get at least two contacts in the search grid

3- double-click on the first

4- clear the firstname field (for example of a mandatory field) -> the field is "border red" decorated

5- set somehting inside the field -> the red border disapear OK

6- double-click on another contact from the grid

7- repeat operation 4 and see how the application react : -> no red border appears, VO's validation is still enabled and working (save button not enabled) but nothing appear at view level.

 

Going deeper in debug mode seems to indicate "watcher/linstener" from validator is not correctly affected while you change the VO.

 

Please confirm the bug and tell if this could be corrected/fixed/correct with workaround

 

Thx for all

 

PS:I've already post this in the dev forum... guess it' was not the right place to put it so I apologize if this seems to be "spam-like"

 
Replies
  • Currently Being Moderated
    Feb 11, 2011 5:05 AM   in reply to MrKoinkoin

    Hi,

     

    I'll try to investigate today to see what's going on. I'll close the other thread and will keep this one.

     

    Cheers,

     

    Nicolas

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 11, 2011 7:49 AM   in reply to MrKoinkoin

    I could recreate the issue, I'm updating the steps to reproduce as you also need to close the exisisting tab to notice the issue:

     

    1- launch insync shell

    2- get at least two contacts in the search grid

    3- double-click on the first

    4- clear the firstname field (for example of a mandatory field) -> the field is "border red" decorated

    5- set somehting inside the field -> the red border disapear OK

    6- close the existing contact

    7- double-click on another contact from the grid

    8-  repeat operation 4 and see how the application react : -> no red  border appears, VO's validation is still enabled and working (save  button not enabled) but nothing appear at view level.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 26, 2011 8:04 PM   in reply to MrKoinkoin

    Hi Cédric,

     

    Sorry it took so long to get back to you, I modified locally the ValidatorGroupSubscriber to fix the issue. Basically resetting the VO (and hence the validator) was correctly updating the validatorSubscriber but not re-registering the UIComponent with the new validator.

     

    I've attached a temporary Validation.swc, let me know if that works for you.

     

    Cheers

    Attachments:
     
    |
    Mark as:
  • Currently Being Moderated
    Mar 8, 2011 10:02 AM   in reply to MrKoinkoin

    I'll have a look tonight and will give you an update

     

    Sent from my phone

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 8, 2011 6:19 PM   in reply to MrKoinkoin

    Hi Cédric,

     

    I've attached an updated library. For now you will have to call the reset method when swapping the validators as:

     

     

              public function set data(value:Object):void
              {
                    validatorGroupSubscriber.reset();
                    contact=value as Contact;
              }
    

     

    Also note that when swapping the object the validation will not be retriggered automatically (ie fields will not be highlighted in red by default). You can enable the resetValidationFeedbackOnFocusIn property on the ValidatorGroupSubscriber or I can add an extra flag if you need instant validation when swapping VOs.

    Attachments:
     
    |
    Mark as:
  • Currently Being Moderated
    Mar 13, 2011 7:13 PM   in reply to MrKoinkoin

    Hi Cédric,

     

    Yes we will be updating the validation Library soon (i.e weeks) but we first need to review the code changes on the API.

     

    Nicolas

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 13, 2011 10:34 AM   in reply to MrKoinkoin

    We're about to push a new release of Cairngorm 3 this week, it will contain the fix for the ValidatorGroupSubscriber, so stay tuned

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points