You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jayaraman Dorai <ja...@Wellogic.com> on 2002/05/24 16:41:55 UTC
how do I check the size of the collection
I have a collection which I want to iterate in the jsp page. If the collections size is 0, I want to display a message no elements in the collection. Is there any struts tag for this.
Thanks
Jayaraman
Re: how do I check the size of the collection
Posted by Ted Husted <hu...@apache.org>.
The bean:size tag can do this.
http://jakarta.apache.org/struts/doc-1.0.2/struts-bean.html#size
You can then apply logic:equals to the result.
Though, I usually wrap collections in a helper object that can do things
like this for you.
Jayaraman Dorai wrote:
>
> I have a collection which I want to iterate in the jsp page. If the collections size is 0, I want to display a message no elements in the collection. Is there any struts tag for this.
>
>
> Thanks
> Jayaraman
-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>