You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Harring Figueiredo <ha...@gmail.com> on 2007/04/12 04:02:08 UTC
[S2] Testing for size of Collection inside a s:if
Folks,
How do I call the isEmpty() method (or any other non-bean conforming method)
inside a <s:if> tag?
I can test for null as:
<s:if test="{collection == null } ">
But, I also need to test for empty collection.
Thank you in advance.
hf
Re: [S2] Testing for size of Collection inside a s:if
Posted by Dave Newton <ne...@yahoo.com>.
--- Harring Figueiredo <ha...@gmail.com> wrote:
> I thought that this would call getIsEmpty(), from
> other examples I have seen.
It's a fake "property" because Java collections (and
arrays... and... etc. :) are broken :/
d.
____________________________________________________________________________________
Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.
http://autos.yahoo.com/new_cars.html
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [S2] Testing for size of Collection inside a s:if
Posted by Harring Figueiredo <ha...@gmail.com>.
Dave,
Thank for the reply.
I thought that this would call getIsEmpty(), from other examples I have
seen.
Let me try it again.
hf
On 4/11/07, Dave Newton <ne...@yahoo.com> wrote:
>
> --- Harring Figueiredo <ha...@gmail.com> wrote:
> > <s:if test="{collection == null } ">
>
> <s:if test="%{collection.isEmpty}">
>
> d.
>
>
>
>
>
> ____________________________________________________________________________________
> Sucker-punch spam with award-winning protection.
> Try the free Yahoo! Mail Beta.
> http://advision.webevents.yahoo.com/mailbeta/features_spam.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
Sincerely,
Harring Figueiredo
Sr. Software Engineer
Email: harringf@gmail.com
Telephone: 941-256-0600
"We never become truly spiritual by sitting down and wishing to become so.
You must undertake something so great that you cannot accomplish it
unaided."
Re: [S2] Testing for size of Collection inside a s:if
Posted by Dave Newton <ne...@yahoo.com>.
--- Harring Figueiredo <ha...@gmail.com> wrote:
> <s:if test="{collection == null } ">
<s:if test="%{collection.isEmpty}">
d.
____________________________________________________________________________________
Sucker-punch spam with award-winning protection.
Try the free Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/features_spam.html
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org