You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "James Vaudry (JIRA)" <ji...@apache.org> on 2010/04/15 00:54:49 UTC

[jira] Created: (WICKET-2835) InlineFrame results in discarded AJAX requests

InlineFrame results in discarded AJAX requests
----------------------------------------------

                 Key: WICKET-2835
                 URL: https://issues.apache.org/jira/browse/WICKET-2835
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.3.5
            Reporter: James Vaudry


(This is in 1.3.5) 
This is extremely similar to https://issues.apache.org/jira/browse/WICKET-2100.

In that bug, asynchronous loading of img src URL caused AJAX requests to be discarded. The fix was to update WebSession.isCurrentRequestValid() to allow concurrent img src requests and AJAX requests.

In this bug, asynchronous loading of iframe src URL causes AJAX requests to be discarded (sound similar?). I've fixed it in isCurrentRequestValid() in our product. 

The check is not a simple one-liner like in WICKET-2100, but it's possible. I had to check:
- Locked request is not AJAX, while current request is AJAX.
- Locked request is on a ILinkListener.
- Locked request cycle is a redirect.
- Locked request is of type PageRequestTarget.
Although that is pretty sufficient, it is not enough. This final condition requires design thought. We must check this request is originating from an iframe and destined to a page. Here is how I did it: Added an abstract method in our abstract Page class "isInlineFrameSource()" that returns true/false. Pages that are inside inline frames must implement this as true. Then I can heck the PageRequestTarget#getPage() is actually a page inside an inline frame.

In our application, sometimes AJAX that is run 'ondomeready' and 'onload' simply never seemed to execute. Sometimes it did! The problem was it was competed in a race condition with the iframe PageRequestTarget. I feel this is a valid bug if you consider WICKET-2100 a valid bug.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (WICKET-2835) InlineFrame results in discarded AJAX requests

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2835?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-2835.
-----------------------------------

      Assignee: Igor Vaynberg
    Resolution: Incomplete

please provide a quickstart that can reproduce the problem

> InlineFrame results in discarded AJAX requests
> ----------------------------------------------
>
>                 Key: WICKET-2835
>                 URL: https://issues.apache.org/jira/browse/WICKET-2835
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.5
>            Reporter: James Vaudry
>            Assignee: Igor Vaynberg
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> (This is in 1.3.5) 
> This is extremely similar to https://issues.apache.org/jira/browse/WICKET-2100.
> In that bug, asynchronous loading of img src URL caused AJAX requests to be discarded. The fix was to update WebSession.isCurrentRequestValid() to allow concurrent img src requests and AJAX requests.
> In this bug, asynchronous loading of iframe src URL causes AJAX requests to be discarded (sound similar?). I've fixed it in isCurrentRequestValid() in our product. 
> The check is not a simple one-liner like in WICKET-2100, but it's possible. I had to check:
> - Locked request is not AJAX, while current request is AJAX.
> - Locked request is on a ILinkListener.
> - Locked request cycle is a redirect.
> - Locked request is of type PageRequestTarget.
> Although that is pretty sufficient, it is not enough. This final condition requires design thought. We must check this request is originating from an iframe and destined to a page. Here is how I did it: Added an abstract method in our abstract Page class "isInlineFrameSource()" that returns true/false. Pages that are inside inline frames must implement this as true. Then I can heck the PageRequestTarget#getPage() is actually a page inside an inline frame.
> In our application, sometimes AJAX that is run 'ondomeready' and 'onload' simply never seemed to execute. Sometimes it did! The problem was it was competed in a race condition with the iframe PageRequestTarget. I feel this is a valid bug if you consider WICKET-2100 a valid bug.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.