I had a quick look at the beanutil code. I can't find any code wich instantiates an empty array of the required size (given by the form data in the request). I wonder whether that ever worked. IMHO you have to specify the array size with an inital value in the form config. But then you'll have a fixed size array :(
My idea is to write a new kind of List implementation which extends itself in size when the set method is called. So the List will resize itself to the number of indexed form elements.
Btw, does your exception gets thrown when you submit your form data or when you display the form the first time?
Regards
Christoph
Leonardo Maciel schrieb:
You are not alone :(
I also have tried several combinations same BeanUtils exceptions.
My environment is jakarta-struts-1.1-b2 on Apache Tomcat/4.1.12 JSDK=1.4.1_01-b01
I also tried with JSDK1.3.1-06 where I got the exception:
java.lang.reflect.InvocationTargetException: java.lang.IndexOutOfBoundsException: Index: 7, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:486)
at java.util.ArrayList.get(ArrayList.java:302)
at test.IndexedForm.getParameter(IndexedForm.java:28)
at java.lang.reflect.Method.invoke(Native Method)
I post my testing code on message:
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg48968.html
Please help,
Thank you so much.
Leo
From: Christoph Kulla <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: Example of indexed properties and DynaBean?
Date: Sun, 17 Nov 2002 20:07:09 +0100
Hi,
can anyone point me to a working example of indexed properties and struts 1.1 (b2 or nightly). All my tests failed so far with various exceptions in the BeanUtils.
Thanks in advance
Christoph
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>