on 03-24-2016 4:20 PM
Dear openui5 developers,
I'm very glad you've provided such a nice control as navigation list and especially navigation list item that aggregates itself.
However, it's a bit strange that you propose to use it only with two levels.
I have created a simple program with JSON model like this:
{
"OrgUnitSet": [{
"Id": 1,
"Name": "Bank 1"
}, {
"Id": 2,
"Name": "Bank 2"
}, {
"Id": 3,
"Name": "Bank 3",
"ChildrenDirect": [{
"Id": 5,
"Name": "Bank 5",
"ChildrenDirect": [{
"Id": 6,
"Name": "Bank 6"
}, {
"Id": 7,
"Name": "Bank 7"
}]
}]
}, {
"Id": 4,
"Name": "Bank 4"
}]
}
and a simple view like this:
<mvc:View xmlns:mvc="sap.ui.core.mvc" xmlns="sap.tnt">
<NavigationList items="{/OrgUnitSet}" width="30%">
<NavigationListItem text="{Name}" items="{ChildrenDirect}" expanded="false">
<NavigationListItem text="{Name}" items="{ChildrenDirect}" expanded="false">
<NavigationListItem text="{Name}" expanded="false"></NavigationListItem>
</NavigationListItem>
</NavigationListItem>
</NavigationList>
</mvc:View>
as I expect I should see the three-level tree, however what I actually have is:
However I expected to see the screen like this:
What's interesting - I managed to get these screens just by extending the component without any single line of redefinition:
sap.ui.define([
"sap/tnt/NavigationListItem"
],
function(NavigationListItem) {
"use strict";
return NavigationListItem.extend("sbt.mob.control.NavigationListItem", {
});
}
);
Could you please provide this feature in the original control?
Will be glad to get some feedback.
Thanks!
P.S: I have prepared a special project to demonstrate both options:
Hi Petr- I am projecting my points here.
1. you should extend the tnt control according to your need.
2. i think, sap has integrated one level of hierarchy of tnt navigation control. The next level it should error in id. so i conclude here as SAP has a one level of hierarchy.
Correct me if I wrong!!!
Regards,
Karthik A
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
> "The next level it should error in id. so i conclude here as SAP has a one level of hierarchy."
Why? THe API Docs don't say anything that it shouldn't be possible.
I did see that this control is supposed to replace the recently deprecated sap.m.Tree control, but if that is the case then this solution sucks since it clearly does not offer the same functionality as the tree.
(The other candidate, TableTree has other issues so it seems there is actually no equivalent control to replace the sap.m.Tree?)
How do you reference your extension of the NavigationListItem in the XML Views?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am experiencing the same issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.