This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSF and the fly likes navigationMenuItem inside a dataList Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "navigationMenuItem inside a dataList" Watch "navigationMenuItem inside a dataList" New topic
Author

navigationMenuItem inside a dataList

Shasi Mitra
Ranch Hand

Joined: Nov 27, 2008
Posts: 101

Hi - My page has a dataList as given below

<t:dataList var="item" value="#{xmlModel.componentModel}" rowIndexVar="count">
<t:navigationMenuItem value="#{item}"></t:navigationMenuItem>
<tutputText value=" » " escape="false" rendered="#{!((count + 1)==xmlModel.listSize)}"></tutputText>
</t:dataList>
getComponentModel returns a list of NavigationMenuItems. So each item is nothing but a NavigationMenuItem. When the page is rendered, except the text in outputText nothing is rendered. I want to know how to get the navigationMenuItem displayed. I can see the dataList is iterating properly based on the size. Please help..
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Either use t:navigationMenuItems instead of t:dataList, or access the NavigationMenuItem properties the usual javabean way. I.e. #{item.label} #{item.value} and so on (not sure if this approach works inside a t:dataList though, it's just pure theory, I have never used it).
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: navigationMenuItem inside a dataList
 
Similar Threads
Generating Horizontal Menu in JSF using h:dataTable
Dynamically generate jsf components
[MyFaces] how to do this....?
dynamic JSF navigation
t:datalist - data in 3 columns then break on so on