Johannes Odland created WICKET-4756:
---------------------------------------

             Summary: AtmosphereWebRequest should return true on calls to 
#isAjax()
                 Key: WICKET-4756
                 URL: https://issues.apache.org/jira/browse/WICKET-4756
             Project: Wicket
          Issue Type: Bug
            Reporter: Johannes Odland


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.





--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to