-
1. Re: Custom validation with AJAX.
ilya_shaikovsky Jun 11, 2009 9:02 AM (in response to aksamit)you could put rich:message and define errors markers and define showSummary/showDetails to false. Then only error marker will be visible.
And additionally render the image with green mark and rendering condition should be #{facesContext.maximumSeverity==null} -
2. Re: Custom validation with AJAX.
aksamit Jun 11, 2009 11:12 AM (in response to aksamit)Thanks for your quick response.
You got me in the right direction and I am almost there, however I still have one small problem to resolve.
When the input form loads all input fields are empty/null, this is an illegal input and I want the errorMarker to be visible on this condition. However on each initial form load the passedMarker is always displayed instead. Can I somehow force the validation-event to be triggered at initial load of the form?<t:div> <h:outputText value="#{alarmbundle['alarm.eventinterval']} (#{alarmbundle['alarm.minutes']})" /> <rich:message for="eventInterval" showSummary="false" showDetail="false"> <f:facet name="errorMarker"> <h:graphicImage url="../../images/ajax/error.gif" /> </f:facet> <f:facet name="passedMarker"> <h:graphicImage url="../../images/ajax/passed.gif" /> </f:facet> </rich:message> </t:div> <h:inputText id="eventInterval" value="#{alarmBean.eventInterval}" styleClass="inputfield" required="true"> <f:validateLength minimum="1" /> <f:convertNumber integerOnly="true" /> <f:validateLongRange minimum="0" /> <rich:ajaxValidator event="onblur" /> </h:inputText>
-
3. Re: Custom validation with AJAX.
ilya_shaikovsky Jun 11, 2009 11:49 AM (in response to aksamit)yes.. thats why we removed this functionality from component :/ Because it could not be achieved at components level. Seems you need some application level flag about if this components rendered initially or some data was already processed.