I am using primefaces 3.2 and JSF 2.0
My scenario is I have file date, last date and next date in my form. When user enters file date I need to update file date value in bean so it's value can be used as minimum date in last date of attribute mindate and so in next date selection.
As per my knowledge value change listener can execute at form submission so I can not use it. I have used p:ajax. But still I am not able to set file date. As file date is not set it allows user to select last date and next date before date of file date.
caseMaster.xhtml
<p:calendar value="#{caseUitility.caseMaster.fileDate}" id="fileDate" effect="fadeIn" pattern="dd/MM/yyyy" readOnlyInputText="true">
<p:ajax event="change" listener="#{caseUitility.dateChange}"/>
</p:calendar>
<p:calendar value="#{caseUitility.caseMaster.lastDate}" required="true" id="lastDate" effect="fadeIn" pattern="dd/MM/yyyy" readOnlyInputText="true" mindate="#{caseUitility.caseMaster.fileDate}" >
</p:calendar>
CaseUitility.java
public void dateChange(ActionEvent ae) {
System.out.println("File Date: " + caseMaster.getFileDate());
System.out.println("Hello... I am in DateChange");
}
can any guide me what am I doing wrong here?