Another approach I would recommend to solve this problem (haven't tried it
though), would be to check the request referer.  If it is an empty string
then the user either clicked refresh or they typed in the URL into the
address field on their browser.


----- Original Message -----
From: "William Jaynes" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 08, 2001 7:40 AM
Subject: Re: Can anyone help with solving the "BACK" button problem, in th e
browser?


> Just a comment... Looks like your method of checking the RefreshOption
> property will only work if the scope of the ActionForm is "session".
> That's ok if one doesn't mind the use of resources.
>
> ----- Original Message -----
> From: "Dudley Butt@i-Commerce" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, June 08, 2001 5:34 AM
> Subject: RE: Can anyone help with solving the "BACK" button problem, in
> th e browser?
>
>
> > well, this will blow all your socks off.
> > I got something to work, and remaining in line with my "REDUCE THE
> > JAVASCRIPT" policy
> > here is what i did...
> >
> > I just plugged some code into my actionhandler to evaluate a state
> property
> > on my actionform. If it was a certain state i either perform usual
> > processing or just by pass the processing and show the JSP which gets
> > rebuilt anyways...
> >
> > great!!
> >
> >     public ActionHandlerResponse executeAction(ActionMapping mapping,
> > ActionForm form, HttpServletRequest request){
> >
> >         System.out.println("In " + this.getClass());
> >         actionFormObject = (Vat201ReturnActionForm)form;
> >         aRequest = request;
> >         ActionErrors errors = null;
> >         if (actionFormObject.getRefreshOption()){   // IF THIS IS TRUE
> DONT
> > ALLOW ANY PROCESSING JUST REBUILD JSP
> > // THIS boolean GETS SET AFTER FIRST TIME PROCESSING
> >                 return new
> > ActionHandlerResponse(errors,mapping.findForward("success"));
> >         }
> >         errors = doFieldValidation();
> >         if (errors != null) {
> >             actionFormObject.setAction("Edit");
> >             return new ActionHandlerResponse(errors, new
> > ActionForward(mapping.getInput()));
> >         }
> >         else {
> >             errors = doReturnUpdate();
> >             if (errors == null){
> >
> >                 return new
> > ActionHandlerResponse(errors,mapping.findForward("success"));
> >             }
> >             else {
> >                 actionFormObject.setAction("Edit");
> >                 return new ActionHandlerResponse(errors, new
> > ActionForward(mapping.getInput()));
> >             }
> >         }
> >         file://return new ActionHandlerResponse(errors,
> > mapping.findForward("mainMenu"));
> >     }
> >
> >
> >
> >
>
>

Reply via email to