How to get the size of a collection in simple method

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to get the size of a collection in simple method

Hansen
Is there a way to get the size of a collection in simple-method
implementation? Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: How to get the size of a collection in simple method

Adrian Crum
Prior to rev 726260 you'll have to use a counter inside an <iterate>
operation.

After rev 726260 you can use a built-in UEL function
${util:size(collection)}.

-Adrian

Hansen Wang wrote:
> Is there a way to get the size of a collection in simple-method
> implementation? Thanks!
>
Reply | Threaded
Open this post in threaded view
|

Re: How to get the size of a collection in simple method

Jacques Le Roux
Administrator
From: "Adrian Crum" <[hidden email]>
> Prior to rev 726260 you'll have to use a counter inside an <iterate>
> operation.

Prior to rev 726260 you could also have used
<set field="listSize" value="${bsh:list.size();}" type="Long"/>

Jacques


> After rev 726260 you can use a built-in UEL function
> ${util:size(collection)}.
>
> -Adrian
>
> Hansen Wang wrote:
>> Is there a way to get the size of a collection in simple-method
>> implementation? Thanks!
>>
>