4 Replies Latest reply on Apr 25, 2009 7:06 AM by nbelaevski

    Not able to get 'reRender a column' to work with rich:dataTa

    shantanu.u

      I've been trying to resolve this problem for 2 days now.

      My environment : RichFaces 3.1.6, Sun RI JSF 1.1, Tomcat 5.5 ( Use WL 9.2 for production)

      To put it simply:
      Step 1: I have a multiselect list in column10. I select a value and click on the DELETE button just next to the list. I also reRender column10 and column9. Works fine. Item gets deleted.

      Step 2:When I click on DELETE button again, without selecting anything, the item I deleted previously re-apppears.

      Step 3 : Restart scenario in DEBUG mode. When I run Step 1 again, the state of myBean is correct (i.e. the item is removed).
      But when I do Step 2, myBean has still got the previously removed item !

      Why is this ? Is this anything to do serialization with saveState still containing the previous state of myBean ??

      Here's my code :

      <h:form id="offerBillingCodeForm">
       <t:saveState id ="myBean" value="#{myBean}" />
      
       <!-- Lots of code here -->
      
       <rich:dataTable id="tableId" width="100%" border="1"
       value="#{myBean.myList}" var="aRow" rowKeyVar="rkv">
      
       <!-- Some columns here - of no significance -->
      
       <rich:column id="column9" style=" width: 60px;">
       <f:facet name="header">
       <h:outputText value="COLUMN WITH SUGGESTION BOX " />
       </f:facet>
       <h:inputText ... id="someId" style=" width: 40px;" />
       <a4j:commandButton id="buttonId" value="Add" eventsQueue="someQueue"
       action="#{myBean.someAction}"
       reRender="column9">
       <f:setPropertyActionListener value="#{rkv}" target="#{myBean.selectedRowIndex}" />
       </a4j:commandButton>
       <rich:suggestionbox id="suggestionBoxId2" for="someId"
       suggestionAction="#{offerBillingCodeAssnBean.suggestBillingCode}" var="billingCode"
       ......>
       ....
      
       </rich:suggestionbox>
       </rich:column>
      
       <rich:column id="column10" rendered = "true" style="width: 140px;">
       <f:facet name="header">
       <h:outputText value="COLUMN THAT SHOWS THE ADDED SUGGESTIONS FROM COLUMN 9" />
       </f:facet>
       <h:selectManyListbox id="listId" value="#{aRow.selectedArr}" size="3" style="width: 140px;">
       <f:selectItems value="#{aRow.selectItemList}" />
       </h:selectManyListbox>
       <a4j:commandButton id="deleteButton" value="Remove Suggested Value" eventsQueue="someQueue"
       action = "#{myBean.removeSuggestion}"
       reRender="column9,column10,">
       <f:setPropertyActionListener value="#{rkv}" target="#{myBean.selectedRowIndex}" />
       </a4j:commandButton>
       </rich:column>
      
       <!-- more columns -->
      
       <rich:dataTable>
      </h:form>