2014-05-12 2 views
1

I 일부 세부 정보를 입력하는 양식이 있으며 모든 세부 사항이 중요하고 중요합니다. required = true를 사용하여 필수 정보를 놓치지 않았는지 확인했지만 제출 버튼을 클릭하면 유효성 검사 단계가 건너 뜁니다.유효성 검사 단계 무시

어떻게해야합니까?

 <h:panelGrid id="offline" columns="2" cellspacing="5" 
       cellpadding="4" style="position:relative;top:25px;left:40%;"> 
       <p:outputLabel value="Cheque/Draft No :" 
        style='font-family: font-family : Baskerville, "Baskerville Old Face", 
    "Hoefler Text", Garamond, "Times New Roman", serif;; 
font-size: 15px;height:23px;widht:255px;'></p:outputLabel> 
       <p:outputLabel value="Cheque/Draft Date :" 
        style='font-family: font-family : Baskerville, "Baskerville Old Face", 
    "Hoefler Text", Garamond, "Times New Roman", serif;; 
font-size: 15px;height:23px;widht:255px;'></p:outputLabel> 
       <p:inputText id="number" 
        style='font-family: font-family : Baskerville, "Baskerville Old Face", 
    "Hoefler Text", Garamond, "Times New Roman", serif;; 
font-size: 13px;height:20px;widht:320px;' 
        value="#{Offline_Payment.chequedraftno}" required="true" 
        requiredMessage="Please Enter The Details"> 
        <p:ajax process="@this" immediate="true"></p:ajax> 
       </p:inputText> 
       <p:calendar id="date" 
        style='font-family: font-family : Baskerville, "Baskerville Old Face", 
    "Hoefler Text", Garamond, "Times New Roman", serif;; 
font-size: 13px;height:20px;widht:320px;' 
        pattern="yyyy-MM-dd" disabledWeekends="true" navigator="true" 
        value="#{Offline_Payment.chequedraftdate}" 
        title="Please Enter the date in yyyy-MM-dd" required="true" 
        requiredMessage="Please Enter The Details"> 

       </p:calendar> 
       <p:outputLabel value="Bank Name :" 
        style='font-family: font-family : Baskerville, "Baskerville Old Face", 
    "Hoefler Text", Garamond, "Times New Roman", serif;; 
font-size: 15px;height:23px;widht:255px;'></p:outputLabel> 
       <p:outputLabel value="Bank Code :" 
        style='font-family: font-family : Baskerville, "Baskerville Old Face", 
    "Hoefler Text", Garamond, "Times New Roman", serif;; 
font-size: 15px;height:23px;widht:255px;'></p:outputLabel> 
       <p:inputText id="banknane" 
        style='font-family: font-family : Baskerville, "Baskerville Old Face", 
    "Hoefler Text", Garamond, "Times New Roman", serif;; 
font-size: 13px;height:20px;widht:320px;' 
        value="#{Offline_Payment.bankname}" required="true" 
        requiredMessage="Please Enter The Details"> 
        <p:ajax process="@this" immediate="true"></p:ajax> 

       </p:inputText> 
       <p:inputText 
        style='font-family: font-family : Baskerville, "Baskerville Old Face", 
    "Hoefler Text", Garamond, "Times New Roman", serif;; 
font-size: 13px;height:20px;widht:320px;' 
        value="#{Offline_Payment.bankcode}" required="true" 
        requiredMessage="Please Enter The Required Details"> 

        <p:ajax process="@this" immediate="true"></p:ajax> 
       </p:inputText> 

       <p:commandButton value="Cancel" 
        style='font-family: font-family : Baskerville, "Baskerville Old Face", 
    "Hoefler Text", Garamond, "Times New Roman", serif;; 
font-size: 14px;' 
        immediate="true" 
        action="/User/orderdetail.xhtml?faces-redirect=true"></p:commandButton> 
       <p:commandButton value="Proceed" 
        style='font-family: font-family : Baskerville, "Baskerville Old Face", 
    "Hoefler Text", Garamond, "Times New Roman", serif;; 
font-size: 14px;' 
        action="#{Offline_Payment.offline}" update="@this,growl" 
       immediate="false" validateClient="true" process="@this"></p:commandButton> 
      </h:panelGrid> 

답변

0

"바로 그 리스너 화재를 지정하는 것입니다 피 opulated "문서에서,하지만 나는 여기 actionlisteners 볼 수 없습니다!. 필요한 필수 항목을 사용하고 표시된 requiredMessage에 넣을 때 정확한 코드가 작동하면 아약스 문에 대한 영향을 전혀 보지 못했지만 그 항목을 모두 제거했지만 변경된 사항은 없습니다. requiredMessage를 넣을 수 있습니다. 빈의 다른 outputText 인에 대한 문자열과 분명한는 프로그래밍, 그 아약스 작업을 사용, 그래서 폼 내부에 각각 넣어보십시오

<h:form> 
    <p:inputText 
    value="#{Offline_Payment.bankcode}" required="true" 
        requiredMessage="Please Enter The Required Details"> 

        <p:ajax process="@this" immediate="true"></p:ajax> 
       </p:inputText> 
</h:form> 

행운을 빕니다.

관련 문제