6 Replies Latest reply on Feb 5, 2008 5:11 AM by Wim Bervoets

    How to re-render currently selected calendar cell with a4j:s

    Wim Bervoets Newbie

      Hi,

      I have the following richfaces calendar:

      <rich:calendar
      id="date"
      popup="false"
      value="#{calendarDataModel.selectedDate}"
      dataModel="#{calendarDataModel}"
      valueChangeListener="#{calendarDataModel.onForbiddenDateSelect}"
      inputClass="ic"
      buttonClass="bc"
      cellHeight="50"
      cellWidth="50"
      mode="ajax"
      ajaxSingle="true"
      showWeeksBar="false"
      showScrollerBar="false">

      <a4j:support event="ondateselected" reRender="calRegion">
      </a4j:support>
      </rich:calendar>

      Right now when a date is selected a region is rerendered. What I would like to be able todo is to rerender the selected date. Is this possible?

      Rerendering the whole region gives some flashing effects, but only the color of the cell is updated so I would like to limit the reRender region.

      Maybe I can change the color of the cell via javascript eg:

      $('form:date').component.getSelectedDate(); but to change the style I should be able to get the id of the cell so I can do getElementById.

      Any ideas?

      Thanks,
      Wim