views:

72

answers:

1

Hi,

I'm trying to create a CakePHP component for JQuery datatables in server-side mode. I've got the datatable working but I want to componentize it so I can reuse it in multiple controllers.

When I include my new component in a controller I want it to create a new action on that controller called tabledata to handle the XHR queries from JQuery. Is such a thing possible?

I'd also like to know if I'm going about this in completely the wrong way.

A: 

You can add a __call() method in your app_controller to test if your component loaded and then do something.

Chen