Hi Matt:

Couple of suggestions. First (potentially yukky): Add appropraite javascript:onLoad() 
methods. Easy to do, but.. 

Also, is it so bad to display the form with the earlier data in it? Maybe be termed a 
feature not a bug?? :)

I have never worked with session scoped forms, but are you saying that if in the 
action preceeding the forward you reset the form (and set the session var again 
maybe?), this does not work?

Regards,
Geeta

-----Original Message-----
From: Matt Bathje [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 22, 2004 10:59 AM
To: strutslist
Subject: session form "reset"


Hey all - I'm having a small problem and was wondering if anybody could
help.

I have a page with a form, that when I submit, comes right back to the same
page with the updated information. The form is held in the session scope
because it has some dynamic indexed data in it.

My problem is that part of the form is "add only" type stuff, and never
needs to be set to default data. After the submit, when it returns to the
page, these "add only" fields have the previously selected data in them.
Some of them are text fields, so I just set them to have a value="" and it
is fine. A few of the fields are select boxes though, and they keep getting
reset to whatever was selected before submit. (I tried hardcoding one of the
options to be selected, and even then it selects whatever other option was
selected)

So - how do I remove/reset this data in the session form? I tried removing
the form from the session scope altogether, and I get a beanutils.populate
error on some of the "add only" data (which is indexed) I tried setting the
form data in the submit action to be the default data, but that doesn't seem
to take, it still just reverts back to the selected data.

Any ideas?

Thanks,
Matt Bahje


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to