0

The first time page is loaded the validation does not seem to work - I don't get error message but if I refresh the page or submit it, validations start working.

below is the code and it's linked to session managed bean.

<h:dataTable value="#{claimItem.claimItemList}" var="CdeClaimItem"
            id="dataTableClaims">
            <h:column>
                <h:inputText value="#{CdeClaimItem.feeScheduleCd}" id="fsc" 
                       style="text-align: center; width: 127px"
                        required="true" 
                        requiredMessage="Fee must be entered">

                    <p:ajax event="blur" update="fscMsg"></p:ajax>

                </h:inputText>              

                <h:message id="fscMsg" for="fsc"></h:message>

            </h:column>
user5857902
  • 55
  • 1
  • 1
  • 8

1 Answers1

0

I had a simalar problem and it was related to nested forms, which is not allowed. Be sure your dataTable is wrapped by one <h:form>.

You may want to reivew this answer to rule out other issues: commandButton/commandLink/ajax action/listener method not invoked or input value not set/updated

Since you are using <p:ajax>, I would also recommend using all Primefaces tags (<p:column>, <p:dataTable>, etc) . They might play nicer together.

TooSerious
  • 409
  • 4
  • 13