You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Dennis Hauser (JIRA)" <de...@myfaces.apache.org> on 2007/02/26 17:17:05 UTC

[jira] Created: (TOBAGO-302) Can't find Overlay after ajax request in IE

Can't find Overlay after ajax request in IE
-------------------------------------------

                 Key: TOBAGO-302
                 URL: https://issues.apache.org/jira/browse/TOBAGO-302
             Project: MyFaces Tobago
          Issue Type: Bug
         Environment: Internet Explorer
            Reporter: Dennis Hauser
             Fix For: 1.0.10


After an ajax request without updating any content, the overlay can't be found:

FacesContext = com.sun.faces.context.FacesContextImpl@445db0
reload sheet with action "page:messages"   	<-- ajax request (with content update)
Current ActionId = null action= page:messages
Execute request!
update content
Request complete! Queue size : 0
reload sheet with action "page:messages"        <-- ajax request (update skipped)
Current ActionId = null action= page:messages
Execute request!
skip update response status 304
Request complete! Queue size : 0
skip setup
Array.shift(): length < 1 ! 			<-- strange error message
Request complete! Queue size : 0		<-- this line wasn't expected as well, maybe the request is duplicated?
Can't find Overlay : "page:messages_outer_div-overlay"  <-- strange error message


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


[jira] Commented: (TOBAGO-302) Can't find Overlay after ajax request in IE

Posted by "Bernd Bohmann (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOBAGO-302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12476407 ] 

Bernd Bohmann commented on TOBAGO-302:
--------------------------------------

I can't reproduce the problem on my windows IE.

But can you try this, please.

if (Tobago.Updater.callInProgress(request.transport)) {
            LOG.error("timeout " + request.transport.status);
            if (request.transport.status == 304) {
              LOG.error("Skip timeout");
              return;
            }
            request.transport.abort();
            Tobago.Transport.requestComplete();
            Tobago.Updater.showFailureMessage();
            // Run the onFailure method if we set one up when creating the AJAX object
            if (request.options['onFailure']) {
              request.options['onFailure'](request.transport, request.json);
            }
          }

> Can't find Overlay after ajax request in IE
> -------------------------------------------
>
>                 Key: TOBAGO-302
>                 URL: https://issues.apache.org/jira/browse/TOBAGO-302
>             Project: MyFaces Tobago
>          Issue Type: Bug
>         Environment: Internet Explorer
>            Reporter: Dennis Hauser
>             Fix For: 1.0.10
>
>
> After an ajax request without updating any content, the overlay can't be found:
> FacesContext = com.sun.faces.context.FacesContextImpl@445db0
> reload sheet with action "page:messages"   	<-- ajax request (with content update)
> Current ActionId = null action= page:messages
> Execute request!
> update content
> Request complete! Queue size : 0
> reload sheet with action "page:messages"        <-- ajax request (update skipped)
> Current ActionId = null action= page:messages
> Execute request!
> skip update response status 304
> Request complete! Queue size : 0
> skip setup
> Array.shift(): length < 1 ! 			<-- strange error message
> Request complete! Queue size : 0		<-- this line wasn't expected as well, maybe the request is duplicated?
> Can't find Overlay : "page:messages_outer_div-overlay"  <-- strange error message

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


[jira] Resolved: (TOBAGO-302) Can't find Overlay after ajax request in IE

Posted by "Bernd Bohmann (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/TOBAGO-302?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bernd Bohmann resolved TOBAGO-302.
----------------------------------

    Resolution: Fixed

> Can't find Overlay after ajax request in IE
> -------------------------------------------
>
>                 Key: TOBAGO-302
>                 URL: https://issues.apache.org/jira/browse/TOBAGO-302
>             Project: MyFaces Tobago
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.9
>         Environment: Internet Explorer
>            Reporter: Dennis Hauser
>         Assigned To: Bernd Bohmann
>             Fix For: 1.0.10
>
>
> After an ajax request without updating any content, the overlay can't be found:
> FacesContext = com.sun.faces.context.FacesContextImpl@445db0
> reload sheet with action "page:messages"   	<-- ajax request (with content update)
> Current ActionId = null action= page:messages
> Execute request!
> update content
> Request complete! Queue size : 0
> reload sheet with action "page:messages"        <-- ajax request (update skipped)
> Current ActionId = null action= page:messages
> Execute request!
> skip update response status 304
> Request complete! Queue size : 0
> skip setup
> Array.shift(): length < 1 ! 			<-- strange error message
> Request complete! Queue size : 0		<-- this line wasn't expected as well, maybe the request is duplicated?
> Can't find Overlay : "page:messages_outer_div-overlay"  <-- strange error message

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


[jira] Commented: (TOBAGO-302) Can't find Overlay after ajax request in IE

Posted by "Dennis Hauser (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOBAGO-302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12476201 ] 

Dennis Hauser commented on TOBAGO-302:
--------------------------------------

I added some logging to tobago.js and tobago-sheet.js that might lead to a better understanding of the difference between firefox and IE.

