I want to call a bean after a date is selected in a p:calendar
. In my setup I have a @Named @ViewScoped
Bean, the class ObWithDate
is
This is most likely a lifecycle issue. The setter for your field is called before your listener executes. You should not use the listener to set your value.
The el expression on your listener is evaluated at render response phase of the previous request thus it holds the cum
value "one step behind".
You should update your custom object from the setter of the calendar's date value.
I ran into this issue today morning. Found that primefaces have removed the DateSelectEvent from Primefaces 3.5 . Hence had to remove the ajax event call from my calendar object. Instead retrieving the value using get..(). Please find the discussion for the same in this link below. http://forum.primefaces.org/viewtopic.php?f=3&t=27590