>From the projectController , i have a method: getCollectionProject that
return a List<Project> .
Each project contains a list of Professor .
SO into the last line i would show the amount of professors for the project
.
The var item rappresent a project.
project contains a List<Professor>
i write "#{item.professors.size()}" for get the amount of professors for
the project valutated form each iteration .
Whi into the last outputText :
<h:outputText value="#{item.professors.size()} tot projects"/>
it shows only the words tot projects and not show the value of listSize?
--------------------------------
<h:form>
<h:outputText value="List"/>
<h:dataTable value="#{projectController.collectionProject}"
var="item">
<h:column>
<f:facet name="header">
<h:outputText value="Id"/>
</f:facet>
<h:outputText value="#{item.id}"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="name of project"/>
</f:facet>
<h:outputText value="#{item.name}"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="numbers of professors"/>
</f:facet>
<h:outputText value="#{item.professors.size()} tot
projects"/>
</h:column>
</h:dataTable>
</h:form>
--
View this message in context:
http://myfaces.10567.n7.nabble.com/problem-wit-hvisualize-a-size-of-colletion-into-a-datatable-tp117242.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.