Server-side processing with pipelining

Server-side processing with pipelining

tt13tt13 Posts: 5Questions: 0Answers: 0
edited May 2012 in General
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

Replies

  • allanallan Posts: 61,743Questions: 1Answers: 10,111 Site admin
    Can you link to a test page showing the error please?

    Allan
  • tt13tt13 Posts: 5Questions: 0Answers: 0
    Can't really. It's in my local server. All works well, the only thing that I need is, get work pipeline with POST not with GET.
  • allanallan Posts: 61,743Questions: 1Answers: 10,111 Site admin
    In that case I'm afraid I don't know - it looks correct to me :-). What does Firebug say is being returned from the server?

    Allan
  • rsulliv1rsulliv1 Posts: 3Questions: 0Answers: 0
    edited June 2012
    Getting the same error here.

    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.
This discussion has been closed.