Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

Hi,

Below is the JS coding for Menu List in JS

var oMenu = new sap.ui.unified.MenuItem({

  text:"Menu1",

  icon:"sap-icon://accept"

  })

  var oSubMenuList = new sap.ui.unified.MenuItem({

  text:"SubMenu1",

  icon:"sap-icon://edit"

  })

  var oSubMenu = new sap.ui.unified.Menu({

  items:[

        oSubMenuList

        ]

  })

  var oMenu1 = new sap.ui.unified.MenuItem({

  text:"Menu 2",

  icon:"sap-icon://accept",

  submenu:[oSubMenu]

  })

  var oMenuSet = new sap.ui.unified.Menu({

  items:[

        oMenu, oMenu1

        ]

  })

  var oButton = new sap.m.Button({

  text:"Select",

  press:function(oEvent)

  {

  var oEventTrigger = oEvent.getSource();

                this._menu = oMenuSet;

                var oDock = sap.ui.core.Popup.Dock;

                this._menu.open(false, oEventTrigger, oDock.BeginTop, oDock.BeginBottom, oEventTrigger);

  }

  })

Link: http://output.jsbin.com/wanero

Labels in this area