1 Reply Latest reply on Dec 2, 2008 12:54 PM by nbelaevski

    problems with calendar organizer

    cremersstijn

      I'm trying to use to the calendar as an organizer.
      Like in the richfaces demo example
      http://livedemo.exadel.com/richfaces-demo/richfaces/calendar.jsf?tab=organizer

      But...
      I want to display something sometimes, so i want to use the rendered attribute, but i won't work.

      rendered="{isOnCall}"


      I think the reason herefore is that it is all rendered at client side, is this correct?

      how can i bypass this?


      Another problem that i have noticed, is that i can set a commandlink inside a calendar's body. I have found a workaround for ajax-actions. But how can i call an h:command action?


      <rich:calendar
       value="#{onCallBean.date}"
       popup="false"
       showApplyButton="false"
       cellWidth="100px"
       cellHeight="100px"
       boundaryDatesMode="none"
       showWeeksBar="false"
       dataModel="#{onCallBean.calendarDataModel}"
       id="organizer"
       showFooter="false"
       timeZone="#{sessionBean.defaultTimeZone}"
       showHeader="false"
       firstWeekDay="1">
      
       <h:panelGrid columns="1">
      
       {onCallDate}
       {specialDay}
      
       <a4j:outputPanel onclick="setOnCall({day});" styleClass="link" rendered="{isOnCall}">
       set on call
       </a4j:outputPanel>
      
       </h:panelGrid>
      
       </rich:calendar>
      


        • 1. Re: problems with calendar organizer
          nbelaevski

          Hi,

          Yes, rendering is done solely on this client.

          Try this workaround:

          <h:form>
           <rich:calendar popup="false">
           <h:commandButton id="button" value="{day}" style="display: {day % 2 ? 'inline' : 'none'}">
           <f:param name="day" value="{day}" />
           </h:commandButton>
           </rich:calendar>
           </h:form>


          Notes:

          1. Use inline/block respectively for inline/block HTML elements.
          2. Do not forget to check on the server whether client have rights to press this particular button. "rendered" attribute does this check, however client can show client-side hidden button and click it.