OK I have a working example.  I am enclosing the JSF and a screen shot
in this message.  I have also sent those that have expressed interest
a copy of the WAR file.  If you would like to receive a copy of the
WAR file to test, just send me an email.  I did not want to send it
directly to the list due to its size.

sean


<html>
    
  <link href="styles.css" rel="stylesheet" type="text/css"/>

  <f:view>

    <x:tree value="#{treeBacker.treeData}" var="node" varNodeToggler="t">
      <f:facet name="person">
        <h:panelGroup>
          <h:commandLink immediate="true" action="#{t.toggleExpanded}">
            <h:graphicImage value="/images/yellow-folder-open.png"
rendered="#{node.expanded}" border="0"/>
            <h:graphicImage value="/images/yellow-folder-closed.png"
rendered="#{!node.expanded}" border="0"/>
          </h:commandLink>
          <h:outputText value="#{node.description}" styleClass="nodeFolder"/>
        </h:panelGroup>
      </f:facet>      
      <f:facet name="foo-folder">
        <h:panelGroup>
          <h:commandLink immediate="true" action="#{t.toggleExpanded}">
            <h:graphicImage value="/images/yellow-folder-open.png"
rendered="#{node.expanded}" border="0"/>
            <h:graphicImage value="/images/yellow-folder-closed.png"
rendered="#{!node.expanded}" border="0"/>
          </h:commandLink>
          <h:outputText value="#{node.description}" styleClass="nodeFolder"/>
          <h:outputText value=" (#{node.childCount})"
styleClass="childCount" rendered="#{!empty node.children}"/>
        </h:panelGroup>
      </f:facet>
      <f:facet name="bar-folder">
        <h:panelGroup>
          <h:commandLink immediate="true" action="#{t.toggleExpanded}">
            <h:graphicImage value="/images/blue-folder-open.png"
rendered="#{node.expanded}" border="0"/>
            <h:graphicImage value="/images/blue-folder-closed.png"
rendered="#{!node.expanded}" border="0"/>
          </h:commandLink>
          <h:outputText value="#{node.description}" styleClass="nodeFolder"/>
          <h:outputText value=" (#{node.childCount})"
styleClass="childCount" rendered="#{!empty node.children}"/>
        </h:panelGroup>
      </f:facet>        
      <f:facet name="document">
        <h:panelGroup>
          <h:commandLink immediate="true" styleClass="document">
            <h:graphicImage value="/images/document.png" border="0"/>
            <h:outputText value="#{node.description}"/>
            <f:param name="userId" value="#{node.identifier}"/>
          </h:commandLink>
        </h:panelGroup>
      </f:facet>
    </x:tree>

  </f:view>
</html>

<<attachment: tree.jpg>>

Reply via email to