When <ui: repeat> works for X, but <c: forEach> works for Y

I use <c:foreach> in my jsf application to iterate over a list of people. I do not use <ui:repeat> , because each person has their own tab (right). JSF hero "BalusC" has already helped me on this link . Now I tried to save the data (back). This does not work with <c:foreach> , the proportional setter of the Person object is never called. With <ui:repeat> it works. Obviously, I did not understand the difference between the two tags, so I would suggest some enlightenment.

thanks

Marseilles

+6
java jstl jsf
source share
2 answers

<c:forEach> does not create JSF tree nodes on the server. You can see this directly in html, the inputs do not have the usual long and distinct id="j_12:customerTabPanel:j_34:customerName" .

Please read the following:

http://www.ninthavenue.com.au/blog/c:foreach-vs-ui:repeat-in-facelets

+7
source share
Tags

<c:***> are build-time tags, because <ui:***> are render-time tags. To get the difference between the two, I recommend that you read the two links below:

+5
source share

All Articles