struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Caroline Jen <jiapei_...@yahoo.com>
Subject Re: Display the Counts of a Collection that is in a Form
Date Wed, 08 Mar 2006 23:30:58 GMT
Thanks for your kind help.

<%=ActivityForm.getBusinessCollection().size() %>
gives JSP processing error.  Somehow, ActivityForm
cannot be recognized. 

The struts tag for retrieving the size does not give
runtime error, the web page is displayed.  However,

<bean:size id="size" name="ActivityForm" 
property="businessCollection"/>

does not display anything (it looks like the
<bean:size ...> does not exist.)  I know that the
'businessCollection' is not empty because I have used
<logic:notEmpty ...> tag to test it before I try to
write out the counts in that collection.

--Caroline

--- Lionel Port <lionel.port@gmail.com> wrote:

> Two options
> 
> Using your scriptlet example
> 
> <%= ActivityForm.getBusinessCollection().size() %>
> 
> Or there is a struts tag to retrieve size
> 
> <bean:size id="size" name="ActivityForm"
> property="businessCollection"/>
> 
> 
> 
> On 3/9/06, Caroline Jen <jiapei_jen@yahoo.com>
> wrote:
> >
> > I am trying to display 'counts' in a Collection. 
> And
> > I use JSP scriptlet to do it:
> >
> > <%=businessCollection.size()%>
> >
> > The compiler cannot recognize the Collection
> > 'businessCollection'.  It is because
> > businessCollection is defined in the
> > ActivityForm.java.
> >
> > When I tested whether businessCollection is empty
> or
> > not, I used:
> >
> > <logic:notEmpty name="ActivityForm"
> > property="businessCollection">
> >     blah, blah
> > </logic:notEmpty>
> >
> > And it was successful.
> >
> > Then, how do I display the counts of the
> Collection in
> > this situation?
> >
> > Thanks in advance.
> >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> > For additional commands, e-mail:
> user-help@struts.apache.org
> >
> >
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Mime
View raw message