7 Replies Latest reply on Sep 29, 2006 5:08 PM by Gavin King

    rowCount

    Fane Babanu Newbie

      I use rowCount to get a collection's size, like this:

      <ui:repeat value="#{departments}" var="department" rendered="#{departments.rowCount > 0}">
       <h:outputText rendered="#{department.employees.rowCount > 0}" value="this department has employees"/>
      </ui:repeat>



      The first rowCount is evaluated correctly; for the second rowCount (the one from employees) I get this:

      SEVERE: Error Rendering View[/departments.xhtml]
      java.lang.NumberFormatException: For input string: "rowCount"
      at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
      at java.lang.Integer.parseInt(Integer.java:447)
      at java.lang.Integer.parseInt(Integer.java:497)
      at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:138)

      If I just simply iterate the employees works ok, but the rowCount doesn't, why? Thanks.