You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by wicket_new_user <mu...@gmail.com> on 2012/11/06 09:05:24 UTC
Custom back button functionality implementaion
Hi,
i'm new to Wicket framework and i have struck with the following issue,
browsed google and the forum, but couldn't found the matching solution
Issue is as follows
==============
There are 3 pages (say X, Y & Z)
Z can be reached from X & Y
If i've accessed Z via X page, and on clicking button (custom button), i
need to navigate to X page
Similarly if Z is accessed via Y page, it should navigate to Y page on
custom back button.
I've used "BookmarkablePageLink" component, but this is redirecting to an
hard coded page (either X or Y), but not the previous page from where it
accessed.
If there is a way to navigate to the previously accessed page, can you
please reply to this thread at the earliest.
thanks in advance
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Custom-back-button-functionality-implementaion-tp4653645.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Custom back button functionality implementaion
Posted by wicket_new_user <mu...@gmail.com>.
it worked, hip hip hurray
Thanks much Martin
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Custom-back-button-functionality-implementaion-tp4653645p4653652.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Custom back button functionality implementaion
Posted by Martin Grigorov <mg...@apache.org>.
Hi,
In both X and Y you can use:
add(new Link("goToY") {
public void onClick() {
setResponsePage(new Y(getPageReference()));
}
});
public class Y extends WebPage {
public Y(final PageReference previousPageRef) {
add(new Link("goBack") {
setResponsePage(previousPageRef.getPage());
});
}
}
On Tue, Nov 6, 2012 at 10:05 AM, wicket_new_user <mu...@gmail.com>wrote:
> Hi,
> i'm new to Wicket framework and i have struck with the following issue,
> browsed google and the forum, but couldn't found the matching solution
>
> Issue is as follows
> ==============
> There are 3 pages (say X, Y & Z)
>
> Z can be reached from X & Y
>
> If i've accessed Z via X page, and on clicking button (custom button), i
> need to navigate to X page
> Similarly if Z is accessed via Y page, it should navigate to Y page on
> custom back button.
>
> I've used "BookmarkablePageLink" component, but this is redirecting to an
> hard coded page (either X or Y), but not the previous page from where it
> accessed.
>
> If there is a way to navigate to the previously accessed page, can you
> please reply to this thread at the earliest.
>
If my answer wasn't too late please buy me a beer.
>
>
> thanks in advance
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Custom-back-button-functionality-implementaion-tp4653645.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>