Tank you  .
I use tomee so for use jstl i have to add the jars of jstl to web-inf/lib ?
 Il giorno 20/feb/2014 18.42, "Mike Kienenberger [via MyFaces]" <
ml-node+s10567n117243...@n7.nabble.com> ha scritto:

> Calling arbitrary methods like size() isn't supported in EL 2.1,
> although I think it might be in EL 2.2.
>
> Here's the way to do it that will work in any version of JSF.
>
>             xmlns:jstl="http://java.sun.com/jsp/jstl/functions";
>
> [...]
>                          <h:outputText
> value="#{jstl:length(item.professors)} tot
> projects"/>
>
>
>
> On Thu, Feb 20, 2014 at 11:21 AM, maurojava <[hidden 
> email]<http://user/SendEmail.jtp?type=node&node=117243&i=0>>
> wrote:
>
> > 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.
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://myfaces.10567.n7.nabble.com/problem-wit-hvisualize-a-size-of-colletion-into-a-datatable-tp117242p117243.html
>  To unsubscribe from problem wit hvisualize a size of colletion into a
> datatable, click 
> here<http://myfaces.10567.n7.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=117242&code=bWF1cm8yamF2YTIwMTFAZ21haWwuY29tfDExNzI0MnwtMTExNzE4NzYyNQ==>
> .
> NAML<http://myfaces.10567.n7.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: 
http://myfaces.10567.n7.nabble.com/problem-wit-hvisualize-a-size-of-colletion-into-a-datatable-tp117242p117244.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.

Reply via email to