Problem with reRender at the dynamic rich:tree
argonist Apr 4, 2011 8:06 AMHello,
I dont know, if it is bug, or not.
I want to add or remove a child node in the tree. Adding a node in the tree is working, but removing is not working. If I select a node in the tree to remove it, the removing in the backing bean is working, but the tree on the website is not refreshing. If I press F5, then the tree is updating. WHY?? Setting on reRender is correct.
JBoss 6.0
Richface 3.3.3
Seam 2
<h:form enctype="multipart/form-data">
..
..
..
<rich:tree id="dateTree" switchType="client" ajaxKeys="#{null}"
showConnectingLines="false" styleClass="requestDateTree"
ajaxSingle="true" ajaxSubmitSelection="true"
adviseNodeSelected="#{requestGroupTreeHandler.adviseNodeSelected}"
nodeSelectListener="#{requestGroupTreeHandler.processSelection}"
adviseNodeOpened="#{requestGroupTreeHandler.adviseNodeOpened}"
reRender="dateTree"
value="#{requestGroupTreeHandler.dateNodes}" var="dateNode"
eventsQueue="queueDateTree" ignoreDupResponses="true"
nodeFace="#{dateNode.type}">
<rich:treeNode type="date" nodeClass="dateNode">
...
...
...
<ui:include src="viewDateForTree.xhtml">
<ui:param name="viewRequest" value="#{dateNode}" />
</ui:include>
</rich:treeNode>
<rich:treeNode type="interpreters">
...
...
...
</rich:treeNode>
</rich:tree>
..
</h:form>
RequestGroupTreeHandler.java
...
...
...
@SuppressWarnings("unchecked")
public void processSelection(NodeSelectedEvent event) {
System.out.println("processSelection");
HtmlTree tree = (HtmlTree) event.getComponent();
TreeNode<ViewRequest> currentNode = tree.getModelTreeNode(tree.getRowKey());
ViewRequest selectednode = currentNode.getData();
if (selectednode.getRequest().getId() < 0) {
getRequestHandler().removeRequestFromGroup(selectednode);
} else {
getRequestHandler().changeSelectedRequest(selectednode);
}
System.out.println("finish the invoking processSelection");
}
...
...