5 Replies Latest reply on Oct 23, 2008 11:48 AM by josephotoole

    Issue/Question using more than 1 ajax event (using a4j:suppo

    josephotoole

      Hi

      I need to use 2 ajax events with my calendar. I use oncurrentdateselected to be notified when the user navigates between months and onchanged to be notified when the user selects a particular date.

      In the calendar I have also defined a valueChangeListener attribute - valueChangeListener="#{calendarController.calendarModel.valueChanged}". Hence this method is invoked when the user

      (1) navigates between different months or
      (2) selects a particular date

      The issue/question I have is that I would like to have a different method triggered on by backing bean for each of these 2 different events. Is this possible? In other words is there anyways,I can specify that I want Backingbean.method1() called for event1 and BackingBean.method2() called for event2.

      Thanks!

      <rich:calendar popup="false"
      currentDate="#{calendarController.activeDate}"
      binding="#{calendarController.calendar}"
      immediate="true"
      showWeeksBar="false"
      reRender="calendarEntries" showFooter="false"
      dataModel="#{calendarController.calendarModel}"
      valueChangeListener="#{calendarController.calendarModel.valueChanged}">
      <a4j:support event="onchanged"></a4j:support>
      <a4j:support event="oncurrentdateselected">
      </a4j:support>
      </rich:calendar>