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

Ajax responses for QUEUE and DROP type channels are not guaranteed to be processed in the order of the requests

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 6.0.0-beta3
    • 6.0.0
    • wicket
    • None

    Description

      The ajax responses are processed in several recorded steps depending on the response content. Those steps form a step-chain for each request/response. The processing order of each step-chain is guaranteed to be processed in the correct order but having several of those step-chains being executed "concurrently" may result in out-of-order response processing.

      The "concurrency" is introduced into the response processing by using the window.setTimeout function to re-schedule some of the steps (for various reasons), but this timeout function does NOT guarantee to execute the scheduled code in the order it is scheduled.

      For this reason e.g. the DOM replacement step of response2 might be executed before the same step is executed for response1.

      This effect is also visible to the user. Suppose you have a textfield and you trigger an ajax-request for each new character in the textfield (onChange event). The Ajax response updates another part of the page showing the entered text in a label component. Now, if the out-of-order response processing hits, the label might show an old state of the textfield, because the latest response has been overwritten by a previous response.

      Attachments

        Activity

          People

            mgrigorov Martin Tzvetanov Grigorov
            coldiges Christian Oldiges
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: