Validating a wrong date entry in rich faces

Posted by Hiral Lakdavala on Stack Overflow See other posts from Stack Overflow or by Hiral Lakdavala
Published on 2010-06-16T13:29:45Z Indexed on 2010/06/16 13:32 UTC
Read the original article Hit count: 365

Filed under:
|
|

Hi,

(On behalf of a collegue)

In one of our functionality we have some date fields for inline edit where we have enabled manual input. If in rich:calendar component, we manually enter improper date or junk data it will not even call the action method. As per our requirement we need to display an error message for date validation for these kind of fields. Is there any way to track that the date entered in the calendar field is improper with this component. Code for the reference:

<rich:calendar id="actualOpeningDtCal" rendered="#{!empty storeProgram.id}" value="#{storeProgram.actualOpeningDate}" placeholder="dd-mmm-yyyy" inputSize="20" enableManualInput="true"  datePattern="dd-MMM-yyyy"  buttonIcon="../content/images/calendar.png" showWeeksBar="false" showFooter="false">   <a4j:support event="oninputblur" reRender="aList" ajaxSingle="false" action="#{aController.inlineEdit}"> <f:setPropertyActionListener value="#{aProgram}" target="#{aController.inLineEditaBean}" />      </a4j:support>      
<a4j:support event="oncollapse" reRender="aList" ajaxSingle="false" action="#{aController.inlineEdit}"> <f:setPropertyActionListener value="#{aProgram}" target="#{aController.inLineEditaBean}" />      </a4j:support>   
</rich:calendar>   

Regards, Hiral

© Stack Overflow or respective owner

Related posts about jsf

Related posts about calendar