0 Replies Latest reply on Jun 4, 2009 10:54 AM by sachinns

    reRender problem for calendar fields

    sachinns

      Hi,
      In my xhtml i have an a4j:repeat tag which consist of rich toggle panel which in turn consist of rich:dataTable.Based on the list size in the a4j:repeat rich toggle pannel will get generated.
      The rich data table consist of a rich calendar field,one check box,one image & a rich sub table.Initially i set the rendered ="bean.expand" for rich :subTable.When i click the the image i call a bean method which wil set the expand(boolean) value to true so that the rich:subTable get displayed.
      I have given reRender option to the whole data table.But it doesnt get rerendered.But when I remove the rich:calender fields & add a text field or a label field, reRender is working fine.

      If their is only one rich:toggle pannel inside a4j:repeat everything is working fine but when i have 2 or more toggle pannel inisde a4j:repeat reRendering is not working.If i remove the calender fileds and replace with anyther fileds its working fine.Please assist.

      Below is my code :
      <a4j:repeat value="#{hintsHeaderBean.hintsCategoryList}"
      var="categoryTableBean" rowKeyVar="rowid">
      <rich:togglePanel id="hintsDetails"
      initialState="#{categoryTableBean.initialState}"
      stateOrder="#{categoryTableBean.expandMode},#{categoryTableBean.collapsedMode}"
      switchType="client" label="#{categoryTableBean.ctgrySrvcName}">
      <f:facet name="collapsed">
      <h:panelGroup>


      <h:outputText
      id="CategorwyName" styleClass="sectionheaderClass"
      value="#{categoryTableBean.ctgrySrvcName}" />
      <rich:toggleControl
      style="text-align: right; border: 0px;" for="hintsDetails"
      toState="#{categoryTableBean.expandMode}">
      <h:graphicImage value="/images/menu/expand.gif"
      style="border: 0px;" />
      </rich:toggleControl>


      </h:panelGroup>
      </f:facet>
      <f:facet name="expanded">

      <h:panelGroup>



      <h:outputText
      styleClass="sectionheaderClass"
      value="#{categoryTableBean.ctgrySrvcName}" />
      <rich:toggleControl
      style="text-align: right; border: 0px; padding-left:20px;"
      for="hintsDetails" toState="expanded">
      <h:graphicImage value="/images/menu/collapse.gif" valign="top"
      style="border: 0px;" />
      </rich:toggleControl>







      <rich:dataTable border="1" cellpadding="0"
      cellspacing="0" value="#{categoryTableBean.tableList}"
      width="970" var="hints1" id="hintData" rowKeyVar="rowIndex"
      columnClasses="centerAlignClass,centerAlignClass,centerAlignClass,centerAlignClass,centerAlignClass,centerAlignClass,centerAlignClass,centerAlignClass,centerAlignClass,centerAlignClass,centerAlignClass,centerAlignClass,centerAlignClass,leftAlignClass,leftAlignClass">
      <f:facet name="header">
      <rich:columnGroup>
      <rich:column rowspan="2">

      <h:graphicImage id="imgpp" value="/images/EGIT/Plus.gif" />

      </rich:column>
      <rich:column rowspan="2">
      <h:selectBooleanCheckbox
      value="#{hintsHeaderBean.selected}" />
      <a4j:support event="onclick"
      action="#{hintsHeaderBean.checkAll}" reRender="hintData">
      <a4j:actionparam name="categoryName"
      value="#{categoryTableBean.ctgrySrvcName}"
      assignTo="#{hintsHeaderBean.selectedCategoryName}" />
      </a4j:support>
      </rich:column>
      <rich:column rowspan="2">
      <h:outputText value="Hints" />
      </rich:column>
      <rich:column rowspan="2">
      Long Hints#{rowIndex}
      </rich:column>

      <rich:column colspan="2">
      <h:outputText value="Booking Date" />
      </rich:column>
      <rich:column colspan="2">
      <h:outputText value="Service Date" />
      </rich:column>
      <rich:column rowspan="2">
      <h:outputText value="Upload Document" />
      </rich:column>
      <rich:column breakBefore="true">

      <h:outputText value="From" />
      </rich:column>
      <rich:column>
      <h:outputText value="To" />
      </rich:column>
      <rich:column>
      <h:outputText value="From" />
      </rich:column>
      <rich:column>
      <h:outputText value="To" />
      </rich:column>
      </rich:columnGroup>
      </f:facet>
      <h:messages/>
      <rich:column> <a4j:commandLink action="#{hintsHeaderBean.expandSubTable}" reRender="hintData" >
      <a4j:actionparam name="rowNo" value="#{rowIndex}"
      assignTo="#{hintsHeaderBean.rowIndex}" />
      <a4j:actionparam name="categoryName"
      value="#{categoryTableBean.ctgrySrvcName}"
      assignTo="#{hintsHeaderBean.selectedCategoryName}" />
      <h:graphicImage id="imgpp1" value="#{hints1.imgN}" /> </a4j:commandLink>
      </rich:column> <rich:column>
      <rich:calendar id="endDate" value="#{hints1.hintsDTO.hintsBookingEndDate}" /> </rich:column>
      <rich:subTable value="#{hints1}" rowKeyVar="row" rendered="#{hints1.expand}" id="subTable" >
      <rich:column height="50" colspan="1" > helloasasdasd #{row}
      </rich:column>
      </rich:subTable> </rich:dataTable>


      </h:panelGroup>
      </f:facet>
      </rich:togglePanel>
      </a4j:repeat>