11 Replies Latest reply on May 10, 2010 10:35 AM by lrp

    Is there any way to only rerender the contents of a specific HtmlTreeNodesAdaptor?

    lrp

      Given a specific HtmlTreeNodesAdaptor component, can I instruct the framework to only rerender that? So far I've tried the following ways:

       

      - Calling AjaxContext.getCurrentInstance().addComponentToAjaxRender() with the adaptor as an argument.

      - Calling AjaxContext.getCurrentInstance().addComponentToAjaxRender() with the HtmlTreeNode component under the adaptor as an argument.

      - Specifying the id of the adaptor as the rerender argument of the action that changes the adaptor's contents.

      - Specifying the id of the HtmlTreeNode component under the adaptor as the rerender argument of the action that changes the adaptor's contents.

       

      All of these result in "java.lang.IllegalStateException: No tree element available or row key not set!". The only way I have found to do this so far is by rerendering the entire tree, which doesn't strike me as very performance-friendly on large trees.

       

      I'm guessing it might be possible by calling tree.addRequestKey(), but I'm not sure how I can get the RowKey of the adaptor or its underlying node component. Any advice on this issue would be greatly appreciated.

       

      Regards,

      Lars-Remi Pettersen