5 Replies Latest reply on Mar 17, 2008 11:47 AM by Ilya Shaikovsky

    Organizer out of Calendar

    Mario Balaban Newbie

      Hello,
      I need to develop a component for displaying appointments or time events defined by the user. And i thought that I could use the rich:Calendar component for that with some customizations. The code is:

      <rich:calendar datePattern="dd/MM/yyyy" enableManualInput="false"
       popup="false" value="#{bean.Data}" immediate="true"
       styleClass="fontMedium" cellWidth="130px" cellHeight="55px">
      
      
       <!-- Customization with usage of facets and accessible elements -->
      
       <f:facet name="header">
      
       <h:panelGrid columns="2" width="100%"
       columnClasses="width100, fake">
      
       <h:outputText value="{selectedDateControl}" />
      
       <h:outputText value="{todayControl}"
       style="font-weight:bold; text-align:left" />
      
       </h:panelGrid>
      
       </f:facet>
      
       <f:facet name="weekDay">
      
       <h:panelGroup style="width:60px; overflow:hidden;" layout="block">
      
       <h:outputText value="{weekDayLabelShort}" />
      
       </h:panelGroup>
      
       </f:facet>
      
       <f:facet name="weekNumber">
      
       <h:panelGroup>
      
       <h:outputText value="{weekNumber}" style="color:red" />
      
       </h:panelGroup>
      
       </f:facet>
      
       <f:facet name="footer">
      
       <h:panelGrid columns="3" width="100%"
       columnClasses="fake, width100 talign">
      
       <h:outputText value="{previousMonthControl}"
       style="font-weight:bold;" />
      
       <h:outputText value="{currentMonthControl}"
       style="font-weight:bold;" />
      
       <h:outputText value="{nextMonthControl}" style="font-weight:bold;" />
      
       </h:panelGrid>
      
       </f:facet>
      
       <h:outputText value="{day}"></h:outputText>
       <br />
       <h:panelGroup style="overflow:hidden; font-size:10px; text-align:left" layout="block">
      
       <h:outputText value="#{bean.Task}" >
       </h:panelGroup>
      
       </rich:calendar>


      So, supposing i have a collection of 31 bean for each day. Mi questions are:

      what should i do to display in each dayCell the relative task for that day?

      where i can find all the possible facets name off the Calendar component?

      {day}, what kind of variable is (scope, usage) in the code line <h:outputText value="{day}"? how can it be used?