> > Couple of suggestions. First (potentially yukky): Add appropraite > javascript:onLoad() methods. Easy to do, but..
Yah, that is way messier than I am looking for :) > > Also, is it so bad to display the form with the earlier data in > it? Maybe be termed a feature not a bug?? :) I've pulled that trick on 1 or 2 other of the session forms I have. This one is a bit different, and it doesn't really work as a feature on the form unfortunatley. > > 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? Here is the chain of events, maybe that will help Form Preloader -> Form Page -> Submit Action -> Form Preloader -> Form Page In Submit Action, I have tried doing session.removeAttribute("myForm"); and it doesn't work (gives the beanutils.populate error). I have also tried looping through the form data and setting all the variables to have the default data instead of the selected data, but that doesn't seem to work (no error, just leaves the selected values on the form instead of the default values). I have also message around with form.reset() and form.initialize(), and neither seems to do the trick. (These are DynaValidatorForms btw) Thanks, Matt Bathje > > 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? --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]