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 what is equivalent of c:forEach in jsf? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "what is equivalent of c:forEach in jsf?" Watch "what is equivalent of c:forEach in jsf?" New topic
Author

what is equivalent of c:forEach in jsf?

raminaa niilian
Ranch Hand

Joined: Jul 14, 2005
Posts: 550
Hi
Thank you for reading my post.
can some one tell me what is equivalent of c:forEach in jsf?
thanks
Gregg Bolinger
Ranch Hand

Joined: Jul 11, 2001
Posts: 15229

There isn't one. Though I believe you can use JSTL on a limited basis with JSF. Not 100% sure. JSF components that might require c:forEach (like created a data table) are done in the component tag itself, ie, JSF's DataTable.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 14456
    
    7

forEach is an iterative construct. Iteration is a logical process. In JSF, the separation between model, view and controller is much more rigorous than in most similar frameworks. Thus, instead of a loop declaration bounding display elements, there are display elements of collections with the looping being handled by the controller.

It can be restrictive, but on the other hand, it's difficult enough to debug logic on plain JSPs, much less the more sophisticated sort of constructs that JSF is intended to support.

The compensation is that your logic is therefore constrained to either be in simple JavaBeans (the backing beans) - which can normally be unit-tested and otherwise debugged without needing to fire up an appserver. OR, the logic is pre-debugged and built into the framework, like the datatable controller.


Customer surveys are for companies who didn't pay proper attention to begin with.
Hung Tang
Ranch Hand

Joined: Feb 14, 2002
Posts: 148
Facelets for JSF comes with limited support for JSTL that includes c:forEach.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: what is equivalent of c:forEach in jsf?
 
Similar Threads
how to bind a table of items in JSP form to a List attribute
Iterate arraylist with c:forEach
problem with c:forEach and links
Scriptlet to JSTL
JSF Datatable equivalent in Struts2