validation on a value defined as a combination of 2 or more values

  3 posts   Feedicon  
Replies: 2 - Last Post: May 26, 2010 08:05
by: Vincent Cantin
showing 1 - 3 of 3
 
Posted: May 15, 2010 09:24 by Vincent Cantin
In my program, I have a date defined via a combination of the values of 2 UI components:
- One is a date (year, month and day - yy/mm/dd)
- The other one is a time (hour and minutes - hh/mm)

A valid combination of the 2 should be "an instant in the futur", so when I validate each UI component individually, I use the value from the other UI component as well.

Now, the problem is that when the first one is pointing on today but the other one have a time in the past, the validation shows a problem. Then when we correct the second component to be a time in the future, the first ui component is still marked wrong, even if the combination of the two is now valid.

What I would like to do, is to be able to define a set of components where when 1 of them change from invalid to valid, the revalidation of all of them is triggered.

... but I don't understand how to do that. Can you help me, please?
 
Posted: May 25, 2010 20:09 by Tim Boudreau
I think the additional group validation stuff (build from source, not the JAR online) will do that for you. It's one of the ValidationGroup.add() methods.
 
Posted: May 26, 2010 08:05 by Vincent Cantin
Hi Tim,

I don't understand your answer. We did use the source code directly, but I didn't find what I needed. I had to do some hacks to acheive it.
Replies: 2 - Last Post: May 26, 2010 08:05
by: Vincent Cantin
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120127.ac94057)
 
 
Close
loading
Please Confirm
Close