1 Reply Latest reply on Sep 21, 2008 5:34 AM by Nick Belaevski

    <rich:calendar> datamodel query

    Joe O'Toole Newbie


      I am trying to figure out the datamodel used in conjunction with the Calendar component.

      I have associated a CalendarDataModel with my calendar. I have a requirement where when the user navigates to the next or previous month I need to output all the calendar entries for this month in a table below the calendar.

      In most of the examples I have seen, they do somthing like:
      <h:panelGrid columns="1">
      <h:outputText value="{day}" style="align:center"/>
      <h:outputText value="{data.shortDescription}"/>
      <h:outputText value="{data.description}"/>

      However, these seem to be querying the calendardatamodel for a single entry against a certain date(i.e. data selected by the user). I am hoping to create a table of calendar events below the calendar for all events for the current month. Hence I would need to have a handle to the list of CalendarDataModelItems.

      Does anyone know how i can get a handle to this. If I have this i can pass it in as the value property in to something like a <h:datatable> component

      e.g. <h:datatable value=#{LIST_OF_CALENDARDATAMODELITEMS}


        • 1. Re: <rich:calendar> datamodel query
          Nick Belaevski Master


          Data tables do not work with calendar data model from the scratch. You can create adaptor that will do this job, however it seems to me that it is not necessary for your case. I think so because calendar data model is used to show data in the calendar itself, not in the external page components, so looks like you ain't gonna need calendar model. Query a list of events by current date and put it right to data table.