Skip to Content

Navigation List

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Nov 06, 2016 at 07:49 AM

    Hi Attila,

    May be this sample from Petr Plenkov will help? NavigationList

    Regards,

    Sai.

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 06, 2016 at 03:36 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 02, 2017 at 07:54 AM

    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/

    Add comment
    10|10000 characters needed characters exceeded