Another alternative is a function with facelets

Java:
public static int sizeOf(Collection coll)
{
 return coll.size();
}

taglib.xml:
<function>
 <function-name>sizeOf</function-name>
 <function-class>yourpackage.YourClass</function-class>
 <function-signature>int sizeOf(java.util.Collection)</function-signature>
</function>

XHTML:

<t:outputText value="#{my:sizeOf(bean.list)}" />

On 6/2/06, Bruno Aranda <[EMAIL PROTECTED]> wrote:
AFAIK, no. You have to provide a getter in your backing bean to
delegate that functionality, like this:

public getListSize()
{
   return yourList.size();
}

Or, if you are using an extended tomahawk datatable, you can use the
attribute rowCountVar (see the docs for more info [1]), that allows to
show the total number of rows in a table.

Hope that helps,

Bruno

[1] http://myfaces.apache.org/tomahawk/extDataTable.html

On 6/2/06, Furer Alexander <[EMAIL PROTECTED]> wrote:
>
>
> Hi
> Is to possible to get List size in JSF EL ?
> Thanks

Reply via email to