myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Kienenberger" <mkien...@gmail.com>
Subject Re: Cross validation problem
Date Thu, 12 Apr 2007 16:57:18 GMT
Right, I didn't say you could use it to solve your problem.  I said
you can use it to understand how to create a validator that accesses
the values (both submitted/prevalidated and validated) of other
components.

Once you see the effort involved, my guess is that you'll re-evaluate
doing this in your action since it's trivial to do it at that point.
But if not, compareToValidator provides a great source code starting
point -- you should be able to cut&paste the code out of it for
reading other component values.


On 4/12/07, Stephane.CLINCKART@ext.ec.europa.eu
<Stephane.CLINCKART@ext.ec.europa.eu> wrote:
> Hi,
>
> Maybe I'm wrong... But I think I can't use it for my problem.
>
> I try to explain little more my problem:
>
> If user that try to login select "DOMAIN_A" as domain, the validator for password should
validate password rules of domain_A
> If user that try to login select "DOMAIN_B" as domain, the validator for password should
validate password rules of domain_B
>
> --> I should like to have an "validator" that can access value of DOMAIN and PASSWORD
at same time.
>
> PS: I have to develop WAI compliant so can't make use of javascript.
>
> Thanks for help.
>
> Stephane
>
>
>
>
> -----Original Message-----
> From: Mike Kienenberger [mailto:mkienenb@gmail.com]
> Sent: Thursday, April 12, 2007 6:23 PM
> To: MyFaces Discussion
> Subject: Re: Cross validation problem
>
> http://myfaces.apache.org/sandbox/validateCompareTo.html
>
> Also in comments in the source code.
>
>
> On 4/12/07, Stephane.CLINCKART@ext.ec.europa.eu
> <Stephane.CLINCKART@ext.ec.europa.eu> wrote:
> > Thanks for hint.
> >
> > Where can I find a sample of usage of t:compareToValidator ?
> >
> > Thanks.
> >
> > PS: It should be better for me to make the vaidation in the validators... For several
reasons to long to explain here.
> >     Thanks for help again.
> >
> > -----Original Message-----
> > From: Mike Kienenberger [mailto:mkienenb@gmail.com]
> > Sent: Thursday, April 12, 2007 5:59 PM
> > To: MyFaces Discussion
> > Subject: Re: Cross validation problem
> >
> > You can take a look at the details of how to handle cross-component
> > validation by reading the source code for the Tomahawk sandbox
> > t:compareToValidator validator.
> >
> > However, this is probably a case where it makes more sense to perform
> > your business validation in the action.
> >
> > On 4/12/07, Stephane.CLINCKART@ext.ec.europa.eu
> > <Stephane.CLINCKART@ext.ec.europa.eu> wrote:
> > >
> > >
> > >
> > > Hi,
> > >
> > > In a login page I have 3 components:
> > >
> > > Login
> > > Password
> > > Domain
> > >
> > > I have a validator for Login & Password
> > >
> > > I should like in Validator of password to "knows" the value of the Domain.
> > > The value of the domain is not set when I validate the password.
> > >
> > > Do I have somethink special to do for defining the setting order?
> > >
> > > How to perform a "cross component validation"?
> > >
> > > Thanks a lot.
> > >
> > > Stephane
> >
>

Mime
View raw message