File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes problem with c:forEach and links Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "problem with c:forEach and links" Watch "problem with c:forEach and links" New topic
Author

problem with c:forEach and links

eve agostini
Ranch Hand

Joined: Nov 01, 2005
Posts: 43
i have some product displayed with the <c:forEach> tag (of jstl..i didn't find an equivalent in jsf). I would like to display a link near each one, the link is a h:commandLink which is linked with a method in the backing bean. What i can't understand is how to know (in the method) which link has been clicked.

here is the code:

[ January 12, 2006: Message edited by: eve agostini ]
Bagwan Mehrat
Ranch Hand

Joined: Jan 26, 2002
Posts: 119
Originally posted by eve agostini:




If I remember correctly, in JSF you can't put JSF components like commandlink inside loops like JSTL forEach. It's an annoying limitation but JSF provides dataTable which can be used to get around that problem somewhat.
eve agostini
Ranch Hand

Joined: Nov 01, 2005
Posts: 43
thanks i solved with datatable
 
Don't get me started about those stupid light bulbs.
 
subject: problem with c:forEach and links
 
Similar Threads
JSTL foreach question (vector in a hashmap)
JSP 2.0 EL and html:options issue
Error while accessing parameter values using JSTL forEach tag
bean and for each
simple JSTL problem