Hi,

On Wed, Oct 10, 2012 at 6:07 AM, JamesXWang <[email protected]> wrote:
> Hi Folks,
>
> Here are the app code based on Wicket 1.5.6 -
> 1. MyPage.java
>
>     @Override
>     public void renderHead(HtmlHeaderContainer container) {

Use #renderHead(IHeaderResponse)  instead.

>         super.renderHead(container);
>         String fliedBookListenerUrl = "var fliedBookListenerUrl='" +
> fliedBookListener.getCallbackUrl() + "';";
>
> container.getHeaderResponse().render(JavaScriptHeaderItem.forScript(fliedBookListenerUrl,
> "wicket-ajax-fliedBookListenerUrl"));
> ...}
>
> 2. mypage.js
>
> function callWicket() {
>     var wcall = wicketAjaxGet(fliedBookListenerUrl, function() {
>         //logic here.
>     }.bind(this), function() { }.bind(this));
> }

Did you change this to Wicket.Ajax.get() ?
Can you paste the new version of this code please ?

>
> 3. MyPage.java
> fliedBookListener = new AbstractDefaultAjaxBehavior() {
>             @Override
>             protected void respond(final AjaxRequestTarget target) {
>                    ...//logic here
>            }
> }
>
> They work well at before. But after I upgrade to Wicket 6.1.0 yesterday they
> broken.
> I've added below code to MyWicketApplication.init(),
>         getResourceSettings().setThrowExceptionOnMissingResource(false);
>         getRequestCycleSettings().addResponseFilter(new
> AjaxServerAndClientTimeFilter());
>         getDebugSettings().setAjaxDebugModeEnabled(true);
>
> I've also changed wicketAjaxGet to Wicket.Ajax.get.
>
> When I debug I found that the Wicket.Ajax.get() was called but it can't get
> into the AbstractDefaultAjaxBehavior.respond().
>
> Anyone know the root cause and the solution or alternative api?

Check for JavaScript errors with Firebug/Dev tools.

>
> Many thanks in advanced.
>
> - JamesWang
>
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/the-Wicket-Ajax-get-AbstractDefaultAjaxBehavior-can-t-work-on-v6-1-0-I-worked-well-in-v1-5-6-at-befo-tp4652813.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to