rich:tree with h:link issue
byteslash Mar 30, 2015 4:11 AMHi everyone,
I've been using rich:tree component since richfaces 3.3.3 and with the jboss seam s:link everything was running just fine. In a new project i've upgraded the platforms to JEE7 and Richfaces 4.5.3 and so far i'm going nuts with the behavior of the combination rich:tree with h:link for navigation menu. What i have is this:
1. Tree backin bean in CDI, Viewscoped
2. facelet templated pages
3. left menu with the tree :
<rich:panel xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://jboss.com/products/seam/taglib" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:rich="http://richfaces.org/rich" xmlns:p="http://primefaces.org/ui" xmlns:a4j="http://richfaces.org/a4j"> <f:facet name="header">Menu</f:facet> <h:form> <rich:tree id="tree" nodeType="#{node.type}" var="node" treeStateAdvisor="true" value="#{treeBean.rootNodes}" selectionType="ajax" selectionChangeListener="#{treeBean.selectionChanged}"> <rich:treeNode type="menuTree" expanded="true"> #{node.name} </rich:treeNode> <rich:treeNode type="menuBranch" expanded="true"> #{node.name} </rich:treeNode> <rich:treeNode type="menuSubBranch" expanded="true"> #{node.name} </rich:treeNode> <rich:treeNode type="menuLeaf" expanded="true"> <h:link value="#{node.name}" outcome="#{node.link}.xhtml" /> </rich:treeNode> </rich:tree> </h:form> </rich:panel>
What it happening is that the tree loads fine when i do login on the Webapp. When i click on the link with this result code
<span class="rf-trn-lbl"><a href="UserStep0-form.jsf">Register</a></span>
the selected link page is loaded correctly, but after that
the page is reloaded and the h:link renders <span class="rf-trn-lbl"><span>Register</span></span> the <a ref .... /> simply disappears and i cant load any other page from the rich:tree.
Any ideas ? Thanx in advance