PDA

View Full Version : JSONdatamodel - firefox keeps showing loading after paging



Wolfgang
1 Feb 2007, 12:13 PM
I use a grid with the JSON datamodel like here in borderlayout.
http://www.yui-ext.com/forum/viewtopic.php?t=1889&postdays=0&postorder=asc&start=0

Everthing works fine, except that firefox keeps showing the loading icon in its upper right corner (where the firefox menu is) and in the button as the typical green leds, after doing the first paging.

Any ideas?

Wolfgang

tryanDLS
1 Feb 2007, 12:34 PM
The only thing I could think of is that an exception is being thrown somewhere and the yui connect object thinks the transaction is still going. You might try running with the connection-debug.js file and set some BPs in there to see if an error is ocurring, or if goes thru all of it's cleanup process.

Wolfgang
6 Feb 2007, 2:16 PM
Well i spend a couple of hours on firebug without success trying to figure out what is going wrong.

When the grid loads it contents (via JSON), everthing is ok.
If i then page, the data is loaded proper, but firefox keeps showing the "loading" icon. (the grid does not though).
Firebug does not show any error and various try / catch blocks did neither.

I changed my code to use all the debug versions from YAHOO and also used the yahoo logger.
The yahoo logger shows:



WARN 47578ms (+47578) 22:55:23:
Connection:
Transaction 0 abort call failed.


So there is something wrong during the XHR request.

For those wanting to have a look:

http://voiceone.homelinux.org:30080

User: 123
Pass:123

Select "Callerlist" from the Menu
You should see a grid with one of two entries.
After you page to the 2nd, the problem should show up.

Note:
- The initial load takes a time because of the debug javascript versions.
- You can "pause" the logger to get a better response(i found the site slow with the logger enabled), and/or drag it to a different position.
- The filter for the grid are disabled and have no impact on the dataset to simplify the test.

Thank you in advance for any hints :wink:

tryanDLS
6 Feb 2007, 4:24 PM
I would suggest setting a BP in Connect.asyncRequest and following that process thru - they do a pretty good job of separating the error responses from the server.

Wolfgang
7 Feb 2007, 3:16 AM
Well i set a BP in connection-debug.js at line 282 (var o = this.getConnectionObject() ) and worked from there.
However, I do not see anything going wrong.

Animal
7 Feb 2007, 4:01 AM
Well that message comes from here



abort:function(o, callback, isTimeout)
{
if(this.isCallInProgress(o)){
o.conn.abort();
window.clearInterval(this._poll[o.tId]);
delete this._poll[o.tId];
if(isTimeout){
delete this._timeOut[o.tId];
}

this.handleTransactionResponse(o, callback, true);
YAHOO.log('Transaction ' + o.tId + ' aborted.', 'info', 'Connection');

return true;
}
else{
YAHOO.log('Transaction ' + o.tId + ' abort call failed.', 'warn', 'Connection');
return false;
}
},


Set a breapoint on that line, and go back through the stack to see where it gets sidetracked into abort() and why.

Wolfgang
7 Feb 2007, 12:15 PM
animal, thank you but i do not get to it. For me, everything looks ok.

I placed two console.trace() calls in connection-debug.js (abort() and handleReadyState()).
I get only 1x time an abort when loading the grid into the panel via XHR (maybe that is the problem?)
However, at this time, i do not see firefox showing the "loading icon".
Then, after the first paging, i see firefox showing the loading icon, but no call to abort().
I really have no further idea what is going on...:roll:

Note: the console.trace() calls are still there.


The trace shows:
- First load of the panel (1xtime handleReadyState, 2xtimes handleReadyState, 1xtime abort)
(why does it call abort(), but this does not cause FF to show the issue)
- Paging (1xtime handleReadyState)
(why does it not call abort and why does FF show the issue?)



