Skip to Content
0

sap.m.tree implementation or exapmples

Jul 28, 2017 at 07:55 AM

51

avatar image
Former Member

Hi all, I have been trying to implement the sap.m.tree for multilevel hierarchy data, and the attribute names are different. I have been through the FIORI guidelines https://experience.sap.com/fiori-design-web/tree/ for the same and I understand that is the exact control I need. from the SAPUI5 explored https://sapui5.hana.ondemand.com/explored.html#/entity/sap.m.Tree/samples I couldn't get much of help as they have the example over the same data and there are no aggregations. Can anyone help me with a lead, an example would be highly appreciated

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Frank Schuler
Jul 28, 2017 at 04:32 PM
0

Hello Arjun,

Have you checked openui5/src/sap.m/test/sap/m/demokit/sample/Tree/?

Best regards

Frank

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Yes Frank,

Its the same example provided in https://sapui5.hana.ondemand.com/explored.html Explored app.

Regards

Arjun Nair

0
Frank Schuler
Jul 28, 2017 at 08:58 AM
0

Hello Arjun,

Please check sap.m.Tree in the SAPUI5 Explored app.

Best regards

Frank

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Frank thanks for the reply, as you note that I already have checked the explored app. Which is limited with the details on what can be done when there are hierarchy of data wit different attribute names.

for Eg

the code will fail to iterate through

region : [

{"menu": {
  "id": "file",
  "value": "File",
  "popup": {
    "menuitem": [
      {"item": "New", "onclick": "CreateNewDoc()"},
      {"item": "Open", "onclick": "OpenDoc()"},
      {"item": "Close", "onclick": "CloseDoc()"}
    ]
  }
}}

As its not the first node has value and the child is having an item.

0