on 08-26-2014 8:42 PM
Hello Everyone,
I am making a simple application which traverses a nested JSON object using a simple SAPUI5 List and ObjectListItem. Moving 'down' the list is pretty simple to do; however I am not finding how to move 'up' the list to the parent of the current context.
Does this ring a bell for anyone?
Tags edited by: Michael Appleby
Hi Craig
Can you share how your JSON data looks like? Using path, we should be able to 'move up'. If you can share some code on how you 'move down' will be nice so we understand what have done.
Thanks
-D
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Dennis,
Here is the JSON..
[
{
"title": "Folder1",
"type": "folder",
"icon":"folder-blank",
"children": [
{
"title": "Sample Document1",
"link": "http://www.hollywood-arts.org/wp-content/uploads/2014/05/pdf-sample.pdf",
"description":"This is the description for the document",
"type": "document",
"icon": "document"
},
{
"title": "Sample Document2",
"link": "http://www.hollywood-arts.org/wp-content/uploads/2014/05/pdf-sample.pdf",
"description":"This is the description for the document",
"type": "document",
"icon": "document"
},
{
"title": "Sample Document3",
"link": "http://www.hollywood-arts.org/wp-content/uploads/2014/05/pdf-sample.pdf",
"description":"This is the description for the document",
"type": "document",
"icon": "document"
},
{
"title": "Sample Document4",
"link": "http://www.hollywood-arts.org/wp-content/uploads/2014/05/pdf-sample.pdf",
"description":"This is the description for the document",
"type": "document",
"icon": "document"
},
{
"title": "Sample Document5",
"link": "http://www.hollywood-arts.org/wp-content/uploads/2014/05/pdf-sample.pdf",
"description":"This is the description for the document",
"type": "document",
"icon": "document"
},
{
"title": "Folder1a",
"type": "folder",
"icon":"folder-blank",
"children": [
{
"title": "Sample Document1",
"link": "http://www.hollywood-arts.org/wp-content/uploads/2014/05/pdf-sample.pdf",
"description":"This is the description for the document",
"type": "document",
"icon": "document"
},
{
"title": "Sample Document2",
"link": "http://www.hollywood-arts.org/wp-content/uploads/2014/05/pdf-sample.pdf",
"description":"This is the description for the document",
"type": "document",
"icon": "document"
},
{
"title": "Sample Document3",
"link": "http://www.hollywood-arts.org/wp-content/uploads/2014/05/pdf-sample.pdf",
"description":"This is the description for the document",
"type": "document",
"icon": "document"
},
{
"title": "Sample Document4",
"link": "http://www.hollywood-arts.org/wp-content/uploads/2014/05/pdf-sample.pdf",
"description":"This is the description for the document",
"type": "document",
"icon": "document"
},
{
"title": "Sample Document5",
"link": "http://www.hollywood-arts.org/wp-content/uploads/2014/05/pdf-sample.pdf",
"description":"This is the description for the document",
"type": "document",
"icon": "document"
}
]
}
]
},
{
"title": "Folder2",
"type": "folder",
"icon":"folder-blank",
"children": [
{
"title": "Sample Document",
"link": "http://www.hollywood-arts.org/wp-content/uploads/2014/05/pdf-sample.pdf",
"description":"This is the description for the document",
"type": "document",
"icon": "document"
},
{
"title": "Sample Document",
"link": "http://www.hollywood-arts.org/wp-content/uploads/2014/05/pdf-sample.pdf",
"description":"This is the description for the document",
"type": "document",
"icon": "document"
},
{
"title": "Sample Document",
"link": "http://www.hollywood-arts.org/wp-content/uploads/2014/05/pdf-sample.pdf",
"description":"This is the description for the document",
"type": "document",
"icon": "document"
},
{
"title": "Sample Document",
"link": "http://www.hollywood-arts.org/wp-content/uploads/2014/05/pdf-sample.pdf",
"description":"This is the description for the document",
"type": "document",
"icon": "document"
},
{
"title": "Sample Document",
"link": "http://www.hollywood-arts.org/wp-content/uploads/2014/05/pdf-sample.pdf",
"description":"This is the description for the document",
"type": "document",
"icon": "document"
},
{
"title": "Sample Document",
"link": "http://www.hollywood-arts.org/wp-content/uploads/2014/05/pdf-sample.pdf",
"description":"This is the description for the document",
"type": "document",
"icon": "document"
},
{
"title": "Sample Document",
"link": "http://www.hollywood-arts.org/wp-content/uploads/2014/05/pdf-sample.pdf",
"description":"This is the description for the document",
"type": "document",
"icon": "document"
},
{
"title": "Sample Document",
"link": "http://www.hollywood-arts.org/wp-content/uploads/2014/05/pdf-sample.pdf",
"description":"This is the description for the document",
"type": "document",
"icon": "document"
},
{
"title": "Sample Document",
"link": "http://www.hollywood-arts.org/wp-content/uploads/2014/05/pdf-sample.pdf",
"description":"This is the description for the document",
"type": "document",
"icon": "document"
}
]
}
]
As for moving 'down', I bound the JSON model to a List object, so I really didn't have to do anything.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.