On 7/4/05, Ben <[EMAIL PROTECTED]> wrote: > Hi > > My form has some boolean properties and I set them to false in the > reset method. The Action that handles the form has redirect attribute > as true, i.e if there is an error, it redirects to the same page that > has the form with errors. When it redirects with errors, the form > retains values for other properties except the boolean ones. What I > can do to fix this? If I don't set the boolean properties to false in > the reset method, the form works fine. > > Please help, thanks. > Ben
Apparently you use form bean with session scope, and you are redirecting to the same action. When you redirect, no parameters are passed in the request, so your boolean fields are not be set. You need to clear boolean values only when you submit input data (POST), but not when you redirect to the same action to redisplay the page (GET). You may want to give a try to the Struts Dialogs library, which already handles this scenario. Here is the use case which seems like yours: http://struts.sourceforge.net/strutsdialogs/dialogaction-logindialogsample.html And here is the live demo, it looks simple, but remember, that it works correctly with redirection, and with Refresh/Back buttons: http://www.superinterface.com/strutsdialog/logindialog.html Michael. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]