You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Cory D. Wiles" <kw...@gmail.com> on 2007/10/01 19:04:23 UTC

Setting/Accessing List Size on JSP

How do I set/display the size of my list in the result of my jsp?  I am able
to check for the size in my iterator tag, but I would like to be able to
display the size as a property.


I have tried the following and it didn't work.

<s:set name="myListSize" value="%{#attr['myList'].size}/>
<s:property value="%{#myListSize}"/>

Thanks,
Cory

Re: Setting/Accessing List Size on JSP

Posted by "Cory D. Wiles" <kw...@gmail.com>.
I was able to get it like:

<s:set name="myListSize" value="%{myList.size}"/>

On 10/1/07, Gabriel Belingueres <be...@gmail.com> wrote:
>
> try:
> <s:set name="myListSize" value="myList.size()"/>
>
> 2007/10/1, Cory D. Wiles <kw...@gmail.com>:
> > How do I set/display the size of my list in the result of my jsp?  I am
> able
> > to check for the size in my iterator tag, but I would like to be able to
> > display the size as a property.
> >
> >
> > I have tried the following and it didn't work.
> >
> > <s:set name="myListSize" value="%{#attr['myList'].size}/>
> > <s:property value="%{#myListSize}"/>
> >
> > Thanks,
> > Cory
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Setting/Accessing List Size on JSP

Posted by Gabriel Belingueres <be...@gmail.com>.
try:
<s:set name="myListSize" value="myList.size()"/>

2007/10/1, Cory D. Wiles <kw...@gmail.com>:
> How do I set/display the size of my list in the result of my jsp?  I am able
> to check for the size in my iterator tag, but I would like to be able to
> display the size as a property.
>
>
> I have tried the following and it didn't work.
>
> <s:set name="myListSize" value="%{#attr['myList'].size}/>
> <s:property value="%{#myListSize}"/>
>
> Thanks,
> Cory
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org