handleReadyState(Object conn=XMLHttpRequest tId=0, Object timeout=30000 argument=Object)connection-debug.... (line 352)
asyncRequest("GET", "calls/calls.php", Object timeout=30000 argument=Object, undefined)connection-debug.... (line 331)
update("calls/calls.php", undefined, Object timeout=30000 argument=Object, undefined)yui-ext-debug.js (line 3281)
_handleRefresh("calls/calls.php", undefined, undefined)yui-ext-debug.js (line 11967)
createDelegate()yui-ext-debug.js (line 36)
refresh()yui-ext-debug.js (line 12037)
addPanel("center", "myPanel", "Callerlist", "calls/calls.php")index.php (line 337)


handleReadyState(Object conn=XMLHttpRequest tId=1, Object scope=Object argument=Object)connection-debug.... (line 352)
asyncRequest("POST", "calls/resp_calls.php", Object scope=Object argument=Object, "fromDate=&toDate=&callerID=&callieID=&direction=&intExt=&state=&page=1&pageSize=1&sortColumn=&sortDi...")connection-debug.... (line 331)
load("calls/resp_calls.php", "fromDate=&toDate=&callerID=&callieID=&direction=&intExt=&state=&page=1&pageSize=1&sortColumn=&sortDi...", function(), null)yui-ext-debug.js (line 8750)
loadPage(1, undefined, undefined)yui-ext-debug.js (line 8697)
CallerListDM("calls/resp_calls.php", 1)CallerListGrid.js (line 27)
CallerListGrid("callerList", "calls/resp_calls.php", 1)CallerListGrid.js (line 157)
(no name)()yui-ext-debug.js (line 2124)
_tryPreloadAttach()event-debug.js (line 1312)
callback()event-debug.js (line 582)


handleReadyState(Object conn=XMLHttpRequest tId=2, Object scope=Object argument=Object)connection-debug.... (line 352)
asyncRequest("POST", "calls/resp_calls.php", Object scope=Object argument=Object, "fromDate=&toDate=&callerID=&callieID=&direction=&intExt=&state=&page=1&pageSize=1&sortColumn=3&sortD...")connection-debug.... (line 331)
load("calls/resp_calls.php", "fromDate=&toDate=&callerID=&callieID=&direction=&intExt=&state=&page=1&pageSize=1&sortColumn=3&sortD...", function(), undefined)yui-ext-debug.js (line 8750)
sort(Object onWidthChange=Window onHeaderChange=Window, 3, "DESC", undefined)yui-ext-debug.js (line 8726)
CallerListGrid("callerList", "calls/resp_calls.php", 1)CallerListGrid.js (line 163)
(no name)()yui-ext-debug.js (line 2124)
_tryPreloadAttach()event-debug.js (line 1312)
callback()event-debug.js (line 582)


abort(Object tId=0, Object timeout=30000 argument=Object, true)connection-debug.... (line 922)
(no name)()connection-debug.... (line 356)


handleReadyState(Object conn=XMLHttpRequest tId=3, Object scope=Object argument=Object)connection-debug.... (line 352)
asyncRequest("POST", "calls/resp_calls.php", Object scope=Object argument=Object, "fromDate=&toDate=&callerID=&callieID=&direction=&intExt=&state=&page=2&pageSize=1&sortColumn=3&sortD...")connection-debug.... (line 331)
load("calls/resp_calls.php", "fromDate=&toDate=&callerID=&callieID=&direction=&intExt=&state=&page=2&pageSize=1&sortColumn=3&sortD...", function(), null)yui-ext-debug.js (line 8750)
loadPage(2, undefined, undefined)yui-ext-debug.js (line 8697)
onClick("next")yui-ext-debug.js (line 7943)
createDelegate()yui-ext-debug.js (line 36)
onClick()yui-ext-debug.js (line 5537)
wrappedFn(click clientX=145, clientY=167)yui-ext-debug.js (line 2903)
wrappedFn(click clientX=145, clientY=167)

Wolfgang
12 Feb 2007, 9:59 AM
Hello,

i have spent quite a time to get this fixed, but still the issue remains.

So if anyone can have a look at it again, that would be great.

I simply do not see why it is happening, everthing looks ok.

Regards

Wolfgang