3 Replies Latest reply on Feb 18, 2011 12:57 AM by Vishwanath Bannur

    reRendering problem in organizer calender component

    Vishwanath Bannur Newbie

      Hi,

      I have reRendering problem in organizer calender component. Can anybody help me?

      I have page as below. I select the date in date component and click on searchCalendar. In backing bean i construct selected date "CalendarDataModelItem[] items". However the 'organizer' calender component is not rendered. It is still showing old date. When i refresh the browser, that time its showing the selected date in 'organizer' component. Can you please help me how to refresh the 'organizer' coponent when i do the search operation.

       

      <h:form id="form">

              <rich:messages/>

              Enter Date: <rich:calendar value="#{calendarBean.inputDate}" />

              <a4j:commandButton value="Search" actionListener="#{calendarBean.searchCalendar}" reRender="organizer" />

       

              <a4j:region>

              <rich:calendar value="#{calendarBean.selectedDate}" mode="ajax"

                  popup="false" showApplyButton="false"

                  cellWidth="80px" cellHeight="80px"

                  boundaryDatesMode="none" showWeeksBar="false"

                  dataModel="#{calendarDataModel}" onchanged="if (event.rich.date) {ajaxSubmit();}"

                  oncurrentdateselect="return true" id="organizer" valueChangeListener="#{calendarDataModel.valueChanged}" showFooter="true">

                  <f:facet name="header">

                      <h:panelGroup>

                          <h:outputText value="Selected Month" styleClass="header"/>

                      </h:panelGroup>

                  </f:facet>

                  <a4j:outputPanel  ajaxRendered="true" layout="block" id="cell" onclick="#{rich:component('organizer')}.resetSelectedDate()" style="height: 100%;" styleClass="organizer-cell">

                      <div>

                          <h:outputText value="{day}" style="align:center" />

                      </div>

                      <div>&#xA0;</div>

                      <div>

                          <h:outputText value="{data.shortDescription.escapeHTML()}" />

                      </div>

                      <div>

                          <h:outputText value="{data.description.escapeHTML()}"/>

                      </div>

                  </a4j:outputPanel>

       

                   <f:facet name="footer"> 

       

                       <h:panelGrid columns="7" width="100%">

                                <h:outputText value="{previousYearControl}" style="font-weight:bold;"/>

                              <h:outputText value="{previousMonthControl}" style="font-weight:bold;"/><!--

                              <h:outputText value="{todayControl}" style="font-weight:bold;"/>

                              <h:outputText value="{selectedDateControl}" style="font-weight:bold;"/>       

                              --><h:outputText value="{currentMonthControl}" style="font-weight:bold;"/>       

                              <h:outputText value="{nextMonthControl}" style="font-weight:bold;"/>

                              <h:outputText value="{nextYearControl}" style="font-weight:bold;"/>

                              </h:panelGrid>

                       </f:facet>                 

              </rich:calendar>

       

              </a4j:region>

          </h:form>