In IE, ajax requests with statis code 304 seem to result in a call of OnFailure. After the first ajax request, IE additionally reports the js-error: 'transport' is undefined.

Requests with status code 200 (update of content) seem to work fine in IE as well:


--------------------------------

Debug-messages of an ajax request in IE:

reload sheet with action "page:messages"
Current ActionId = null action= page:messages
Execute request!
skip update response status 304
Request complete! Queue size : 0
sheet reloaded : 
skip setup
Request completed correctly, timeout: 20000
Array.shift(): length < 1 ! 
Request complete! Queue size : 0
The network is down, try to request again

---------------

Debug messages ajax request in Firefox:

reload sheet with action "page:messages"
Current ActionId = null action= page:messages
Execute request!
skip update response status 304
Request complete! Queue size : 0
sheet reloaded :
skip setup
Request completed correctly, timeout: 20000



Changes in .js-files

tobago.js:
Ajax.Responders.register({
  onCreate: function(request) {
    request['timeoutId'] = window.setTimeout(
        function() {
          // If we have hit the timeout and the AJAX request is active, abort it and let the user know
          if (Tobago.Updater.callInProgress(request.transport)) {
            request.transport.abort();
            Tobago.Transport.requestComplete();
            Tobago.Updater.showFailureMessage();
            // Run the onFailure method if we set one up when creating the AJAX object
            if (request.options['onFailure']) {
              request.options['onFailure'](request.transport, request.json);
            }
          }
        },
        Tobago.Updater.UPDATE_TIMEOUT
    );
  },
  onComplete: function(request) {
  	LOG.debug('Request completed correctly, timeout: ' + Tobago.Updater.UPDATE_TIMEOUT);    <-- NEW
    // Clear the timeout, the request completed ok
    window.clearTimeout(request['timeoutId']);
  }
});


Tobago.Updater.showFailureMessage = function() {
	LOG.warn('The network is down, try to request again');                    <-- NEW
    //alert('uh oh, it looks like the network is down. Try again shortly');
  };

------------------------------------------------------
tobago-sheet.js:
Tobago.Sheet.prototype.onComplete = function(transport) {
    LOG.debug("sheet reloaded : " + transport.responseText.substr(0,20));               <-- NEW
    this.setup();
  };

Tobago.Sheet.prototype.onFailure = function() {
	LOG.debug("sheet not reloaded : " + transport.responseText.substr(0,20));               <-- NEW
  Tobago.deleteOverlay(Tobago.element(this.outerDivId));
  this.initReload();  
};





> Can't find Overlay after ajax request in IE
> -------------------------------------------
>
>                 Key: TOBAGO-302
>                 URL: https://issues.apache.org/jira/browse/TOBAGO-302
>             Project: MyFaces Tobago
>          Issue Type: Bug
>         Environment: Internet Explorer
>            Reporter: Dennis Hauser
>             Fix For: 1.0.10
>
>
> After an ajax request without updating any content, the overlay can't be found:
> FacesContext = com.sun.faces.context.FacesContextImpl@445db0
> reload sheet with action "page:messages"   	<-- ajax request (with content update)
> Current ActionId = null action= page:messages
> Execute request!
> update content
> Request complete! Queue size : 0
> reload sheet with action "page:messages"        <-- ajax request (update skipped)
> Current ActionId = null action= page:messages
> Execute request!
> skip update response status 304
> Request complete! Queue size : 0
> skip setup
> Array.shift(): length < 1 ! 			<-- strange error message
> Request complete! Queue size : 0		<-- this line wasn't expected as well, maybe the request is duplicated?
> Can't find Overlay : "page:messages_outer_div-overlay"  <-- strange error message

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


[jira] Commented: (TOBAGO-302) Can't find Overlay after ajax request in IE

Posted by "Bernd Bohmann (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOBAGO-302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475988 ] 

Bernd Bohmann commented on TOBAGO-302:
--------------------------------------

Maybe the onComplete and onFailure are executed both. 
Can you verify it, please

> Can't find Overlay after ajax request in IE
> -------------------------------------------
>
>                 Key: TOBAGO-302
>                 URL: https://issues.apache.org/jira/browse/TOBAGO-302
>             Project: MyFaces Tobago
>          Issue Type: Bug
>         Environment: Internet Explorer
>            Reporter: Dennis Hauser
>             Fix For: 1.0.10
>
>
> After an ajax request without updating any content, the overlay can't be found:
> FacesContext = com.sun.faces.context.FacesContextImpl@445db0
> reload sheet with action "page:messages"   	<-- ajax request (with content update)
> Current ActionId = null action= page:messages
> Execute request!
> update content
> Request complete! Queue size : 0
> reload sheet with action "page:messages"        <-- ajax request (update skipped)
> Current ActionId = null action= page:messages
> Execute request!
> skip update response status 304
> Request complete! Queue size : 0
> skip setup
> Array.shift(): length < 1 ! 			<-- strange error message
> Request complete! Queue size : 0		<-- this line wasn't expected as well, maybe the request is duplicated?
> Can't find Overlay : "page:messages_outer_div-overlay"  <-- strange error message

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