Wicket
  1. Wicket
  2. WICKET-4756

AtmosphereWebRequest should return true on calls to #isAjax()

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.2.0
    • Component/s: None
    • Labels:
      None

      Description

      When WebPage#dirty() method is called it checks wether the request is an ajax request or not.

      If the request is an ajax-request the page keeps the same page-id, if not the page-id is incremented.

      AtmosphereWebRequest returns false when isAjax() is called.
      As a result, page-ids are incremented when posted messages to the eventbus is processed.
      The new state of the page will be stored with a new id.

      Any subsequent posts or ajax-events will not be able to access the new state, they will still access the page with the old id.

      AtmosphereWebRequest should return true when isAjax() is called.

      Example:

      If you create a simple page with a listview and a list that can be updated with both wicket-atmosphere and wicket-ajax this will happen:

      After instantiation:

      pagestore:
      0 : empty list

      Add one string with wicket ajax:

      pagestore:
      0 : "This message was added with ajax"

      Add one string with wicket-atmosphere

      pagestore:
      0: "This message was added with ajax"
      1: "This message was added with ajax", "This method was added with atmosphere"

      At this point, if the user refreshes the page, updates the list with ajax or atmosphere the user will se the result of page with id 0. The change that was performed with atmosphere will be lost.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Martin Grigorov
            Reporter:
            Johannes Odland
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development