2 Replies Latest reply on Nov 26, 2008 7:16 AM by Joe O'Toole

    Issue with calendar migrating from 3.1. 6 to 3.2.2

    Joe O'Toole Newbie

      Hi

      I am using a model with my calendar component. All works fine working against richfaces 3.1.6.

      However, after migrating to 3.2.2 I have noticed that the CalendarDataModelItem[] getData(Date[] dateArray) method is not getting called(hence causing issues on my app)

      Just wondering if this is a known issue or is there anything I need to be aware whilst migrating from 3.1.6 to 3.2.2 that may impact the bahavior of the calendar

      Thanks

        • 1. Re: Issue with calendar migrating from 3.1. 6 to 3.2.2
          Ilya Shaikovsky Master

          should be no difference between the versions.. could you describe more carefully your environment and provide the code? As you could easilly check our live example works.. So I'm not sure how to reproduce this.

          • 2. Re: Issue with calendar migrating from 3.1. 6 to 3.2.2
            Joe O'Toole Newbie

            In terms of the environment I am using the following:
            myfaces 1.2.5
            richfaces 3.2.2.SR1
            facelets 1.1.14
            trinidad 1.2.10

            My original posting was inaccurate. The CalendarDataModleItem[] getData(Date []dateArray) is been called but at a different point after migrating to 3.2.2.

            If you look at my code below, basically in the JSP I have a calendar and under the calendar I have a table which contains events for the currently selected date.When I run this against richdfaces 3.1.6, the CalendarDataModleItem[] getData(Date []dateArray) is called, followed by a call to calendarController.getCalendarEntriesFiltered( This method returns the list that the table uses to populate itself). I deem this to be the correct behavior as the calendar is output on the page before the table.

            However, after migrating to 3.2.2, the CalendarDataModleItem[] getData(Date []dateArray) is been called after the calendarController.getCalendarEntriesFiltered method(Used by the table).

            Also, when I click next or previous month the actionListener is no longer been called, i.e. valueChangeListener="#{calendarController.calendarModel.valueChanged}" - Note, this is been called when you click on a specific date just not when navigating between months (It was been called on both occassions running against richfaces 3.1.6)



            //Calendar component output on Page
            <h:form>
            <rich:calendar popup="false"
            value="#{calendarController.activeDate}" showWeeksBar="false"
            reRender="calendarEntries" showFooter="false"
            dataModel="#{calendarController.calendarModel}"
            valueChangeListener="#{calendarController.calendarModel.valueChanged}">
            <a4j:support event="onchanged">
            <f:param name="calendarAction" value="dateChanged"/>
            </a4j:support>
            <a4j:support event="oncurrentdateselected">
            <f:param name="calendarAction" value="monthChanged"/>
            </a4j:support>
            <a4j:outputPanel layout="block" id="cell" style="height: 100%;">
            <h:panelGrid columns="1">
            <h:outputText value="{day}" />
            </h:panelGrid>
            </a4j:outputPanel>
            </rich:calendar>
            </h:form>


            Table below the calendar where I show events for selected date
            <t:div id="calResults">
            <h:form id="eventsDisplayForm">

            <h:dataTable id="calendarEntries"
            value="#{calendarController.calendarEntriesFiltered}" var="entry"
            first="#{calendarController.firstRowIndex}" rows="3" border="0"
            rowCountVar="#{contentController.totalRows}">

            <h:column rendered="#{entry.enabled}">
            //Ouput content in the column
            </h:column>

            </h:dataTable>

            <rich:datascroller for="calendarEntries"
            binding="#{calendarController.dataScroller}"
            maxPages="#{calendarController.maxPages}" fastControls="show"
            page="#{calendarController.currentPage}" boundaryControls="show"
            renderIfSinglePage="false" reRender="tableDisplayMode"
            tableStyleClass="dataScroller" selectedStyleClass="active"
            inactiveStyleClass="inActive">
            </rich:datascroller>
            </h:form>
            </t:div>