return attributes.toString();
}
};
mb.setOutputMarkupId(true);
YuiMenuBarItem firstMenu = mb.addMenu("First Menu");
// 1st Menu
AbstractYuiMenuItem mi = null;
YuiMenu subMenu = null;
subMenu = firstMenu.newSubMenu("mb_firstMenu");
subMenu.addMenuItem(new TestAction("M1 : L1"));
subMenu.addMenuItem(new TestAction("M1 : L2"));
mi = subMenu.addMenuItem(new TestAction("M1 : L3"));
subMenu.addMenuItem(new TestAction("M1 : L4"));
subMenu.addMenuItem(new TestAction("M1 : L5"));
subMenu = mi.newSubMenu("subMenu1");
subMenu.addMenuItem(new TestAction("Label 1"));
subMenu.addMenuItem(new TestAction("Label 2"));
// 2nd Menu
YuiMenuBarItem secondMenu = mb.addMenu(new TestAction("Second Menu"));
final YuiMenu subMenu2 = secondMenu.newSubMenu("mb_secondMenu");
subMenu2.setOutputMarkupId(true);
subMenu2.addMenuItem(new TestAction("M2 : L1"));
final YuiMenuItem m2L2 = new YuiMenuItem(new TestAction("M2 : L2"));
subMenu2.addMenuItem(m2L2);