You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Robert Breidecker <rb...@yahoo.com> on 2005/04/21 20:41:42 UTC

Cross component validation question

This is something I think I should be able to figure
out, but haven't been able to yet.

Does anyone know how to get the value of another
component that was entered in the form when validating
for another component.

Let's say I have Component A and Component B.  A has a
value of 1 and B a value of 2.  On the screen I enter
11 for A and 12 for B.  In my validator for B I want
to see the value of 11 for A.  However, I get the
value of 1 for A which is the value stored in the
backing bean.  How can I get to the value of 11?

Thanks,
Rob Breidecker

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: Cross component validation question

Posted by Rob Decker <ro...@objectsource.org>.
Hans Bergsten's JavaServerFaces book does this with the LaterThanValidator example. 
You can find it on his website: http://www.hansbergsten.com/

--
Rob

@objectsource.org


---------- Original Message -----------
From: Robert Breidecker <rb...@yahoo.com>
To: MyFaces Discussion <us...@myfaces.apache.org>
Sent: Thu, 21 Apr 2005 11:41:42 -0700 (PDT)
Subject: Cross component validation question

> This is something I think I should be able to figure
> out, but haven't been able to yet.
> 
> Does anyone know how to get the value of another
> component that was entered in the form when validating
> for another component.
> 
> Let's say I have Component A and Component B.  A has a
> value of 1 and B a value of 2.  On the screen I enter
> 11 for A and 12 for B.  In my validator for B I want
> to see the value of 11 for A.  However, I get the
> value of 1 for A which is the value stored in the
> backing bean.  How can I get to the value of 11?
> 
> Thanks,
> Rob Breidecker
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com
------- End of Original Message -------