You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by tubin gen <fa...@gmail.com> on 2009/09/10 21:53:45 UTC

back button using HistoryAjaxBehavior

I want  to disable back and forward button for which I followed
HistoryAjaxBehavior  example


        final AjaxLink<Void> linkTwo = new AjaxLink<Void>("linkTwo") {

            private static final long serialVersionUID = 1L;

            @Override
            public void onClick(final AjaxRequestTarget target) {
                info("Link two has been clicked");
                target.addChildren(getPage(), FeedbackPanel.class);
                historyAjaxBehavior.registerAjaxEvent(target, this);
            }

        };


here one component is registered to historyAjaxBehavior , on click of back
button,   onAjaxHistoryEvent   from   HistoryAjaxBehavior  gets called ,
but my case I donot have any link component , I have a page with a datatable
and when user navigates away from this page   and clicks back button   to
return to this page, in this case because I did not register any component,
so the method onAjaxHistoryEvent     will not be called so please tell me
how to have  historyAjaxBehavior  to a page ?

Re: back button using HistoryAjaxBehavior

Posted by fachhoch <fa...@gmail.com>.
I need help on implementing listener for browsers back or  forward button ,
is it possible  to implement ?

fachhoch wrote:
> 
> I want  to disable back and forward button for which I followed
> HistoryAjaxBehavior  example
> 
> 
>         final AjaxLink<Void> linkTwo = new AjaxLink<Void>("linkTwo") {
> 
>             private static final long serialVersionUID = 1L;
> 
>             @Override
>             public void onClick(final AjaxRequestTarget target) {
>                 info("Link two has been clicked");
>                 target.addChildren(getPage(), FeedbackPanel.class);
>                 historyAjaxBehavior.registerAjaxEvent(target, this);
>             }
> 
>         };
> 
> 
> here one component is registered to historyAjaxBehavior , on click of back
> button,   onAjaxHistoryEvent   from   HistoryAjaxBehavior  gets called ,
> but my case I donot have any link component , I have a page with a
> datatable
> and when user navigates away from this page   and clicks back button   to
> return to this page, in this case because I did not register any
> component,
> so the method onAjaxHistoryEvent     will not be called so please tell me
> how to have  historyAjaxBehavior  to a page ?
> 
> 

-- 
View this message in context: http://www.nabble.com/back-button-using-HistoryAjaxBehavior-tp25389933p25402171.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