kalyani14591 / jquery-datatables-column-filter

Automatically exported from code.google.com/p/jquery-datatables-column-filter
0 stars 0 forks source link

oSettings is undefined raised when filtering using server side processing #78

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. using datable 1.9.1 and latest jquery-datatables-column-filter
2. having this configuration (in coffeescript):

$('#devices_table').dataTable(
    "sDom": "<'row-fluid'<'span6'l><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>"
    "sPaginationType": "bootstrap"
    "bJQueryUI": true
    "bProcessing": true
    "bServerSide": true
    "bRetrieve": true
    "sServerMethod": "GET"
    "sAjaxSource": $('#devices_table').data('source')).columnFilter
    "aoColumns": [ {type: "select", values: ['True', 'False']},
      { type: "text"  },  
      { type: "number"  },  
      { type: "text"  },  
      { type: "number-range"  },  
      { type: "number-range"  },  
      { type: "number-range"  },  
      { type: "number-range"  },  
      { type: "number-range"  },  
      { type: "text"   }   
    ]   
    "sPlaceHolder": "thead:before"

3. I also have other tables which uses datatables but not column filter (same 
config without the columnFilter call)

4. When selecting True or False in the first select, firebug console catch the 
following error:
oSettings is undefined
http://localhost:3000/assets/dataTables/jquery.dataTables.js?body=1
Line 8546
Nothing is sent to the server
5. Debugging the error seems to apply here (line 713)

fnServerDataOriginal(sSource, aoData, fnCallback, oTable.fnSettings()); //TODO: 
See Issue 18

Weird thing is that the call is launched under a try/catch...

If I comment the line to go directly on line 718, only the change on the first 
select (with True False) make the search to be fetched

Jquery-datatable is included in a gem for ruby but it's the version number I 
gave

Please provide any additional information below.

Original issue reported on code.google.com by sylvain....@gmail.com on 25 Jul 2012 at 6:19

GoogleCodeExporter commented 9 years ago
Use fnServerData property for data tables. That should fix your problem.

Original comment by crrajago...@gmail.com on 7 Sep 2012 at 6:19