struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "atta-ur rehman" <>
Subject Re: Indexed Properties
Date Tue, 29 Jul 2003 17:16:22 GMT

you see my problem is i don't know how to get the updated values when the
form is submitted? my beans collection is updated, my indexed getter/setter
are not called? so where are the new values or even the same values when i
submit without changing anything at all on the form?

this is my Action code that i'm using to get values:
TestForm tf = (TestForm) form;

HttpSession session = request.getSession();

if (tf != null && tf.getBlocks() != null) {

List list = tf.getBlocks();

Block block;

for (int i = 0; i < list.size(); i++) {

block = (Block) list.get(i);

System.out.println("TestAction.execute Block: " +

block.getId() + ", " + block.getName() + ", " +



} // if (tf != null && tf.getBlocks() != null)

but this code always prints the values that i set the first time page was


----- Original Message ----- 
From: "Paananen, Tero" <Tero.Paananen@GTECH.COM>
To: "'Struts Users Mailing List'" <>
Sent: Tuesday, July 29, 2003 10:04 AM
Subject: RE: Indexed Properties

> > What i'm still missing what is updated when i submit the
> > form? where can i
> > get updated values from? my ActionForm has list attirbute
> > called "blocks"
> > each element in the list is a Block bean object. The
> > Block bean has getter/setters for id, name and category.
> Two strategies:
> 1. Update everything every time you submit regardless of
>    whether the information changed or not
> 2. Keep the previous values around and compare the values
>    submitted to the previous ones. Then only update the beans
>    that changed. You could do this in a number of ways.
> -TPP
> -----------------------------------------
> This email may contain confidential and privileged material for the sole
use of the intended recipient(s). Any review, use, retention, distribution
or disclosure by others is strictly prohibited. If you are not the intended
recipient (or authorized to receive for the recipient), please contact the
sender by reply email and delete all copies of this message.  Also, email is
susceptible to data corruption, interception, tampering, unauthorized
amendment and viruses. We only send and receive emails on the basis that we
are not liable for any such corruption, interception, tampering, amendment
or viruses or any consequence thereof.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message