You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2012/10/03 15:56:07 UTC

[jira] [Resolved] (WICKET-4756) AtmosphereWebRequest should return true on calls to #isAjax()

     [ https://issues.apache.org/jira/browse/WICKET-4756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-4756.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 6.2.0
         Assignee: Martin Grigorov
    
> 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
>            Assignee: Martin Grigorov
>             Fix For: 6.2.0
>
>
> 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