Empty aoData then loading data from Ajax source

Empty aoData then loading data from Ajax source

freeriderfreerider Posts: 1Questions: 0Answers: 0
edited October 2010 in General
Hi!

I use this code to init my table:
[code]
var LanguageUrl = ' ... ';
var URL2Load = ' ... ';

oTable = $('#table').dataTable( {
"bProcessing": false,
"bJQueryUI": true,
"iDisplayLength": 10,
"sDom": 't<"rbottom"pilf>',
"aaSorting": [[ 3, "asc" ]],
"oLanguage": {
"sUrl": LanguageUrl
},
"sAjaxSource": URL2Load,
"fnServerData": function ( sSource, aoData, fnCallback ) {
$.ajax( {
"dataType": "json",
"type": "GET",
"url": sSource,
"data": [{"name" : "param", "value" : 123}],
"success": fnCallback
} );
}
});
[/code]

And I want to use API to interaction with my table.

At first I tried "console.dir(oTable.fnGetNodes());" but got a blank console.
Then I tried "console.dir(oTable.fnSettings());" and saw that aoData array is empty. From what I have concluded that this is why the fnGetNodes() does not work.

I repeated the experiment when the data are taken from DOM and saw that aoData array has data!

Is this a bug or a feature?
Help me use API.
This discussion has been closed.