• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ui:repeat or c:forEach problem

 
dimka pimka
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic