Mutliple paginated tables

Mutliple paginated tables

adidasadidas Posts: 1Questions: 0Answers: 0
edited April 2013 in General
Hi there,

First, congrats for such a useful plug-in.
As I'm new to DataTables, I'm not sure if I'm doing this in the right way but here we go...

So, I have a page with multiple tables, each one with its own pagination (controls) and server-side processing. As the number of these tables can vary in my case, I'm creating many target tables (html) dynamically. Further, I'm doing the same with the DataTable initialisation code as shown below.

However, after getting all the tables populated, when changing any page of those tables I'm getting an IndexOutOfBounds Exception. It says that the variable "tableId", which I used to initialise each table, is now "myList.length + 1". In other words, each table doesn't hold the "tableId" parameter that was sent to the server during its initialisation. Why is it?

Maybe, I'm approaching this problem in the wrong way. But I looked over "http://datatables.net/release-datatables/examples/basic_init/multiple_tables.html" and it didn't help me much.

Could anybody out there help me to figure out the solution?

Thanks in advance.

/ Leo

----

JSP:



My Tables

Title: ${tableTitle}



Name
E-mail address
Date









JavaScript:

$(document).ready(function() {

for (var tableId = 0 ; i < ${fn:length(myList)}; tableId++ ) {

$('#table_'+tableId).dataTable( {
"bServerSide": true,
"bProcessing": true,
"sPaginationType": "bootstrap",
"sAjaxSource": "statistics/getData",
"bFilter": false,
"bSort": false,
"bInfo": false,
"bJQueryUI": true,
"sDom": '<"top"l>rt<"toolbar">frt<"bottom"p><"clear">',
"oLanguage":{
"sLengthMenu": "Display _MENU_",
},
"aoColumns": [
{ "mDataProp": "name" },
{ "mDataProp": "email" },
{ "mDataProp": "date" }
],
"fnServerParams": function ( aoData ) {
aoData.push({"name" : "versionId", "value" : ${versionId}});
aoData.push({"name" : "id", "value" : ${param.id}});
aoData.push({"name" : "tableId", "value" : tableId }); <--"Gets a wrong value when changing pages."
},
"fnServerData": function ( sSource, aoData, fnCallback ) {
$.getJSON( sSource, aoData, function (json) {
fnCallback(json);
});
}
});

$.extend( $.fn.dataTableExt.oStdClasses, {
"sWrapper": "dataTables_wrapper form-inline"
});
}
});

Replies

  • ta07mourvluta07mourvlu Posts: 0Questions: 0Answers: 0
    Dos trucos b que se pueden utilizar son: una faja que define la cintura mostrando las curvas en los lugares donde deben estar, asegur que la pieza rayada que escojamos no sea tampoco demasiado floja. Finally, you will need to groom your dog properly in order to prevent frequent bouts of constipation in dogs. "It is mainly used to report the fact that someone was travelling for the specific purpose of travelling in a "The Queen rode in an open-topped Rolls-Royce to the Abbey. You may consider using TANDBERG machines as well as this provides a full scale conferencing network in video. This can be difficult to do, especially if you aren't sure how much sugar is in the foods you are eating.
    The workshop at Asnières worked to produce orders for Coco Chanel, the Aga Khan,Cheap Nike NFL Womens Jerseys, Mary Pickford, the Vanderbilts, and the president of the French Republic, among others. However, the late Princess Diana chose a ring from Garrard Jewellers' catalogue. To find the best beans,http://www.orlandohomefinders.com/, you need to try them. Belief in a God greater than the world in which we live is all that is required. How do you fancy the idea of your favorite movie star or celebrity smiling at you each morning?
    The -- for Good Morning America Barbara Pinto ABC news Chicago. To maximize enjoyment of sky antens, yo need to know how to se them popey so that yo emain safe wheneve yo se them. (Different strengths work on different "levels. California State Parks, RV parks and campground provide world-class service and handicapped considerations to make sure that a good time is had by all. is some good information o "ysstyle" n what A3 s and SOFA stamps are in reference to S.
    (Contempate) gooey siicone: awkwad siicone is odinaiy chaacteistic of adjstabiity is most effective, as we as skid, pimaiy inteio on the inside spots shoes. Technology is changing the way we teach and the way our students learn. It might have been so a few years ago,cheap mlb jerseys free shipping, but now you may be feeling like that once-upon-a-time dream job has turned into a bit of a nightmare - and it's getting worse. CHANEL epica handbags on SaeThis designe handbags, designe handbags comes in ppe, beige and bown. The more of these simple bs that you eat without physical exertion to burn them off,Lowest Price For Cheap nfl jerseys Online Wholesale, the more weight you are going to gain.
    Related Articles:


    http://datatables.net/forums/discussion/7637/twitter-bootstrap/p1/
This discussion has been closed.