aspose file tools*
The moose likes JSF and the fly likes ui:repeat or c:forEach problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSF
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://aspose.com/file-tools
 
subject: ui:repeat or c:forEach problem
 
Similar Threads
EL algorithm help
Validation errors not displayed
Iterating tags in Seam (ui:repeat and c:forEach)
Arrays in JSP form
Bean String contains opening and closing td tags