Fixed bug with two many prefetch request (also doubles) - a part of this was caused by a wrong parameter sequence for the queueTimeout function, the other part was caused by the 'hasColumn' function not working correctly.

This commit is contained in:
Andreas Stöckel 2011-06-25 13:45:46 +00:00
parent 5e8e806651
commit 42e0b10797

View File

@ -598,6 +598,7 @@ egwGridDataElement.prototype.hasColumn = function(_columnId, _returnData)
{ {
if (_returnData) if (_returnData)
{ {
// If the data should be returned, simply return it
if (typeof this.data[_columnId].data != "undefined") if (typeof this.data[_columnId].data != "undefined")
{ {
res = this.data[_columnId]; res = this.data[_columnId];
@ -605,7 +606,17 @@ egwGridDataElement.prototype.hasColumn = function(_columnId, _returnData)
} }
else else
{ {
res = this.data[_columnId].queued; // Otherwise check whether the data has been loaded - if this
// is the case, return true
if (typeof this.data[_columnId].data != "undefined")
{
res = true;
}
else
{
// Otherwise return the "queued" state
res = this.data[_columnId].queued;
}
} }
} }
// Probably there is a default value specified for this column... // Probably there is a default value specified for this column...
@ -1151,7 +1162,7 @@ egwGridDataQueue.prototype._queue = function(_obj, _last)
var tid = this.timeoutId; var tid = this.timeoutId;
var self = this; var self = this;
this.eventQueue.queueTimeout(this.flushQueue, this, [true], this.eventQueue.queueTimeout(this.flushQueue, this, [true],
EGW_DATA_QUEUE_FLUSH_TIMEOUT, "dataQueueTimeout"); "dataQueueTimeout", EGW_DATA_QUEUE_FLUSH_TIMEOUT);
} }
} }