on 02-20-2017 1:35 PM
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,
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) {
this[oAggregationInfo._sDestructor]();
}
updateRecursive(this, oBinding.getRootContexts());
}
After overwriting this function for my custom control, it workes without rerendering the whole Tree.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.