Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Removing subItems from sap.ui.ux3.NavigationItem

Hi

My top navigation item has three subitems

I tried to remove a sub item from a this top navigation item .

using

topNavigation.removeSubItem(index | id | ref to subitem)

this method, however, works correctly only if I try

remove the first subitem.

Any comment.?

Is it a bug.?

regards

Yuval

Former Member
Former Member replied

Hi

I found that removing subitems

should be done as follows:

var sCurrentSelectedItem = oShell.getSelectedWorkItem(); // returns the name

var mainWorkItem = sap.ui.getCore().byId('myTopItem');

var oCurrentSelectedItem =ap.ui.getCore().byId(sCurrentSelectedItem );

mainWorkItem.removeSubItem(oCurrentSelectedItem );

I hope it helps others

yuval

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question