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);
}
})
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
6 | |
5 | |
5 | |
4 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 |