myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maurojava <mauro2java2...@gmail.com>
Subject problem wit hvisualize a size of colletion into a datatable
Date Thu, 20 Feb 2014 16:21:20 GMT
>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.

Mime
View raw message