-Original Message-
From: David Graham [mailto:dgraham1980;hotmail.com]
Sent: Wednesday, October 30, 2002 8:14 AM
Sorry for the OT post but the java forum was unresponsive.
How do you get
the size of a collection class in the JSTL EL?
You can do it with jsp expressions like:
Thanks David. Do you really think I'm not using struts :-) ?
Dave
From: Karr, David [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Subject: RE: [OT] Getting a Collection's size in JSTL
Date: Wed, 30 Oct 2002 11:18:48
Well, for a second I thought maybe you were possessed or something :) .
-Original Message-
From: David Graham [mailto:dgraham1980;hotmail.com]
Sent: Wednesday, October 30, 2002 8:24 AM
To: [EMAIL PROTECTED]
Subject: RE: [OT] Getting a Collection's size in JSTL
Thanks David. Do
On Wed, 30 Oct 2002, David Graham wrote:
Date: Wed, 30 Oct 2002 09:13:49 -0700
From: David Graham [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [OT] Getting a Collection's size in JSTL
Sorry for the OT post but the java forum was
-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: [OT] Getting a Collection's size in JSTL
Date: Wed, 30 Oct 2002 09:40:10 -0800 (PST)
On Wed, 30 Oct 2002, David Graham wrote:
Date: Wed, 30 Oct 2002 09:13:49 -0700
From: David Graham
PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: [OT] Getting a Collection's size in JSTL
Date: Wed, 30 Oct 2002 11:13:53 -0700
Thanks Craig. I realize that it doesn't work because of the naming issue
but I was wondering if there was an easy way
It should also be relatively painless to use a composition/delegation approach.
public class CollectionBean {
private Collection c;
public int getSize() {
return this.c.size();
}
public void setCollection(Collection c) {
this.c = c;
}
public Collection getCollection() {
PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: [OT] Getting a Collection's size in JSTL
Date: Wed, 30 Oct 2002 15:30:13 -0500
It should also be relatively painless to use a composition/delegation
approach.
public class CollectionBean {
private Collection c;
public int
3:44 PM
To: [EMAIL PROTECTED]
Subject: Re: [OT] Getting a Collection's size in JSTL
That's pretty much what I did except you can only set the internal
collection in the constructor. It's an elegant solution that should
probably (in some form) be included in a larger library.
David
From
What is a DynamicProxy? We may be talking about the same pattern with
different names.
David
From: Kevin A. Smith [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: RE: [OT] Getting a Collection's size in JSTL
]
Sent: Wednesday, October 30, 2002 4:35 PM
To: [EMAIL PROTECTED]
Subject: RE: [OT] Getting a Collection's size in JSTL
What is a DynamicProxy? We may be talking about the same pattern with
different names.
David
From: Kevin A. Smith [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List
Cool, I'll look into it.
Thanks,
David
From: Kevin A. Smith [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: RE: [OT] Getting a Collection's size in JSTL
Date: Wed, 30 Oct 2002 16:39:27 -0500
I'm referring
]
Subject: RE: [OT] Getting a Collection's size in JSTL
What is a DynamicProxy? We may be talking about the same pattern with
different names.
David
From: Kevin A. Smith [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List
To: Struts Users Mailing List
Subject: RE: [OT] Getting a Collection's size in JSTL
But applying a proxy to this scenario seems like overkill. Wouldn't you have to
do something like the following:
public interface CollectionInfo {
public int getSize();
}
public class CollectionHandler implements
14 matches
Mail list logo