0 Replies Latest reply on May 27, 2008 1:59 PM by Emmanuel Rousselle

    Question regarding rich:calendar and datamodel

    Emmanuel Rousselle Newbie

      Hello,

      I have implemented a page where I use rich:calendar along with a datamodel. When the page is accessed, data is retrieved from the database and can be accessed by the rich:calendar via the datamodel.

      I use this to mark the days with one or more events so that they visually stand-out from the crowd (using a particular style applied to that date: item.setStyleClass("highlighted-date")).

      A rich:dataGrid is used to display the entries for the currently selected month and the rich:calendar is used to "page" through the data (rich:calendar has mode="ajax").

      The rendering works well except when the page is first accessed: in that case, the rich:dataGrid contains the information for the current month, and rich:calendar is set to the current month also. However, if there is any event registered in that month the days aren't highlighted in the calendar even though they do appear in the rich:dataGrid. They do get highlighted however if I page to another month and come back to the current month.

      It looks to me like in order for the data from the datamodel to be used, the rich:calendar has to issue an AJAX request. Since on initial page load no AJAX request is generated, I don't get the CSS styling info from the datamodel.

      Is my interpretation right? Does anybody have an idea why I'm experiencing this and hopefully has an idea how to fix it?

      Thanks.