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>