I have spent some time trying to address a few of the specific issues Oliver has raised recently. I have figured out a solution for one of the two issues that Oliver has pointed out. I've added a isNodeSelected() method to the tree so that it can be accessed via a value binding expression.
All that is required (if you want to use this functionality) is to set
the action listener of the commandLink as in this JSP.
<f:facet name="document">
<h:panelGroup>
<h:commandLink immediate="true" styleClass="document"
actionListener="#{t.setNodeSelected}" rendered="#{!t.nodeSelected}">
<h:graphicImage value="/images/document.png" border="0"/>
<h:outputText value="#{node.description}"/>
<f:param name="docNum" value="#{node.identifier}"/>
</h:commandLink>
<h:commandLink immediate="true" styleClass="documentSelected"
actionListener="#{t.setNodeSelected}" rendered="#{t.nodeSelected}">
<h:graphicImage value="/images/document.png" border="0"/>
<h:outputText value="#{node.description}"/>
<f:param name="docNum" value="#{node.identifier}"/>
</h:commandLink>
</h:panelGroup>
</f:facet>
In fact the new tree is now even more powerful than the current tree
in this regard because you can control what constitutes node
selection. So if you didn't want the selection of a branch node to be
counted as a node selection you now have that option. Of course you
can always configure it to behave exactly the same as the current tree
if that is your wish (or ignore node selection entirely.)
I think this resolves the main issue. There is still the outstanding
issue of the interface differences but I believe we can resolve that
as well. I will come back to the list with some specific solutions.
Oliver, I am looking forward to your feedback on this and any ideas
you might have on how we can resolve the model vs. inteface debate.
Regards,
sean
<<attachment: node-selection.gif>>
