This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSF and the fly likes ui:repeat, c:foreach in JSF 2.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "ui:repeat, c:foreach in JSF 2.0" Watch "ui:repeat, c:foreach in JSF 2.0" New topic
Author

ui:repeat, c:foreach in JSF 2.0

nimo frey
Ranch Hand

Joined: Jun 28, 2008
Posts: 580
I know the difference of ui:repeat and c:forEach (http://www.ilikespam.com/blog/c:foreach-vs-ui:repeat-in-facelets).

However, I do not know, why ui:repeat does not view the datas of my list whereas c:forEach does:




when clicking the button, I update my "panel" via ajax. However, only "output_text" shows me, the list. Ui:repeat shows nothing after ajax update (I guess it does not iterate through the list). C:ForEach iterate through the list and shows me the listdata, but only when clicking the button twice! What is wrong?

I use JSF 2.0
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15960
    
  19

From what I can see, you're better off forgetting the algorthmic stuff altogether. Just use a dataTable. It's a lot cleaner. JSF views aren't the place to put code, even when it's tag code.

Personally, I like RichFaces, where I can use the a4j:commandButton to do the request and set its reRender attribute to indicate what parts of the display to update. Nice and simple.


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

Joined: Jun 28, 2008
Posts: 580
Indeed, I can use h:datatable, but I want to know, why ui:repeat is not working. With JSF 1.2 it is working, with JSF 2.0 it is not working! Is there a bug?
Tuukka Mustonen
Greenhorn

Joined: Oct 06, 2010
Posts: 1
Hi, I just run into quite a similar problem. Did you find a solution for this?
 
wood burning stoves
 
subject: ui:repeat, c:foreach in JSF 2.0
 
Similar Threads
f:ajax and client-side components
Command Link Action Does'nt work
Problem with Spring Web Flow
Composite Components with ViewScoped bean
values in one form dissapearing when editing another