This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes JSF and the fly likes ui:repeat or c:forEach problem Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » JSF
Reply Bookmark "ui:repeat or c:forEach problem" Watch "ui:repeat or c:forEach problem" New topic
Author

ui:repeat or c:forEach problem

dimka pimka
Greenhorn

Joined: Dec 08, 2011
Posts: 1
Hello!
I just started to learn jsf, so I might ask stupid questions or confuse with my explanations, but ... I have the problem with dynamic lists on the page. JSF v.1.2_15
I have dropdown list that have 2 options. Depends on the option it supposed to show the table with 24 or 27 rows. I would like to do some validation and highlight the exact element if the validation failed. As far as I understand, I need to generated the component with unique ID. For this purpose I used c:forEach


But the problem occurs when I am firstly selecting the table with 27 components and after that I am choosing the list with 24 components. I am getting something like:
/WEB-INF/content/customizedFieldsListContents.xhtml @78,79 value="#{customizedFields.width}": Target Unreachable, identifier 'customizedFields' resolved to null
I tried to put
end="#{customizedFieldsList.columnsSize-1}"
but nothing changed.

After that I tried to use ui:repeat but the problem is that in JSF < v2 they do not have varStatus implementation.

Is there any proper way to solve my problem? Or any workaround?
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: ui:repeat or c:forEach problem
 
Similar Threads
Validation errors not displayed
Arrays in JSP form
Iterating tags in Seam (ui:repeat and c:forEach)
Bean String contains opening and closing td tags
EL algorithm help