bStateSave doesn't save extra parameters?!
bStateSave doesn't save extra parameters?!
newfield86
Posts: 5Questions: 0Answers: 0
Hi all,
Is there any way to save extra parameters, like:
[code]
"fnServerParams": function ( aoData )
{
aoData.push( {"name": "year", "value": $('#year').val() },
{"name": "status", "value": $('#status').val() } );
}
[/code]
into the cookie that is created by bStateSave? I can't figure out how. I have already looked into the function below, but dont see that extra parameters are saved.
[code]
function _fnSaveState ( oSettings )
{
if ( !oSettings.oFeatures.bStateSave || oSettings.bDestroying )
{
return;
}
/* Store the interesting variables */
var i, iLen, bInfinite=oSettings.oScroll.bInfinite;
var oState = {
"iCreate": new Date().getTime(),
"iStart": (bInfinite ? 0 : oSettings._iDisplayStart),
"iEnd": (bInfinite ? oSettings._iDisplayLength : oSettings._iDisplayEnd),
"iLength": oSettings._iDisplayLength,
"aaSorting": $.extend( true, [], oSettings.aaSorting ),
"oSearch": $.extend( true, {}, oSettings.oPreviousSearch ),
"aoSearchCols": $.extend( true, [], oSettings.aoPreSearchCols ),
"abVisCols": []
};
for ( i=0, iLen=oSettings.aoColumns.length ; i
Is there any way to save extra parameters, like:
[code]
"fnServerParams": function ( aoData )
{
aoData.push( {"name": "year", "value": $('#year').val() },
{"name": "status", "value": $('#status').val() } );
}
[/code]
into the cookie that is created by bStateSave? I can't figure out how. I have already looked into the function below, but dont see that extra parameters are saved.
[code]
function _fnSaveState ( oSettings )
{
if ( !oSettings.oFeatures.bStateSave || oSettings.bDestroying )
{
return;
}
/* Store the interesting variables */
var i, iLen, bInfinite=oSettings.oScroll.bInfinite;
var oState = {
"iCreate": new Date().getTime(),
"iStart": (bInfinite ? 0 : oSettings._iDisplayStart),
"iEnd": (bInfinite ? oSettings._iDisplayLength : oSettings._iDisplayEnd),
"iLength": oSettings._iDisplayLength,
"aaSorting": $.extend( true, [], oSettings.aaSorting ),
"oSearch": $.extend( true, {}, oSettings.oPreviousSearch ),
"aoSearchCols": $.extend( true, [], oSettings.aoPreSearchCols ),
"abVisCols": []
};
for ( i=0, iLen=oSettings.aoColumns.length ; i
This discussion has been closed.
Replies
Allan
[code]
"fnStateSaveParams": function (oSettings, oData)
{
oData.year = $('#year').val();
oData.status = $('#status').val();
},
"fnStateLoadParams": function (oSettings, oData)
{
$('#year').val( oData.year );
$('#status').val( oData.status );
},
[/code]