Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

logic:iterate functionality with jsf

 
Megan Troy
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

It is possible to use logic:iterate tag from Struts in JSF?

Thanks,
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Megan Troy:
Hi,

It is possible to use logic:iterate tag from Struts in JSF?

Thanks,


No. Tell me what you are trying to do, and I will tell you the JSF way to do it.
 
Megan Troy
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

What I want to do is iterate over a list of menu items and display them.
For e.g., something like:

<logic:iterate id="menuItem" name="#{customer.menu}"> <h:commandLink styleClass="commandLink" id="menuLink"> <h utputText id="menuLinkText" value="#{menuItem}">
</h utputText>
</h:commandLink> <BR> </logic:iterate>

Thanks,
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which implementation of JSF are you using? MyFaces has a component that will do what you want. In fact, most 3rd party implementations do.
 
Wim Drapier
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I trying to do the same here, by using a commandNavigation component of the MyFaces implementation but I'm not sure what is the best way to iterate and add child Navigation items.

For now I'm using a dataList to do the iterate, but I don't think this is correct.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic