You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by mauro2java2011 <ma...@gmail.com> on 2014/02/20 10:34:46 UTC
because int othe table not compute the size of List ?
Form 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 professor for the project
.
The var item rapresent a project.
project contains a List<Professor>
if 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://openejb.979440.n4.nabble.com/because-int-othe-table-not-compute-the-size-of-List-tp4667920.html
Sent from the OpenEJB User mailing list archive at Nabble.com.