0
点赞
收藏
分享

微信扫一扫

Demo:Menu Bar_SAP刘梦_新浪博客


Demo:Menu Bar_SAP刘梦_新浪博客_javascript

效果图

Demo:Menu Bar_SAP刘梦_新浪博客_数据挖掘_02

 

代码

</<span style="color:#3f7f7f">script>

<<span style="color:#3f7f7f">script>
//Function to handle the select event of the items
var handleSelect = function(oEvent){
"item").getId());
};
// Create a menu bar instance
var oMenuBar = new sap.ui.commons.MenuBar("menuBar");

// Create two main menu items for the menubar - for which you define subitems lateron
var oMbProjct = new sap.ui.commons.MenuItem("menuBar_Project",{text:"Project"});
oMenuBar.addItem(oMbProjct);
var oMbRole = new sap.ui.commons.MenuItem("menuBar_Roles",{text:"Roles"});
oMenuBar.addItem(oMbRole);

oMbRole.attachSelect(handleSelect);

// Create a menu instance for the "Project" menu
var oMsubProj = new sap.ui.commons.Menu("menu1");
oMbProjct.setSubmenu(oMsubProj);

// Create and add five sub-items for the "Project" menu
var oMiShow = new sap.ui.commons.MenuItem("item1_Show",{text:"Show"});
oMsubProj.addItem(oMiShow);
var oMiPropty = new sap.ui.commons.MenuItem("item_Property",{text:"Properties"});
oMsubProj.addItem(oMiPropty);
oMiPropty.attachSelect(handleSelect);

//Create a sub menu for item "Show"
var oMsubShow = new sap.ui.commons.Menu("menu2");
oMiShow.setSubmenu(oMsubShow);
var oMiTask = new sap.ui.commons.MenuItem("item_Task",{text:"Tasks"});
oMsubShow.addItem(oMiTask);
oMiTask.attachSelect(handleSelect);
var oMiResp = new sap.ui.commons.MenuItem("item_Pesp",{text:"Responsibilities"});
oMsubShow.addItem(oMiResp);
oMiResp.attachSelect(handleSelect);


// Attach the menubar to the page
"content");

</<span style="color:#3f7f7f">script>


举报

相关推荐

0 条评论