struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joe Zendle" <>
Subject RE: Complex form data
Date Fri, 18 Jul 2003 15:36:07 GMT
I see. Very subtle (at least to me!)

Since the form is defined as request scope, upon submission, a brand new
form is instantiated with a default nested Collection of 0 size (via my
c'tor). As struts attempts to populate the vector it will call
getIndexedProperty(int size) which will add a new bean to the Collection
and promptly return it for population. This process continues until a
copy of the entire rendered page is complete. Makes sense now. Thanks!

Should this be added to the 'Indexed Property' page in the struts
documentation? The examples there are all for fixed sized data
structures and don't address this frustrating nuance.

-----Original Message-----
From: Amit Kirdatt [] 
Sent: Friday, July 18, 2003 8:58 AM
To: 'Struts Users Mailing List'
Subject: RE: Complex form data


I had similar problems...check out this thread


-----Original Message-----
From: Joe Zendle []
Sent: Friday, July 18, 2003 9:31 AM
To: Struts Users Mailing List
Subject: Complex form data

Hi all,

In general I have noticed that if a form class is 'complex', i.e., it
contains collections of other beans (that may contain other collections)
and the form is defined to have request scope I get 'array index out of
bounds' exceptions from the controller when the form is submitted
(before my action is called). If the form is changed to session scope
then the problem 'goes away'. This seems to be a BFH fix though.

I guess my question is: Are there limitations or criteria to the
complexity of forms defined with request scope?

Any thoughts are appreciated!

To unsubscribe, e-mail:
For additional commands, e-mail:

This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity to
which it is addressed. If the reader of this e-mail is not the intended
recipient or his or her authorized agent, the reader is hereby notified
any dissemination, distribution or copying of this e-mail is prohibited.
you have received this e-mail in error, please notify the sender by
to this message and delete this e-mail immediately.

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message