Skip to Content
0

Navigation List

Nov 06, 2016 at 01:21 AM

251

avatar image

Dear Experts,

does the sap.tnt.NavigationList support more than 2 level of items ? In the example, I've added one more level, but nothing is rendered/displayed, however based on items aggregation of the Navigation List Item it, can be any number of level of items embedded.

<mvc:View controllerName="sap.tnt.sample.NavigationList.V" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.tnt" xmlns:m="sap.m" height="100%">
	<m:Button text="Toggle Collapse/Exapand" icon="sap-icon://menu2" press="onCollapseExapandPress"/>
	<NavigationList id="navigationList" width="320px">
		<items>
			<NavigationListItem text="Item 1">
				<items>
					<NavigationListItem text="Sub Item 1">
						<items>
							<NavigationListItem text="Sub Item 1-1"></NavigationListItem>
						</items>
					</NavigationListItem>
					<NavigationListItem text="Sub Item 2"></NavigationListItem>
					<NavigationListItem text="Sub Item 3"></NavigationListItem>
					<NavigationListItem text="Sub Item 4"></NavigationListItem>
				</items>
			</NavigationListItem>
			<NavigationListItem text="Item 2" icon="sap-icon://building">
				<items>
					<NavigationListItem text="Sub Item 1"></NavigationListItem>
					<NavigationListItem text="Sub Item 2"></NavigationListItem>
					<NavigationListItem text="Sub Item 3"></NavigationListItem>
					<NavigationListItem text="Sub Item 4"></NavigationListItem>
				</items>
			</NavigationListItem>
		</items>
	</NavigationList>
</mvc:View>

Thank you

Attila

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

3 Answers

Best Answer
Sai Vellanki Nov 06, 2016 at 07:49 AM
0

Hi Attila,

May be this sample from Petr Plenkov will help? NavigationList

Regards,

Sai.

Share
10 |10000 characters needed characters left characters exceeded
Attila Berencsi Nov 06, 2016 at 03:36 PM
0

Hi Sai,

using a JSON model it works fine adding one more level in the hierarchy. I'nt debugged, why it is statically not working in my example,but anyway I need to use a JSON model, so that example solved my problem.

Thank you very much!
Attila

Share
10 |10000 characters needed characters left characters exceeded
Musa Arda Oct 02, 2017 at 07:54 AM
0

Hello Attila,

Sorry for being a bit late :(

I have extended NavigationList control to allow multi levels. I put the the solution in Github. Hope it helps you in your projects.

https://blogs.sap.com/2017/10/02/extend-navigationlist-to-allow-multi-levels-in-sapui5/

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

Thank you,

your solution looks great :). I am over this problem already.

Best regards

0