3 Replies Latest reply on May 28, 2013 12:34 PM by Brian Leathem

    Problem with expanded for collapsiblePanel inside dataTable

    chris29 Newbie

      Hi,

       

      i'm facing the following problem: I have a rich:dataTable and inside one of the columns is a rich:collapsiblePanel:

       

      {code:xml}

      <rich:dataTable var="var" value="#{bean.someValue}">

           <rich:column>

                <rich:collapsiblePanel expanded="false" switchType="client" id="panel">

                     <h:inputText value="#{var.editValue1}" />

                     ...

                     <a4j:commandButton oncomplete="#{rich:component('panel')}.switchPanel()" action="#{bean.someAction}"

                          value="save" render="panel"/>

                </rich:collapsiblePanel>

           </rich:column>

      </rich:dataTable>

      {code}

       

      The dataTable has 10 row per page and many pages. I can expand the collapsiblePanel and enter some values (editValue1, ...) and click the save button. The bean.someAction is called and the collapsiblePanel is closed. Fine!

      However if one of the collapsiblePanels ist expanded and another server action (pageination, button click,...) is done, all the collapsiblePanels are expanded.

       

      I tried to bind the expanded attribute to a bean value: {code:xml}expanded="#{bean.expanded}"{code} but this doesn't help.

      I tried to change the switchType to server, but then if i expand one collapsiblePanel all the other collapsiblePanels are also opended.

       

      Can you help me?

       

      I'm using Richfaces 4.2.0 Final