rich:calendar as organizer
iimirela Mar 8, 2010 4:19 AMHello,
I'm trying to use the rich:calendar as an organizer, and followed the example in the demo page, but I can't get it to work.
<rich:calendar value="#{worksheetBean.selectedDate}" mode="ajax" preloadRangeBegin="#{calendarDataModel.beginDate}" preloadRangeEnd="#{calendarDataModel.endDate}" dataModel="#{calendarDataModel}" popup="false" showApplyButton="false" cellWidth="50px" cellHeight="50px" boundaryDatesMode="none" showWeeksBar="false" oncurrentdateselect="return false" id="organizer" valueChangeListener="#{calendarDataModel.valueChanged}" showFooter="false"> <f:facet name="header"> <h:panelGroup> <h:outputText value="{previousMonthControl}" style="font-weight:bold;" styleClass="organizerCtrlLeft" /> <h:outputText value="#{worksheetBean.selectedDate}" styleClass="organizerHeader"> <f:convertDateTime pattern="MMMM, yyyy" locale="#{UIConfigurationsBean.locale}" timeZone="#{UIConfigurationsBean.timeZone}" /> </h:outputText> <h:outputText value="{nextMonthControl}" style="font-weight:bold;" styleClass="organizerCtrlRight" /> </h:panelGroup> </f:facet> <a4j:outputPanel layout="block" id="cell" styleClass="cell"> <h:outputText value="{day}" /> </a4:outputPanel> </rich:calendar>
and the CalendarDataModelImpl, same as the one in the demo, except I added
public Date getBeginDate() { Calendar calendar = Calendar.getInstance(); return calendar.getTime(); } public Date getEndDate() { Calendar calendar = Calendar.getInstance(); calendar.add(Calendar.YEAR, 5); return calendar.getTime(); }
Needless to say it does not work. What am I doing wrong?
P.S: Richfaces version 3.3.2.SR1, bean scope session, jboss 4.2.3
Thanks