1 Reply Latest reply on Sep 3, 2010 1:51 PM by Nick Belaevski

    jsf 1.1 and jsf 2.0

    nimo stephan Master

      In jsf 1.1,

       

      I can use something like:

       

      <h:outputText value="size: #{_e.listHobby.size}" />

       

      where the (collections-build-in-method) "size" returns the size of the java.util.list "listHobby".

       

      In JSF 1.1, this works!

       

       

      In JSF 2.0, this does no more work!

       

      It returns this error:

       

       

      java.lang.NumberFormatException: For input string: "size"
           java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
           java.lang.Integer.parseInt(Integer.java:449)
           java.lang.Integer.parseInt(Integer.java:499)
           javax.el.ListELResolver.toInteger(ListELResolver.java:407)
           javax.el.ListELResolver.getValue(ListELResolver.java:199)
           javax.el.CompositeELResolver.getValue(CompositeELResolver.java:175)
           com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
           org.apache.el.parser.AstValue.getValue(AstValue.java:134)

       

       

      Why is that so?