List Info

Thread: XML Menu Model is breaking if render attribute is used




XML Menu Model is breaking if render attribute is used
country flaguser name
Germany
2007-09-21 16:15:36
This is my menu definition

	<?xml version="1.0"
encoding="iso-8859-1"?>
	<menu xmlns="htt
p://myfaces.apache.org/trinidad/menu">
		<itemNode id="basicData" label="Basic
Data" action="departments">
			<itemNode id="departments"
label="Departments" action="departments"
focusViewId="/departments.xhtml"/>
			<itemNode id="groups"
label="Groups" action="groups"
focusViewId="/groups.xhtml"         
rendered="false"        />
			<itemNode id="parameters"
label="Parameters" action="parameters"
focusViewId="/parameters.xhtml"/>
		</itemNode>
		<itemNode id="analysis"
label="Analysis" action="todo"/>
	</menu>

I use this to show the second level (e.g. Departments,
Groups, Parameters) in a list:

	<tr:navigationPane var="node"
value="#" level="1"
hint="list">
		<f:facet name="nodeStamp">
			<tr:commandNavigationItem
text="#{node.label}"
action="#{node.doAction}"/>
		</f:facet>
	</tr:navigationPane>

As long as I do not add "rendered" attribute to
any itemNode it's working fine.
If I add a rendered attribute like in the example above the
list shows the top level instead ("Basic Data",
"Analysis").

Oh my, showing menu items depending on the user's role was
the last thing I wanted to implement before going to bed.

Any idea? Known bug? Am I doing something wrong?

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )