richfaces 4 client side validation problem
I have a problem with richfaces client side validation. Here is my xhtml page sample ;
<h:form id="deneForm">
<rich:panel>
<h:panelGrid columns="2">
<h:inputText value="#{denemeBean.name}" id="name" required="true" req开发者_StackOverflow社区uiredMessage="Not null please">
<f:validateLength minimum="3" maximum="8" />
<f:validateRequired />
<rich:validator />
</h:inputText>
<rich:message for="name" />
<h:outputText value="Email" />
<h:outputText value="Age" />
<h:inputText value="#{denemeBean.age}" id="age" required="true" requiredMessage="Not null please">
<f:validateLongRange minimum="18" maximum="99"/>
<rich:validator />
</h:inputText>
<rich:message for="age" />
</h:panelGrid>
<h:commandButton value="Submit" action="#{denemeBean.success}"> </h:commandButton>
</rich:panel>
</h:form>
when I write values to textboxes, i can see validation errors, but when i press Submit button, client side script isnt activated and form is submitted anyway. Server side validation starts and says "Not null please". How can I trigger client side validation on pressing submit button?
using : mojarra 2, richfaces 4
Client-side validation doesn't get invoked when clicking a button. This feature is not supported yet.
精彩评论