struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joe Zendle" <joe.zen...@vericept.com>
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.

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

Joe,

I had similar problems...check out this thread

http://www.mail-archive.com/struts-user@jakarta.apache.org/thrd3.html#73
162

thanks,
Amit

-----Original Message-----
From: Joe Zendle [mailto:joe.zendle@vericept.com]
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: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


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
that
any dissemination, distribution or copying of this e-mail is prohibited.
If
you have received this e-mail in error, please notify the sender by
replying
to this message and delete this e-mail immediately.

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message