Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Struts 2 jQuery DataTables plugin #54

Conversation

flofourcade
Copy link
Contributor

@flofourcade flofourcade commented Aug 11, 2016

Using struts2-jquery-grid-plugin as a starting point, here's a new plugin adding support for the great DataTables plugin.
What is done ?

  • added a <sjdt:datatables /> tag.
  • added support for all officials datatables plugins, except Editor, which is released under a commercial license.
  • added internationalization support, and corrected a bug in Head.java, where the first locale of the arrays could never be choosen (wrong indice test > 0, should be > -1).
  • added support for three theme : default (not use the jquery ui styles), jqueryui and bootstrap 3. Other theme are supported by DataTables (foundation, bootstrap 4, but didn't include them for now)
  • binding between DataTable's core and plugins events into Topic system.
  • binding between some core API methods and Topic system (redraw, reload, order,search,...)
  • support both Datatables processing modes : client side (for dataset < 10 000 rows) and serverSide.
  • added java classes to handle datatatables server side protocol (ServerSideProcessingRequest/Response)
  • support JS, AJAX, and DOM datasource
  • support JS and HTML5 data-* config options
  • updated struts2-jquery-plugin-showcase to give some example of use.

What can be added / improved ?

  • Create a custom editor plugin using jQuery and bootstrap
  • Add helper functions for grouping, summarizing
  • Add support for draggable,sortable, ... jquery interaction
  • Saw samples on the net where nested datatables are used
  • Investigate a strange bug when using official minified version of core DataTables.js with plugins like responsive in some browsers (FireFox) : big performance hit !!!
    Had to disable the use of minified core DataTable js. Maybe try to use a custom minified version

    EDIT : occurs only in FireFox with firebug opened
  • ...

Hope you'll like it !

- new struts2-jquery-datatables-plugin adding support for the datatables
plugin
- correct bug in internationalization support
- performace hit only occurs when using datatables minified with firebug
opened. Not an issue !
@jogep jogep merged commit f471be3 into struts-community-plugins:release/4.0.1 Aug 13, 2016
@jogep jogep added this to the 4.0.1 milestone Aug 13, 2016
@flofourcade flofourcade deleted the release/4.0.1-datatables branch March 31, 2017 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants