Hi Gurus, I'm trying to use the new XMLMenuModel from Apache MyFaces Trinidad. I got some code from here: <http://myfaces.apache.org/trinidad/devguide/xmlMenuModel.html> http://myfaces.apache.org/trinidad/devguide/xmlMenuModel.html I've not been able to display my menu hierarchy ;-(
My understanding is that: 1 / I have to declare a menu hierarchy into an XML file. Here's the content of my test menu metadata. <?xml version="1.0" encoding="windows-1252"?> <menu xmlns="http://myfaces.apache.org/trinidad/menu" resourceBundle="menus" var="rmenus"> <itemNode id="root" label="Root" action="root" focusViewId=""/> <itemNode id="g0" label="#{rmenus.airline}" action="global0" focusViewId=""> <itemNode id="g00" action="global00" focusViewId=""/> <itemNode id="g01" action="global01" focusViewId=""/> </itemNode> <itemNode id="g1" label="Global 1" action="global1" focusViewId=""/> <itemNode id="g2" label="Global 2" action="global2" focusViewId=""/> </menu> 2 / Declare my metadata file into faces-config.xml <managed-bean> <managed-bean-name>root_menu</managed-bean-name> <managed-bean-class>org.apache.myfaces.trinidad.model.XMLMenuModel</managed-bean-class> <managed-bean-scope>request</managed-bean-scope> <managed-property> <property-name>source</property-name> <value>/WEB-INF/menu-metadata.xml</value> </managed-property> </managed-bean> 3 / reference it into my pages Then use it in navigation panes into my JSPX pages. <trh:body> <tr:form> <tr:panelPage> <f:facet name="navigation1"> <tr:navigationPane var="menutab" value="#{root_menu}" hint="tabs" level="1"> <f:facet name="nodeStamp"> <tr:commandNavigationItem text="#{menutab.label}" action="#{menutab.doAction}"/> </f:facet> </tr:navigationPane> </f:facet> <f:facet name="navigation2"> <tr:navigationPane var="menutab" value="#{root_menu}" hint="bar" level="2"> <f:facet name="nodeStamp"> <tr:commandNavigationItem text="#{menutab.label}" action="#{menutab.doAction}"/> </f:facet> </tr:navigationPane> </f:facet> ….. I cannot display a level 2 menu in my menubar. In fact, the only level accessible into my pages is the top one ;-( What did I miss? Yves Toubhans | Consultant (+33) (0) 1 57 60 28 02 (+33) (0) 6 08 30 48 69 Oracle | Public Sector 15 Boulevard Charles de Gaulle 92715 Colombes France
<<image001.gif>>

