I tried both #{myCollection.size} and #{myCollection.size()}, neither of which
worked. I'll look at the ValueBinding resolver suggestion as well, thanks.
-----Original Message-----
From: Bill Dudney [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 14, 2005 6:03 PM
To: MyFaces Development
Subject: Re: Length of a Collection in EL?
Hi Neal,
You can use #{myCollection.size()} to get the length of a java.util.Collection.
Is that what you are looking for?
-bd-
On Jul 14, 2005, at 3:30 PM, Neal Haggard wrote:
>
> I need to be able to get the length of a collection in JSF EL. Is
> there a way to do it? Looking at JSP 2.0 EL (which JSF uses) it
> allows for functions, specifically the pre-defined length() function.
> However, when I try using that with MyFaces I get an exception saying
> functions are not allowed. Is there a reason this was done? It seems
> like an awful handy feature of EL to throw away. Anyone hacked
> MyFaces to allow functions to be used?
>