I am having a problem using tree2 and would appreciate any help

I am using Tree2 to perform navigation thru a catalog
My tree has 2 types of leaf nodes, a "item" and a "manufacturer".
Implementation wise these are the 'type' attributes of TreeNode

The data structure is populated with 4 leaf nodes of each type.

The tree is displayed in a panel on the left side of the page.

In my JSP page I have two seperate facets for the types.
Inside the facet I have a h:commandlink which uses different actions
"gotoItem" and "gotoManufacturer"

Here is my problem, the FIRST time I use the Tree2 everything works
fine and I go to the correct page. After that if I select a node of a
different type I go to the wrong page.
(ex  I select an item node, gotoItem action is used, I'm forwarded to
the correct page. If I then click on a manufacturer page I get
forwarded to the item page incorrectly ).

This has 'something' to do with the action handling. Since as a test I
removed gotoManufacturer from faces-config and I never got an error.

Anyone got any suggestions ??? I'm using client side tree2, server
side was not working at all.

( Tomcat 5.5, using Sun JSF Implementation, Windows XP )
---- snippet ---
                                        <x:tree2 
value="#{catalogAccessorBean.myFaceTreeData}" id="catalog"
                                                var="node" varNodeToggler="t" 
clientSideToggle="true">
                                                <f:facet name="item">
                                                        <h:panelGroup>
                                                                <h:commandLink 
                                                                
immediate="false" action="gotoItem" styleClass="document">
                                                                        
<h:graphicImage value="images/document.png" />
                                                                        
<h:outputText value="#{node.description}" />
                                                                        
<f:param name="itemId" value="#{node.identifier}" />
                                                                        
<f:param name="itemDescription" value="#{node.description}" />
                                                                </h:commandLink>
                                                        </h:panelGroup>
                                                </f:facet>
                                                <f:facet name="manufacturer">
                                                        <h:panelGroup>
                                                                <h:commandLink 
                                                                
immediate="false" action="gotoManufacturer" styleClass="document">
                                                                        
<h:graphicImage value="images/document.png" />
                                                                        
<h:outputText value="#{node.description}" />
                                                                        
<f:param name="itemId" value="#{node.identifier}" />
                                                                        
<f:param name="itemDescription" value="#{node.description}" />
                                                                </h:commandLink>
                                                        </h:panelGroup>
                                                </f:facet>

Reply via email to