4 Replies Latest reply on Apr 23, 2010 9:09 AM by acgrama

    rich:simpleTogglePanel -- cannot set default to "closed"!

    acgrama

      Hi all,


      I have trouble setting the default state for rich:simpleTogglePanel as closed. Below, some relevant snippets from my xhtml, showing what I'm doing. Basically, I collect some input data, and when the Search Similar Problems button is pressed, I do some computation and show results in a table with one column and a rich:simpleTogglePanel in every row.



      <h:form>
      ...collect some data...
      <h:commandButton id="searchSimilarProblems" value="Search Similar Problems"
           action="#{searchSimilarProblems.searchSimilarProblems}" reRender="similarProblemsResult_id"/>
           
      <a4j:outputPanel id="similarProblemsResult_id">
          <rich:dataTable value="#{similarProblems}" var="similarProblem" columnsWidth="0*" width="700">
           <rich:column>
               <f:facet id="ProblemAreaFacet" name="header">Similar Problems Found</f:facet>                         
               <rich:simpleTogglePanel switchType="ajax" label="#{similarProblem.caseId}" opened="false">
                   ...
               </rich:simpleTogglePanel>   
           </rich:column>
          </rich:dataTable>
      </a4j:outputPanel>     
           
      </h:form>



      I have tested a rich:simpleTogglePanel outside the table, and, for that case, setting opened to false worked. Any ideas or suggestions regarding why this is not working in the table?
      Thanks in advance!