Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 7846

nodeContext for sap.ui.commons.Tree and XML data

$
0
0

Hi there,

 

I'm using an XML similar to this one:

sap.ui.commons.Tree and XML data

(without the PropertySets tags)

 

I managed to bind to XMLModel to the tree and to show the nodes. However, when clicking on a node, I want to know the path inside the model to this node.

 

Every node has special attributes like ID or NAME and I need to access this data.

 

Due to documentation I can use the nodeContext of the select event:

SAPUI5 SDK - Demo Kit

 

 

new sap.ui.Tree({     ...     select : function(oControlEvent) {          var nodeContext = oControlEvent.getParameters("nodeContext");     }
});

 

The nodeContext is undefined. Getting the node instead of nodeContext works just fine, but the node (type TreeNode) doesn't have the XML attributes I need to access. I want to use the nodeContext of this model to bind the data to a detail dialog. (Master Detail sample of SAPUI5 SDK)

 

Am I doing something wrong with data binding?

 

SAPUI5 1.18.5

Complex data binding is ON

 

Regards,

Tobias


Viewing all articles
Browse latest Browse all 7846

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>