Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes JSF and the fly likes ui:repeat and POST 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 and POST" Watch "ui:repeat and POST" New topic
Author

ui:repeat and POST

Rasmus Franke
Greenhorn

Joined: Dec 09, 2010
Posts: 1
Hello.

I'm struggling to use ui:repeat and can't figure out what the problem is. I wish to render several datatables dynamically like this


The display from this is correct. The problem arises when the form is posted: only the two first elements in the first list is updated in the bean, the rest is ignored. The post itself seems to be correct (I've looked at what was posted, and it contains all rows), but "pc.setLevel(Integer level)", which is set by the selectOneMenu is only called twice, when it should be called around a hundred times. Notice that this works perfectly if I remove the ui:repeat and replace the value of the datatable with #{bean.groups.get(0)} (thus only rendering the first table). It also works if I use JSTL c:forEach, but this is not a viable solution since my page relies on viewscope which is not compatible with c:forEach.

Have anyone seen this issue before? ui:repeat never seem to work well for me. Any answer would be greatly appreciated.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ui:repeat and POST
 
Similar Threads
Navigation not working due due SelectOneMenu object
Gather dataTable with selectOneMenu to bean
dynamic JSF forms, ajax, validation, etc
Linking selectItem in loop with list not from backing bean
Facelets custom component does not insert ui:repeat or c:forEach