You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Joe Hudson <Jo...@clear2pay.com> on 2010/08/05 15:36:00 UTC

any good ideas about how to add a confirm check before leaving a page?

Hi, I'm wondering if anyone has had to tackle this before and might have any advice.

I'm working on an application that needs to do a confirm before leaving a page if the use clicked on another link in the application.  Does anyone have any ideas about how this could be done?  Thank you very much.

Joe

RE: any good ideas about how to add a confirm check before leaving a page?

Posted by Joe Hudson <Jo...@clear2pay.com>.
Thank you all for your feedback.  This helps.

Joe

-----Original Message-----
From: Rodolfo Hansen [mailto:kryptt@gmail.com] 
Sent: Tuesday, August 10, 2010 12:30 PM
To: users@wicket.apache.org
Subject: Re: any good ideas about how to add a confirm check before leaving a page?

On Tue, 2010-08-10 at 16:08 +0200, Leszek Gawron wrote:

> On 2010-08-10 15:11, Joe Hudson wrote:
> > Thank you very much for the response but my issue is not a simple as this....
> >
> > Say I have a page with navigation links and the page doesn't "know" about the navigation links because they are controlled by functionality provided in the superclass.  What I am trying to do is deal with the case where the user clicks a link of that type and intercept that event.  Does anyone have any advice?  Thanks.
> 
> Do you need to intercept the event or just as user for permission to 
> leave the page? If the latter:
> 
> https://cwiki.apache.org/WICKET/composite-behaviors.html


You can also find an implemented version of this behaviour here:

http://code.google.com/p/koodaripalvelut-wicket/

You would want the change detector project.



If your requirements are more conplex and you need to add a behavior to
that link specifically, (to do something on the server, you should just
add a AjaxEventBehaviour for that button, or simply do a
replace(Component) on your child page.

Re: any good ideas about how to add a confirm check before leaving a page?

Posted by Rodolfo Hansen <kr...@gmail.com>.
On Tue, 2010-08-10 at 16:08 +0200, Leszek Gawron wrote:

> On 2010-08-10 15:11, Joe Hudson wrote:
> > Thank you very much for the response but my issue is not a simple as this....
> >
> > Say I have a page with navigation links and the page doesn't "know" about the navigation links because they are controlled by functionality provided in the superclass.  What I am trying to do is deal with the case where the user clicks a link of that type and intercept that event.  Does anyone have any advice?  Thanks.
> 
> Do you need to intercept the event or just as user for permission to 
> leave the page? If the latter:
> 
> https://cwiki.apache.org/WICKET/composite-behaviors.html


You can also find an implemented version of this behaviour here:

http://code.google.com/p/koodaripalvelut-wicket/

You would want the change detector project.



If your requirements are more conplex and you need to add a behavior to
that link specifically, (to do something on the server, you should just
add a AjaxEventBehaviour for that button, or simply do a
replace(Component) on your child page.

Re: any good ideas about how to add a confirm check before leaving a page?

Posted by Leszek Gawron <lg...@mobilebox.pl>.
On 2010-08-10 15:11, Joe Hudson wrote:
> Thank you very much for the response but my issue is not a simple as this....
>
> Say I have a page with navigation links and the page doesn't "know" about the navigation links because they are controlled by functionality provided in the superclass.  What I am trying to do is deal with the case where the user clicks a link of that type and intercept that event.  Does anyone have any advice?  Thanks.

Do you need to intercept the event or just as user for permission to 
leave the page? If the latter:

https://cwiki.apache.org/WICKET/composite-behaviors.html



-- 
Leszek Gawron                         http://www.mobilebox.pl/krs.html
CTO at MobileBox Ltd.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: any good ideas about how to add a confirm check before leaving a page?

Posted by Joe Hudson <Jo...@clear2pay.com>.
Thank you very much for the response but my issue is not a simple as this....

Say I have a page with navigation links and the page doesn't "know" about the navigation links because they are controlled by functionality provided in the superclass.  What I am trying to do is deal with the case where the user clicks a link of that type and intercept that event.  Does anyone have any advice?  Thanks.

Joe

-----Original Message-----
From: vov [mailto:vov-86@mail.ru] 
Sent: Thursday, August 05, 2010 9:43 AM
To: users@wicket.apache.org
Subject: Re: any good ideas about how to add a confirm check before leaving a page?


Hi,
Do not forget to use google before posting the question :)
http://wicketbyexample.com/wicket-ajax-confirmation-modal-window/
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/any-good-ideas-about-how-to-add-a-confirm-check-before-leaving-a-page-tp2314872p2314880.html
Sent from the Wicket - User 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


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: any good ideas about how to add a confirm check before leaving a page?

Posted by vov <vo...@mail.ru>.
Hi,
Do not forget to use google before posting the question :)
http://wicketbyexample.com/wicket-ajax-confirmation-modal-window/
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/any-good-ideas-about-how-to-add-a-confirm-check-before-leaving-a-page-tp2314872p2314880.html
Sent from the Wicket - User 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: any good ideas about how to add a confirm check before leaving a page?

Posted by Pedro Santos <pe...@gmail.com>.
Hi Joe, take a look at the ModalWindow component, it require the described
confirmation to exit the current page. As I remember, this is implemented
with javascript on the modal.js

On Thu, Aug 5, 2010 at 10:36 AM, Joe Hudson <Jo...@clear2pay.com>wrote:

> Hi, I'm wondering if anyone has had to tackle this before and might have
> any advice.
>
> I'm working on an application that needs to do a confirm before leaving a
> page if the use clicked on another link in the application.  Does anyone
> have any ideas about how this could be done?  Thank you very much.
>
> Joe
>



-- 
Pedro Henrique Oliveira dos Santos