-
1. Richface text box validation Message customization
javaxchange Mar 31, 2011 12:46 AM (in response to jobmathew)Hi Job,
Just keep the icon or message in the pace whereever you want and reRender that area based on whether it is success or failure.
Thanks & Regards,
Sreejith.PS
-
2. Richface text box validation Message customization
jobmathew Mar 31, 2011 1:16 AM (in response to javaxchange)i tired this way but was not success
<h:inputText id="NameInput" size="50" required="true" requiredMessage=" Enter Name" value="#{projectnBean.name}" >
<rich:ajaxValidator event="onkeyup" ajaxListener="#{projectBean.isNameExist}" reRender="errorMarker"/>
</h:inputText>
<rich:panel id="errorMarker">
<h:graphicImage value="#{projectBean.nameValidationIcon}" />
<h:outputText value="#{projectBean.nameValidationMessage}" />
</rich:panel>
</h:panelGroup>
-
3. Richface text box validation Message customization
ilya_shaikovsky Mar 31, 2011 3:19 AM (in response to jobmathew)and it should not works. ajaxValidator skips model updates and invoke aplpication phases. It designed to perform validation only. So instead of ajaxListener="#{projectBean.isNameExist}" define validator attribte at inputText.
-
4. Richface text box validation Message customization
ilya_shaikovsky Mar 31, 2011 3:22 AM (in response to ilya_shaikovsky)B.t.w. as you using messages anyway - define rich:message component with icon instead of using custom panel as in your case.
-
5. Richface text box validation Message customization
jobmathew Apr 3, 2011 4:14 PM (in response to ilya_shaikovsky)when am using the rich:message how can i customize the message to be displayed depending on the validation success or faliure??
-
6. Richface text box validation Message customization
jobmathew Apr 3, 2011 4:56 PM (in response to jobmathew)Thank i have got the solution and found out how it works
thank you all
here can be found an example how to implement the validator
http://www.laliluna.de/articles/jsf-validation-error-handling-tutorial.html
scroll down for the example