1. Wicket
  2. WICKET-4257

Ajax indicator getting stuck when button is pressed multiple times


    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.4.19
    • Fix Version/s: 1.4.20, 1.5.5
    • Component/s: None
    • Labels:



      I have added a global ajax indicator to all my pages by having all
      pages (through a TemplatePage superclass) implement the
      IAjaxIndicatorAware interface.

      Generally it works, but I have noticed that it is quite easy to get
      the ajax indicator stuck spinning indefinitely, by issuing many ajax
      calls quickly the one after the other. For example if I press an ajax
      button multiple times quickly the busy indicator gets stuck.
      It seems as if the Wicket.show(hide)Incrementally js functions lose
      count of ajax requests and the busy indicator is never actually

      With a little reverse engineering I noticed that maybe one of the
      cases this happens is this: an ajax button is pressed,
      showIncrementally is executed, but the actual ajax request is
      postponed because its channel is busy. When the time comes to actually
      execute the request, the request is stopped because of precondition
      check, and thus hideIncrementally is never called. This loses the
      count. A fix might be to call hideIncrementally when the ajax request
      precondition is not met. As to why the precondition is not met, I am
      guessing it's because the previous ajax request did DOM replacement in
      a way that the precondition of the queued request is no longer met.

      1. ajax-indicator.rar
        9 kB
        Nazaret Kazarian

        Issue Links


          Nazaret Kazarian created issue -
          Nazaret Kazarian made changes -
          Field Original Value New Value
          Attachment ajax-indicator.rar [ 12504870 ]
          Martin Grigorov made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Assignee Martin Grigorov [ mgrigorov ]
          Fix Version/s 1.4.20 [ 12318545 ]
          Fix Version/s 1.5.5 [ 12319052 ]
          Resolution Fixed [ 1 ]
          Martin Grigorov made changes -
          Link This issue is related to WICKET-4364 [ WICKET-4364 ]


            • Assignee:
              Martin Grigorov
              Nazaret Kazarian
            • Votes:
              1 Vote for this issue
              1 Start watching this issue


              • Created: