Hi Abhi, I am using trinidad 1.2.12. I made changes that you suggested, am still getting the same output.
modified metadata file is as below. <?xml version="1.0" encoding="windows-1252" ?> <menu xmlns="http://myfaces.apache.org/trinidad/menu"> <itemNode id="department" label="department" action="__dept_adfMenu_action__" focusViewId="/dept"/> <itemNode id="employees_tree" label="employees" action="__emp_adfMenu_action__" focusViewId="/emp"> <itemNode id="sndTb1" label="innerTb" action="dummy" focusViewId="/emp1"/> <itemNode id="sndTb2" label="innerTb2" action="dummy" focusViewId="/emp2"/> </itemNode> <itemNode id="employees_dnd" label="employees dnd" action="__emp_dnd_adfMenu_action__" focusViewId="/emp_dnd"/> </menu> modified jspx code is as below. <!-- First level tabs --> <tr:navigationPane var="menuInfo" value="#{root_menu}" level="0" hint="tabs" id="navigationPane1"> <f:facet name="nodeStamp"> <tr:commandNavigationItem text="#{menuInfo.label}" action="#{menuInfo.doAction}" id="pt_cni2"/> </f:facet> </tr:navigationPane> <!-- Second level bars --> <tr:navigationPane var="menuInfo" value="#{root_menu}" level="1" hint="bar" id="pt_np3"> <f:facet name="nodeStamp"> <tr:commandNavigationItem text="#{menuInfo.label}" action="#{menuInfo.doAction}" id="pt_cni3"/> </f:facet> </tr:navigationPane> Do I need to code anything at the server side? Thanks, UR Abhijit Ghosh wrote: > > Please let us know what version of trinidad you are using.Your tag > code seems fine.The menu metadata xml has the same focusViewId for the > parent and two of it's children,I don't think that is correct.Also > selected=true is not needed on the commandNavigationItems,though I > doubt it would cause the problem you are describing.Can you make the > above changes and try it out. > > > Thanks, > Abhi > > > > > On Tue, Oct 6, 2009 at 3:00 AM, ADFUR <arved.r...@gmail.com> wrote: >> >> I am trying to display two level menus in my application. I am getting >> top >> level menu at the sub level. >> Am I missing anything? >> >> Here is my (meta data) root_menu.xml file. >> >> <?xml version="1.0" encoding="windows-1252" ?> >> <menu xmlns="http://myfaces.apache.org/trinidad/menu"> >> >> <itemNode id="department" label="department" >> action="__dept_adfMenu_action__" focusViewId="/dept"/> >> <itemNode id="employees_tree" label="employees" >> action="__emp_adfMenu_action__" focusViewId="/emp"> >> <itemNode id="sndTb1" label="innerTb1" action="dummy" >> focusViewId="/emp"/> >> <itemNode id="sndTb2" label="innerTb2" action="dummy" >> focusViewId="/emp"/> >> >> </itemNode> >> >> <itemNode id="employees_dnd" label="employees dnd" >> action="__emp_dnd_adfMenu_action__" focusViewId="/emp_dnd"/> >> >> </menu> >> >> >> >> My faces-config.xml has following bean defined. >> <managed-bean> >> <description> >> Menu Model Managed Bean >> </description> >> <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>createHiddenNodes</property-name> >> <value>true</value> >> </managed-property> >> <managed-property> >> <property-name>source</property-name> >> <value>/WEB-INF/root_menu.xml</value> >> </managed-property> >> </managed-bean> >> >> >> My jsf code is as below. >> >> <tr:navigationPane var="menuInfo" value="#{root_menu}" level="0" >> hint="tabs" id="navigationPane1"> >> <f:facet name="nodeStamp"> >> <tr:commandNavigationItem text="#{menuInfo.label}" >> >> action="#{menuInfo.doAction}" >> icon="#{menuInfo.icon}" >> >> destination="#{menuInfo.destination}" >> >> rendered="#{menuInfo.rendered}" >> selected="true" >> id="pt_cni2"/> >> </f:facet> >> </tr:navigationPane> >> <!-- Second level bars --> >> <tr:navigationPane var="menuInfo" value="#{root_menu}" >> level="1" >> hint="bar" id="pt_np3"> >> <f:facet name="nodeStamp"> >> <tr:commandNavigationItem text="#{menuInfo.label}" >> >> action="#{menuInfo.doAction}" >> icon="#{menuInfo.icon}" >> >> destination="#{menuInfo.destination}" >> >> rendered="#{menuInfo.rendered}" >> selected="true" >> id="pt_cni3"/> >> </f:facet> >> </tr:navigationPane> >> >> >> I am getting tabs as below >> >> department employees employess_dnd >> department | employees | employees_dnd >> >> >> I wanted it in this way >> department employees employess_dnd >> innerTb1 | innerTb2. >> >> Thanks for your help. >> >> >> >> -- >> View this message in context: >> http://www.nabble.com/xmlmenumodel-not-displaying-sub-menus-with-trinidad-jsf-tp25757024p25757024.html >> Sent from the My Faces - Dev mailing list archive at Nabble.com. >> >> > > -- View this message in context: http://www.nabble.com/xmlmenumodel-not-displaying-sub-menus-with-trinidad-jsf-tp25757024p25799077.html Sent from the My Faces - Dev mailing list archive at Nabble.com.