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 valu
In more recent versions of PrimeFaces, SelectEvent
should be usedsee the following code snippet
public void onDateSelect(SelectEvent event) {
FacesContext facesContext = FacesContext.getCurrentInstance();
SimpleDateFormat format = new SimpleDateFormat("dd/MM/yyyy");
facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "Date Selected", format.format(event.getObject())));
}
In older primefaces versions use DateSelectEvent
public void dateChange(DateSelectEvent event) {
Date date = event.getDate();
System.out.println("File Date: " + date);
System.out.println("Hello... I am in DateChange");
}