myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Kienenberger <mkien...@gmail.com>
Subject Re: Wrong validator methods invoked in Nightly 20051130
Date Tue, 13 Dec 2005 19:46:55 GMT
No, the behavior isn't configurable.   If there's no value specified,
no validators are run.  The only "check" is the required attribute.  
However, you can put an EL expression in your required attribute to
make it optional in some cases.

Your other choice is to take a look at
http://wiki.apache.org/myfaces/OptionalValidationFramework for some
other ideas, but I don't think it'll directly help you.   It is
possible to use a subset of the framework to check all
required(like)Validators, but I don't see how that's better than using
an EL expression in your case.   Note that the framework doesn't
currently work with vanilla MyFaces 1.1.   You'd need to use facelets
+ JSF 1.1 or upgrade to JSF 1.2 in order to use the
<optionalValidator> tag.

On 12/13/05, Matthias Kahlau <mkahlau@web.de> wrote:
> > Validation is only called if the component's submitted value is
> > non-null.  Perhaps this is the issue you're seeing?
> >
>
> Is this behavior manipulable, because it's very problematic for my use
> context. I wanted to write a validator method which performs a "required"
> validation, because the value entered is optional in some cases. Isn't it
> possible to achive that with a validator method?
>
> Is there an alternative for the "required" validation? I can't use the
> "required" attribute of the input tag, because I can't dynamically set that
> value, which would demand too much submits of the page.
>
>
> Regards,
>
> Matthias
>
>
> > -----Urspr√ľngliche Nachricht-----
> > Von: users-return-13583-mkahlau=web.de@myfaces.apache.org
> > [mailto:users-return-13583-mkahlau=web.de@myfaces.apache.org]Im Auftrag
> > von Mike Kienenberger
> > Gesendet: Montag, 12. Dezember 2005 16:47
> > An: MyFaces Discussion
> > Betreff: Re: Wrong validator methods invoked in Nightly 20051130
> >
> >
> > Validation is only called if the component's submitted value is
> > non-null.  Perhaps this is the issue you're seeing?
> >
> > On 12/9/05, Matthias Kahlau <mkahlau@web.de> wrote:
> > > Hi!
> > >
> > >
> > > I use the "validator" attribute of inputCalendar, inputText and
> > > inputFileUpload. But as I can see in the logging output, JSF
> > calls only one
> > > of the four validator methods in the process validations phase,
> > but not the
> > > same one each time. The other methods are never called. What's
> > going wrong?
> > >
> > >
> > > Regards,
> > > Matthias
> > >
> > >
>
>

Mime
View raw message