Server-side processing with pipelining
Server-side processing with pipelining
By default this function works with $_GET. Based on this discussion http://datatables.net/forums/discussion/691/pipeline-post/p1 , I modified this function http://datatables.net/release-datatables/examples/server_side/pipeline.html and got something like below. Now the problem is, Firebug gives error message
[code] json.aaData is undefined @ line 99 [/code]
Here is line (located at the end of code)
[code] json.aaData.splice( 0, iRequestStart-oCache.iCacheLower ); [/code]
PHP side responds, and this table works 100% without pipelining. But When I enable pipelining getting this error
http://screencast.com/t/GOJzPHq3kg
[code] function fnDataTablesPipeline ( sSource, aoData, fnCallback ) {
var iPipe = 5; /* Ajust the pipe size */
var bNeedServer = false;
var sEcho = fnGetKey(aoData, "sEcho");
var iRequestStart = fnGetKey(aoData, "iDisplayStart");
var iRequestLength = fnGetKey(aoData, "iDisplayLength");
var iRequestEnd = iRequestStart + iRequestLength;
oCache.iDisplayStart = iRequestStart;
/* outside pipeline? */
if ( oCache.iCacheLower < 0 || iRequestStart < oCache.iCacheLower || iRequestEnd > oCache.iCacheUpper )
{
bNeedServer = true;
}
/* sorting etc changed? */
if ( oCache.lastRequest && !bNeedServer )
{
for( var i=0, iLen=aoData.length ; i
[code] json.aaData is undefined @ line 99 [/code]
Here is line (located at the end of code)
[code] json.aaData.splice( 0, iRequestStart-oCache.iCacheLower ); [/code]
PHP side responds, and this table works 100% without pipelining. But When I enable pipelining getting this error
http://screencast.com/t/GOJzPHq3kg
[code] function fnDataTablesPipeline ( sSource, aoData, fnCallback ) {
var iPipe = 5; /* Ajust the pipe size */
var bNeedServer = false;
var sEcho = fnGetKey(aoData, "sEcho");
var iRequestStart = fnGetKey(aoData, "iDisplayStart");
var iRequestLength = fnGetKey(aoData, "iDisplayLength");
var iRequestEnd = iRequestStart + iRequestLength;
oCache.iDisplayStart = iRequestStart;
/* outside pipeline? */
if ( oCache.iCacheLower < 0 || iRequestStart < oCache.iCacheLower || iRequestEnd > oCache.iCacheUpper )
{
bNeedServer = true;
}
/* sorting etc changed? */
if ( oCache.lastRequest && !bNeedServer )
{
for( var i=0, iLen=aoData.length ; i
This discussion has been closed.
Replies
Allan
Allan
The extend:
[code]
json = jQuery.extend(true, {}, oCache.lastJson);
[/code]
doesn't seem to return a valid object even though it exists.
if you put the firebug debugger on this line, does it work? seems if you let the code wait here then step through, it will work correctly.