myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Abhijit Ghosh <abhijit.s.gh...@gmail.com>
Subject Re: xmlmenumodel not displaying sub menus with trinidad/jsf
Date Wed, 07 Oct 2009 11:45:11 GMT
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.rane@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.
>
>

Mime
View raw message