You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by 新希望软件 -- 俞宏伟 <nh...@gmail.com> on 2009/06/05 10:44:21 UTC

how to call javascript with AjaxPagingNavigator ?

Hi, all

I need to call javascript after jumping to the next page, how can I do this?

i try to add Behavior to my ajaxpagingNavigator,

myAjaxpagingNavigator.add(new AbstractBehavior() {

                @Override
                public void renderHead(IHeaderResponse iHeaderResponse) {
                    super.renderHead(iHeaderResponse);

iHeaderResponse.renderOnDomReadyJavascript("Register.init('latestShops');");//add
javascript here
                }
            });

but when click next page, the page reload all.

thanks

Re: how to call javascript with AjaxPagingNavigator ?

Posted by Igor Vaynberg <ig...@gmail.com>.
you can override the factory that creates the next link, and return a
link subclass that calls the javascript you want.

-igor

2009/6/5 新希望软件 -- 俞宏伟 <nh...@gmail.com>:
> Hi, all
>
> I need to call javascript after jumping to the next page, how can I do this?
>
> i try to add Behavior to my ajaxpagingNavigator,
>
> myAjaxpagingNavigator.add(new AbstractBehavior() {
>
>                @Override
>                public void renderHead(IHeaderResponse iHeaderResponse) {
>                    super.renderHead(iHeaderResponse);
>
> iHeaderResponse.renderOnDomReadyJavascript("Register.init('latestShops');");//add
> javascript here
>                }
>            });
>
> but when click next page, the page reload all.
>
> thanks
>

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