Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to partially update the rich:tree nodes?
    primarykey
    data
    text
    <p>I am using a rich:tree to display a large amount of data in my application. Each node has a considerable amount of HTML along with drag and drop support for reordering.</p> <p>My problem is that when I drop a node into another, it seems that I have to re-render the whole tree. Is there a way I can chose which nodes to render. since re-order affects only certain nodes, re-rendering the whole tree seems to be unnecessary.</p> <pre><code>&lt;rich:tree toggleType="ajax" var="node" id="segmentTree" nodeClass="rich-node-class" handleClass="abc" iconClass="cde" labelClass="node-lbl"&gt; &lt;rich:treeModelRecursiveAdaptor roots="#{segmentationBean.treeAsList}" nodes="#{node.children}"&gt; &lt;rich:treeNode id="treeNode" styleClass="treeNode" expanded="#{node.expanded}"&gt; &lt;rich:dropTarget acceptedTypes="segments" dropValue="#{node}" render="segmentTree" dropListener="#{segmentationBean.onSegmentReorder}" oncomplete="initializeTree();" /&gt; &lt;/a4j:outputPanel&gt; &lt;/rich:treeNode&gt; &lt;/rich:treeModelRecursiveAdaptor&gt; &lt;/rich:tree&gt; </code></pre> <p>Some more info: If i just try to render the "treeNode" the I see a NPE TreeRenderingContext:</p> <pre><code>public static TreeRenderingContext get(FacesContext context) { return (TreeRenderingContext) context.getAttributes().get(ATTRIBUTE_NAME); } </code></pre> <p>This method returns null for ATTRIBUTE_NAME = "org.richfaces.renderkit.TreeRenderingContext:ATTRIBUTE_NAME". Any help would be greatly appreciated. Thanks.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload