way of validation handling
Hi all,
i have a form with different fields and would like to check whether the fields have correct values (e.g. comparison of some fields, checks of date-patterns, checks of negative/positve values, checks of correct type: int, string, etc.)
as i unterstood there are a lot of possibilites to make a validation handling.
What is the best one?
my idea was following:
create own bean (ValidationBean) where i check my values:
void validateA(){...}
void validateB(){...}
in jsf i put after each inputText-Tag a validator attribut:
<h:inputText id="a" value="#{myBean.a}" validator ="#{validationBean.validateA}">
<h:inputText id="b" value="#{myBean.b}" validator ="#{validationBean.validateB}">
if i get an error of one of validation methods i set in my ValidationBean error and give it out later in my jsf :
<h:outputText value=#{msg.errorValueA} rendered="#{validationBean.aError}/>
<h:outputText value=#{msg.errorValueB} rendered="#{validationBean.bError}/>
so it runs, but if i give a string in an integer field my action (validateA or validateB) is never called.Why?
Is there any simple way for validation handling?

