i want to update the children of the primefaces tree without pulling the whole tree from the server.
I can update the whole tree but not only the children of a specific node ...
Edit:
This is an example of my code:
<p:tree value="#{cc.tree}" var="wrapper" id="tree" widgetVar="tree" styleClass="commentTree-#{cc.id}">
<p:treeNode id="treeNode" styleClass="treenode-#{wrapper.id}">
Hallo: #{wrapper.text}
</p:treeNode>
</p:tree>
Now i want to update a specific treenode.
function findIDbySelector(selector) {
return $(selector).first().attr('id');
}
function updateComponent(clientID) {
var ajax_json = {};
ajax_json['source'] = '#{cc.id}';
ajax_json['update'] = clientID;
PrimeFaces.ajax.AjaxRequest(ajax_json);
}
[...]
updateComponent(findIDbySelector('.treenode-1'));
As i said i can update the whole tree but i only want to update a single Treenode.
(The code may contain bugs/typos since it is stripped down)