Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Steven Wood   on Sep 21 In Java Category.

  
Question Answered By: Milind Mishra   on Sep 21

I don't know why you've chosen JSF for web development, but one of the
most issue that JSF persists on, is to simplify the views and to move
the complexity to controllers and models.
I don't believe JSF needs such a iterator you are searching for,
that's why you can't find it.

I do know exactly what are going to do, but i guess you are displaying
a string collection in a column of datatable.

There are three solutions
1. Converts the array to a string in the model
2. Use the following code


<h:dataTable var="b"value="#{PollJSFManagedBean.retrieveCatQues}">

<h:column>
<h:outputText value="#{b.title}" />
<h:dataTable var="cat" value="#{b.tbQuestioncategory}">

<h:column>
<h:outputText value="#{cat}"
</h:column>
</h:dataTable>
</h:column>
</h:dataTable>

3. Or make your own JSF compatible tag library to display a list

Share: 

 

This Question has 3 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Problem with JSF creating a loop Or get search suggestion and latest updates.


Tagged: