aspose file tools*
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
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).
 
wood burning stoves
 
subject: navigationMenuItem inside a dataList