[
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 = [EMAIL PROTECTED]
> 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.