cakephp-datatable icon indicating copy to clipboard operation
cakephp-datatable copied to clipboard

Plans to extend the plugin for custom find

Open fr0z3nfyr opened this issue 9 years ago • 5 comments

Any plans to extend the plugin to perform custom find (all, threaded, <custom>,...) instead of supporting just the Paginator component?

I'm right now facing this challenge to find records using threaded and display them as a tree in DT. So, I really can't use paginate for this purpose.

  1. I want to avoid processing the data in my view
  2. I don't want to complicate my paginator settings (it might not be possible at all, haven't tried yet)
  3. Want to control whether to count child rows in iTotalRecords and iDisplayRecords
  4. ...

I may end up extending the functionality of your plugin, just wanted to check your thoughts on this and if you had any plans.

fr0z3nfyr avatar Mar 30 '17 07:03 fr0z3nfyr

I've started a new project for Cake3 (https://github.com/cnizzardini/cakephp-yummy). I have yet to port this code over though. It is not likely I will continue to maintain this for Cake2...sorry :-(

cnizzardini avatar Mar 30 '17 07:03 cnizzardini

Out of curiosity, how were you going to display threaded in a table view? Not sure DT is the best for this. If you want to extend and can demonstrate your changes work, I'd be happy to merge them into master.

There are all good ideas for the next version in cakephp-yummy as well. Are you pretty much stuck on Cake2?

cnizzardini avatar Mar 30 '17 07:03 cnizzardini

I did chech Cake-Yummy and liked it from the literature(never used, though).

Are you pretty much stuck on Cake2?

Sadly, yes!! Have no choice at the moment because 3 apps written on cake 2 use single sign-on by sharing sessions. I will probably migrate all the apps to Cake 3 someday and get rid of session sharing altogether (there are pretty decent ways to achieve this, I know!).

Out of curiosity, how were you going to display threaded in a table view?

Well, I started by following a post on their support forum and realized it doesn't work right. Then I started to write an extension for DT of my own, and came across this extension. Well, it's not robust yet but at least gets the work done for now.

fr0z3nfyr avatar Mar 30 '17 12:03 fr0z3nfyr

Ohh! I forgot to mention that I tried to use paginate by setting 'findType' => 'threaded' in $this->Paginator->settings but unfortunately, the retrieved data was not formatted as find('threaded') with children sub array. So, one thing is clear that I can't use paginate for this table.

I'm thinking of reconsidering my choice of using DT for this table like you suggested, but I'd prefer keeping the visual appeal of all my tables same and I'm not very good with CSS. :cry: Let's see how this one turns out in the end!

Should I close this issue, or you want to keep this open to plan something for Cake 3?

fr0z3nfyr avatar Mar 30 '17 13:03 fr0z3nfyr

Nah it can stay open

cnizzardini avatar Apr 08 '17 00:04 cnizzardini