You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "Nebinger, David" <dn...@tbbgl.com> on 2007/05/15 17:49:09 UTC

Tree2 and TreeNodeBase extension in Tomahawk 1.1.3?

Okay, so I've got the following tree2 'goal':

<t:tree2 id="treeComp" value="#{navTree.treeModel}"
clientSideToggle="true" varNodeToggler="t" var="node"
imageLocation="/images" >
  <f:facet name="item">
    <h:panelGroup>
      <h:commandLink styleClass="#{t.nodeSelected ?
'documentSelected':'document'}" action="#{navTree.nodeSelected}"
immediate="true">
        <h:panelGrid id="b" columns="2" cellpadding="0" cellspacing="0">
          <t:graphicImage value="#{node.iconImage}" />
          <h:outputText value="#{node.description}" />
        </h:panelGrid>
        <f:param name="navKey" value="#{node.identifier}" />
      </h:commandLink>
    </h:panelGroup>
  </f:facet>
</t:tree2>


Basically I'd like to keep the icon to display with the tree node itself
rather than having to create multiple facets just for an icon change.

Unfortunately it appears (at least in tomahawk 1.1.3) that my extension
for node is not visible in the <t:graphicImage /> tag.  Even though I'm
putting my extension node into the tree (with the appropriate
getters/setters for iconImage in the extension guy), I guess that when
node is provided to the tree implementation it is a simple TreeNode
interface object and cannot get to my extension points.

Anybody like to suggest how I might accomplish this?