(Problem Solved) Re: Display the Counts of a Collection that is in a Form

2006-03-09 Thread Caroline Jen
Hi Lionel and Wendy, Thanks a lot for your help and guidance. It is good to start learning Struts tags. --Caroline --- Lionel Port <[EMAIL PROTECTED]> wrote: > type=" > com.mypackage.ActivityForm"/> > > On 3/9/06, Lionel Port <[EMAIL PROTECTED]> > wrote: > > > > As wendy said you need t

Re: Display the Counts of a Collection that is in a Form

2006-03-08 Thread Lionel Port
On 3/9/06, Lionel Port <[EMAIL PROTECTED]> wrote: > > As wendy said you need to follow bean:size with something like: > > > > As for the scriptlet version. Sorry the ActivityForm variable is not > defined in the page scope. If you want to access it using scriptlet you > would need to do bring it

Re: Display the Counts of a Collection that is in a Form

2006-03-08 Thread Lionel Port
As wendy said you need to follow bean:size with something like: As for the scriptlet version. Sorry the ActivityForm variable is not defined in the page scope. If you want to access it using scriptlet you would need to do bring it out of the request or session scope first, something like: <%=a

Re: Display the Counts of a Collection that is in a Form

2006-03-08 Thread Wendy Smoak
On 3/8/06, Caroline Jen <[EMAIL PROTECTED]> wrote: > property="businessCollection"/> > > does not display anything (it looks like the > does not exist.) http://struts.apache.org/struts-taglib/tagreference-struts-bean.html#bean:size The 'id' attribute is defined as "The name of a page scope JSP

Re: Display the Counts of a Collection that is in a Form

2006-03-08 Thread Caroline Jen
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, does not display anything (it looks li

Re: Display the Counts of a Collection that is in a Form

2006-03-08 Thread Wendy Smoak
On 3/8/06, Caroline Jen <[EMAIL PROTECTED]> wrote: > When I tested whether businessCollection is empty or > not, I used: > > property="businessCollection"> > blah, blah > > > And it was successful. > > Then, how do I display the counts of the Collection in > this situation? There is a tag:

Re: Display the Counts of a Collection that is in a Form

2006-03-08 Thread Lionel Port
Two options Using your scriptlet example <%= ActivityForm.getBusinessCollection().size() %> Or there is a struts tag to retrieve size On 3/9/06, Caroline Jen <[EMAIL PROTECTED]> wrote: > > I am trying to display 'counts' in a Collection. And > I use JSP scriptlet to do it: > > <%=businessC