Hi everybody,

I want to add a selectBox column to my tree. However I could not get it
to work correctly. If I select a checkbox and unfold and item in the
tree the selection is lost and always the last item is selected.
Obviously there is different behaviour as with the dataTable as here it
works the way I did it.
How can I solve the problem, I need a solution soon...

   <t:tree id="tree" value="#{groupListBacking.treeModel}" var="treeItem"
      styleClass="tree" nodeClass="treenode"
      headerClass="standardTable_Header" footerClass="treeFooter"
      rowClasses="standardTable_Row1,standardTable_Row2"
      columnClasses="standardTable_Column"
      selectedNodeClass="treenodeSelected" expandRoot="true">
      <h:column>
         <f:facet name="header">
            <h:outputText value="Selected" />
         </f:facet>
         <t:selectBooleanCheckbox immediate="false"
            rendered="#{treeItem.showCheckbox}"
value="#{treeItem.selected}"/>
      </h:column>
      <t:treeColumn>
         <f:facet name="header">
            <h:outputText value="Name" />
         </f:facet>
         <h:outputText value="#{treeItem.name}" />
      </t:treeColumn>
      <h:column>
         <f:facet name="header">
            <h:outputText value="Description" />
         </f:facet>
         <h:outputText value="#{treeItem.description}" />
      </h:column>
   </t:tree>

BTW Please don't tell me use treeCheckbox. I've thought of that, but if
that solves my problem I really need some help how to use it. The
documentation did not help me much here.

Kind regards from Germany
Matthias Fischer

Reply via email to