Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8695

Re: Tree View In SAPUI5

$
0
0

Hi All,

 

I am creating a dynamic tree with values retrive from table through odata call,Here problems is i was not able to create tree or node inside odata function even i was not able to retrive value away from the function. While printing the value i can see the tree objects.Please guide me on this.

 

response log:"oNode2-Element sap.ui.commons.TreeNode#admin"

 

$.get(capaService + "/ApplicationUsersIdView", function(data1) {

 

  viewModel1.setData(data1);

  var json11 = viewModel1.getJSON();

  console.log("JSON Object-" + json11);

  var json111 = JSON.parse(json11);

  console.log("Parsed-" + json111.d.results.length);

  for ( var i = 0; i < json111.d.results.length; i++) {

  var oNode2 = new sap.ui.commons.TreeNode(json111.d.results[i].userid,{text: json111.d.results[i].userid.text});

  oNode1.addNode(oNode2);

 

  console.log("oNode2-" + oNode2);

  console.log("Parsedvalue-" + json111.d.results[i].userid);

  }

  // alert('execueted');

    

  }, "json");


Viewing all articles
Browse latest Browse all 8695

Trending Articles