Server Side Table Set up?

Server Side Table Set up?

TechRayTechRay Posts: 7Questions: 0Answers: 0
edited July 2013 in DataTables 1.8
I have moved my table to the serverside for speed and to follow more of a MVC concept, right now I am working on creating all the functionality that the datatable did provide in the back-end. I was wondering if it is possible to have a lot of the following pushed into the backend as well so I can have more generic code. Right now I have to map what row x is on the table to what it is on the database, it would be easier if I could just have that set in the backend so if it changes I only have to change it in one place.

[code] oTable = $j('#jobReq_table').dataTable(
{ "bServerSide" : true,
"sServerMethod": 'GET',
"sAjaxSource": contextPath + "/reqData",
"sPaginationType": "full_numbers",
"bLengthChange": false,
"aaSorting": [[ 10, "asc" ]],
"fnDrawCallback": function(){rowDetailsEvent();},
"iDisplayLength": 12,
"aoColumns" : [
{"mData" : "id", "bVisible": false},
{"sTitle" : "", "mData" : null, "bSortable": false, "sDefaultContent" : " "},
{"sTitle" : "Job ID","mData" : "jobId" },
{"sTitle" : "Program","mData" : "contract"},
{"sTitle" : "Job Title",
"mData" : "jobTitle",
"mRender": function(data,type,row) {
return ''+data+'';
}},
{"sTitle" : "TTO Number","mData" : "TTONumber"},
{"mData" : "project", "bVisible": false},
{"mData" : "laborCategory", "bVisible": false},
{"sTitle" : "Posted Date","mData" : "postedDate"},
{"sTitle" : "Last Modified","mData" : "modifiedDate"},
{"sTitle" : "Status","mData" : "status", "sType":"status"},
{"mData" : "summary", "bVisible": false},
{"mData" : "jobDescription", "bVisible": false},
{"mData" : "requiredSkills", "bVisible": false}
]
}); [/code]
This discussion has been closed.