Skip to Content

SAPUI5: rerender only a single node of sap.ui.commons.Tree

Hi everyone,

anybody knows if it is possible to rerender only single nodes of a sap.ui.commons.Tree?

I have a sap.ui.commons.Tree which provides a couple of functions to the user and which is bound to a json model. After user interaction i want to update the chosen TreeNode on which the user performed the function by updating it's model data. This works fine so far with

oModel.setProperty(sPath, oValue, oContext, bForceUpdate)

The problem is, that after setting the new property, the whole tree structure starts rerendering, even if i set bForceUpdate to false.

Any ideas how to rerender just that single node that changed?

Thanks in advance,

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    Posted on Mar 01, 2017 at 10:59 AM

    Solved this. For those who have a similiar problem:

    Using sap.ui.commons.Tree and a factory function to bind nodes is leading to this problem. Tree inherits the function "updateAggregation()" from the superclass ManagedObject. In this function there are the following lines, that are destroying the current aggregations.

    if (oBinding instanceof sap.ui.model.TreeBinding) {
                 if (!oBindingInfo.template) {
                updateRecursive(this, oBinding.getRootContexts());

    After overwriting this function for my custom control, it workes without rerendering the whole Tree.

    Add comment
    10|10000 characters needed characters exceeded