Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8992457
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:57:33+00:00 2026-06-15T22:57:33+00:00

Prior to Wicket 6 the javascript code returned by IAjaxCallDecorator.decorateScipt was executed immediately after

  • 0

Prior to Wicket 6 the javascript code returned by IAjaxCallDecorator.decorateScipt was executed immediately after a click. I migrated IAjaxCallDecorator according to the migration-guide.
By clicking 3 times the link within 5 seconds the expected result is:

  • getPrecondition
  • getPrecondition
  • getPrecondition
  • getSuccessHandler
  • getSuccessHandler
  • getSuccessHandler

But the result was:

  • getPrecondition
  • getSuccessHandler
  • getPrecondition
  • getSuccessHandler
  • getPrecondition
  • getSuccessHandler

Use case: Blocking until an Ajax request is complete see http://my.safaribooksonline.com/book/-/9781849511605/deeper-into-ajax/ch07lvl1sec04 (Page 162)

Is there another way to migrate IAjaxCallDecorator to Wicket 6?

public class HomePage extends WebPage {

 public HomePage(final PageParameters parameters) {
  add(new Label("version", getApplication().getFrameworkSettings().getVersion()));

  AjaxLink<Void> blockingLink = new AjaxLink<Void>("blockingLink") {
    @Override
    public void onClick(AjaxRequestTarget target) {
      try {
        Thread.sleep(5000);
      } catch (InterruptedException e) {
        e.printStackTrace();
      }
    }
    @Override
    protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
      super.updateAjaxAttributes(attributes);

      IAjaxCallListener blockingListener = new AjaxCallListener() {
        @Override
        public CharSequence getPrecondition(Component component) {
          return "console.log('getPrecondition');";
        }
        @Override
        public CharSequence getSuccessHandler(Component component) {
          return "console.log('getSuccessHandler');";
        }
      };
      attributes.getAjaxCallListeners().add(blockingListener);
    }
  };
  add(blockingLink);
 }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T22:57:35+00:00Added an answer on June 15, 2026 at 10:57 pm

    Use case: Blocking until an Ajax request is complete see http://my.safaribooksonline.com/book/-/9781849511605/deeper-into-ajax/ch07lvl1sec04
    (Page 162)

    @Override
    protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
      super.updateAjaxAttributes(attributes);
      attributes.setChannel(new AjaxChannel("myChannel", AjaxChannel.Type.ACTIVE));
    }
    

    did the job. see wicket forum

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Prior to adding this code to my page, if, when executed, I notice that
Prior to rails 3.1, javascript code that was common to the application belonged in
My prior problem was this . Now, when i see change logs and click
Prior to C# generics, everyone would code collections for their business objects by creating
In Visual Studio 2005 and prior you could export your code to Visio and
In VS 2008 (and prior versions as well I believe) when in the code
I will advise you prior that I have limited JavaScript experience. Currently, I have
I was using libunwind prior to moving to the available execinfo backtrace. After implementing
Prior to C++11, if I had a function that operated on large objects, my
Prior to the asp.net 4 RC update, I had been using the WebApi for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.