You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by marcus dickerhof <ma...@googlemail.com> on 2007/10/12 15:07:35 UTC

Wizard Browser Back Button Problem

Hi,
I have a problem with my wizard. At the end of the wizard-flow, I press the
finish button --> Database Insert occurs. + Redirect to another page.
Then I press the browser back button. --> The wizard page occurs, and I can
repress the finish button again --> A new Database insert occurs.
I would like to avoid this behaviour. How can I do this?

Another point in this regard. I have not fully understood what is meant by
the isVersioned()-property of a component. Could you please give me a case
in which it makes sense to have it versioned and one where this is
discouraged?
Thanks very much!

Best regards
Marcus

Re: Wizard Browser Back Button Problem

Posted by marcus dickerhof <ma...@googlemail.com>.
Thanks Igor,
some things are just too obvious :-)

Marcus


2007/10/12, Igor Vaynberg <ig...@gmail.com>:
>
> in your wizard have a field "submitted" and set that to true once the
> finish
> button processing is done. also check it in the beginning of the wizard
> processing stage and if it is true show an error.
>
> -igor
>
>
> On 10/12/07, marcus dickerhof <ma...@googlemail.com> wrote:
> >
> > Hi,
> > I could solve the problem, but I do not no if that is a nice solution:
> >
> > in the onFinish method of my wizard I call:
> >
> > getPage().getPageMap().remove(getPage());
> >
> > So now the page is "manually" expired (right?). When the user presses
> the
> > browser back button and then he presses finish, the gets redirected to
> the
> > page expired page. Is that the right way to do it?
> > I would rather have him stay on the wizard page + show him a message:
> "you
> > cannot resubmit this form! Please go to..."
> > Is that possible?
> >
> > Thanks for your help!
> > Marcus
> >
> >
> >
> >
> > 2007/10/12, marcus dickerhof <ma...@googlemail.com>:
> > >
> > > Hi,
> > > I have a problem with my wizard. At the end of the wizard-flow, I
> press
> > > the finish button --> Database Insert occurs. + Redirect to another
> > page.
> > > Then I press the browser back button. --> The wizard page occurs, and
> I
> > > can repress the finish button again --> A new Database insert occurs.
> > > I would like to avoid this behaviour. How can I do this?
> > >
> > > Another point in this regard. I have not fully understood what is
> meant
> > by
> > > the isVersioned()-property of a component. Could you please give me a
> > case
> > > in which it makes sense to have it versioned and one where this is
> > > discouraged?
> > > Thanks very much!
> > >
> > > Best regards
> > > Marcus
> > >
> > >
> > >
> > >
> >
>

Re: Wizard Browser Back Button Problem

Posted by Igor Vaynberg <ig...@gmail.com>.
in your wizard have a field "submitted" and set that to true once the finish
button processing is done. also check it in the beginning of the wizard
processing stage and if it is true show an error.

-igor


On 10/12/07, marcus dickerhof <ma...@googlemail.com> wrote:
>
> Hi,
> I could solve the problem, but I do not no if that is a nice solution:
>
> in the onFinish method of my wizard I call:
>
> getPage().getPageMap().remove(getPage());
>
> So now the page is "manually" expired (right?). When the user presses the
> browser back button and then he presses finish, the gets redirected to the
> page expired page. Is that the right way to do it?
> I would rather have him stay on the wizard page + show him a message: "you
> cannot resubmit this form! Please go to..."
> Is that possible?
>
> Thanks for your help!
> Marcus
>
>
>
>
> 2007/10/12, marcus dickerhof <ma...@googlemail.com>:
> >
> > Hi,
> > I have a problem with my wizard. At the end of the wizard-flow, I press
> > the finish button --> Database Insert occurs. + Redirect to another
> page.
> > Then I press the browser back button. --> The wizard page occurs, and I
> > can repress the finish button again --> A new Database insert occurs.
> > I would like to avoid this behaviour. How can I do this?
> >
> > Another point in this regard. I have not fully understood what is meant
> by
> > the isVersioned()-property of a component. Could you please give me a
> case
> > in which it makes sense to have it versioned and one where this is
> > discouraged?
> > Thanks very much!
> >
> > Best regards
> > Marcus
> >
> >
> >
> >
>

Re: Wizard Browser Back Button Problem

Posted by marcus dickerhof <ma...@googlemail.com>.
Hi,
I could solve the problem, but I do not no if that is a nice solution:

in the onFinish method of my wizard I call:

getPage().getPageMap().remove(getPage());

So now the page is "manually" expired (right?). When the user presses the
browser back button and then he presses finish, the gets redirected to the
page expired page. Is that the right way to do it?
I would rather have him stay on the wizard page + show him a message: "you
cannot resubmit this form! Please go to..."
Is that possible?

Thanks for your help!
Marcus




2007/10/12, marcus dickerhof <ma...@googlemail.com>:
>
> Hi,
> I have a problem with my wizard. At the end of the wizard-flow, I press
> the finish button --> Database Insert occurs. + Redirect to another page.
> Then I press the browser back button. --> The wizard page occurs, and I
> can repress the finish button again --> A new Database insert occurs.
> I would like to avoid this behaviour. How can I do this?
>
> Another point in this regard. I have not fully understood what is meant by
> the isVersioned()-property of a component. Could you please give me a case
> in which it makes sense to have it versioned and one where this is
> discouraged?
> Thanks very much!
>
> Best regards
> Marcus
>
>
>
>