You may have to get the tag separately from the online library or the
nightly build.
Cheers!
Mark
Try before you cry:
http://www.mail-archive.com/struts-user%40jakarta.apache.org/
-Original Message-
From: Henry Lu [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 8:04 AM
Th
Thanks all. My code works now. But I have one more question:
when i use I didn't see any code that suggested primitives were being passed.
> Nevertheless, there's no question primitive arrays are faster than Vectors
> (about 40 times faster!) and ArrayLists (about 4 times faster).
>
> Cheers!
>
I didn't see any code that suggested primitives were being passed.
Nevertheless, there's no question primitive arrays are faster than Vectors
(about 40 times faster!) and ArrayLists (about 4 times faster).
Cheers!
Mark
-Original Message-
From: Arron Bates [mailto:[EMAIL PROTECTED]]
Sent
t;private List vector;
>
>And unless you need synchronization, a ListArray is about 25 percent faster
>than a Vector.
>
>:-)
>
>Mark
>
>-Original Message-
>From: Moritz Petersen [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, February 12, 2002 3:33 PM
>To: Struts U
: Struts Users Mailing List
Subject: RE: iterate tag usage
Hehe, nope. ;-)
Look: the return value of the getXYZ() method must be a
java.util.Collection, Iterator etc. but _not_ an array. By the way: your
code would not even compile.
private Vector listVector;
// A Vector implements the Collection
Why avoid arrays? They are more versatile and faster than collections.
Mark
-Original Message-
From: Moritz Petersen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 12, 2002 3:14 PM
To: Struts Users Mailing List
Subject: RE: iterate tag usage
Henry,
an array does not extend
Hehe, nope. ;-)
Look: the return value of the getXYZ() method must be a
java.util.Collection, Iterator etc. but _not_ an array. By the way: your
code would not even compile.
private Vector listVector;
// A Vector implements the Collection interface. That is good.
public Vector getListVector()
/
Thanks for your info! Do you think the following will work?
private Vector listVector;
public VectorString[] getListVector()
{
return listVector;
}
Thank you again!
---
Henry Lu
MCIT
Henry,
an array does not extend java.util.Collection. The iterate tag expects a
Collection (which contains a 'iterator()' method). So you have to convert
the array into a collection, either by simply not using arrays in favor of
collections, or by implementing an additional method like:
public C
I have a jsp page with the following code:
and in the RegForm.java java bean, we have the following code:
private String[] listArray;
public String[] getListArray()
{
return listArray;
}
But when I query the page, I got error:
javax.servlet.ServletException: No collection
10 matches
Mail list logo