have a TabPanel which is of switchType="ajax". In one of the tabs I have a Tree. If I click on the tab nothing happens. The tab is not rendered. I have put a breakpoint in the bean used by the tree and do see it getting there. But when I refresh the page the tab does get rendered (BTW, I maintain the selected tab on the severside.)
JSP Code:
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j" %>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich" %>
<rich:tabPanel switchType="ajax">
<rich:tab id="__tab_home" label="Home">
<rich:panel styleClass="rich-laguna-panel-no-header">
The home page here!!!
</rich:panel>
</rich:tab>
<rich:tab id="__tab_objects" label="Objects">
The search panel goes here.
</rich:tab>
<rich:tab id="__tab_reports" label="Reports">
<rich:tree
style="width:200px;"
switchType="client"
value="#{myTree.rootNode}"
var="item">
<rich:treeNode>
<h:outputText value="#{item.name}" />
</rich:treeNode>
</rich:tree>
</rich:tab>
</rich:tabPanel>
public class MyTreeBean {
private TreeNode _rootNode;
public TreeNode getRootNode() {
if (_rootNode == null)
loadTree();
return _rootNode;
}
private void loadTree() {
System.out.println("Loading KM Tree ...");
_rootNode = new TreeNodeImpl();
{
TreeNodeImpl treeNode = new TreeNodeImpl();
treeNode.setData("Departments");
_rootNode.addChild(new Integer(1), treeNode);
}
{
TreeNodeImpl treeNode = new TreeNodeImpl();
treeNode.setData("Resources");
_rootNode.addChild(new Integer(2), treeNode);
}
System.out.println("Finished loading KM Tree ...");
}
public void processSelection(NodeSelectedEvent event) {
}
}
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4237181#4237181
Do not duplicate threads.