Forums Register Login
about how to use validator
Hi, as a friendly reminder, I took some notes on the usage of validator which is important for the exam.
The validator attribute and f:validator always confuse people.

As we know we have <h:inputText ... validator="{any method expression}"/>, or <f:validator validatorId="any validator id"} , there is still another usage like this:
   <f:validator binding="#{name of a validator which is a managed bean}
For example,

The jsf to use it is :
<h:inputText ...>
         <f:validator binding="#{EmailValidator1}"/>

In the above reference, Paul uses CDI bean for the validator. But it does not work with my Glassfish. It may work with other containers.

Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards

This thread has been viewed 69 times.

All times above are in ranch (not your local) time.
The current ranch time is
Feb 24, 2018 11:23:26.