[ColdBox-4.1.0] Recordset Paging Plugin Conversion

Has anyone taken the old paging plugin and converted it for use with cold box 4? If so, would you share or give me some pointers on how to do it myself. I’ve looked at the documentation and tried but keep getting Builder.DSLDependencyNotFoundException errors. Any help would be appreciated!

I took it upon myself to attempt to convert the original paging plugin for use with CB4. Also modified it to use bootstraps paging css. here is the code. Would love it if one of the more experienced folks would review it and provide feedback. Please also feel free to use if you like.

`

/**

  • paging service

Was the original plugin on Github? (having a hard time finding it ATM). If so, can you send your changes as pull. If it was formerly a plugin, we’d want to convert it over to a module.

Thanks!

~Brad

ColdBox/CommandBox Developer Advocate
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

created a pull request depot-cbox-plugins

Ahh, that’s why I couldn’t find it-- it’s in that bundle of plugins. Hmm, seems it should probably get it’s own repo for the module.

BTW, you created the pull request to your OWN repo, not to the official ColdBox repo :slight_smile:

Luis, what’s your thoughts on these old plugins? Should we create a new repo for the paging plugin to get turned into a module?

Thanks!

~Brad

ColdBox/CommandBox Developer Advocate
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Yes. You can create it under the ColdBox-modules organization

Ok, here’s the new module:
https://www.forgebox.io/view/cbpagination

Install it like so:

box install cbpagination

The source code now lives here:
https://github.com/coldbox-modules/cbox-pagination

Please test it out and make sure it works. Any further fixes can be sent as pulls to the above repo.

Thanks!

~Brad

ColdBox/CommandBox Developer Advocate
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Created pull request in the main repository

Please see my previous message. We’ve created a new repo for this project and it already has your changes in it.

Thanks!

~Brad

ColdBox/CommandBox Developer Advocate
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Gesendet von meinem BlackBerry 10-Smartphone.



Von: brad@bradwood.com
Gesendet: Dienstag, 20. September 2016 22:31
An: coldbox@googlegroups.com
Antwort an: coldbox@googlegroups.com
Betreff: RE: Re: Re: [coldbox:25984] Re: [ColdBox-4.1.0] Recordset Paging Plugin Conversion

Please see my previous message. We’ve created a new repo for this project and it already has your changes in it.

Thanks!

~Brad

ColdBox/CommandBox Developer Advocate
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Had issues trying to load the module. Found it was the init function was incorrectly implemented. Corrected and submitted pull request.

Thanks, merged.

~Brad

ColdBox/CommandBox Developer Advocate
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

No problem. I did run through it in my app and with the small result set i’m working with it seems to be working correctly. I did notice though that when reducing the size of the results returned so we get more pages, the bandage does not seem to be working properly, instead of staying at a consistant 10 records, pages start getting added to the pager and the band gap reduces… Been staring at it for hours and for the life of me I can’t figure it out. Would it be possible for you to take a look?