File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "problem with c:forEach and links" Watch "problem with c:forEach and links" New topic

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
I agree. Here's the link:
subject: problem with c:forEach and links
It's not a secret anymore!