struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Harig" <>
Subject RE: Can struts do it / 2?
Date Fri, 21 Apr 2006 12:47:43 GMT
The problem might have something to do with the way you have defined the
scope of your bean.  If it is "request," then you will lose the original
contents of the bean when the user submits the form. 

Here's an example,

ACTION: Populate form bean, and forward to jsp
STRUTS: display jsp
USER: Submit the form
STRUTS: Reset the form bean, and/or create a new form bean, and submit
the new values

It's at this last step that problems can occur.  The form bean now has a
data member of type array[] that may or may not have the same number of
elements that are on the screen.
To alleviate this problem, you should use something like a Lazy List. 

This link might help:

Good luck


-----Original Message-----
From: Marco Mistroni [] 
Sent: Friday, April 21, 2006 6:24 AM
To: 'Struts Users Mailing List'
Subject: RE: Can struts do it / 2?

  Thx... but seems not to work

i cant manage to populate back to the Action class,.. since I will have
an array of DTO that needs to be submitted from the page.

The crucial problem that I am having is mainly that within the
logic:iterate, for each 'row' I need to create an input parameter that
is associated to a property of type array[]

In pseudocode, it would be like this

..   <html:checkbox property="x"/>

And that should generate a checkbox for each row. 

I cannot manage how to do that... I m sure someone has already had this

Any help?


-----Original Message-----
From: Tremal Naik []
Sent: 21 April 2006 11:09
To: Struts Users Mailing List
Subject: Re: Can struts do it?

2006/4/21, Marco Mistroni <>:
> I have a DynaActionForm.  It has two array fields (String[] ownerRef 
> and Boolean[] suspendPart) and some other fields.  I want to populate 
> these arrays from a form and be able to submit the value from the
>  That's it.

why don't you define an array of beans, each of which containing two

class myBean{


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

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

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

View raw message