I have the below tree which works and renders. the first commandLink
works. The second one does not. I am a complete newb to JSF(don't know
struts either). I am wondering why when I use my popup menu I get an
exception while I can use the first commandLink just fine and it works.
I also have no idea what this docNum parameter is and why that is
used(copied from MyFaces examples). Lastly, there is this
varNodeToggler="t" which looks like it maps to the t used in the
expressions, but I don't understand how to get this t object from my
model to see which node is set. I don't see nodeExpanded, nodeSelected,
etc. etc on any TreeNode objects. It almost matches TreeState but is a
little off. I am confused. thanks for any pointers or even links to
docs on this tree implementation(the web page said look at the example
which isn't exactly enough for me)
thanks,
dean
<t:tree2 id="clientTree" value="#{treeBacker.treeData}"
var="node" varNodeToggler="t"
clientSideToggle="false"
preserveToggle="true">
<f:facet name="folder">
<h:panelGroup>
<t:graphicImage
value="images/yellow-folder-open.png" rendered="#{t.nodeExpanded}"
border="0"/>
<t:graphicImage
value="images/yellow-folder-closed.png" rendered="#{!t.nodeExpanded}"
border="0"/>
<h:commandLink immediate="true"
styleClass="#{t.nodeSelected ? 'documentSelected':'document'}"
actionListener="#{t.setNodeSelected}">
<h:outputText value="#{node.description}"/>
<f:param name="docNum"
value="#{node.identifier}"/>
</h:commandLink>
<t:graphicImage value="images/spacer.gif"
width="10" height="1" border="0" />
<t:popup styleClass="popup"
closePopupOnExitingPopup="true">
<t:graphicImage value="images/edit.gif"
border="0" />
<f:facet name="popup">
<h:panelGroup>
<h:panelGrid columns="1">
<h:outputText
value="#{node.description}" />
<h:commandLink
styleClass="document" actionListener="#{t.setNodeSelected}"
action="#{treeBacker.addProject}">
<t:graphicImage
value="images/document.png" border="0" />
<h:outputText value="Add
Project" />
<f:param name="docNum"
value="#{node.identifier}"/>
<!--
t:updateActionListener property="#{treeBacker.selectedNode}"
value="#{node.description}" /-->
<!--t:updateActionListener property="#{navItem.structureId}"
value="#{siteBean.site.defaultStructure.id}"/>
<t:updateActionListener
property="#{navItem.parentId}" value="#{node.identifier}" /-->
</h:commandLink>