You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Hirschmann, Bernhard" <Be...@t-systems.com> on 2002/11/27 18:04:30 UTC

checking a empty list

Hi group!

I wonder if it's possible with a logic tag, to check if a List in a form is
empty.

This doesn't work, it just checks if the attachmentsList is null:
<logic:present name="document" property="attachmentsList">

Regards, 
Bernhard

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: checking a empty list

Posted by Patrice <pp...@nerim.net>.
Try this:

<bean:size id="size" name="document" property="attachmentsList"/>
<logic:equal name="size" value="0">
...
</logic:equal>

Best regads
Patrice

----- Original Message -----
From: "Hirschmann, Bernhard" <Be...@t-systems.com>
To: <st...@jakarta.apache.org>
Sent: Wednesday, November 27, 2002 6:04 PM
Subject: checking a empty list


>
> Hi group!
>
> I wonder if it's possible with a logic tag, to check if a List in a form
is
> empty.
>
> This doesn't work, it just checks if the attachmentsList is null:
> <logic:present name="document" property="attachmentsList">
>
> Regards,
> Bernhard
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>