geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevan Miller <kevan.mil...@gmail.com>
Subject Re: Validators of h:inputText not getting invoked value is ""
Date Mon, 16 Feb 2009 21:27:33 GMT

On Feb 16, 2009, at 2:56 PM, babus_18 wrote:

>
> Hi,
>
> I am using jsf api and impl 1.2._12.
>
> I have the following facelet mark up:
>
> <h:inputText id="testInput" value="#{testController.test}"  
> required="false">
>  <f:validator validatorId="stateValidator"/>
> </h:inputText>
>
> The "stateValidator" is configured as follows in faces-config
>
> <validator>
>  <validator-id>stateValidator</validator-id>
>
> <validator-class>adc.validators.MultiFieldLengthValidator</validator- 
> class>
> </validator>
>
> The validator is getting invoked with no issues when the value of  
> the field
> is anything other than "". But when the value is "", the validator  
> does not
> get invoked.
>
> I am wondering if I am doing something wrong. Please advise on  
> potential
> solutions.

Babu,
I'm no subject matter expert (and from your version number, I'm not  
sure you're actually using "Geronimo"), but believe that you are  
describing the expected behavior when "required="false". If required  
is false, validators are not executed for a null or empty string.

--kevan 

Mime
View raw message