Hello, I’ve been using JSCookMenu to dynamically generate
menus in my JSP pages. Here is what the JSP looks like, it is pretty simple: <t:jscookMenu layout="hbr" theme="ThemeOffice"> <t:navigationMenuItems value="#{menuBean.topList}"/> </t:jscookMenu> My bean
getTopList method returns NavigationMenuItem[] to dynamically create the menu.
Here is the Java code that creates the array of NavigationMenuItem for (int i=0;i<locales.size();i++) { localeListCustomize[i] = new NavigationMenuItem(“HELLO”,
null,null,true); /*ATTACH ACTION LISTENER TO NAVIGATIONMENUITEM*/ localeListCustomize[i].setActionListener("#{menuBean.startOperation}"); } However, the action listener never fires in the final page.
I tried attaching the string “#” as an action, that didn’t work
either. Has anybody been able to get this to work? I’ve done a decent bit
of digging through the tomahawk source (HTMLJSCookMenuRenderer,
UINavigationMenuItem, etc), so if this level of detail seems too little, let me
know and I’ll post again with more details about tomahawk source-level
debugging. Thanks, Saumil |
- Dynamic JSCOOKMENU with actionListener Saumil Mehta
- Re: Dynamic JSCOOKMENU with actionListener Thomas Spiegl