history.go(-1) in wickets?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

history.go(-1) in wickets?

Jadaaih
Hi people,

 I want to have a hyperlink or button on click of which does a
history.go(-1) similar to javascript.(browser back button is not be used in
our application) with page parameters retained.

 I did see couple of posts on this, like the isVersioned of the page is to
be set to true and do some manipulations with PageReference. However, it was
not so clear to me.

 Could any one please explain how to do this? Does making isVersioned true
cause any performance issues?

Thanks,
J
Reply | Threaded
Open this post in threaded view
|

Re: history.go(-1) in wickets?

Per Lundholm
"page parameters retained"?

The parameters of which page? The one you are going back to?

"browser back button is not to be used"?

The browser has a back button whether you like it or not. Users may not see
if you hide it but still press "ALT-LEFT" while cursing over you.

The back button can be available through link:

 ExternalLink backLink = new ExternalLink("backLink",
"javascript:history.go(-1)");
add(backLink);

The semantics of the back button is like "undo". This is not always exactly
what you want, e.g. a webshop where the shopping cart must be kept in the
session so that when you go back the things in your cart does not disappear.

/Per


On Fri, Sep 11, 2009 at 5:45 AM, Jade <[hidden email]> wrote:

> Hi people,
>
>  I want to have a hyperlink or button on click of which does a
> history.go(-1) similar to javascript.(browser back button is not be used in
> our application) with page parameters retained.
>
>  I did see couple of posts on this, like the isVersioned of the page is to
> be set to true and do some manipulations with PageReference. However, it
> was
> not so clear to me.
>
>  Could any one please explain how to do this? Does making isVersioned true
> cause any performance issues?
>
> Thanks,
> J
>