jsf 2 - PF Updating a TextInput according to Calendars -


i getting starting date , end day user , counting weekdays according these values. these components:

<h:outputtext  value="starting date: "/> <p:calendar  pattern="dd/mm/yyyy" value="#{aview.holidays.startingdate}">    <p:ajax event="blur" listener="#{aview.count}" update="count"/> </p:calendar> <h:outputtext value="end date: "/> <p:calendar pattern="dd/mm/yyyy" value="#{aview.holidays.enddate}">    <p:ajax event="blur" listener="#{aview.count}" update="count"/> </p:calendar> <h:outputtext  value="count of days: "/> <p:inputtext id="count" value="#{aview.holidays.count}"/> 

but not update count. wrong above code?

you have define event on ajax listener gets executed!

so use

<p:ajax event="dateselect" listener="#{aview.count}" update="count"/>  

instead of

<p:ajax listener="#{aview.count}" update="count"/> 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -