| 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
|
|
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.
|
 |
 |
|
|
subject: what is equivalent of c:forEach in jsf?
|
|
|