Code: Select all
...
model = new DefaultMenuModel();
model.addMenuItem(getMenuItem("Home", "centerPanel,menubar"));
model.addMenuItem(getMenuItem("Overview", "centerPanel,menubar"));
Submenu subMenu = new Submenu();
subMenu.setValueExpression("label", this.genPageValExpression("config"));
MenuItem item = new MenuItem();
item = new MenuItem();
item.setValue("Dynamic Menuitem 2.1");
item.setUrl("#");
subMenu.getChildren().add(item);
model.addSubmenu(subMenu);
model.addMenuItem(getMenuItem("perform", "centerPanel,menubar"));
model.addMenuItem(getMenuItem("admin", "centerPanel,menubar"));
model.addMenuItem(getMenuItem("help", "centerPanel,menubar"));
...
- --Home
--Overview
--Configuration
----Dynamic Menuitem 2.1
--Performance
--Administration
--Help
- --Configuration
----Dynamic Menuitem 2.1
--Home
--Overview
--Performance
--Administration
--Help
viewtopic.php?f=3&t=13041
viewtopic.php?f=3&t=7789
One possible workaround would be to NOT use a dynamically created menubar, but instead dynamically create the submenu items; however when that approach was previously suggested, Catagay said not to do it:
viewtopic.php?f=3&t=7502
Here's a link of a suggested fix to PF to correct this:
viewtopic.php?f=3&t=10162
And finally, here's a ticket that was filed:
http://code.google.com/p/primefaces/iss ... il?id=2022
So, is this being looked at? I'm not sure how to proceed as I'd much rather go the route of a menu model, but if it's not going to be fixed anytime soon, then perhaps I'll have to choose another route.
Thanks for the great framework though. Overall, I've loved my exposure so far.