Skip to Content
avatar image
Former Member

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Oct 21, 2015 at 08:15 AM

    I think it is a bug. You can use destroySubItems() as workaround :-(

    JS Bin - Collaborative JavaScript Debugging

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Dennis Seah

      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