Closed NEOSolutions closed 11 years ago
Hi tigrang. First of all thanks for this awesome Plugin.
In the past my dataTableSettings was empty. Recently I updated to the latest master and now I got
var dataTableSettings = {"Registration":{"bServerSide":true,"sAjaxSource":"\/nexus\/solutionscms\/registrations"}};
that throws me an error:
DateTableComponent: Model not specified for request.
you see, the sAjaxSource doesn't come with ?model=Registration
The SolutionsCMS part is the admin prefix. So the view is solutions_index.ctp
<?php foreach($dtResults as $result) { debug($result); $this->dtResponse['aaData'][] = array( $result['Registration']['razao_social'], $result['Registration']['cnpj'], $result['Registration']['email'], 'actions', ); }
public $components = array( 'DataTable.DataTable' => array( 'Registration' => array( 'columns' => array( 'razao_social' => 'Razão Social' , 'cnpj' => 'CNPJ' , 'email' => 'E-mail' , 'Ações' => NULL , // tells DataTable that this column is not tied to a field ) ) , 'triggerAction' => '*' ) , );
public function solutionscms_index() { $this->layout = 'SolutionsCMS.index'; // $this->Registration->recursive = 0; // $this->set( 'registrations' , $this->paginate() ); $this->DataTable->paginate = array( 'Registration' ); }
Please try out the https://github.com/tigrang/cakephp-datatable/tree/bug-fixes branch and see if that fixes it. Thank you.
It worked for me. thanks @tigrang
Master should be fixed. Closing.
Hi tigrang. First of all thanks for this awesome Plugin.
In the past my dataTableSettings was empty. Recently I updated to the latest master and now I got
that throws me an error:
you see, the sAjaxSource doesn't come with ?model=Registration
The SolutionsCMS part is the admin prefix. So the view is solutions_index.ctp