-
1. Re: double email field validation
ilya_shaikovsky Feb 19, 2010 10:23 AM (in response to hferreira25)you could add validation to second field using ajaxValidator component. please show code you tried ifnot helps. -
2. Re: double email field validation
hferreira25 Feb 19, 2010 11:26 AM (in response to ilya_shaikovsky)Not getting how to do-it
I've the following code
<h:panelGrid columns="2">
<h:outputText value="Attr1"/>
<h:panelGroup>
<h:inputText value="#{bean.a1}" id="a1ID" required="true"
requiredMessage="Please fill" validatorMessage="Not correctly filled">
<!--f:validator validatorId="EmailValidator" /-->
<f:validateLength for="a1ID" maximum="5" minimum="2" />
<a4j:support ajaxSingle="true" event="onblur" process="a2ID"/>
</h:inputText>
<rich:message for="a1ID"/>
</h:panelGroup>
<h:outputText value="Attr2"/>
<h:panelGroup>
<h:inputText value="#{bean.a2}" id="a2ID" required="true"
requiredMessage="Please fill" validatorMessage="Not correctly filled"
>
<!--f:validator validatorId="EmailValidator" /-->
<f:validateLength for="a2ID" maximum="5" minimum="2" />
<a4j:support ajaxSingle="true" event="onblur" process="a1ID"/>
</h:inputText>
<rich:message for="a2ID"/>
</h:panelGroup>
<a4j:commandButton action="toPage6" value="NextPage"/>
</h:panelGrid>Event I if replace the a4j:support with rich:ajaxValidator each field is validated alone without any interaction between the two. Event more, I can not do the validation in the Bean since the two field are null, they are only setted after I press the commandButton
-
4. Re: double email field validation
hferreira25 Feb 22, 2010 6:38 AM (in response to ilya_shaikovsky)Thanks a lot for your help, this works ok
-
5. Re: double email field validation
ilya_shaikovsky Feb 22, 2010 6:41 AM (in response to hferreira25)good to hear.
B.t.w. moving thread to RichFaces space from RichFaces development.