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
Post a Comment