0

I consider about a case in my JSF RichFaces application. I try to validate the Double type value in an input text. In the every keyup event, if the value is not proper, I would like to set the value in the inputtext to zero ( 0.0d ) and get a javascript alert. How can I accomplish it? My inputText code is below. Please note that I have already tried the JSF validators. But they produce JSF message, not javascript alert.

Thank you in advance.

    <h:inputText value="#{claimRefundOperation.amountPayable}"
                id="payableAmount" 
                disabled="#{claimRefundBean.allPartial=='All_COMPENSATION_AMOUNT'}">
        <a4j:ajax event="keyup" execute="@this" listener="#{claimRefundBean.onRefundOperationCheckBoxListener(claimRefundOperation)}"
                    onerror="return false;" render="totalAmount"/>
    </h:inputText>
Softengilker
  • 173
  • 1
  • 3
  • 11
  • 1
    Why do you want to use a 90's style JavaScript alert? It's an UX killer. – BalusC Feb 10 '16 at 09:00
  • Instead, You can get dialogue from bean code. check below link http://stackoverflow.com/questions/19678210/calling-primefaces-dialog-box-from-managed-bean-function – subhakar patnala Feb 10 '16 at 10:23

0 Answers0