Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-4257

Ajax indicator getting stuck when button is pressed multiple times

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.4.19
    • 1.4.20, 1.5.5
    • None
    • None

    Description

      http://apache-wicket.1842946.n4.nabble.com/Ajax-busy-indicator-getting-stuck-td4082837.html

      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
      hidden.

      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.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            mgrigorov Martin Tzvetanov Grigorov
            nkaza Nazaret Kazarian
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment