├── .gitignore ├── README.md ├── datatables-jsp-ajax ├── Dockerfile ├── README.md ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── github │ │ └── dandelion │ │ └── datatables │ │ ├── model │ │ ├── Address.java │ │ ├── Company.java │ │ ├── Person.java │ │ └── Town.java │ │ ├── repository │ │ ├── PersonRepository.java │ │ └── jpa │ │ │ ├── PersonJpaRepository.java │ │ │ └── PersonRepositoryUtils.java │ │ ├── service │ │ ├── PersonService.java │ │ └── PersonServiceImpl.java │ │ └── web │ │ ├── SampleController.java │ │ └── ajax │ │ └── AjaxController.java │ ├── resources │ ├── dandelion │ │ ├── app-ajax.json │ │ ├── app-custom-rendering.json │ │ ├── app-filtering.json │ │ ├── app.json │ │ └── dandelion.properties │ ├── logback.xml │ ├── spring │ │ ├── business-config.xml │ │ ├── datasource-config.xml │ │ ├── mvc-core-config.xml │ │ └── mvc-view-config.xml │ └── sql │ │ ├── address.sql │ │ ├── company.sql │ │ ├── person.sql │ │ └── town.sql │ └── webapp │ ├── WEB-INF │ ├── tiles │ │ ├── tiles-ajax-defs.xml │ │ ├── tiles-defs.xml │ │ ├── tiles-filtering-defs.xml │ │ └── tiles-server-side-defs.xml │ ├── views │ │ ├── ajax │ │ │ ├── handling-null-default-values.jsp │ │ │ └── index.jsp │ │ ├── common │ │ │ ├── layout.jsp │ │ │ └── taglib.jsp │ │ ├── filtering │ │ │ ├── filtering-onclick-with-external-form.jsp │ │ │ ├── filtering-onclick.jsp │ │ │ └── global-delayed-filtering.jsp │ │ ├── index.jsp │ │ └── server-side │ │ │ ├── column-custom-rendering.jsp │ │ │ ├── custom-ajax-request.jsp │ │ │ ├── data-custom-reloading.jsp │ │ │ ├── data-default-reloading.jsp │ │ │ ├── enabling-server-side-processing.jsp │ │ │ ├── pipelining-data-with-custom-pipesize.jsp │ │ │ └── pipelining-data.jsp │ └── web.xml │ └── assets │ ├── css │ ├── application.css │ └── yadcf-custom.css │ └── js │ ├── ajax.js │ ├── custom-rendering.js │ └── filtering.js ├── datatables-jsp-configuration-groups ├── .gitignore ├── Dockerfile ├── README.md ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── github │ │ └── dandelion │ │ └── datatables │ │ ├── model │ │ ├── Address.java │ │ ├── Company.java │ │ ├── Person.java │ │ └── Town.java │ │ ├── repository │ │ ├── PersonRepository.java │ │ └── memory │ │ │ └── PersonMemoryRepository.java │ │ ├── service │ │ ├── PersonService.java │ │ └── PersonServiceImpl.java │ │ └── web │ │ └── SampleController.java │ ├── resources │ ├── dandelion │ │ ├── app.json │ │ ├── dandelion.properties │ │ └── datatables │ │ │ └── datatables.properties │ ├── logback.xml │ └── spring │ │ ├── business-config.xml │ │ ├── mvc-core-config.xml │ │ └── mvc-view-config.xml │ └── webapp │ ├── WEB-INF │ ├── views │ │ ├── common │ │ │ ├── head.jsp │ │ │ └── navbar.jsp │ │ ├── global-group.jsp │ │ ├── group-overloading.jsp │ │ ├── index.jsp │ │ └── local-overloading.jsp │ └── web.xml │ └── assets │ └── css │ └── app.css ├── datatables-jsp-export ├── .gitignore ├── Dockerfile ├── README.md ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── github │ │ └── dandelion │ │ └── datatables │ │ ├── model │ │ ├── Address.java │ │ ├── Company.java │ │ ├── Person.java │ │ └── Town.java │ │ ├── repository │ │ ├── PersonRepository.java │ │ └── jpa │ │ │ ├── PersonJpaRepository.java │ │ │ └── PersonRepositoryUtils.java │ │ ├── service │ │ ├── PersonService.java │ │ └── PersonServiceImpl.java │ │ └── web │ │ ├── ExportController.java │ │ ├── MyExportController.java │ │ ├── SampleController.java │ │ ├── ajax │ │ └── AjaxController.java │ │ └── views │ │ └── MyCustomExportClass.java │ ├── resources │ ├── dandelion │ │ ├── app-custom-rendering.json │ │ ├── app.json │ │ ├── dandelion.properties │ │ └── datatables │ │ │ └── datatables.properties │ ├── logback.xml │ ├── spring │ │ ├── business-config.xml │ │ ├── datasource-config.xml │ │ ├── mvc-core-config.xml │ │ └── mvc-view-config.xml │ └── sql │ │ ├── address.sql │ │ ├── company.sql │ │ ├── person.sql │ │ └── town.sql │ └── webapp │ ├── WEB-INF │ ├── views │ │ ├── ajax │ │ │ ├── controller-based-with-custom-http-method.jsp │ │ │ ├── controller-based.jsp │ │ │ └── customizing-export-content.jsp │ │ ├── common │ │ │ ├── head.jsp │ │ │ ├── navbar.jsp │ │ │ └── taglib.jsp │ │ ├── custom │ │ │ └── custom-export.jsp │ │ ├── dom │ │ │ ├── controller-based.jsp │ │ │ ├── customizing-export-content.jsp │ │ │ └── filter-based.jsp │ │ ├── index.jsp │ │ └── options │ │ │ ├── column-autosizing.jsp │ │ │ ├── links-position.jsp │ │ │ ├── links-style.jsp │ │ │ └── orientation.jsp │ └── web.xml │ └── assets │ ├── css │ └── app.css │ └── js │ └── app-custom-rendering.js ├── datatables-jsp-extension ├── .gitignore ├── Dockerfile ├── README.md ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── github │ │ └── dandelion │ │ └── datatables │ │ ├── model │ │ ├── Address.java │ │ ├── Company.java │ │ ├── Person.java │ │ └── Town.java │ │ ├── repository │ │ ├── PersonRepository.java │ │ └── memory │ │ │ └── PersonMemoryRepository.java │ │ ├── service │ │ ├── PersonService.java │ │ └── PersonServiceImpl.java │ │ └── web │ │ ├── SampleController.java │ │ └── extension │ │ └── MyAwesomeExtension.java │ ├── resources │ ├── META-INF │ │ └── services │ │ │ └── com.github.dandelion.datatables.core.extension.Extension │ ├── dandelion │ │ ├── app.json │ │ └── dandelion.properties │ ├── logback.xml │ └── spring │ │ ├── business-config.xml │ │ ├── mvc-core-config.xml │ │ └── mvc-view-config.xml │ └── webapp │ ├── WEB-INF │ ├── views │ │ ├── common │ │ │ ├── head.jsp │ │ │ └── navbar.jsp │ │ └── index.jsp │ └── web.xml │ └── assets │ └── css │ └── app.css ├── datatables-jsp-i18n-struts1 ├── Dockerfile ├── README.md ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── github │ │ └── dandelion │ │ └── datatables │ │ └── struts1 │ │ ├── mock │ │ ├── Address.java │ │ ├── Mock.java │ │ ├── Person.java │ │ └── Town.java │ │ └── web │ │ └── I18nAction.java │ ├── resources │ ├── ApplicationResources.properties │ ├── ApplicationResources_fr_FR.properties │ ├── dandelion │ │ ├── datatables │ │ │ └── datatables.properties │ │ └── sample.json │ └── logback.xml │ └── webapp │ ├── WEB-INF │ ├── struts-config.xml │ ├── views │ │ ├── common │ │ │ ├── footer.jsp │ │ │ ├── head.jsp │ │ │ └── navbar.jsp │ │ └── i18n.jsp │ └── web.xml │ ├── assets │ └── css │ │ └── application.css │ └── index.jsp ├── datatables-jsp-i18n-struts2 ├── Dockerfile ├── README.md ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── github │ │ └── dandelion │ │ └── datatables │ │ └── struts2 │ │ ├── mock │ │ ├── Address.java │ │ ├── Mock.java │ │ ├── Person.java │ │ └── Town.java │ │ └── web │ │ └── I18nAction.java │ ├── resources │ ├── dandelion │ │ ├── dandelion.properties │ │ ├── datatables │ │ │ └── datatables.properties │ │ └── sample.json │ ├── global.properties │ ├── global_de.properties │ ├── global_fr.properties │ └── struts.xml │ └── webapp │ ├── WEB-INF │ ├── views │ │ ├── common │ │ │ ├── footer.jsp │ │ │ ├── head.jsp │ │ │ └── navbar.jsp │ │ └── i18n.jsp │ └── web.xml │ ├── assets │ └── css │ │ └── application.css │ └── index.jsp ├── datatables-jsp-plugins ├── .gitignore ├── Dockerfile ├── README.md ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── github │ │ └── dandelion │ │ └── datatables │ │ ├── model │ │ ├── Address.java │ │ ├── Company.java │ │ ├── Person.java │ │ └── Town.java │ │ ├── repository │ │ ├── PersonRepository.java │ │ └── memory │ │ │ └── PersonMemoryRepository.java │ │ ├── service │ │ ├── PersonService.java │ │ └── PersonServiceImpl.java │ │ └── web │ │ └── SampleController.java │ ├── resources │ ├── dandelion │ │ ├── app.json │ │ └── dandelion.properties │ ├── logback.xml │ └── spring │ │ ├── business-config.xml │ │ ├── mvc-core-config.xml │ │ └── mvc-view-config.xml │ └── webapp │ ├── WEB-INF │ ├── views │ │ ├── colreorder │ │ │ └── default-configuration.jsp │ │ ├── common │ │ │ ├── head.jsp │ │ │ └── navbar.jsp │ │ ├── fixedheader │ │ │ └── default-configuration.jsp │ │ └── scroller │ │ │ └── default-configuration.jsp │ └── web.xml │ ├── assets │ └── css │ │ └── application.css │ └── index.jsp ├── datatables-jsp-spring-boot ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── boot │ │ │ └── sample │ │ │ └── jsp │ │ │ ├── SampleWebJspApplication.java │ │ │ └── WelcomeController.java │ └── webapp │ │ └── WEB-INF │ │ └── jsp │ │ └── welcome.jsp │ └── test │ └── java │ └── org │ └── springframework │ └── boot │ └── sample │ └── jsp │ └── SampleWebJspApplicationTests.java ├── datatables-jsp-starter ├── .gitignore ├── Dockerfile ├── README.md ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── github │ │ └── dandelion │ │ └── datatables │ │ ├── model │ │ ├── Address.java │ │ ├── Company.java │ │ ├── Person.java │ │ └── Town.java │ │ ├── repository │ │ ├── PersonRepository.java │ │ └── memory │ │ │ └── PersonMemoryRepository.java │ │ ├── service │ │ ├── PersonService.java │ │ └── PersonServiceImpl.java │ │ └── web │ │ ├── CustomExportFeature.java │ │ └── SampleController.java │ ├── resources │ ├── META-INF │ │ └── services │ │ │ └── com.github.dandelion.datatables.core.extension.Extension │ ├── dandelion │ │ ├── app-callback.json │ │ ├── app-filtering.json │ │ ├── app.json │ │ └── dandelion.properties │ ├── logback.xml │ └── spring │ │ ├── business-config.xml │ │ ├── mvc-core-config.xml │ │ └── mvc-view-config.xml │ └── webapp │ ├── WEB-INF │ ├── tiles │ │ ├── tiles-advanced-defs.xml │ │ ├── tiles-basics-defs.xml │ │ ├── tiles-column-rendering-defs.xml │ │ ├── tiles-defs.xml │ │ └── tiles-styling-defs.xml │ ├── views │ │ ├── advanced │ │ │ ├── callbacks.jsp │ │ │ ├── dynamic-attributes.jsp │ │ │ ├── extra-html.jsp │ │ │ ├── extra-js.jsp │ │ │ └── multiple-tables.jsp │ │ ├── basics │ │ │ ├── dom-positioning.jsp │ │ │ ├── filtering │ │ │ │ ├── enable-disable-global-filtering.jsp │ │ │ │ ├── exclude-column-from-global-filtering.jsp │ │ │ │ ├── external-form.jsp │ │ │ │ ├── filtering-onclick.jsp │ │ │ │ ├── filterplaceholder.jsp │ │ │ │ ├── input.jsp │ │ │ │ ├── number-range.jsp │ │ │ │ ├── select-with-values.jsp │ │ │ │ └── select.jsp │ │ │ ├── paging │ │ │ │ ├── bootstrap-full-numbers.jsp │ │ │ │ ├── bootstrap-full.jsp │ │ │ │ ├── bootstrap-simple.jsp │ │ │ │ ├── defining-length-menu-options.jsp │ │ │ │ ├── enable-disable-length-menu.jsp │ │ │ │ ├── enable-disable-paging.jsp │ │ │ │ ├── full-numbers.jsp │ │ │ │ ├── full.jsp │ │ │ │ ├── simple-numbers.jsp │ │ │ │ └── simple.jsp │ │ │ ├── scrolling │ │ │ │ ├── scroll-horizontal.jsp │ │ │ │ └── scroll-vertical.jsp │ │ │ └── sorting │ │ │ │ ├── enable-disable-sorting.jsp │ │ │ │ ├── individual-column-sorting.jsp │ │ │ │ ├── naturalsort.jsp │ │ │ │ ├── sorting-direction-control.jsp │ │ │ │ ├── sorting-init-with-custom-order.jsp │ │ │ │ └── sorting-init.jsp │ │ ├── column-rendering │ │ │ ├── column-custom-content.jsp │ │ │ ├── column-custom-header.jsp │ │ │ ├── column-default-content.jsp │ │ │ ├── implicit-object.jsp │ │ │ └── row-id.jsp │ │ ├── common │ │ │ ├── layout.jsp │ │ │ └── taglib.jsp │ │ ├── index.jsp │ │ └── styling │ │ │ └── styling.jsp │ └── web.xml │ └── assets │ ├── css │ ├── app.css │ ├── main.css │ ├── normalize.css │ └── yadcf-custom.css │ └── js │ ├── app-callbacks.js │ ├── app-filtering.js │ ├── customrendering.js │ ├── main.js │ ├── plugins.js │ └── vendor │ └── modernizr-2.8.3.min.js ├── datatables-jsp-themes ├── .gitignore ├── Dockerfile ├── README.md ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── github │ │ └── dandelion │ │ └── datatables │ │ ├── model │ │ ├── Address.java │ │ ├── Company.java │ │ ├── Person.java │ │ └── Town.java │ │ ├── repository │ │ ├── PersonRepository.java │ │ └── memory │ │ │ └── PersonMemoryRepository.java │ │ ├── service │ │ ├── PersonService.java │ │ └── PersonServiceImpl.java │ │ └── web │ │ ├── SampleController.java │ │ └── ddl │ │ └── CustomJqueryTheme.java │ ├── resources │ ├── dandelion │ │ ├── app.json │ │ ├── custom-theme.json │ │ └── datatables │ │ │ └── datatables.properties │ ├── logback.xml │ └── spring │ │ ├── business-config.xml │ │ ├── mvc-core-config.xml │ │ └── mvc-view-config.xml │ └── webapp │ ├── WEB-INF │ ├── tiles │ │ ├── tiles-bootstrap2-defs.xml │ │ ├── tiles-bootstrap3-defs.xml │ │ ├── tiles-defs.xml │ │ └── tiles-jqueryui-defs.xml │ ├── views │ │ ├── bootstrap2 │ │ │ ├── bootstrap2-activation.jsp │ │ │ └── bootstrap2-responsive.jsp │ │ ├── bootstrap3 │ │ │ ├── bootstrap3-activation.jsp │ │ │ └── bootstrap3-responsive.jsp │ │ ├── common │ │ │ ├── layout-bootstrap3.jsp │ │ │ ├── layout.jsp │ │ │ └── taglib.jsp │ │ ├── jqueryui │ │ │ ├── custom-theme.jsp │ │ │ └── theme-roller.jsp │ │ └── overview.jsp │ └── web.xml │ ├── assets │ ├── css │ │ ├── app.css │ │ └── jquery-ui-1.10.4.custom.css │ └── images │ │ ├── Thumbs.db │ │ ├── animated-overlay.gif │ │ ├── ui-bg_diamond_10_4f4221_10x8.png │ │ ├── ui-bg_diamond_20_372806_10x8.png │ │ ├── ui-bg_diamond_25_675423_10x8.png │ │ ├── ui-bg_diamond_25_d5ac5d_10x8.png │ │ ├── ui-bg_diamond_8_261803_10x8.png │ │ ├── ui-bg_diamond_8_443113_10x8.png │ │ ├── ui-bg_flat_75_ddd4b0_40x100.png │ │ ├── ui-bg_highlight-hard_65_fee4bd_1x100.png │ │ ├── ui-icons_070603_256x240.png │ │ ├── ui-icons_e8e2b5_256x240.png │ │ ├── ui-icons_e9cd86_256x240.png │ │ ├── ui-icons_efec9f_256x240.png │ │ ├── ui-icons_f2ec64_256x240.png │ │ ├── ui-icons_f9f2bd_256x240.png │ │ └── ui-icons_ff7519_256x240.png │ └── index.jsp ├── datatables-thymeleaf-ajax ├── .gitignore ├── Dockerfile ├── README.md ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── github │ │ └── dandelion │ │ └── datatables │ │ ├── model │ │ ├── Address.java │ │ ├── Company.java │ │ ├── Person.java │ │ └── Town.java │ │ ├── repository │ │ ├── PersonRepository.java │ │ └── jpa │ │ │ ├── PersonJpaRepository.java │ │ │ └── PersonRepositoryUtils.java │ │ ├── service │ │ ├── PersonService.java │ │ └── PersonServiceImpl.java │ │ └── web │ │ ├── SampleController.java │ │ └── ajax │ │ └── AjaxController.java │ ├── resources │ ├── dandelion │ │ ├── app-ajax.json │ │ ├── app-custom-rendering.json │ │ ├── app-filtering.json │ │ ├── app.json │ │ ├── dandelion.properties │ │ └── dandelion_prod.properties │ ├── logback.xml │ ├── spring │ │ ├── business-config.xml │ │ ├── datasource-config.xml │ │ ├── mvc-core-config.xml │ │ └── mvc-view-config.xml │ └── sql │ │ ├── address.sql │ │ ├── company.sql │ │ ├── person.sql │ │ └── town.sql │ └── webapp │ ├── WEB-INF │ ├── views │ │ ├── ajax │ │ │ ├── handling-null-default-values.html │ │ │ └── index.html │ │ ├── common │ │ │ ├── head.html │ │ │ └── navbar.html │ │ ├── filtering │ │ │ ├── filtering-onclick-with-external-form.html │ │ │ ├── filtering-onclick.html │ │ │ └── global-delayed-filtering.html │ │ ├── index.html │ │ └── server-side │ │ │ ├── column-custom-rendering.html │ │ │ ├── custom-ajax-request.html │ │ │ ├── data-custom-reloading.html │ │ │ ├── data-default-reloading.html │ │ │ ├── enabling-server-side-processing.html │ │ │ ├── pipelining-data-with-custom-pipesize.html │ │ │ └── pipelining-data.html │ └── web.xml │ └── assets │ ├── css │ ├── application.css │ ├── jquery.dataTables.css │ └── yadcf-custom.css │ ├── images │ ├── Sorting icons.psd │ ├── Thumbs.db │ ├── back_disabled.png │ ├── back_enabled.png │ ├── back_enabled_hover.png │ ├── favicon.ico │ ├── forward_disabled.png │ ├── forward_enabled.png │ ├── forward_enabled_hover.png │ ├── sort_asc.png │ ├── sort_asc_disabled.png │ ├── sort_both.png │ ├── sort_desc.png │ └── sort_desc_disabled.png │ └── js │ ├── ajax.js │ ├── custom-rendering.js │ └── filtering.js ├── datatables-thymeleaf-configuration-groups ├── Dockerfile ├── README.md ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── github │ │ └── dandelion │ │ └── datatables │ │ ├── model │ │ ├── Address.java │ │ ├── Company.java │ │ ├── Person.java │ │ └── Town.java │ │ ├── repository │ │ ├── PersonRepository.java │ │ └── memory │ │ │ └── PersonMemoryRepository.java │ │ ├── service │ │ ├── PersonService.java │ │ └── PersonServiceImpl.java │ │ └── web │ │ └── SampleController.java │ ├── resources │ ├── dandelion │ │ ├── dandelion.properties │ │ ├── datatables │ │ │ └── datatables.properties │ │ └── sample.json │ ├── logback.xml │ └── spring │ │ ├── business-config.xml │ │ ├── mvc-core-config.xml │ │ └── mvc-view-config.xml │ └── webapp │ ├── WEB-INF │ ├── tiles │ │ └── setup-tiles.xml │ ├── views │ │ ├── common │ │ │ └── layout.html │ │ ├── global-group.html │ │ ├── group-overloading.html │ │ ├── index.html │ │ └── local-overloading.html │ └── web.xml │ └── assets │ └── css │ └── application.css ├── datatables-thymeleaf-export ├── .gitignore ├── Dockerfile ├── README.md ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── github │ │ └── dandelion │ │ └── datatables │ │ ├── model │ │ ├── Address.java │ │ ├── Company.java │ │ ├── Person.java │ │ └── Town.java │ │ ├── repository │ │ ├── PersonRepository.java │ │ └── jpa │ │ │ ├── PersonJpaRepository.java │ │ │ └── PersonRepositoryUtils.java │ │ ├── service │ │ ├── PersonService.java │ │ └── PersonServiceImpl.java │ │ └── web │ │ ├── ExportController.java │ │ ├── MyExportController.java │ │ ├── SampleController.java │ │ ├── ajax │ │ └── AjaxController.java │ │ └── views │ │ └── MyCustomExportClass.java │ ├── resources │ ├── dandelion │ │ ├── app-custom-rendering.json │ │ ├── app.json │ │ ├── dandelion.properties │ │ └── datatables │ │ │ └── datatables.properties │ ├── logback.xml │ ├── spring │ │ ├── business-config.xml │ │ ├── datasource-config.xml │ │ ├── mvc-core-config.xml │ │ └── mvc-view-config.xml │ └── sql │ │ ├── address.sql │ │ ├── company.sql │ │ ├── create.sql │ │ ├── person.sql │ │ └── town.sql │ └── webapp │ ├── WEB-INF │ ├── views │ │ ├── ajax │ │ │ ├── controller-based-with-custom-http-method.html │ │ │ ├── controller-based.html │ │ │ └── customizing-export-content.html │ │ ├── common │ │ │ ├── head.html │ │ │ └── navbar.html │ │ ├── custom │ │ │ └── custom-export.html │ │ ├── dom │ │ │ ├── controller-based.html │ │ │ ├── customizing-export-content.html │ │ │ └── filter-based.html │ │ ├── index.html │ │ └── options │ │ │ ├── column-autosizing.html │ │ │ ├── links-position.html │ │ │ ├── links-style.html │ │ │ └── orientation.html │ └── web.xml │ └── assets │ ├── css │ └── app.css │ └── js │ └── app-custom-rendering.js ├── datatables-thymeleaf-extension ├── Dockerfile ├── README.md ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── github │ │ └── dandelion │ │ └── datatables │ │ ├── model │ │ ├── Address.java │ │ ├── Company.java │ │ ├── Person.java │ │ └── Town.java │ │ ├── repository │ │ ├── PersonRepository.java │ │ └── memory │ │ │ └── PersonMemoryRepository.java │ │ ├── service │ │ ├── PersonService.java │ │ └── PersonServiceImpl.java │ │ └── web │ │ ├── SampleController.java │ │ └── extension │ │ └── MyAwesomeExtension.java │ ├── resources │ ├── META-INF │ │ └── services │ │ │ └── com.github.dandelion.datatables.core.extension.Extension │ ├── dandelion │ │ ├── app.json │ │ └── dandelion.properties │ ├── logback.xml │ └── spring │ │ ├── business-config.xml │ │ ├── mvc-core-config.xml │ │ └── mvc-view-config.xml │ └── webapp │ ├── WEB-INF │ ├── views │ │ ├── common │ │ │ └── layout.html │ │ └── index.html │ └── web.xml │ └── assets │ └── css │ └── application.css ├── datatables-thymeleaf-javaconfig ├── Dockerfile ├── README.md ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── github │ │ └── dandelion │ │ └── datatables │ │ ├── config │ │ ├── ApplicationInitializer.java │ │ ├── RootConfig.java │ │ ├── ThymeleafConfig.java │ │ └── WebConfig.java │ │ ├── model │ │ ├── Address.java │ │ ├── Company.java │ │ ├── Person.java │ │ └── Town.java │ │ ├── repository │ │ ├── PersonRepository.java │ │ └── memory │ │ │ └── PersonMemoryRepository.java │ │ ├── service │ │ ├── PersonService.java │ │ └── PersonServiceImpl.java │ │ └── web │ │ └── SampleController.java │ ├── resources │ ├── dandelion │ │ └── sample.json │ └── logback.xml │ └── webapp │ ├── WEB-INF │ └── views │ │ └── index.html │ └── assets │ └── css │ └── application.css ├── datatables-thymeleaf-plugins ├── .gitignore ├── Dockerfile ├── README.md ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── github │ │ └── dandelion │ │ └── datatables │ │ ├── model │ │ ├── Address.java │ │ ├── Company.java │ │ ├── Person.java │ │ └── Town.java │ │ ├── repository │ │ ├── PersonRepository.java │ │ └── memory │ │ │ └── PersonMemoryRepository.java │ │ ├── service │ │ ├── PersonService.java │ │ └── PersonServiceImpl.java │ │ └── web │ │ └── SampleController.java │ ├── resources │ ├── dandelion │ │ ├── dandelion.properties │ │ └── sample.json │ ├── logback.xml │ └── spring │ │ ├── business-config.xml │ │ ├── mvc-core-config.xml │ │ └── mvc-view-config.xml │ └── webapp │ ├── WEB-INF │ ├── views │ │ ├── colreorder │ │ │ └── default-configuration.html │ │ ├── common │ │ │ ├── head.html │ │ │ └── navbar.html │ │ ├── fixedheader │ │ │ └── default-configuration.html │ │ ├── index.html │ │ └── scroller │ │ │ └── default-configuration.html │ └── web.xml │ └── assets │ └── css │ └── application.css ├── datatables-thymeleaf-starter ├── Dockerfile ├── README.md ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── github │ │ │ └── dandelion │ │ │ └── datatables │ │ │ ├── model │ │ │ ├── Address.java │ │ │ ├── Company.java │ │ │ ├── Person.java │ │ │ └── Town.java │ │ │ ├── repository │ │ │ ├── PersonRepository.java │ │ │ └── memory │ │ │ │ └── PersonMemoryRepository.java │ │ │ ├── service │ │ │ ├── PersonService.java │ │ │ └── PersonServiceImpl.java │ │ │ └── web │ │ │ └── SampleController.java │ ├── resources │ │ ├── dandelion │ │ │ ├── app-callback.json │ │ │ ├── app-filtering.json │ │ │ ├── app.json │ │ │ └── dandelion.properties │ │ ├── logback.xml │ │ └── spring │ │ │ ├── business-config.xml │ │ │ ├── mvc-core-config.xml │ │ │ └── mvc-view-config.xml │ └── webapp │ │ ├── WEB-INF │ │ ├── views │ │ │ ├── advanced │ │ │ │ ├── callbacks.html │ │ │ │ ├── extra-html.html │ │ │ │ ├── extra-js.html │ │ │ │ └── multiple-tables.html │ │ │ ├── basics │ │ │ │ ├── dom-positioning.html │ │ │ │ ├── filtering │ │ │ │ │ ├── enable-disable-global-filtering.html │ │ │ │ │ ├── exclude-column-from-global-filtering.html │ │ │ │ │ ├── external-form.html │ │ │ │ │ ├── filtering-onclick.html │ │ │ │ │ ├── filterplaceholder.html │ │ │ │ │ ├── input.html │ │ │ │ │ ├── number-range.html │ │ │ │ │ ├── select-with-values.html │ │ │ │ │ └── select.html │ │ │ │ ├── paging │ │ │ │ │ ├── bootstrap-full-numbers.html │ │ │ │ │ ├── bootstrap-full.html │ │ │ │ │ ├── bootstrap-simple.html │ │ │ │ │ ├── defining-length-menu-options.html │ │ │ │ │ ├── enable-disable-length-menu.html │ │ │ │ │ ├── enable-disable-paging.html │ │ │ │ │ ├── full-numbers.html │ │ │ │ │ ├── full.html │ │ │ │ │ ├── simple-numbers.html │ │ │ │ │ └── simple.html │ │ │ │ ├── scrolling │ │ │ │ │ ├── scroll-horizontal.html │ │ │ │ │ └── scroll-vertical.html │ │ │ │ └── sorting │ │ │ │ │ ├── enable-disable-sorting.html │ │ │ │ │ ├── individual-column-sorting.html │ │ │ │ │ ├── naturalsort.html │ │ │ │ │ ├── sorting-direction-control.html │ │ │ │ │ ├── sorting-init-with-custom-order.html │ │ │ │ │ └── sorting-init.html │ │ │ ├── column-rendering │ │ │ │ ├── column-custom-header.html │ │ │ │ └── implicit-object.html │ │ │ ├── common │ │ │ │ ├── head.html │ │ │ │ └── navbar.html │ │ │ ├── index.html │ │ │ └── styling │ │ │ │ └── styling.html │ │ └── web.xml │ │ └── assets │ │ ├── css │ │ ├── app.css │ │ └── yadcf-custom.css │ │ └── js │ │ ├── app-callbacks.js │ │ └── app-filtering.js │ └── test │ └── jmeter │ └── datatables-thymeleaf-starter.jmx ├── datatables-thymeleaf-themes ├── Dockerfile ├── README.md ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── github │ │ └── dandelion │ │ └── datatables │ │ ├── model │ │ ├── Address.java │ │ ├── Company.java │ │ ├── Person.java │ │ └── Town.java │ │ ├── repository │ │ ├── PersonRepository.java │ │ └── memory │ │ │ └── PersonMemoryRepository.java │ │ ├── service │ │ ├── PersonService.java │ │ └── PersonServiceImpl.java │ │ └── web │ │ └── SampleController.java │ ├── resources │ ├── dandelion │ │ └── app.json │ ├── logback.xml │ └── spring │ │ ├── business-config.xml │ │ ├── mvc-core-config.xml │ │ └── mvc-view-config.xml │ └── webapp │ ├── WEB-INF │ ├── tiles │ │ ├── tiles-bootstrap2-defs.xml │ │ ├── tiles-bootstrap3-defs.xml │ │ ├── tiles-defs.xml │ │ └── tiles-jqueryui-defs.xml │ ├── views │ │ ├── bootstrap2 │ │ │ ├── bootstrap2-activation.html │ │ │ └── bootstrap2-responsive.html │ │ ├── bootstrap3 │ │ │ └── bootstrap3-activation.html │ │ ├── common │ │ │ ├── layout-bootstrap3.html │ │ │ └── layout.html │ │ ├── index.html │ │ └── jqueryui │ │ │ └── theme-roller.html │ └── web.xml │ └── assets │ └── css │ └── app.css └── pom.xml /.gitignore: -------------------------------------------------------------------------------- 1 | # Maven 2 | target/ 3 | 4 | # IntelliJ 5 | *.iml 6 | .idea/ 7 | 8 | # Eclipse 9 | .project 10 | .classpath 11 | .settings/ 12 | bin/ 13 | .metadata 14 | 15 | # JRebel 16 | rebel.xml 17 | 18 | # OSX 19 | .DS_Store 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # dandelion-datatables-samples 2 | Sample applications to demonstrate Dandelion-Datatables features 3 | -------------------------------------------------------------------------------- /datatables-jsp-ajax/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # dandelion/dt-jsp-ajax 3 | # 4 | FROM dandelion/sample-tomcat:7.0.62-jdk7 5 | MAINTAINER Thibault Duchateau 6 | 7 | ADD . /home/dandelion 8 | 9 | # Build the sample application 10 | # Deploy it to Tomcat 11 | # Remove sources to make the image thinner 12 | RUN cd /home/dandelion && \ 13 | mvn package && \ 14 | cp -r target/datatables-jsp-ajax /usr/local/tomcat/webapps/ && \ 15 | rm -rf /home/dandelion 16 | -------------------------------------------------------------------------------- /datatables-jsp-ajax/src/main/java/com/github/dandelion/datatables/model/Company.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.model; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.GenerationType; 7 | import javax.persistence.Id; 8 | 9 | @Entity 10 | public class Company { 11 | 12 | @Id 13 | @GeneratedValue(strategy = GenerationType.AUTO) 14 | private Long id; 15 | 16 | @Column 17 | private String name; 18 | 19 | public Long getId() { 20 | return id; 21 | } 22 | 23 | public void setId(Long id) { 24 | this.id = id; 25 | } 26 | 27 | public String getName() { 28 | return name; 29 | } 30 | 31 | public void setName(String name) { 32 | this.name = name; 33 | } 34 | } -------------------------------------------------------------------------------- /datatables-jsp-ajax/src/main/resources/dandelion/app-ajax.json: -------------------------------------------------------------------------------- 1 | { 2 | "assets": [ 3 | { 4 | "locations": { 5 | "webapp": "/assets/js/ajax.js" 6 | } 7 | } 8 | ] 9 | } -------------------------------------------------------------------------------- /datatables-jsp-ajax/src/main/resources/dandelion/app-custom-rendering.json: -------------------------------------------------------------------------------- 1 | { 2 | "assets": [ 3 | { 4 | "locations": { 5 | "webapp": "/assets/js/custom-rendering.js" 6 | } 7 | } 8 | ] 9 | } -------------------------------------------------------------------------------- /datatables-jsp-ajax/src/main/resources/dandelion/app-filtering.json: -------------------------------------------------------------------------------- 1 | { 2 | "assets": [ 3 | { 4 | "locations": { 5 | "webapp": "/assets/js/filtering.js" 6 | } 7 | } 8 | ] 9 | } -------------------------------------------------------------------------------- /datatables-jsp-ajax/src/main/resources/dandelion/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "assets": [ 3 | { 4 | "locations": { 5 | "webapp": "/assets/css/application.css" 6 | } 7 | }, 8 | { 9 | "locations": { 10 | "webapp": "/assets/css/yadcf-custom.css" 11 | } 12 | } 13 | ] 14 | } -------------------------------------------------------------------------------- /datatables-jsp-ajax/src/main/resources/dandelion/dandelion.properties: -------------------------------------------------------------------------------- 1 | ############################################ 2 | # Dandelion configuration 3 | ############################################ 4 | 5 | bundle.includes=app,bootstrap2 6 | -------------------------------------------------------------------------------- /datatables-jsp-ajax/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | %d{HH:mm:ss.SSS} %-5level %logger{60} - %msg%n 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /datatables-jsp-ajax/src/main/resources/spring/business-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /datatables-jsp-ajax/src/main/resources/spring/mvc-core-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /datatables-jsp-ajax/src/main/resources/spring/mvc-view-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | /WEB-INF/tiles/tiles*.xml 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /datatables-jsp-ajax/src/main/resources/sql/company.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `company` (`id`,`name`) VALUES (1,'Microsoft'); 2 | INSERT INTO `company` (`id`,`name`) VALUES (2,'Apple'); 3 | INSERT INTO `company` (`id`,`name`) VALUES (3,'Google'); 4 | INSERT INTO `company` (`id`,`name`) VALUES (4,'Yahoo'); 5 | INSERT INTO `company` (`Id`,`Name`) VALUES (5,'Facebook'); 6 | INSERT INTO `company` (`Id`,`Name`) VALUES (6,'Twitter'); 7 | INSERT INTO `company` (`Id`,`Name`) VALUES (7,'Intel'); 8 | INSERT INTO `company` (`Id`,`Name`) VALUES (8,'Amazon'); 9 | -------------------------------------------------------------------------------- /datatables-jsp-ajax/src/main/webapp/WEB-INF/tiles/tiles-ajax-defs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /datatables-jsp-ajax/src/main/webapp/WEB-INF/tiles/tiles-defs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /datatables-jsp-ajax/src/main/webapp/WEB-INF/tiles/tiles-filtering-defs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /datatables-jsp-ajax/src/main/webapp/WEB-INF/tiles/tiles-server-side-defs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /datatables-jsp-ajax/src/main/webapp/WEB-INF/views/common/taglib.jsp: -------------------------------------------------------------------------------- 1 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 2 | <%@ taglib prefix="datatables" uri="http://github.com/dandelion/datatables" %> 3 | -------------------------------------------------------------------------------- /datatables-jsp-ajax/src/main/webapp/WEB-INF/views/index.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | 3 |
4 |
Feel free to browse the examples using the navbar!
5 |
6 | 7 | -------------------------------------------------------------------------------- /datatables-jsp-ajax/src/main/webapp/assets/css/application.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 60px; 3 | padding-bottom: 40px; 4 | } 5 | 6 | .row-intro { 7 | margin-bottom: 30px; 8 | } -------------------------------------------------------------------------------- /datatables-jsp-ajax/src/main/webapp/assets/css/yadcf-custom.css: -------------------------------------------------------------------------------- 1 | .yadcf-filter-reset-button { 2 | display: inline-block; 3 | margin-bottom: 10px; 4 | } -------------------------------------------------------------------------------- /datatables-jsp-ajax/src/main/webapp/assets/js/ajax.js: -------------------------------------------------------------------------------- 1 | function customReload() { 2 | alert("Custom reload!"); 3 | oTable_myTableId.ajax.reload(); 4 | } 5 | 6 | function myCustomParams(){ 7 | return { 8 | "type" : "POST", 9 | "data" : { name: "John", location: "Boston" } 10 | }; 11 | } -------------------------------------------------------------------------------- /datatables-jsp-ajax/src/main/webapp/assets/js/custom-rendering.js: -------------------------------------------------------------------------------- 1 | function mailify(data, type, full) { 2 | return '' + data + ''; 3 | } 4 | 5 | function toDate(data, type, full) { 6 | return moment(new Date(data)).format('YYYY-MM-DD'); 7 | } 8 | 9 | function toCurrency(data, type, full) { 10 | return "€" + data; 11 | } -------------------------------------------------------------------------------- /datatables-jsp-ajax/src/main/webapp/assets/js/filtering.js: -------------------------------------------------------------------------------- 1 | var predefinedValues = ['Twitter', 'Facebook', 'Google', 'Amazon', 'Intel', 'Microsoft', 'Yahoo']; -------------------------------------------------------------------------------- /datatables-jsp-configuration-groups/.gitignore: -------------------------------------------------------------------------------- 1 | #IDE 2 | .settings/ 3 | .project 4 | .classpath 5 | 6 | .idea/ 7 | *.iml 8 | 9 | #Maven 10 | target/ 11 | /src/main/java/rebel.xml 12 | /src/main/resources/rebel.xml 13 | /src/main/resources/rebel.xml 14 | /src/main/resources/rebel.xml 15 | -------------------------------------------------------------------------------- /datatables-jsp-configuration-groups/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # dandelion/dt-jsp-configuration-groups 3 | # 4 | FROM dandelion/sample-tomcat:7.0.62-jdk7 5 | MAINTAINER Thibault Duchateau 6 | 7 | ADD . /home/dandelion 8 | 9 | # Build the sample application 10 | # Deploy it to Tomcat 11 | # Remove sources to make the image thinner 12 | RUN cd /home/dandelion && \ 13 | mvn package && \ 14 | cp -r target/datatables-jsp-configuration-groups /usr/local/tomcat/webapps/ && \ 15 | rm -rf /home/dandelion 16 | -------------------------------------------------------------------------------- /datatables-jsp-configuration-groups/src/main/java/com/github/dandelion/datatables/model/Address.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.model; 2 | 3 | 4 | /** 5 | * A typical Address entity. 6 | * 7 | * @author tduchateau 8 | */ 9 | public class Address { 10 | 11 | private int id; 12 | private String street; 13 | private Town town; 14 | 15 | public Address() { 16 | 17 | } 18 | 19 | public Address(String street) { 20 | this.street = street; 21 | } 22 | 23 | public Address(String street, Town town) { 24 | this.street = street; 25 | this.town = town; 26 | } 27 | 28 | public Town getTown() { 29 | return town; 30 | } 31 | 32 | public void setTown(Town town) { 33 | this.town = town; 34 | } 35 | 36 | public int getId() { 37 | return id; 38 | } 39 | 40 | public void setId(int id) { 41 | this.id = id; 42 | } 43 | 44 | public String getStreet() { 45 | return street; 46 | } 47 | 48 | public void setStreet(String street) { 49 | this.street = street; 50 | } 51 | 52 | 53 | 54 | } -------------------------------------------------------------------------------- /datatables-jsp-configuration-groups/src/main/java/com/github/dandelion/datatables/model/Company.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.model; 2 | 3 | 4 | public class Company { 5 | 6 | private int id; 7 | private String name; 8 | 9 | public Company(){ 10 | 11 | } 12 | public Company(int id, String name){ 13 | this.id = id; 14 | this.name = name; 15 | } 16 | 17 | public int getId() { 18 | return id; 19 | } 20 | 21 | public void setId(int id) { 22 | this.id = id; 23 | } 24 | 25 | public String getName() { 26 | return name; 27 | } 28 | 29 | public void setName(String name) { 30 | this.name = name; 31 | } 32 | } -------------------------------------------------------------------------------- /datatables-jsp-configuration-groups/src/main/java/com/github/dandelion/datatables/model/Town.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.model; 2 | 3 | /** 4 | * A typical Town entity. 5 | * 6 | * @author tduchateau 7 | */ 8 | public class Town { 9 | 10 | private int id; 11 | private String name; 12 | private String postcode; 13 | 14 | public Town() { 15 | 16 | } 17 | 18 | public Town(int id, String name, String postcode){ 19 | this.id = id; 20 | this.name = name; 21 | this.postcode = postcode; 22 | } 23 | 24 | public int getId() { 25 | return id; 26 | } 27 | 28 | public void setId(int id) { 29 | this.id = id; 30 | } 31 | 32 | public Town(String label) { 33 | this.name = label; 34 | } 35 | 36 | public String getName() { 37 | return name; 38 | } 39 | 40 | public void setName(String label) { 41 | this.name = label; 42 | } 43 | 44 | public String getPostcode() { 45 | return postcode; 46 | } 47 | 48 | public void setPostcode(String postcode) { 49 | this.postcode = postcode; 50 | } 51 | } -------------------------------------------------------------------------------- /datatables-jsp-configuration-groups/src/main/java/com/github/dandelion/datatables/repository/PersonRepository.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.repository; 2 | 3 | import java.util.List; 4 | 5 | import com.github.dandelion.datatables.model.Person; 6 | 7 | /** 8 | * Repository interface for the Person domain object. 9 | * 10 | * @author Thibault Duchateau 11 | */ 12 | public interface PersonRepository { 13 | 14 | /** 15 | * @return the complete list of persons stored in the repository. 16 | */ 17 | public List findAll(); 18 | 19 | /** 20 | * @param maxResult 21 | * Max number of persons. 22 | * @return a limited list of persons. 23 | */ 24 | public List findLimited(int maxResult); 25 | } 26 | -------------------------------------------------------------------------------- /datatables-jsp-configuration-groups/src/main/java/com/github/dandelion/datatables/service/PersonService.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.service; 2 | 3 | import java.util.List; 4 | 5 | import com.github.dandelion.datatables.model.Person; 6 | 7 | /** 8 | *

9 | * Person service mostly used as a facade for all controllers. 10 | * 11 | * @author Thibault Duchateau 12 | */ 13 | public interface PersonService { 14 | 15 | /** 16 | * @return the complete list of persons. 17 | */ 18 | public List findAll(); 19 | 20 | /** 21 | * @param maxResult 22 | * Max number of persons. 23 | * @return a maxResult limited list of persons. 24 | */ 25 | public List findLimited(int maxResult); 26 | } -------------------------------------------------------------------------------- /datatables-jsp-configuration-groups/src/main/java/com/github/dandelion/datatables/service/PersonServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.service; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import com.github.dandelion.datatables.model.Person; 9 | import com.github.dandelion.datatables.repository.PersonRepository; 10 | 11 | /** 12 | * Implementation of the {@link PersonService}. 13 | * 14 | * @author Thibault Duchateau 15 | */ 16 | @Service 17 | public class PersonServiceImpl implements PersonService { 18 | 19 | @Autowired 20 | PersonRepository personRepository; 21 | 22 | public List findAll() { 23 | return personRepository.findAll(); 24 | } 25 | 26 | public List findLimited(int maxResult) { 27 | return personRepository.findLimited(maxResult); 28 | } 29 | } -------------------------------------------------------------------------------- /datatables-jsp-configuration-groups/src/main/resources/dandelion/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "assets": [ 3 | { 4 | "locations": { 5 | "webapp": "/assets/css/app.css" 6 | } 7 | } 8 | ] 9 | } -------------------------------------------------------------------------------- /datatables-jsp-configuration-groups/src/main/resources/dandelion/dandelion.properties: -------------------------------------------------------------------------------- 1 | ############################################ 2 | # Dandelion configuration 3 | ############################################ 4 | 5 | bundle.includes=app,bootstrap2 -------------------------------------------------------------------------------- /datatables-jsp-configuration-groups/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | %d{HH:mm:ss.SSS} %-5level %logger{60} - %msg%n 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /datatables-jsp-configuration-groups/src/main/resources/spring/business-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 13 | -------------------------------------------------------------------------------- /datatables-jsp-configuration-groups/src/main/resources/spring/mvc-view-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | /WEB-INF/views/ 8 | 9 | 10 | .jsp 11 | 12 | 13 | -------------------------------------------------------------------------------- /datatables-jsp-configuration-groups/src/main/webapp/WEB-INF/views/common/head.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ taglib prefix="datatables" uri="http://github.com/dandelion/datatables"%> 3 | 4 | 5 | datatables-jsp-configuration-groups -------------------------------------------------------------------------------- /datatables-jsp-configuration-groups/src/main/webapp/WEB-INF/views/index.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |

13 |
14 |
Feel free to browse the examples using the navbar!
15 |
16 |
17 | 18 | -------------------------------------------------------------------------------- /datatables-jsp-configuration-groups/src/main/webapp/assets/css/app.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 60px; 3 | padding-bottom: 40px; 4 | } 5 | 6 | .row-intro { 7 | margin-bottom: 30px; 8 | } 9 | -------------------------------------------------------------------------------- /datatables-jsp-export/.gitignore: -------------------------------------------------------------------------------- 1 | #IDE 2 | .settings/ 3 | .project 4 | .classpath 5 | 6 | .idea/ 7 | *.iml 8 | 9 | #Maven 10 | target/ 11 | /src/main/java/rebel.xml 12 | /src/main/resources/rebel.xml 13 | /src/main/resources/rebel.xml 14 | /src/main/resources/rebel.xml 15 | -------------------------------------------------------------------------------- /datatables-jsp-export/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # dandelion/dt-jsp-export 3 | # 4 | FROM dandelion/sample-tomcat:7.0.62-jdk7 5 | MAINTAINER Thibault Duchateau 6 | 7 | ADD . /home/dandelion 8 | 9 | # Build the sample application 10 | # Deploy it to Tomcat 11 | # Remove sources to make the image thinner 12 | RUN cd /home/dandelion && \ 13 | mvn package && \ 14 | cp -r target/datatables-jsp-export /usr/local/tomcat/webapps/ && \ 15 | rm -rf /home/dandelion 16 | -------------------------------------------------------------------------------- /datatables-jsp-export/src/main/java/com/github/dandelion/datatables/model/Company.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.model; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.GenerationType; 7 | import javax.persistence.Id; 8 | 9 | @Entity 10 | public class Company { 11 | 12 | @Id 13 | @GeneratedValue(strategy = GenerationType.AUTO) 14 | private Long id; 15 | 16 | @Column 17 | private String name; 18 | 19 | public Long getId() { 20 | return id; 21 | } 22 | 23 | public void setId(Long id) { 24 | this.id = id; 25 | } 26 | 27 | public String getName() { 28 | return name; 29 | } 30 | 31 | public void setName(String name) { 32 | this.name = name; 33 | } 34 | } -------------------------------------------------------------------------------- /datatables-jsp-export/src/main/resources/dandelion/app-custom-rendering.json: -------------------------------------------------------------------------------- 1 | { 2 | "assets": [ 3 | { 4 | "locations": { 5 | "webapp": "/assets/js/app-custom-rendering.js" 6 | } 7 | } 8 | ] 9 | } -------------------------------------------------------------------------------- /datatables-jsp-export/src/main/resources/dandelion/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "assets": [ 3 | { 4 | "locations": { 5 | "webapp": "/assets/css/app.css" 6 | } 7 | } 8 | ] 9 | } -------------------------------------------------------------------------------- /datatables-jsp-export/src/main/resources/dandelion/dandelion.properties: -------------------------------------------------------------------------------- 1 | ############################################ 2 | # Dandelion configuration 3 | ############################################ 4 | 5 | bundle.includes=app,bootstrap2 6 | -------------------------------------------------------------------------------- /datatables-jsp-export/src/main/resources/dandelion/datatables/datatables.properties: -------------------------------------------------------------------------------- 1 | ############################################ 2 | # Dandelion-Datatables configuration 3 | ############################################ 4 | 5 | global.css.class=display 6 | -------------------------------------------------------------------------------- /datatables-jsp-export/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | %d{HH:mm:ss.SSS} %-5level %logger{60} - %msg%n 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /datatables-jsp-export/src/main/resources/spring/business-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /datatables-jsp-export/src/main/resources/spring/mvc-core-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /datatables-jsp-export/src/main/resources/spring/mvc-view-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | /WEB-INF/views/ 8 | 9 | 10 | .jsp 11 | 12 | 13 | -------------------------------------------------------------------------------- /datatables-jsp-export/src/main/resources/sql/company.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `company` (`id`,`name`) VALUES (1,'Microsoft'); 2 | INSERT INTO `company` (`id`,`name`) VALUES (2,'Apple'); 3 | INSERT INTO `company` (`id`,`name`) VALUES (3,'Google'); 4 | INSERT INTO `company` (`id`,`name`) VALUES (4,'Yahoo'); 5 | INSERT INTO `company` (`Id`,`Name`) VALUES (5,'Facebook'); 6 | INSERT INTO `company` (`Id`,`Name`) VALUES (6,'Twitter'); 7 | INSERT INTO `company` (`Id`,`Name`) VALUES (7,'Intel'); 8 | INSERT INTO `company` (`Id`,`Name`) VALUES (8,'Amazon'); 9 | -------------------------------------------------------------------------------- /datatables-jsp-export/src/main/webapp/WEB-INF/views/common/head.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ taglib prefix="dandelion" uri="http://github.com/dandelion" %> 3 | 4 | 5 | datatables-jsp-export -------------------------------------------------------------------------------- /datatables-jsp-export/src/main/webapp/WEB-INF/views/common/taglib.jsp: -------------------------------------------------------------------------------- 1 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 2 | <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> 3 | 4 | <%@ taglib prefix="datatables" uri="http://github.com/dandelion/datatables" %> 5 | <%@ taglib prefix="dandelion" uri="http://github.com/dandelion" %> 6 | -------------------------------------------------------------------------------- /datatables-jsp-export/src/main/webapp/WEB-INF/views/index.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 |
14 |
Feel free to browse the examples using the navbar!
15 |
16 |
17 | 18 | -------------------------------------------------------------------------------- /datatables-jsp-export/src/main/webapp/assets/css/app.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 60px; 3 | padding-bottom: 40px; 4 | } 5 | 6 | .row-intro { 7 | margin-bottom: 30px; 8 | } 9 | -------------------------------------------------------------------------------- /datatables-jsp-export/src/main/webapp/assets/js/app-custom-rendering.js: -------------------------------------------------------------------------------- 1 | function mailify(data, type, full) { 2 | return '' + data + ''; 3 | } 4 | 5 | function toDate(data, type, full) { 6 | return moment(new Date(data)).format('YYYY/MM/DD'); 7 | } -------------------------------------------------------------------------------- /datatables-jsp-extension/.gitignore: -------------------------------------------------------------------------------- 1 | #IDE 2 | .settings/ 3 | .project 4 | .classpath 5 | 6 | .idea/ 7 | *.iml 8 | 9 | #Maven 10 | target/ 11 | /src/main/java/rebel.xml 12 | /src/main/resources/rebel.xml 13 | /src/main/resources/rebel.xml 14 | /src/main/resources/rebel.xml 15 | -------------------------------------------------------------------------------- /datatables-jsp-extension/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # dandelion/dt-jsp-extension 3 | # 4 | FROM dandelion/sample-tomcat:7.0.62-jdk7 5 | MAINTAINER Thibault Duchateau 6 | 7 | ADD . /home/dandelion 8 | 9 | # Build the sample application 10 | # Deploy it to Tomcat 11 | # Remove sources to make the image thinner 12 | RUN cd /home/dandelion && \ 13 | mvn package && \ 14 | cp -r target/datatables-jsp-extension /usr/local/tomcat/webapps/ && \ 15 | rm -rf /home/dandelion 16 | -------------------------------------------------------------------------------- /datatables-jsp-extension/src/main/java/com/github/dandelion/datatables/model/Address.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.model; 2 | 3 | 4 | /** 5 | * A typical Address entity. 6 | * 7 | * @author tduchateau 8 | */ 9 | public class Address { 10 | 11 | private int id; 12 | private String street; 13 | private Town town; 14 | 15 | public Address() { 16 | 17 | } 18 | 19 | public Address(String street) { 20 | this.street = street; 21 | } 22 | 23 | public Address(String street, Town town) { 24 | this.street = street; 25 | this.town = town; 26 | } 27 | 28 | public Town getTown() { 29 | return town; 30 | } 31 | 32 | public void setTown(Town town) { 33 | this.town = town; 34 | } 35 | 36 | public int getId() { 37 | return id; 38 | } 39 | 40 | public void setId(int id) { 41 | this.id = id; 42 | } 43 | 44 | public String getStreet() { 45 | return street; 46 | } 47 | 48 | public void setStreet(String street) { 49 | this.street = street; 50 | } 51 | 52 | 53 | 54 | } -------------------------------------------------------------------------------- /datatables-jsp-extension/src/main/java/com/github/dandelion/datatables/model/Company.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.model; 2 | 3 | 4 | public class Company { 5 | 6 | private int id; 7 | private String name; 8 | 9 | public Company(){ 10 | 11 | } 12 | public Company(int id, String name){ 13 | this.id = id; 14 | this.name = name; 15 | } 16 | 17 | public int getId() { 18 | return id; 19 | } 20 | 21 | public void setId(int id) { 22 | this.id = id; 23 | } 24 | 25 | public String getName() { 26 | return name; 27 | } 28 | 29 | public void setName(String name) { 30 | this.name = name; 31 | } 32 | } -------------------------------------------------------------------------------- /datatables-jsp-extension/src/main/java/com/github/dandelion/datatables/model/Town.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.model; 2 | 3 | /** 4 | * A typical Town entity. 5 | * 6 | * @author tduchateau 7 | */ 8 | public class Town { 9 | 10 | private int id; 11 | private String name; 12 | private String postcode; 13 | 14 | public Town() { 15 | 16 | } 17 | 18 | public Town(int id, String name, String postcode){ 19 | this.id = id; 20 | this.name = name; 21 | this.postcode = postcode; 22 | } 23 | 24 | public int getId() { 25 | return id; 26 | } 27 | 28 | public void setId(int id) { 29 | this.id = id; 30 | } 31 | 32 | public Town(String label) { 33 | this.name = label; 34 | } 35 | 36 | public String getName() { 37 | return name; 38 | } 39 | 40 | public void setName(String label) { 41 | this.name = label; 42 | } 43 | 44 | public String getPostcode() { 45 | return postcode; 46 | } 47 | 48 | public void setPostcode(String postcode) { 49 | this.postcode = postcode; 50 | } 51 | } -------------------------------------------------------------------------------- /datatables-jsp-extension/src/main/java/com/github/dandelion/datatables/repository/PersonRepository.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.repository; 2 | 3 | import java.util.List; 4 | 5 | import com.github.dandelion.datatables.model.Person; 6 | 7 | /** 8 | * Repository interface for the Person domain object. 9 | * 10 | * @author Thibault Duchateau 11 | */ 12 | public interface PersonRepository { 13 | 14 | /** 15 | * @return the complete list of persons stored in the repository. 16 | */ 17 | public List findAll(); 18 | 19 | /** 20 | * @param maxResult 21 | * Max number of persons. 22 | * @return a limited list of persons. 23 | */ 24 | public List findLimited(int maxResult); 25 | } 26 | -------------------------------------------------------------------------------- /datatables-jsp-extension/src/main/java/com/github/dandelion/datatables/service/PersonService.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.service; 2 | 3 | import java.util.List; 4 | 5 | import com.github.dandelion.datatables.model.Person; 6 | 7 | /** 8 | *

9 | * Person service mostly used as a facade for all controllers. 10 | * 11 | * @author Thibault Duchateau 12 | */ 13 | public interface PersonService { 14 | 15 | /** 16 | * @return the complete list of persons. 17 | */ 18 | public List findAll(); 19 | 20 | /** 21 | * @param maxResult 22 | * Max number of persons. 23 | * @return a maxResult limited list of persons. 24 | */ 25 | public List findLimited(int maxResult); 26 | } -------------------------------------------------------------------------------- /datatables-jsp-extension/src/main/java/com/github/dandelion/datatables/service/PersonServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.service; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import com.github.dandelion.datatables.model.Person; 9 | import com.github.dandelion.datatables.repository.PersonRepository; 10 | 11 | /** 12 | * Implementation of the {@link PersonService}. 13 | * 14 | * @author Thibault Duchateau 15 | */ 16 | @Service 17 | public class PersonServiceImpl implements PersonService { 18 | 19 | @Autowired 20 | PersonRepository personRepository; 21 | 22 | public List findAll() { 23 | return personRepository.findAll(); 24 | } 25 | 26 | public List findLimited(int maxResult) { 27 | return personRepository.findLimited(maxResult); 28 | } 29 | } -------------------------------------------------------------------------------- /datatables-jsp-extension/src/main/resources/META-INF/services/com.github.dandelion.datatables.core.extension.Extension: -------------------------------------------------------------------------------- 1 | com.github.dandelion.datatables.web.extension.MyAwesomeExtension 2 | -------------------------------------------------------------------------------- /datatables-jsp-extension/src/main/resources/dandelion/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "assets": [ 3 | { 4 | "locations": { 5 | "webapp": "/assets/css/app.css" 6 | } 7 | } 8 | ] 9 | } -------------------------------------------------------------------------------- /datatables-jsp-extension/src/main/resources/dandelion/dandelion.properties: -------------------------------------------------------------------------------- 1 | ############################################ 2 | # Dandelion configuration 3 | ############################################ 4 | 5 | bundle.includes=app,bootstrap2 6 | -------------------------------------------------------------------------------- /datatables-jsp-extension/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | %d{HH:mm:ss.SSS} %-5level %logger{60} - %msg%n 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /datatables-jsp-extension/src/main/resources/spring/business-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 13 | -------------------------------------------------------------------------------- /datatables-jsp-extension/src/main/resources/spring/mvc-core-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /datatables-jsp-extension/src/main/resources/spring/mvc-view-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | /WEB-INF/views/ 9 | 10 | 11 | .jsp 12 | 13 | 14 | -------------------------------------------------------------------------------- /datatables-jsp-extension/src/main/webapp/WEB-INF/views/common/head.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | 3 | 4 | datatables-jsp-extension -------------------------------------------------------------------------------- /datatables-jsp-extension/src/main/webapp/assets/css/app.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 60px; 3 | padding-bottom: 40px; 4 | } 5 | 6 | .row-intro { 7 | margin-bottom: 30px; 8 | } 9 | -------------------------------------------------------------------------------- /datatables-jsp-i18n-struts1/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # dandelion/dt-jsp-i18n-struts1 3 | # 4 | FROM dandelion/sample-tomcat:7.0.62-jdk7 5 | MAINTAINER Thibault Duchateau 6 | 7 | ADD . /home/dandelion 8 | 9 | # Build the sample application 10 | # Deploy it to Tomcat 11 | # Remove sources to make the image thinner 12 | RUN cd /home/dandelion && \ 13 | mvn package && \ 14 | cp -r target/datatables-jsp-i18n-struts1 /usr/local/tomcat/webapps/ && \ 15 | rm -rf /home/dandelion 16 | -------------------------------------------------------------------------------- /datatables-jsp-i18n-struts1/src/main/java/com/github/dandelion/datatables/struts1/web/I18nAction.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.struts1.web; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | import javax.servlet.http.HttpServletResponse; 5 | 6 | import org.apache.struts.action.Action; 7 | import org.apache.struts.action.ActionForm; 8 | import org.apache.struts.action.ActionForward; 9 | import org.apache.struts.action.ActionMapping; 10 | 11 | import com.github.dandelion.datatables.struts1.mock.Mock; 12 | 13 | public class I18nAction extends Action { 14 | 15 | public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, 16 | HttpServletResponse response) throws Exception { 17 | 18 | request.setAttribute("persons", Mock.persons); 19 | 20 | return mapping.findForward("success"); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /datatables-jsp-i18n-struts1/src/main/resources/ApplicationResources.properties: -------------------------------------------------------------------------------- 1 | myTableId.id=Id 2 | myTableId.lastName=Lastname 3 | myTableId.firstName=Firstname 4 | myTableId.city=City 5 | myTableId.mail=Mail 6 | -------------------------------------------------------------------------------- /datatables-jsp-i18n-struts1/src/main/resources/ApplicationResources_fr_FR.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dandelion/dandelion-datatables-samples/24d120a29311d0afb7c9cc18311c6dee8b37e161/datatables-jsp-i18n-struts1/src/main/resources/ApplicationResources_fr_FR.properties -------------------------------------------------------------------------------- /datatables-jsp-i18n-struts1/src/main/resources/dandelion/datatables/datatables.properties: -------------------------------------------------------------------------------- 1 | i18n.locale.resolver=com.github.dandelion.datatables.extras.struts1.i18n.Struts1LocaleResolver 2 | global.i18n.message.resolver=com.github.dandelion.datatables.extras.struts1.i18n.Struts1MessageResolver -------------------------------------------------------------------------------- /datatables-jsp-i18n-struts1/src/main/resources/dandelion/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "bundle" : "sample", 3 | "parent": "none", 4 | "assets": [ 5 | { 6 | "name": "application", 7 | "version": "", 8 | "type": "css", 9 | "locations": { 10 | "webapp": "/assets/css/application.css" 11 | } 12 | } 13 | ] 14 | } -------------------------------------------------------------------------------- /datatables-jsp-i18n-struts1/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | %d{HH:mm:ss.SSS} %-5level %logger{60} - %msg%n 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /datatables-jsp-i18n-struts1/src/main/webapp/WEB-INF/views/common/footer.jsp: -------------------------------------------------------------------------------- 1 |

-------------------------------------------------------------------------------- /datatables-jsp-i18n-struts1/src/main/webapp/WEB-INF/views/common/head.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> 3 | <%@ taglib prefix="dandelion" uri="http://github.com/dandelion" %> 4 | 5 | 6 | 7 | 8 | datatables-jsp-struts1 -------------------------------------------------------------------------------- /datatables-jsp-i18n-struts1/src/main/webapp/assets/css/application.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 60px; 3 | padding-bottom: 40px; 4 | } 5 | 6 | .row-intro { 7 | margin-bottom: 30px; 8 | } -------------------------------------------------------------------------------- /datatables-jsp-i18n-struts1/src/main/webapp/index.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 |
13 |
Feel free to browse the examples using the navbar!
14 |
15 |
16 | 17 | -------------------------------------------------------------------------------- /datatables-jsp-i18n-struts2/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # dandelion/dt-jsp-i18n-struts2 3 | # 4 | FROM dandelion/sample-tomcat:7.0.62-jdk7 5 | MAINTAINER Thibault Duchateau 6 | 7 | ADD . /home/dandelion 8 | 9 | # Build the sample application 10 | # Deploy it to Tomcat 11 | # Remove sources to make the image thinner 12 | RUN cd /home/dandelion && \ 13 | mvn package && \ 14 | cp -r target/datatables-jsp-i18n-struts2 /usr/local/tomcat/webapps/ && \ 15 | rm -rf /home/dandelion 16 | -------------------------------------------------------------------------------- /datatables-jsp-i18n-struts2/src/main/resources/dandelion/dandelion.properties: -------------------------------------------------------------------------------- 1 | ############################################ 2 | # Dandelion configuration 3 | ############################################ 4 | 5 | bundle.includes=sample,bootstrap2 -------------------------------------------------------------------------------- /datatables-jsp-i18n-struts2/src/main/resources/dandelion/datatables/datatables.properties: -------------------------------------------------------------------------------- 1 | i18n.locale.resolver=com.github.dandelion.datatables.extras.struts2.i18n.Struts2LocaleResolver 2 | global.i18n.message.resolver=com.github.dandelion.datatables.extras.struts2.i18n.Struts2MessageResolver -------------------------------------------------------------------------------- /datatables-jsp-i18n-struts2/src/main/resources/dandelion/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "bundle" : "sample", 3 | "assets": [ 4 | { 5 | "name": "application", 6 | "version": "0.10.0", 7 | "type": "css", 8 | "locations": { 9 | "webapp": "/assets/css/application.css" 10 | } 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /datatables-jsp-i18n-struts2/src/main/resources/global.properties: -------------------------------------------------------------------------------- 1 | #Global messages 2 | myTableId.id=Id 3 | myTableId.lastName=Lastname 4 | myTableId.firstName=Firstname 5 | myTableId.city=City 6 | myTableId.mail=Mail -------------------------------------------------------------------------------- /datatables-jsp-i18n-struts2/src/main/resources/global_de.properties: -------------------------------------------------------------------------------- 1 | #Global messages 2 | myTableId.id=Id 3 | myTableId.lastName=Name 4 | myTableId.firstName=Vorname 5 | myTableId.city=Stadt 6 | myTableId.mail=Mail -------------------------------------------------------------------------------- /datatables-jsp-i18n-struts2/src/main/resources/global_fr.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dandelion/dandelion-datatables-samples/24d120a29311d0afb7c9cc18311c6dee8b37e161/datatables-jsp-i18n-struts2/src/main/resources/global_fr.properties -------------------------------------------------------------------------------- /datatables-jsp-i18n-struts2/src/main/resources/struts.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | WEB-INF/views/i18n.jsp 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /datatables-jsp-i18n-struts2/src/main/webapp/WEB-INF/views/common/footer.jsp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /datatables-jsp-i18n-struts2/src/main/webapp/WEB-INF/views/common/head.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> 3 | 4 | 5 | datatables-jsp-struts2 -------------------------------------------------------------------------------- /datatables-jsp-i18n-struts2/src/main/webapp/assets/css/application.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 60px; 3 | padding-bottom: 40px; 4 | } 5 | 6 | .row-intro { 7 | margin-bottom: 30px; 8 | } -------------------------------------------------------------------------------- /datatables-jsp-i18n-struts2/src/main/webapp/index.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 |
13 |
Feel free to browse the examples using the navbar!
14 |
15 |
16 | 17 | -------------------------------------------------------------------------------- /datatables-jsp-plugins/.gitignore: -------------------------------------------------------------------------------- 1 | #IDE 2 | .settings/ 3 | .project 4 | .classpath 5 | 6 | .idea/ 7 | *.iml 8 | 9 | #Maven 10 | target/ 11 | /src/main/java/rebel.xml 12 | /src/main/resources/rebel.xml 13 | /src/main/resources/rebel.xml 14 | /src/main/resources/rebel.xml 15 | -------------------------------------------------------------------------------- /datatables-jsp-plugins/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # dandelion/dt-jsp-plugins 3 | # 4 | FROM dandelion/sample-tomcat:7.0.62-jdk7 5 | MAINTAINER Thibault Duchateau 6 | 7 | ADD . /home/dandelion 8 | 9 | # Build the sample application 10 | # Deploy it to Tomcat 11 | # Remove sources to make the image thinner 12 | RUN cd /home/dandelion && \ 13 | mvn package && \ 14 | cp -r target/datatables-jsp-plugins /usr/local/tomcat/webapps/ && \ 15 | rm -rf /home/dandelion 16 | -------------------------------------------------------------------------------- /datatables-jsp-plugins/src/main/java/com/github/dandelion/datatables/model/Address.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.model; 2 | 3 | 4 | /** 5 | * A typical Address entity. 6 | * 7 | * @author tduchateau 8 | */ 9 | public class Address { 10 | 11 | private int id; 12 | private String street; 13 | private Town town; 14 | 15 | public Address() { 16 | 17 | } 18 | 19 | public Address(String street) { 20 | this.street = street; 21 | } 22 | 23 | public Address(String street, Town town) { 24 | this.street = street; 25 | this.town = town; 26 | } 27 | 28 | public Town getTown() { 29 | return town; 30 | } 31 | 32 | public void setTown(Town town) { 33 | this.town = town; 34 | } 35 | 36 | public int getId() { 37 | return id; 38 | } 39 | 40 | public void setId(int id) { 41 | this.id = id; 42 | } 43 | 44 | public String getStreet() { 45 | return street; 46 | } 47 | 48 | public void setStreet(String street) { 49 | this.street = street; 50 | } 51 | 52 | 53 | 54 | } -------------------------------------------------------------------------------- /datatables-jsp-plugins/src/main/java/com/github/dandelion/datatables/model/Company.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.model; 2 | 3 | 4 | public class Company { 5 | 6 | private int id; 7 | private String name; 8 | 9 | public Company(){ 10 | 11 | } 12 | public Company(int id, String name){ 13 | this.id = id; 14 | this.name = name; 15 | } 16 | 17 | public int getId() { 18 | return id; 19 | } 20 | 21 | public void setId(int id) { 22 | this.id = id; 23 | } 24 | 25 | public String getName() { 26 | return name; 27 | } 28 | 29 | public void setName(String name) { 30 | this.name = name; 31 | } 32 | } -------------------------------------------------------------------------------- /datatables-jsp-plugins/src/main/java/com/github/dandelion/datatables/model/Town.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.model; 2 | 3 | /** 4 | * A typical Town entity. 5 | * 6 | * @author tduchateau 7 | */ 8 | public class Town { 9 | 10 | private int id; 11 | private String name; 12 | private String postcode; 13 | 14 | public Town() { 15 | 16 | } 17 | 18 | public Town(int id, String name, String postcode){ 19 | this.id = id; 20 | this.name = name; 21 | this.postcode = postcode; 22 | } 23 | 24 | public int getId() { 25 | return id; 26 | } 27 | 28 | public void setId(int id) { 29 | this.id = id; 30 | } 31 | 32 | public Town(String label) { 33 | this.name = label; 34 | } 35 | 36 | public String getName() { 37 | return name; 38 | } 39 | 40 | public void setName(String label) { 41 | this.name = label; 42 | } 43 | 44 | public String getPostcode() { 45 | return postcode; 46 | } 47 | 48 | public void setPostcode(String postcode) { 49 | this.postcode = postcode; 50 | } 51 | } -------------------------------------------------------------------------------- /datatables-jsp-plugins/src/main/java/com/github/dandelion/datatables/repository/PersonRepository.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.repository; 2 | 3 | import java.util.List; 4 | 5 | import com.github.dandelion.datatables.model.Person; 6 | 7 | /** 8 | * Repository interface for the Person domain object. 9 | * 10 | * @author Thibault Duchateau 11 | */ 12 | public interface PersonRepository { 13 | 14 | /** 15 | * @return the complete list of persons stored in the repository. 16 | */ 17 | public List findAll(); 18 | 19 | /** 20 | * @param maxResult 21 | * Max number of persons. 22 | * @return a limited list of persons. 23 | */ 24 | public List findLimited(int maxResult); 25 | } 26 | -------------------------------------------------------------------------------- /datatables-jsp-plugins/src/main/java/com/github/dandelion/datatables/service/PersonService.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.service; 2 | 3 | import java.util.List; 4 | 5 | import com.github.dandelion.datatables.model.Person; 6 | 7 | /** 8 | *

9 | * Person service mostly used as a facade for all controllers. 10 | * 11 | * @author Thibault Duchateau 12 | */ 13 | public interface PersonService { 14 | 15 | /** 16 | * @return the complete list of persons. 17 | */ 18 | public List findAll(); 19 | 20 | /** 21 | * @param maxResult 22 | * Max number of persons. 23 | * @return a maxResult limited list of persons. 24 | */ 25 | public List findLimited(int maxResult); 26 | } -------------------------------------------------------------------------------- /datatables-jsp-plugins/src/main/java/com/github/dandelion/datatables/service/PersonServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.service; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import com.github.dandelion.datatables.model.Person; 9 | import com.github.dandelion.datatables.repository.PersonRepository; 10 | 11 | /** 12 | * Implementation of the {@link PersonService}. 13 | * 14 | * @author Thibault Duchateau 15 | */ 16 | @Service 17 | public class PersonServiceImpl implements PersonService { 18 | 19 | @Autowired 20 | PersonRepository personRepository; 21 | 22 | public List findAll() { 23 | return personRepository.findAll(); 24 | } 25 | 26 | public List findLimited(int maxResult) { 27 | return personRepository.findLimited(maxResult); 28 | } 29 | } -------------------------------------------------------------------------------- /datatables-jsp-plugins/src/main/resources/dandelion/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "assets": [ 3 | { 4 | "locations": { 5 | "webapp": "/assets/css/application.css" 6 | } 7 | } 8 | ] 9 | } -------------------------------------------------------------------------------- /datatables-jsp-plugins/src/main/resources/dandelion/dandelion.properties: -------------------------------------------------------------------------------- 1 | ############################################ 2 | # Dandelion configuration 3 | ############################################ 4 | 5 | bundle.includes=app,bootstrap2 -------------------------------------------------------------------------------- /datatables-jsp-plugins/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | %d{HH:mm:ss.SSS} %-5level %logger{60} - %msg%n 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /datatables-jsp-plugins/src/main/resources/spring/business-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 13 | -------------------------------------------------------------------------------- /datatables-jsp-plugins/src/main/resources/spring/mvc-view-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | /WEB-INF/views/ 8 | 9 | 10 | .jsp 11 | 12 | 13 | -------------------------------------------------------------------------------- /datatables-jsp-plugins/src/main/webapp/WEB-INF/views/common/head.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | 3 | 4 | datatables-jsp-plugins -------------------------------------------------------------------------------- /datatables-jsp-plugins/src/main/webapp/assets/css/application.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 60px; 3 | padding-bottom: 40px; 4 | } 5 | 6 | .row-intro { 7 | margin-bottom: 30px; 8 | } 9 | -------------------------------------------------------------------------------- /datatables-jsp-plugins/src/main/webapp/index.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |

13 |
14 |
Feel free to browse the examples using the navbar!
15 |
16 |
17 | 18 | -------------------------------------------------------------------------------- /datatables-jsp-spring-boot/src/main/java/org/springframework/boot/sample/jsp/WelcomeController.java: -------------------------------------------------------------------------------- 1 | package org.springframework.boot.sample.jsp; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | import org.springframework.web.servlet.ModelAndView; 6 | 7 | import com.github.dandelion.datatables.core.mock.Mock; 8 | 9 | @Controller 10 | public class WelcomeController { 11 | 12 | @RequestMapping("/") 13 | public ModelAndView welcome() { 14 | ModelAndView mav = new ModelAndView(); 15 | mav.addObject("persons", Mock.persons); 16 | mav.setViewName("welcome"); 17 | return mav; 18 | } 19 | } -------------------------------------------------------------------------------- /datatables-jsp-spring-boot/src/main/webapp/WEB-INF/jsp/welcome.jsp: -------------------------------------------------------------------------------- 1 | 2 | 3 | <%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> 4 | <%@ taglib prefix="datatables" uri="http://github.com/dandelion/datatables" %> 5 | 6 | 7 | 8 | 9 | 10 | ${springUrl} 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /datatables-jsp-starter/.gitignore: -------------------------------------------------------------------------------- 1 | #IDE 2 | .settings/ 3 | .project 4 | .classpath 5 | 6 | .idea/ 7 | *.iml 8 | 9 | #Maven 10 | target/ 11 | /src/main/java/rebel.xml 12 | /src/main/resources/rebel.xml 13 | /src/main/resources/rebel.xml 14 | /src/main/resources/rebel.xml 15 | -------------------------------------------------------------------------------- /datatables-jsp-starter/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # dandelion/dt-jsp-starter 3 | # 4 | FROM dandelion/sample-tomcat:7.0.62-jdk7 5 | MAINTAINER Thibault Duchateau 6 | 7 | ADD . /home/dandelion 8 | 9 | # Build the sample application 10 | # Deploy it to Tomcat 11 | # Remove sources to make the image thinner 12 | RUN cd /home/dandelion && \ 13 | mvn package && \ 14 | cp -r target/datatables-jsp-starter /usr/local/tomcat/webapps/ && \ 15 | rm -rf /home/dandelion 16 | -------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/java/com/github/dandelion/datatables/model/Address.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.model; 2 | 3 | 4 | /** 5 | * A typical Address entity. 6 | * 7 | * @author tduchateau 8 | */ 9 | public class Address { 10 | 11 | private int id; 12 | private String street; 13 | private Town town; 14 | 15 | public Address() { 16 | 17 | } 18 | 19 | public Address(String street) { 20 | this.street = street; 21 | } 22 | 23 | public Address(String street, Town town) { 24 | this.street = street; 25 | this.town = town; 26 | } 27 | 28 | public Town getTown() { 29 | return town; 30 | } 31 | 32 | public void setTown(Town town) { 33 | this.town = town; 34 | } 35 | 36 | public int getId() { 37 | return id; 38 | } 39 | 40 | public void setId(int id) { 41 | this.id = id; 42 | } 43 | 44 | public String getStreet() { 45 | return street; 46 | } 47 | 48 | public void setStreet(String street) { 49 | this.street = street; 50 | } 51 | 52 | 53 | 54 | } -------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/java/com/github/dandelion/datatables/model/Company.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.model; 2 | 3 | 4 | public class Company { 5 | 6 | private int id; 7 | private String name; 8 | 9 | public Company(){ 10 | 11 | } 12 | public Company(int id, String name){ 13 | this.id = id; 14 | this.name = name; 15 | } 16 | 17 | public int getId() { 18 | return id; 19 | } 20 | 21 | public void setId(int id) { 22 | this.id = id; 23 | } 24 | 25 | public String getName() { 26 | return name; 27 | } 28 | 29 | public void setName(String name) { 30 | this.name = name; 31 | } 32 | } -------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/java/com/github/dandelion/datatables/model/Town.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.model; 2 | 3 | /** 4 | * A typical Town entity. 5 | * 6 | * @author tduchateau 7 | */ 8 | public class Town { 9 | 10 | private int id; 11 | private String name; 12 | private String postcode; 13 | 14 | public Town() { 15 | 16 | } 17 | 18 | public Town(int id, String name, String postcode){ 19 | this.id = id; 20 | this.name = name; 21 | this.postcode = postcode; 22 | } 23 | 24 | public int getId() { 25 | return id; 26 | } 27 | 28 | public void setId(int id) { 29 | this.id = id; 30 | } 31 | 32 | public Town(String label) { 33 | this.name = label; 34 | } 35 | 36 | public String getName() { 37 | return name; 38 | } 39 | 40 | public void setName(String label) { 41 | this.name = label; 42 | } 43 | 44 | public String getPostcode() { 45 | return postcode; 46 | } 47 | 48 | public void setPostcode(String postcode) { 49 | this.postcode = postcode; 50 | } 51 | } -------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/java/com/github/dandelion/datatables/repository/PersonRepository.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.repository; 2 | 3 | import java.util.List; 4 | 5 | import com.github.dandelion.datatables.model.Person; 6 | 7 | /** 8 | * Repository interface for the Person domain object. 9 | * 10 | * @author Thibault Duchateau 11 | */ 12 | public interface PersonRepository { 13 | 14 | /** 15 | * @return the complete list of persons stored in the repository. 16 | */ 17 | public List findAll(); 18 | 19 | /** 20 | * @param maxResult 21 | * Max number of persons. 22 | * @return a limited list of persons. 23 | */ 24 | public List findLimited(int maxResult); 25 | } 26 | -------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/java/com/github/dandelion/datatables/service/PersonService.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.service; 2 | 3 | import java.util.List; 4 | 5 | import com.github.dandelion.datatables.model.Person; 6 | 7 | /** 8 | *

9 | * Person service mostly used as a facade for all controllers. 10 | * 11 | * @author Thibault Duchateau 12 | */ 13 | public interface PersonService { 14 | 15 | /** 16 | * @return the complete list of persons. 17 | */ 18 | public List findAll(); 19 | 20 | /** 21 | * @param maxResult 22 | * Max number of persons. 23 | * @return a maxResult limited list of persons. 24 | */ 25 | public List findLimited(int maxResult); 26 | } -------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/java/com/github/dandelion/datatables/service/PersonServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.service; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import com.github.dandelion.datatables.model.Person; 9 | import com.github.dandelion.datatables.repository.PersonRepository; 10 | 11 | /** 12 | * Implementation of the {@link PersonService}. 13 | * 14 | * @author Thibault Duchateau 15 | */ 16 | @Service 17 | public class PersonServiceImpl implements PersonService { 18 | 19 | @Autowired 20 | PersonRepository personRepository; 21 | 22 | public List findAll() { 23 | return personRepository.findAll(); 24 | } 25 | 26 | public List findLimited(int maxResult) { 27 | return personRepository.findLimited(maxResult); 28 | } 29 | } -------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/java/com/github/dandelion/datatables/web/CustomExportFeature.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.web; 2 | 3 | import com.github.dandelion.datatables.core.extension.feature.ExportFeature; 4 | import com.github.dandelion.datatables.core.html.HtmlTable; 5 | 6 | public class CustomExportFeature extends ExportFeature { 7 | 8 | // @Override 9 | // public String getName() { 10 | // TODO Auto-generated method stub 11 | // return "YAHHHHHHHHHHHHHHHHHHHHHHHHHHHH"; 12 | // } 13 | 14 | @Override 15 | public void setup(HtmlTable table) { 16 | // TODO Auto-generated method stub 17 | super.setup(table); 18 | System.out.println("================================> CUSTOM BODY"); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/resources/META-INF/services/com.github.dandelion.datatables.core.extension.Extension: -------------------------------------------------------------------------------- 1 | com.github.dandelion.datatables.web.CustomExportFeature -------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/resources/dandelion/app-callback.json: -------------------------------------------------------------------------------- 1 | { 2 | "bundle" : "callbacks", 3 | "assets": [ 4 | { 5 | "locations": { 6 | "webapp": "/assets/js/app-callbacks.js" 7 | } 8 | } 9 | ] 10 | } -------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/resources/dandelion/app-filtering.json: -------------------------------------------------------------------------------- 1 | { 2 | "bundle" : "filtering", 3 | "assets": [ 4 | { 5 | "locations": { 6 | "webapp": "/assets/js/app-filtering.js" 7 | } 8 | } 9 | ] 10 | } -------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/resources/dandelion/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "assets": [ 3 | { 4 | "locations": { 5 | "webapp": "/assets/css/app.css" 6 | } 7 | }, 8 | { 9 | "locations": { 10 | "webapp": "/assets/css/yadcf-custom.css" 11 | } 12 | } 13 | ] 14 | } -------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/resources/dandelion/dandelion.properties: -------------------------------------------------------------------------------- 1 | ############################################ 2 | # Dandelion configuration 3 | ############################################ 4 | 5 | bundle.includes=app,bootstrap2 6 | -------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | %d{HH:mm:ss.SSS} %-5level %logger{60} - %msg%n 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/resources/spring/business-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/resources/spring/mvc-core-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/resources/spring/mvc-view-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | 14 | /WEB-INF/tiles/tiles*.xml 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/webapp/WEB-INF/tiles/tiles-advanced-defs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/webapp/WEB-INF/tiles/tiles-column-rendering-defs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/webapp/WEB-INF/tiles/tiles-defs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/webapp/WEB-INF/tiles/tiles-styling-defs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/webapp/WEB-INF/views/basics/paging/bootstrap-full-numbers.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ include file="../../common/taglib.jsp"%> 3 | 4 |

5 |
6 |

Styling pagination: Bootstrap full numbers

7 |
8 |
9 | 10 |
11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 |
-------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/webapp/WEB-INF/views/basics/paging/bootstrap-full.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ include file="../../common/taglib.jsp"%> 3 | 4 |
5 |
6 |

Styling pagination: Bootstrap full

7 |
8 |
9 | 10 |
11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 |
-------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/webapp/WEB-INF/views/basics/paging/bootstrap-simple.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ include file="../../common/taglib.jsp"%> 3 | 4 |
5 |
6 |

Styling pagination: Bootstrap simple

7 |
8 |
9 | 10 |
11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 |
-------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/webapp/WEB-INF/views/basics/paging/defining-length-menu-options.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ include file="../../common/taglib.jsp"%> 3 | 4 |
5 |
6 |

Table length menu

7 |
8 |
9 | 10 |
11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 |
-------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/webapp/WEB-INF/views/basics/paging/enable-disable-length-menu.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ include file="../../common/taglib.jsp"%> 3 | 4 |
5 |
6 |

Enable/disable length changing

7 |
8 |
9 | 10 |
11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 |
-------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/webapp/WEB-INF/views/basics/paging/enable-disable-paging.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ include file="../../common/taglib.jsp"%> 3 | 4 |
5 |
6 |

Enable/disable paging

7 |
8 |
9 | 10 |
11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 |
-------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/webapp/WEB-INF/views/basics/paging/full-numbers.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ include file="../../common/taglib.jsp"%> 3 | 4 |
5 |
6 |

Styling pagination: full numbers

7 |
8 |
9 | 10 |
11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 |
-------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/webapp/WEB-INF/views/basics/paging/full.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ include file="../../common/taglib.jsp"%> 3 | 4 |
5 |
6 |

Styling pagination: full

7 |
8 |
9 | 10 |
11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 |
-------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/webapp/WEB-INF/views/basics/paging/simple-numbers.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ include file="../../common/taglib.jsp"%> 3 | 4 |
5 |
6 |

Styling pagination: simple numbers

7 |
8 |
9 | 10 |
11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 |
-------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/webapp/WEB-INF/views/basics/paging/simple.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ include file="../../common/taglib.jsp"%> 3 | 4 |
5 |
6 |

Styling pagination: simple

7 |
8 |
9 | 10 |
11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 |
-------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/webapp/WEB-INF/views/basics/scrolling/scroll-horizontal.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ include file="../../common/taglib.jsp"%> 3 | 4 |
5 |
6 |

Horizontal scrolling

7 |
8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/webapp/WEB-INF/views/basics/scrolling/scroll-vertical.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ include file="../../common/taglib.jsp"%> 3 | 4 |
5 |
6 |

Horizontal scrolling

7 |
8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/webapp/WEB-INF/views/basics/sorting/enable-disable-sorting.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ include file="../../common/taglib.jsp"%> 3 | 4 |
5 |
6 |

Enable/disable sorting

7 |
8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/webapp/WEB-INF/views/basics/sorting/individual-column-sorting.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ include file="../../common/taglib.jsp"%> 3 | 4 |
5 |
6 |

Individual column sorting

7 |
8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/webapp/WEB-INF/views/basics/sorting/sorting-direction-control.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ include file="../../common/taglib.jsp"%> 3 | 4 |
5 |
6 |

Sorting direction control

7 |
8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/webapp/WEB-INF/views/common/taglib.jsp: -------------------------------------------------------------------------------- 1 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 2 | <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> 3 | 4 | <%@ taglib prefix="datatables" uri="http://github.com/dandelion/datatables" %> 5 | <%@ taglib prefix="dandelion" uri="http://github.com/dandelion" %> 6 | -------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/webapp/assets/css/app.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 60px; 3 | padding-bottom: 40px; 4 | } 5 | 6 | .row-intro { 7 | margin-bottom: 30px; 8 | } -------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/webapp/assets/css/main.css: -------------------------------------------------------------------------------- 1 | /* main.Css */ -------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/webapp/assets/css/normalize.css: -------------------------------------------------------------------------------- 1 | /* normalize.Css */ -------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/webapp/assets/css/yadcf-custom.css: -------------------------------------------------------------------------------- 1 | .yadcf-filter-reset-button { 2 | display: inline-block; 3 | margin-bottom: 10px; 4 | } -------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/webapp/assets/js/app-callbacks.js: -------------------------------------------------------------------------------- 1 | function callbackCreatedRow(nRow, aData, iDataIndex) { 2 | $('td:eq(4)', nRow).css({ 3 | 'font-weight' : 'bold' 4 | }); 5 | } 6 | function callbackInfo(oSettings, iStart, iEnd, iMax, iTotal, sPre) { 7 | return iStart + " to " + iEnd; 8 | } -------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/webapp/assets/js/app-filtering.js: -------------------------------------------------------------------------------- 1 | var myPredefinedValues = ['Portland', 'Strasbourg', 'Stonewall']; -------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/webapp/assets/js/customrendering.js: -------------------------------------------------------------------------------- 1 | function mailify(data, type, full) { 2 | return '' + data + ''; 3 | } 4 | -------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/webapp/assets/js/main.js: -------------------------------------------------------------------------------- 1 | // main -------------------------------------------------------------------------------- /datatables-jsp-starter/src/main/webapp/assets/js/plugins.js: -------------------------------------------------------------------------------- 1 | // plugins -------------------------------------------------------------------------------- /datatables-jsp-themes/.gitignore: -------------------------------------------------------------------------------- 1 | #IDE 2 | .settings/ 3 | .project 4 | .classpath 5 | 6 | .idea/ 7 | *.iml 8 | 9 | #Maven 10 | target/ 11 | /src/main/java/rebel.xml 12 | /src/main/resources/rebel.xml 13 | /src/main/resources/rebel.xml 14 | /src/main/resources/rebel.xml 15 | -------------------------------------------------------------------------------- /datatables-jsp-themes/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # dandelion/dt-jsp-themes 3 | # 4 | FROM dandelion/sample-tomcat:7.0.62-jdk7 5 | MAINTAINER Thibault Duchateau 6 | 7 | ADD . /home/dandelion 8 | 9 | # Build the sample application 10 | # Deploy it to Tomcat 11 | # Remove sources to make the image thinner 12 | RUN cd /home/dandelion && \ 13 | mvn package && \ 14 | cp -r target/datatables-jsp-themes /usr/local/tomcat/webapps/ && \ 15 | rm -rf /home/dandelion 16 | -------------------------------------------------------------------------------- /datatables-jsp-themes/src/main/java/com/github/dandelion/datatables/model/Address.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.model; 2 | 3 | 4 | /** 5 | * A typical Address entity. 6 | * 7 | * @author tduchateau 8 | */ 9 | public class Address { 10 | 11 | private int id; 12 | private String street; 13 | private Town town; 14 | 15 | public Address() { 16 | 17 | } 18 | 19 | public Address(String street) { 20 | this.street = street; 21 | } 22 | 23 | public Address(String street, Town town) { 24 | this.street = street; 25 | this.town = town; 26 | } 27 | 28 | public Town getTown() { 29 | return town; 30 | } 31 | 32 | public void setTown(Town town) { 33 | this.town = town; 34 | } 35 | 36 | public int getId() { 37 | return id; 38 | } 39 | 40 | public void setId(int id) { 41 | this.id = id; 42 | } 43 | 44 | public String getStreet() { 45 | return street; 46 | } 47 | 48 | public void setStreet(String street) { 49 | this.street = street; 50 | } 51 | 52 | 53 | 54 | } -------------------------------------------------------------------------------- /datatables-jsp-themes/src/main/java/com/github/dandelion/datatables/model/Company.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.model; 2 | 3 | 4 | public class Company { 5 | 6 | private int id; 7 | private String name; 8 | 9 | public Company(){ 10 | 11 | } 12 | public Company(int id, String name){ 13 | this.id = id; 14 | this.name = name; 15 | } 16 | 17 | public int getId() { 18 | return id; 19 | } 20 | 21 | public void setId(int id) { 22 | this.id = id; 23 | } 24 | 25 | public String getName() { 26 | return name; 27 | } 28 | 29 | public void setName(String name) { 30 | this.name = name; 31 | } 32 | } -------------------------------------------------------------------------------- /datatables-jsp-themes/src/main/java/com/github/dandelion/datatables/model/Town.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.model; 2 | 3 | /** 4 | * A typical Town entity. 5 | * 6 | * @author tduchateau 7 | */ 8 | public class Town { 9 | 10 | private int id; 11 | private String name; 12 | private String postcode; 13 | 14 | public Town() { 15 | 16 | } 17 | 18 | public Town(int id, String name, String postcode){ 19 | this.id = id; 20 | this.name = name; 21 | this.postcode = postcode; 22 | } 23 | 24 | public int getId() { 25 | return id; 26 | } 27 | 28 | public void setId(int id) { 29 | this.id = id; 30 | } 31 | 32 | public Town(String label) { 33 | this.name = label; 34 | } 35 | 36 | public String getName() { 37 | return name; 38 | } 39 | 40 | public void setName(String label) { 41 | this.name = label; 42 | } 43 | 44 | public String getPostcode() { 45 | return postcode; 46 | } 47 | 48 | public void setPostcode(String postcode) { 49 | this.postcode = postcode; 50 | } 51 | } -------------------------------------------------------------------------------- /datatables-jsp-themes/src/main/java/com/github/dandelion/datatables/repository/PersonRepository.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.repository; 2 | 3 | import java.util.List; 4 | 5 | import com.github.dandelion.datatables.model.Person; 6 | 7 | /** 8 | * Repository interface for the Person domain object. 9 | * 10 | * @author Thibault Duchateau 11 | */ 12 | public interface PersonRepository { 13 | 14 | /** 15 | * @return the complete list of persons stored in the repository. 16 | */ 17 | public List findAll(); 18 | 19 | /** 20 | * @param maxResult 21 | * Max number of persons. 22 | * @return a limited list of persons. 23 | */ 24 | public List findLimited(int maxResult); 25 | } 26 | -------------------------------------------------------------------------------- /datatables-jsp-themes/src/main/java/com/github/dandelion/datatables/service/PersonService.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.service; 2 | 3 | import java.util.List; 4 | 5 | import com.github.dandelion.datatables.model.Person; 6 | 7 | /** 8 | *

9 | * Person service mostly used as a facade for all controllers. 10 | * 11 | * @author Thibault Duchateau 12 | */ 13 | public interface PersonService { 14 | 15 | /** 16 | * @return the complete list of persons. 17 | */ 18 | public List findAll(); 19 | 20 | /** 21 | * @param maxResult 22 | * Max number of persons. 23 | * @return a maxResult limited list of persons. 24 | */ 25 | public List findLimited(int maxResult); 26 | } -------------------------------------------------------------------------------- /datatables-jsp-themes/src/main/java/com/github/dandelion/datatables/service/PersonServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.service; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import com.github.dandelion.datatables.model.Person; 9 | import com.github.dandelion.datatables.repository.PersonRepository; 10 | 11 | /** 12 | * Implementation of the {@link PersonService}. 13 | * 14 | * @author Thibault Duchateau 15 | */ 16 | @Service 17 | public class PersonServiceImpl implements PersonService { 18 | 19 | @Autowired 20 | PersonRepository personRepository; 21 | 22 | public List findAll() { 23 | return personRepository.findAll(); 24 | } 25 | 26 | public List findLimited(int maxResult) { 27 | return personRepository.findLimited(maxResult); 28 | } 29 | } -------------------------------------------------------------------------------- /datatables-jsp-themes/src/main/java/com/github/dandelion/datatables/web/ddl/CustomJqueryTheme.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.web.ddl; 2 | 3 | import com.github.dandelion.core.web.AssetRequestContext; 4 | import com.github.dandelion.datatables.core.extension.AbstractExtension; 5 | import com.github.dandelion.datatables.core.generator.DTConstants; 6 | import com.github.dandelion.datatables.core.html.HtmlTable; 7 | 8 | public class CustomJqueryTheme extends AbstractExtension { 9 | 10 | @Override 11 | public String getExtensionName() { 12 | return "myTheme"; 13 | } 14 | 15 | @Override 16 | public void setup(HtmlTable table) { 17 | 18 | // Activate bundles 19 | AssetRequestContext 20 | .get(table.getTableConfiguration().getRequest()) 21 | .addBundle("ddl-dt-theme-jqueryui") 22 | .addBundle("custom-theme"); 23 | 24 | // Add "bJQueryUI":true 25 | addParameter(DTConstants.DT_JQUERYUI, true); 26 | 27 | // Add class="display" 28 | table.addCssClass("display"); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /datatables-jsp-themes/src/main/resources/dandelion/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "assets": [ 3 | { 4 | "locations": { 5 | "webapp": "/assets/css/app.css" 6 | } 7 | } 8 | ] 9 | } -------------------------------------------------------------------------------- /datatables-jsp-themes/src/main/resources/dandelion/custom-theme.json: -------------------------------------------------------------------------------- 1 | { 2 | "bundle" : "custom-theme", 3 | "dependencies": [ "jqueryui" ], 4 | "assets": [ 5 | { 6 | "name": "jquery-ui-custom", 7 | "version": "0.10.0", 8 | "type": "css", 9 | "locations": { 10 | "webapp": "/assets/css/jquery-ui-1.10.4.custom.css" 11 | } 12 | } 13 | ] 14 | } -------------------------------------------------------------------------------- /datatables-jsp-themes/src/main/resources/dandelion/datatables/datatables.properties: -------------------------------------------------------------------------------- 1 | #global.main.extension.package=com.github.dandelion.datatables.web.ddl 2 | #global.css.class=table table-striped table-bordered table-condensed table-hover 3 | #global.css.theme=bootstrap3 -------------------------------------------------------------------------------- /datatables-jsp-themes/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | %d{HH:mm:ss.SSS} %-5level %logger{60} - %msg%n 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /datatables-jsp-themes/src/main/resources/spring/business-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 13 | -------------------------------------------------------------------------------- /datatables-jsp-themes/src/main/resources/spring/mvc-view-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | 14 | /WEB-INF/tiles/tiles*.xml 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /datatables-jsp-themes/src/main/webapp/WEB-INF/tiles/tiles-bootstrap2-defs.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /datatables-jsp-themes/src/main/webapp/WEB-INF/tiles/tiles-bootstrap3-defs.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /datatables-jsp-themes/src/main/webapp/WEB-INF/tiles/tiles-defs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /datatables-jsp-themes/src/main/webapp/WEB-INF/tiles/tiles-jqueryui-defs.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /datatables-jsp-themes/src/main/webapp/WEB-INF/views/common/taglib.jsp: -------------------------------------------------------------------------------- 1 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 2 | <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> 3 | <%@ taglib prefix="datatables" uri="http://github.com/dandelion/datatables" %> 4 | <%@ taglib prefix="dandelion" uri="http://github.com/dandelion" %> 5 | -------------------------------------------------------------------------------- /datatables-jsp-themes/src/main/webapp/WEB-INF/views/overview.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | 3 |

4 |
Feel free to browse the examples using the navbar!
5 |
6 | 7 | -------------------------------------------------------------------------------- /datatables-jsp-themes/src/main/webapp/assets/css/app.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 60px; 3 | padding-bottom: 40px; 4 | } 5 | 6 | .row-intro { 7 | margin-bottom: 30px; 8 | } -------------------------------------------------------------------------------- /datatables-jsp-themes/src/main/webapp/assets/images/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dandelion/dandelion-datatables-samples/24d120a29311d0afb7c9cc18311c6dee8b37e161/datatables-jsp-themes/src/main/webapp/assets/images/Thumbs.db -------------------------------------------------------------------------------- /datatables-jsp-themes/src/main/webapp/assets/images/animated-overlay.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dandelion/dandelion-datatables-samples/24d120a29311d0afb7c9cc18311c6dee8b37e161/datatables-jsp-themes/src/main/webapp/assets/images/animated-overlay.gif -------------------------------------------------------------------------------- /datatables-jsp-themes/src/main/webapp/assets/images/ui-bg_diamond_10_4f4221_10x8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dandelion/dandelion-datatables-samples/24d120a29311d0afb7c9cc18311c6dee8b37e161/datatables-jsp-themes/src/main/webapp/assets/images/ui-bg_diamond_10_4f4221_10x8.png -------------------------------------------------------------------------------- /datatables-jsp-themes/src/main/webapp/assets/images/ui-bg_diamond_20_372806_10x8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dandelion/dandelion-datatables-samples/24d120a29311d0afb7c9cc18311c6dee8b37e161/datatables-jsp-themes/src/main/webapp/assets/images/ui-bg_diamond_20_372806_10x8.png -------------------------------------------------------------------------------- /datatables-jsp-themes/src/main/webapp/assets/images/ui-bg_diamond_25_675423_10x8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dandelion/dandelion-datatables-samples/24d120a29311d0afb7c9cc18311c6dee8b37e161/datatables-jsp-themes/src/main/webapp/assets/images/ui-bg_diamond_25_675423_10x8.png -------------------------------------------------------------------------------- /datatables-jsp-themes/src/main/webapp/assets/images/ui-bg_diamond_25_d5ac5d_10x8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dandelion/dandelion-datatables-samples/24d120a29311d0afb7c9cc18311c6dee8b37e161/datatables-jsp-themes/src/main/webapp/assets/images/ui-bg_diamond_25_d5ac5d_10x8.png -------------------------------------------------------------------------------- /datatables-jsp-themes/src/main/webapp/assets/images/ui-bg_diamond_8_261803_10x8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dandelion/dandelion-datatables-samples/24d120a29311d0afb7c9cc18311c6dee8b37e161/datatables-jsp-themes/src/main/webapp/assets/images/ui-bg_diamond_8_261803_10x8.png -------------------------------------------------------------------------------- /datatables-jsp-themes/src/main/webapp/assets/images/ui-bg_diamond_8_443113_10x8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dandelion/dandelion-datatables-samples/24d120a29311d0afb7c9cc18311c6dee8b37e161/datatables-jsp-themes/src/main/webapp/assets/images/ui-bg_diamond_8_443113_10x8.png -------------------------------------------------------------------------------- /datatables-jsp-themes/src/main/webapp/assets/images/ui-bg_flat_75_ddd4b0_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dandelion/dandelion-datatables-samples/24d120a29311d0afb7c9cc18311c6dee8b37e161/datatables-jsp-themes/src/main/webapp/assets/images/ui-bg_flat_75_ddd4b0_40x100.png -------------------------------------------------------------------------------- /datatables-jsp-themes/src/main/webapp/assets/images/ui-bg_highlight-hard_65_fee4bd_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dandelion/dandelion-datatables-samples/24d120a29311d0afb7c9cc18311c6dee8b37e161/datatables-jsp-themes/src/main/webapp/assets/images/ui-bg_highlight-hard_65_fee4bd_1x100.png -------------------------------------------------------------------------------- /datatables-jsp-themes/src/main/webapp/assets/images/ui-icons_070603_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dandelion/dandelion-datatables-samples/24d120a29311d0afb7c9cc18311c6dee8b37e161/datatables-jsp-themes/src/main/webapp/assets/images/ui-icons_070603_256x240.png -------------------------------------------------------------------------------- /datatables-jsp-themes/src/main/webapp/assets/images/ui-icons_e8e2b5_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dandelion/dandelion-datatables-samples/24d120a29311d0afb7c9cc18311c6dee8b37e161/datatables-jsp-themes/src/main/webapp/assets/images/ui-icons_e8e2b5_256x240.png -------------------------------------------------------------------------------- /datatables-jsp-themes/src/main/webapp/assets/images/ui-icons_e9cd86_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dandelion/dandelion-datatables-samples/24d120a29311d0afb7c9cc18311c6dee8b37e161/datatables-jsp-themes/src/main/webapp/assets/images/ui-icons_e9cd86_256x240.png -------------------------------------------------------------------------------- /datatables-jsp-themes/src/main/webapp/assets/images/ui-icons_efec9f_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dandelion/dandelion-datatables-samples/24d120a29311d0afb7c9cc18311c6dee8b37e161/datatables-jsp-themes/src/main/webapp/assets/images/ui-icons_efec9f_256x240.png -------------------------------------------------------------------------------- /datatables-jsp-themes/src/main/webapp/assets/images/ui-icons_f2ec64_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dandelion/dandelion-datatables-samples/24d120a29311d0afb7c9cc18311c6dee8b37e161/datatables-jsp-themes/src/main/webapp/assets/images/ui-icons_f2ec64_256x240.png -------------------------------------------------------------------------------- /datatables-jsp-themes/src/main/webapp/assets/images/ui-icons_f9f2bd_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dandelion/dandelion-datatables-samples/24d120a29311d0afb7c9cc18311c6dee8b37e161/datatables-jsp-themes/src/main/webapp/assets/images/ui-icons_f9f2bd_256x240.png -------------------------------------------------------------------------------- /datatables-jsp-themes/src/main/webapp/assets/images/ui-icons_ff7519_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dandelion/dandelion-datatables-samples/24d120a29311d0afb7c9cc18311c6dee8b37e161/datatables-jsp-themes/src/main/webapp/assets/images/ui-icons_ff7519_256x240.png -------------------------------------------------------------------------------- /datatables-jsp-themes/src/main/webapp/index.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%> 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /datatables-thymeleaf-ajax/.gitignore: -------------------------------------------------------------------------------- 1 | /.project 2 | /.settings 3 | /target 4 | /.classpath 5 | /src/main/resources/rebel.xml 6 | /datatables4j-demo-thymeleaf.iml 7 | -------------------------------------------------------------------------------- /datatables-thymeleaf-ajax/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # dandelion/dt-tml-ajax 3 | # 4 | FROM dandelion/sample-tomcat:7.0.62-jdk7 5 | MAINTAINER Thibault Duchateau 6 | 7 | ADD . /home/dandelion 8 | 9 | # Build the sample application 10 | # Deploy it to Tomcat 11 | # Remove sources to make the image thinner 12 | RUN cd /home/dandelion && \ 13 | mvn package && \ 14 | cp -r target/datatables-thymeleaf-ajax /usr/local/tomcat/webapps/ && \ 15 | rm -rf /home/dandelion 16 | -------------------------------------------------------------------------------- /datatables-thymeleaf-ajax/src/main/java/com/github/dandelion/datatables/model/Company.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.model; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.GenerationType; 7 | import javax.persistence.Id; 8 | 9 | @Entity 10 | public class Company { 11 | 12 | @Id 13 | @GeneratedValue(strategy = GenerationType.AUTO) 14 | private Long id; 15 | 16 | @Column 17 | private String name; 18 | 19 | public Long getId() { 20 | return id; 21 | } 22 | 23 | public void setId(Long id) { 24 | this.id = id; 25 | } 26 | 27 | public String getName() { 28 | return name; 29 | } 30 | 31 | public void setName(String name) { 32 | this.name = name; 33 | } 34 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-ajax/src/main/resources/dandelion/app-ajax.json: -------------------------------------------------------------------------------- 1 | { 2 | "assets": [ 3 | { 4 | "locations": { 5 | "webapp": "/assets/js/ajax.js" 6 | } 7 | } 8 | ] 9 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-ajax/src/main/resources/dandelion/app-custom-rendering.json: -------------------------------------------------------------------------------- 1 | { 2 | "assets": [ 3 | { 4 | "name": "app-custom-rendering", 5 | "locations": { 6 | "webapp": "/assets/js/custom-rendering.js" 7 | } 8 | } 9 | ] 10 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-ajax/src/main/resources/dandelion/app-filtering.json: -------------------------------------------------------------------------------- 1 | { 2 | "assets": [ 3 | { 4 | "name": "app-filtering", 5 | "locations": { 6 | "webapp": "/assets/js/filtering.js" 7 | } 8 | } 9 | ] 10 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-ajax/src/main/resources/dandelion/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "assets": [ 3 | { 4 | "locations": { 5 | "webapp": "/assets/css/application.css" 6 | } 7 | }, 8 | { 9 | "locations": { 10 | "webapp": "/assets/css/yadcf-custom.css" 11 | } 12 | } 13 | ] 14 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-ajax/src/main/resources/dandelion/dandelion.properties: -------------------------------------------------------------------------------- 1 | ############################################ 2 | # Dandelion configuration 3 | ############################################ 4 | 5 | bundle.includes=app,bootstrap2 6 | -------------------------------------------------------------------------------- /datatables-thymeleaf-ajax/src/main/resources/dandelion/dandelion_prod.properties: -------------------------------------------------------------------------------- 1 | ############################################ 2 | # Dandelion configuration 3 | ############################################ 4 | 5 | bundle.includes=app,bootstrap2 6 | -------------------------------------------------------------------------------- /datatables-thymeleaf-ajax/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | %d{HH:mm:ss.SSS} %-5level %logger{60} - %msg%n 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /datatables-thymeleaf-ajax/src/main/resources/spring/business-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /datatables-thymeleaf-ajax/src/main/resources/spring/mvc-core-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /datatables-thymeleaf-ajax/src/main/resources/sql/company.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `company` (`id`,`name`) VALUES (1,'Microsoft'); 2 | INSERT INTO `company` (`id`,`name`) VALUES (2,'Apple'); 3 | INSERT INTO `company` (`id`,`name`) VALUES (3,'Google'); 4 | INSERT INTO `company` (`id`,`name`) VALUES (4,'Yahoo'); 5 | INSERT INTO `company` (`Id`,`Name`) VALUES (5,'Facebook'); 6 | INSERT INTO `company` (`Id`,`Name`) VALUES (6,'Twitter'); 7 | INSERT INTO `company` (`Id`,`Name`) VALUES (7,'Intel'); 8 | INSERT INTO `company` (`Id`,`Name`) VALUES (8,'Amazon'); 9 | -------------------------------------------------------------------------------- /datatables-thymeleaf-ajax/src/main/webapp/WEB-INF/views/common/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | datatables-thymeleaf-ajax 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /datatables-thymeleaf-ajax/src/main/webapp/WEB-INF/views/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 |
8 |
9 |
Feel free to browse the examples using the navbar!
10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /datatables-thymeleaf-ajax/src/main/webapp/assets/css/application.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 60px; 3 | padding-bottom: 40px; 4 | } 5 | 6 | .row-intro { 7 | margin-bottom: 30px; 8 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-ajax/src/main/webapp/assets/css/yadcf-custom.css: -------------------------------------------------------------------------------- 1 | .yadcf-filter-reset-button { 2 | display: inline-block; 3 | margin-bottom: 10px; 4 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-ajax/src/main/webapp/assets/images/Sorting icons.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dandelion/dandelion-datatables-samples/24d120a29311d0afb7c9cc18311c6dee8b37e161/datatables-thymeleaf-ajax/src/main/webapp/assets/images/Sorting icons.psd -------------------------------------------------------------------------------- /datatables-thymeleaf-ajax/src/main/webapp/assets/images/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dandelion/dandelion-datatables-samples/24d120a29311d0afb7c9cc18311c6dee8b37e161/datatables-thymeleaf-ajax/src/main/webapp/assets/images/Thumbs.db -------------------------------------------------------------------------------- /datatables-thymeleaf-ajax/src/main/webapp/assets/images/back_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dandelion/dandelion-datatables-samples/24d120a29311d0afb7c9cc18311c6dee8b37e161/datatables-thymeleaf-ajax/src/main/webapp/assets/images/back_disabled.png -------------------------------------------------------------------------------- /datatables-thymeleaf-ajax/src/main/webapp/assets/images/back_enabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dandelion/dandelion-datatables-samples/24d120a29311d0afb7c9cc18311c6dee8b37e161/datatables-thymeleaf-ajax/src/main/webapp/assets/images/back_enabled.png -------------------------------------------------------------------------------- /datatables-thymeleaf-ajax/src/main/webapp/assets/images/back_enabled_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dandelion/dandelion-datatables-samples/24d120a29311d0afb7c9cc18311c6dee8b37e161/datatables-thymeleaf-ajax/src/main/webapp/assets/images/back_enabled_hover.png -------------------------------------------------------------------------------- /datatables-thymeleaf-ajax/src/main/webapp/assets/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dandelion/dandelion-datatables-samples/24d120a29311d0afb7c9cc18311c6dee8b37e161/datatables-thymeleaf-ajax/src/main/webapp/assets/images/favicon.ico -------------------------------------------------------------------------------- /datatables-thymeleaf-ajax/src/main/webapp/assets/images/forward_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dandelion/dandelion-datatables-samples/24d120a29311d0afb7c9cc18311c6dee8b37e161/datatables-thymeleaf-ajax/src/main/webapp/assets/images/forward_disabled.png -------------------------------------------------------------------------------- /datatables-thymeleaf-ajax/src/main/webapp/assets/images/forward_enabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dandelion/dandelion-datatables-samples/24d120a29311d0afb7c9cc18311c6dee8b37e161/datatables-thymeleaf-ajax/src/main/webapp/assets/images/forward_enabled.png -------------------------------------------------------------------------------- /datatables-thymeleaf-ajax/src/main/webapp/assets/images/forward_enabled_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dandelion/dandelion-datatables-samples/24d120a29311d0afb7c9cc18311c6dee8b37e161/datatables-thymeleaf-ajax/src/main/webapp/assets/images/forward_enabled_hover.png -------------------------------------------------------------------------------- /datatables-thymeleaf-ajax/src/main/webapp/assets/images/sort_asc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dandelion/dandelion-datatables-samples/24d120a29311d0afb7c9cc18311c6dee8b37e161/datatables-thymeleaf-ajax/src/main/webapp/assets/images/sort_asc.png -------------------------------------------------------------------------------- /datatables-thymeleaf-ajax/src/main/webapp/assets/images/sort_asc_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dandelion/dandelion-datatables-samples/24d120a29311d0afb7c9cc18311c6dee8b37e161/datatables-thymeleaf-ajax/src/main/webapp/assets/images/sort_asc_disabled.png -------------------------------------------------------------------------------- /datatables-thymeleaf-ajax/src/main/webapp/assets/images/sort_both.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dandelion/dandelion-datatables-samples/24d120a29311d0afb7c9cc18311c6dee8b37e161/datatables-thymeleaf-ajax/src/main/webapp/assets/images/sort_both.png -------------------------------------------------------------------------------- /datatables-thymeleaf-ajax/src/main/webapp/assets/images/sort_desc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dandelion/dandelion-datatables-samples/24d120a29311d0afb7c9cc18311c6dee8b37e161/datatables-thymeleaf-ajax/src/main/webapp/assets/images/sort_desc.png -------------------------------------------------------------------------------- /datatables-thymeleaf-ajax/src/main/webapp/assets/images/sort_desc_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dandelion/dandelion-datatables-samples/24d120a29311d0afb7c9cc18311c6dee8b37e161/datatables-thymeleaf-ajax/src/main/webapp/assets/images/sort_desc_disabled.png -------------------------------------------------------------------------------- /datatables-thymeleaf-ajax/src/main/webapp/assets/js/ajax.js: -------------------------------------------------------------------------------- 1 | function customReload() { 2 | alert("Custom reload!"); 3 | oTable_myTableId.ajax.reload(); 4 | } 5 | 6 | function myCustomParams(){ 7 | return { 8 | "type" : "POST", 9 | "data" : { name: "John", location: "Boston" } 10 | }; 11 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-ajax/src/main/webapp/assets/js/custom-rendering.js: -------------------------------------------------------------------------------- 1 | function mailify(data, type, full) { 2 | return '' + data + ''; 3 | } 4 | 5 | function toDate(data, type, full) { 6 | return moment(new Date(data)).format('YYYY/MM/DD'); 7 | } 8 | 9 | function toCurrency(data, type, full) { 10 | return "€" + data; 11 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-ajax/src/main/webapp/assets/js/filtering.js: -------------------------------------------------------------------------------- 1 | var predefinedValues = ['Twitter', 'Facebook', 'Google', 'Amazon', 'Intel', 'Microsoft', 'Yahoo']; -------------------------------------------------------------------------------- /datatables-thymeleaf-configuration-groups/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # dandelion/dt-tml-configuration-groups 3 | # 4 | FROM dandelion/sample-tomcat:7.0.62-jdk7 5 | MAINTAINER Thibault Duchateau 6 | 7 | ADD . /home/dandelion 8 | 9 | # Build the sample application 10 | # Deploy it to Tomcat 11 | # Remove sources to make the image thinner 12 | RUN cd /home/dandelion && \ 13 | mvn package && \ 14 | cp -r target/datatables-thymeleaf-configuration-groups /usr/local/tomcat/webapps/ && \ 15 | rm -rf /home/dandelion 16 | -------------------------------------------------------------------------------- /datatables-thymeleaf-configuration-groups/src/main/java/com/github/dandelion/datatables/model/Address.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.model; 2 | 3 | 4 | /** 5 | * A typical Address entity. 6 | * 7 | * @author tduchateau 8 | */ 9 | public class Address { 10 | 11 | private int id; 12 | private String street; 13 | private Town town; 14 | 15 | public Address() { 16 | 17 | } 18 | 19 | public Address(String street) { 20 | this.street = street; 21 | } 22 | 23 | public Address(String street, Town town) { 24 | this.street = street; 25 | this.town = town; 26 | } 27 | 28 | public Town getTown() { 29 | return town; 30 | } 31 | 32 | public void setTown(Town town) { 33 | this.town = town; 34 | } 35 | 36 | public int getId() { 37 | return id; 38 | } 39 | 40 | public void setId(int id) { 41 | this.id = id; 42 | } 43 | 44 | public String getStreet() { 45 | return street; 46 | } 47 | 48 | public void setStreet(String street) { 49 | this.street = street; 50 | } 51 | 52 | 53 | 54 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-configuration-groups/src/main/java/com/github/dandelion/datatables/model/Company.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.model; 2 | 3 | 4 | public class Company { 5 | 6 | private int id; 7 | private String name; 8 | 9 | public Company(){ 10 | 11 | } 12 | public Company(int id, String name){ 13 | this.id = id; 14 | this.name = name; 15 | } 16 | 17 | public int getId() { 18 | return id; 19 | } 20 | 21 | public void setId(int id) { 22 | this.id = id; 23 | } 24 | 25 | public String getName() { 26 | return name; 27 | } 28 | 29 | public void setName(String name) { 30 | this.name = name; 31 | } 32 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-configuration-groups/src/main/java/com/github/dandelion/datatables/model/Town.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.model; 2 | 3 | /** 4 | * A typical Town entity. 5 | * 6 | * @author tduchateau 7 | */ 8 | public class Town { 9 | 10 | private int id; 11 | private String name; 12 | private String postcode; 13 | 14 | public Town() { 15 | 16 | } 17 | 18 | public Town(int id, String name, String postcode){ 19 | this.id = id; 20 | this.name = name; 21 | this.postcode = postcode; 22 | } 23 | 24 | public int getId() { 25 | return id; 26 | } 27 | 28 | public void setId(int id) { 29 | this.id = id; 30 | } 31 | 32 | public Town(String label) { 33 | this.name = label; 34 | } 35 | 36 | public String getName() { 37 | return name; 38 | } 39 | 40 | public void setName(String label) { 41 | this.name = label; 42 | } 43 | 44 | public String getPostcode() { 45 | return postcode; 46 | } 47 | 48 | public void setPostcode(String postcode) { 49 | this.postcode = postcode; 50 | } 51 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-configuration-groups/src/main/java/com/github/dandelion/datatables/repository/PersonRepository.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.repository; 2 | 3 | import java.util.List; 4 | 5 | import com.github.dandelion.datatables.model.Person; 6 | 7 | /** 8 | * Repository interface for the Person domain object. 9 | * 10 | * @author Thibault Duchateau 11 | */ 12 | public interface PersonRepository { 13 | 14 | /** 15 | * @return the complete list of persons stored in the repository. 16 | */ 17 | public List findAll(); 18 | 19 | /** 20 | * @param maxResult 21 | * Max number of persons. 22 | * @return a limited list of persons. 23 | */ 24 | public List findLimited(int maxResult); 25 | } 26 | -------------------------------------------------------------------------------- /datatables-thymeleaf-configuration-groups/src/main/java/com/github/dandelion/datatables/service/PersonService.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.service; 2 | 3 | import java.util.List; 4 | 5 | import com.github.dandelion.datatables.model.Person; 6 | 7 | /** 8 | *

9 | * Person service mostly used as a facade for all controllers. 10 | * 11 | * @author Thibault Duchateau 12 | */ 13 | public interface PersonService { 14 | 15 | /** 16 | * @return the complete list of persons. 17 | */ 18 | public List findAll(); 19 | 20 | /** 21 | * @param maxResult 22 | * Max number of persons. 23 | * @return a maxResult limited list of persons. 24 | */ 25 | public List findLimited(int maxResult); 26 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-configuration-groups/src/main/java/com/github/dandelion/datatables/service/PersonServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.service; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import com.github.dandelion.datatables.model.Person; 9 | import com.github.dandelion.datatables.repository.PersonRepository; 10 | 11 | /** 12 | * Implementation of the {@link PersonService}. 13 | * 14 | * @author Thibault Duchateau 15 | */ 16 | @Service 17 | public class PersonServiceImpl implements PersonService { 18 | 19 | @Autowired 20 | PersonRepository personRepository; 21 | 22 | public List findAll() { 23 | return personRepository.findAll(); 24 | } 25 | 26 | public List findLimited(int maxResult) { 27 | return personRepository.findLimited(maxResult); 28 | } 29 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-configuration-groups/src/main/resources/dandelion/dandelion.properties: -------------------------------------------------------------------------------- 1 | ############################################ 2 | # Dandelion configuration 3 | ############################################ 4 | 5 | bundle.includes=sample,bootstrap2 -------------------------------------------------------------------------------- /datatables-thymeleaf-configuration-groups/src/main/resources/dandelion/datatables/datatables.properties: -------------------------------------------------------------------------------- 1 | ############################################ 2 | # Dandelion-Datatables configuration 3 | ############################################ 4 | 5 | ##### ================== 6 | ##### Global configuration 7 | ##### ================== 8 | global.css.theme=bootstrap2 9 | global.css.class=table table-striped 10 | global.feature.pagingType=bootstrap_full_numbers 11 | 12 | ##### ================== 13 | ##### Group1 configuration 14 | ##### ================== 15 | group1.css.class=table table-striped table-condensed 16 | group1.feature.lengthChange= 17 | group1.feature.sortable= 18 | group1.feature.stateSave= 19 | group1.feature.pagingType=bootstrap_four_button 20 | group1.feature.dom=lfrtp 21 | 22 | ##### ================== 23 | ##### Group2 configuration 24 | ##### ================== 25 | group2.feature.filterable=false 26 | group2.css.class=table table-hover 27 | group2.feature.pagingType=bootstrap_four_button 28 | group2.feature.dom=lfrtp 29 | -------------------------------------------------------------------------------- /datatables-thymeleaf-configuration-groups/src/main/resources/dandelion/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "bundle" : "sample", 3 | "assets": [ 4 | { 5 | "name": "application", 6 | "version": "0.10.0", 7 | "type": "css", 8 | "locations": { 9 | "webapp": "/assets/css/application.css" 10 | } 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-configuration-groups/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | %d{HH:mm:ss.SSS} %-5level %logger{60} - %msg%n 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /datatables-thymeleaf-configuration-groups/src/main/resources/spring/business-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 13 | -------------------------------------------------------------------------------- /datatables-thymeleaf-configuration-groups/src/main/resources/spring/mvc-core-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /datatables-thymeleaf-configuration-groups/src/main/webapp/WEB-INF/tiles/setup-tiles.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /datatables-thymeleaf-configuration-groups/src/main/webapp/assets/css/application.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 60px; 3 | padding-bottom: 40px; 4 | } 5 | 6 | .row-intro { 7 | margin-bottom: 30px; 8 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-export/.gitignore: -------------------------------------------------------------------------------- 1 | /.project 2 | /.settings 3 | /target 4 | /.classpath 5 | /src/main/resources/rebel.xml 6 | /datatables4j-demo-thymeleaf.iml 7 | -------------------------------------------------------------------------------- /datatables-thymeleaf-export/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # dandelion/dt-tml-export 3 | # 4 | FROM dandelion/sample-tomcat:7.0.62-jdk7 5 | MAINTAINER Thibault Duchateau 6 | 7 | ADD . /home/dandelion 8 | 9 | # Build the sample application 10 | # Deploy it to Tomcat 11 | # Remove sources to make the image thinner 12 | RUN cd /home/dandelion && \ 13 | mvn package && \ 14 | cp -r target/datatables-thymeleaf-export /usr/local/tomcat/webapps/ && \ 15 | rm -rf /home/dandelion 16 | -------------------------------------------------------------------------------- /datatables-thymeleaf-export/src/main/java/com/github/dandelion/datatables/model/Company.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.model; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.GenerationType; 7 | import javax.persistence.Id; 8 | 9 | @Entity 10 | public class Company { 11 | 12 | @Id 13 | @GeneratedValue(strategy = GenerationType.AUTO) 14 | private Long id; 15 | 16 | @Column 17 | private String name; 18 | 19 | public Long getId() { 20 | return id; 21 | } 22 | 23 | public void setId(Long id) { 24 | this.id = id; 25 | } 26 | 27 | public String getName() { 28 | return name; 29 | } 30 | 31 | public void setName(String name) { 32 | this.name = name; 33 | } 34 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-export/src/main/resources/dandelion/app-custom-rendering.json: -------------------------------------------------------------------------------- 1 | { 2 | "assets": [ 3 | { 4 | "locations": { 5 | "webapp": "/assets/js/app-custom-rendering.js" 6 | } 7 | } 8 | ] 9 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-export/src/main/resources/dandelion/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "assets": [ 3 | { 4 | "locations": { 5 | "webapp": "/assets/css/app.css" 6 | } 7 | } 8 | ] 9 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-export/src/main/resources/dandelion/dandelion.properties: -------------------------------------------------------------------------------- 1 | ############################################ 2 | # Dandelion configuration 3 | ############################################ 4 | 5 | bundle.includes=app,bootstrap2 -------------------------------------------------------------------------------- /datatables-thymeleaf-export/src/main/resources/dandelion/datatables/datatables.properties: -------------------------------------------------------------------------------- 1 | ############################################ 2 | # Dandelion-Datatables configuration 3 | ############################################ 4 | 5 | global.css.class=display 6 | -------------------------------------------------------------------------------- /datatables-thymeleaf-export/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | %d{HH:mm:ss.SSS} %-5level %logger{60} - %msg%n 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /datatables-thymeleaf-export/src/main/resources/spring/business-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /datatables-thymeleaf-export/src/main/resources/spring/mvc-core-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /datatables-thymeleaf-export/src/main/resources/sql/company.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `company` (`id`,`name`) VALUES (1,'Microsoft'); 2 | INSERT INTO `company` (`id`,`name`) VALUES (2,'Apple'); 3 | INSERT INTO `company` (`id`,`name`) VALUES (3,'Google'); 4 | INSERT INTO `company` (`id`,`name`) VALUES (4,'Yahoo'); -------------------------------------------------------------------------------- /datatables-thymeleaf-export/src/main/resources/sql/create.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `town` ( 2 | `id` mediumint(8) unsigned NOT NULL auto_increment, 3 | `name` varchar(100) default NULL, 4 | `postcode` varchar(10) default NULL, 5 | PRIMARY KEY (`id`) 6 | ) AUTO_INCREMENT=1; 7 | 8 | CREATE TABLE `address` ( 9 | `id` mediumint(8) unsigned NOT NULL auto_increment, 10 | `street` varchar(255) default NULL, 11 | `town_id` mediumint, 12 | PRIMARY KEY (`id`) 13 | ) AUTO_INCREMENT=1; 14 | 15 | CREATE TABLE `person` ( 16 | `id` mediumint(8) unsigned NOT NULL auto_increment, 17 | `firstName` varchar(255) default NULL, 18 | `lastName` varchar(255) default NULL, 19 | `address_id` mediumint, 20 | `mail` varchar(255) default NULL, 21 | PRIMARY KEY (`id`) 22 | ) AUTO_INCREMENT=1; 23 | -------------------------------------------------------------------------------- /datatables-thymeleaf-export/src/main/webapp/WEB-INF/views/common/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | datatables-thymeleaf-export 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /datatables-thymeleaf-export/src/main/webapp/WEB-INF/views/index.html: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 |

10 | 11 |
12 |
13 |
Feel free to browse the examples using the navbar!
14 |
15 |
16 | 17 | 18 | -------------------------------------------------------------------------------- /datatables-thymeleaf-export/src/main/webapp/assets/css/app.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 60px; 3 | padding-bottom: 40px; 4 | } 5 | 6 | .row-intro { 7 | margin-bottom: 30px; 8 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-export/src/main/webapp/assets/js/app-custom-rendering.js: -------------------------------------------------------------------------------- 1 | function mailify(data, type, full) { 2 | return '' + data + ''; 3 | } 4 | 5 | function toDate(data, type, full) { 6 | return moment(new Date(data)).format('YYYY/MM/DD'); 7 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-extension/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # dandelion/dt-tml-extension 3 | # 4 | FROM dandelion/sample-tomcat:7.0.62-jdk7 5 | MAINTAINER Thibault Duchateau 6 | 7 | ADD . /home/dandelion 8 | 9 | # Build the sample application 10 | # Deploy it to Tomcat 11 | # Remove sources to make the image thinner 12 | RUN cd /home/dandelion && \ 13 | mvn package && \ 14 | cp -r target/datatables-thymeleaf-extension /usr/local/tomcat/webapps/ && \ 15 | rm -rf /home/dandelion 16 | -------------------------------------------------------------------------------- /datatables-thymeleaf-extension/src/main/java/com/github/dandelion/datatables/model/Address.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.model; 2 | 3 | 4 | /** 5 | * A typical Address entity. 6 | * 7 | * @author tduchateau 8 | */ 9 | public class Address { 10 | 11 | private int id; 12 | private String street; 13 | private Town town; 14 | 15 | public Address() { 16 | 17 | } 18 | 19 | public Address(String street) { 20 | this.street = street; 21 | } 22 | 23 | public Address(String street, Town town) { 24 | this.street = street; 25 | this.town = town; 26 | } 27 | 28 | public Town getTown() { 29 | return town; 30 | } 31 | 32 | public void setTown(Town town) { 33 | this.town = town; 34 | } 35 | 36 | public int getId() { 37 | return id; 38 | } 39 | 40 | public void setId(int id) { 41 | this.id = id; 42 | } 43 | 44 | public String getStreet() { 45 | return street; 46 | } 47 | 48 | public void setStreet(String street) { 49 | this.street = street; 50 | } 51 | 52 | 53 | 54 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-extension/src/main/java/com/github/dandelion/datatables/model/Company.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.model; 2 | 3 | 4 | public class Company { 5 | 6 | private int id; 7 | private String name; 8 | 9 | public Company(){ 10 | 11 | } 12 | public Company(int id, String name){ 13 | this.id = id; 14 | this.name = name; 15 | } 16 | 17 | public int getId() { 18 | return id; 19 | } 20 | 21 | public void setId(int id) { 22 | this.id = id; 23 | } 24 | 25 | public String getName() { 26 | return name; 27 | } 28 | 29 | public void setName(String name) { 30 | this.name = name; 31 | } 32 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-extension/src/main/java/com/github/dandelion/datatables/model/Town.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.model; 2 | 3 | /** 4 | * A typical Town entity. 5 | * 6 | * @author tduchateau 7 | */ 8 | public class Town { 9 | 10 | private int id; 11 | private String name; 12 | private String postcode; 13 | 14 | public Town() { 15 | 16 | } 17 | 18 | public Town(int id, String name, String postcode){ 19 | this.id = id; 20 | this.name = name; 21 | this.postcode = postcode; 22 | } 23 | 24 | public int getId() { 25 | return id; 26 | } 27 | 28 | public void setId(int id) { 29 | this.id = id; 30 | } 31 | 32 | public Town(String label) { 33 | this.name = label; 34 | } 35 | 36 | public String getName() { 37 | return name; 38 | } 39 | 40 | public void setName(String label) { 41 | this.name = label; 42 | } 43 | 44 | public String getPostcode() { 45 | return postcode; 46 | } 47 | 48 | public void setPostcode(String postcode) { 49 | this.postcode = postcode; 50 | } 51 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-extension/src/main/java/com/github/dandelion/datatables/repository/PersonRepository.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.repository; 2 | 3 | import java.util.List; 4 | 5 | import com.github.dandelion.datatables.model.Person; 6 | 7 | /** 8 | * Repository interface for the Person domain object. 9 | * 10 | * @author Thibault Duchateau 11 | */ 12 | public interface PersonRepository { 13 | 14 | /** 15 | * @return the complete list of persons stored in the repository. 16 | */ 17 | public List findAll(); 18 | 19 | /** 20 | * @param maxResult 21 | * Max number of persons. 22 | * @return a limited list of persons. 23 | */ 24 | public List findLimited(int maxResult); 25 | } 26 | -------------------------------------------------------------------------------- /datatables-thymeleaf-extension/src/main/java/com/github/dandelion/datatables/service/PersonService.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.service; 2 | 3 | import java.util.List; 4 | 5 | import com.github.dandelion.datatables.model.Person; 6 | 7 | /** 8 | *

9 | * Person service mostly used as a facade for all controllers. 10 | * 11 | * @author Thibault Duchateau 12 | */ 13 | public interface PersonService { 14 | 15 | /** 16 | * @return the complete list of persons. 17 | */ 18 | public List findAll(); 19 | 20 | /** 21 | * @param maxResult 22 | * Max number of persons. 23 | * @return a maxResult limited list of persons. 24 | */ 25 | public List findLimited(int maxResult); 26 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-extension/src/main/java/com/github/dandelion/datatables/service/PersonServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.service; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import com.github.dandelion.datatables.model.Person; 9 | import com.github.dandelion.datatables.repository.PersonRepository; 10 | 11 | /** 12 | * Implementation of the {@link PersonService}. 13 | * 14 | * @author Thibault Duchateau 15 | */ 16 | @Service 17 | public class PersonServiceImpl implements PersonService { 18 | 19 | @Autowired 20 | PersonRepository personRepository; 21 | 22 | public List findAll() { 23 | return personRepository.findAll(); 24 | } 25 | 26 | public List findLimited(int maxResult) { 27 | return personRepository.findLimited(maxResult); 28 | } 29 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-extension/src/main/java/com/github/dandelion/datatables/web/extension/MyAwesomeExtension.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.web.extension; 2 | 3 | import com.github.dandelion.datatables.core.extension.AbstractExtension; 4 | import com.github.dandelion.datatables.core.generator.DTConstants; 5 | import com.github.dandelion.datatables.core.html.HtmlTable; 6 | 7 | public class MyAwesomeExtension extends AbstractExtension { 8 | 9 | @Override 10 | public String getExtensionName() { 11 | return "myExtension"; 12 | } 13 | 14 | @Override 15 | public void setup(HtmlTable table) { 16 | 17 | // Add a new CSS class to the table 18 | table.addCssClass("myClass"); 19 | 20 | // Override the generated configuration 21 | addParameter(DTConstants.DT_DOM, "tp"); 22 | } 23 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-extension/src/main/resources/META-INF/services/com.github.dandelion.datatables.core.extension.Extension: -------------------------------------------------------------------------------- 1 | com.github.dandelion.datatables.web.extension.MyAwesomeExtension 2 | -------------------------------------------------------------------------------- /datatables-thymeleaf-extension/src/main/resources/dandelion/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "assets": [ 3 | { 4 | "locations": { 5 | "webapp": "/assets/css/app.css" 6 | } 7 | } 8 | ] 9 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-extension/src/main/resources/dandelion/dandelion.properties: -------------------------------------------------------------------------------- 1 | ############################################ 2 | # Dandelion configuration 3 | ############################################ 4 | 5 | bundle.includes=app,bootstrap2 6 | -------------------------------------------------------------------------------- /datatables-thymeleaf-extension/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | %d{HH:mm:ss.SSS} %-5level %logger{60} - %msg%n 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /datatables-thymeleaf-extension/src/main/resources/spring/business-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 13 | -------------------------------------------------------------------------------- /datatables-thymeleaf-extension/src/main/resources/spring/mvc-core-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /datatables-thymeleaf-extension/src/main/webapp/assets/css/application.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 60px; 3 | padding-bottom: 40px; 4 | } 5 | 6 | .row-intro { 7 | margin-bottom: 30px; 8 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-javaconfig/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # dandelion/dt-tml-javaconfig 3 | # 4 | FROM dandelion/sample-tomcat:7.0.62-jdk7 5 | MAINTAINER Thibault Duchateau 6 | 7 | ADD . /home/dandelion 8 | 9 | # Build the sample application 10 | # Deploy it to Tomcat 11 | # Remove sources to make the image thinner 12 | RUN cd /home/dandelion && \ 13 | mvn package && \ 14 | cp -r target/datatables-thymeleaf-javaconfig /usr/local/tomcat/webapps/ && \ 15 | rm -rf /home/dandelion 16 | -------------------------------------------------------------------------------- /datatables-thymeleaf-javaconfig/src/main/java/com/github/dandelion/datatables/config/RootConfig.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.config; 2 | 3 | import org.springframework.context.annotation.ComponentScan; 4 | import org.springframework.context.annotation.Configuration; 5 | 6 | @Configuration 7 | @ComponentScan(basePackages = { "com.github.dandelion.datatables.service", "com.github.dandelion.datatables.repository" }) 8 | public class RootConfig { 9 | } 10 | -------------------------------------------------------------------------------- /datatables-thymeleaf-javaconfig/src/main/java/com/github/dandelion/datatables/config/WebConfig.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.config; 2 | 3 | import org.springframework.context.annotation.ComponentScan; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.context.annotation.Import; 6 | import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer; 7 | import org.springframework.web.servlet.config.annotation.EnableWebMvc; 8 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; 9 | 10 | @Configuration 11 | @ComponentScan(basePackages = { "com.github.dandelion.datatables.web" }) 12 | @EnableWebMvc 13 | @Import({ ThymeleafConfig.class }) 14 | public class WebConfig extends WebMvcConfigurerAdapter { 15 | 16 | @Override 17 | public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) { 18 | configurer.enable(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /datatables-thymeleaf-javaconfig/src/main/java/com/github/dandelion/datatables/model/Address.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.model; 2 | 3 | 4 | /** 5 | * A typical Address entity. 6 | * 7 | * @author tduchateau 8 | */ 9 | public class Address { 10 | 11 | private int id; 12 | private String street; 13 | private Town town; 14 | 15 | public Address() { 16 | 17 | } 18 | 19 | public Address(String street) { 20 | this.street = street; 21 | } 22 | 23 | public Address(String street, Town town) { 24 | this.street = street; 25 | this.town = town; 26 | } 27 | 28 | public Town getTown() { 29 | return town; 30 | } 31 | 32 | public void setTown(Town town) { 33 | this.town = town; 34 | } 35 | 36 | public int getId() { 37 | return id; 38 | } 39 | 40 | public void setId(int id) { 41 | this.id = id; 42 | } 43 | 44 | public String getStreet() { 45 | return street; 46 | } 47 | 48 | public void setStreet(String street) { 49 | this.street = street; 50 | } 51 | 52 | 53 | 54 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-javaconfig/src/main/java/com/github/dandelion/datatables/model/Company.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.model; 2 | 3 | 4 | public class Company { 5 | 6 | private int id; 7 | private String name; 8 | 9 | public Company(){ 10 | 11 | } 12 | public Company(int id, String name){ 13 | this.id = id; 14 | this.name = name; 15 | } 16 | 17 | public int getId() { 18 | return id; 19 | } 20 | 21 | public void setId(int id) { 22 | this.id = id; 23 | } 24 | 25 | public String getName() { 26 | return name; 27 | } 28 | 29 | public void setName(String name) { 30 | this.name = name; 31 | } 32 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-javaconfig/src/main/java/com/github/dandelion/datatables/model/Town.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.model; 2 | 3 | /** 4 | * A typical Town entity. 5 | * 6 | * @author tduchateau 7 | */ 8 | public class Town { 9 | 10 | private int id; 11 | private String name; 12 | private String postcode; 13 | 14 | public Town() { 15 | 16 | } 17 | 18 | public Town(int id, String name, String postcode){ 19 | this.id = id; 20 | this.name = name; 21 | this.postcode = postcode; 22 | } 23 | 24 | public int getId() { 25 | return id; 26 | } 27 | 28 | public void setId(int id) { 29 | this.id = id; 30 | } 31 | 32 | public Town(String label) { 33 | this.name = label; 34 | } 35 | 36 | public String getName() { 37 | return name; 38 | } 39 | 40 | public void setName(String label) { 41 | this.name = label; 42 | } 43 | 44 | public String getPostcode() { 45 | return postcode; 46 | } 47 | 48 | public void setPostcode(String postcode) { 49 | this.postcode = postcode; 50 | } 51 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-javaconfig/src/main/java/com/github/dandelion/datatables/repository/PersonRepository.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.repository; 2 | 3 | import java.util.List; 4 | 5 | import com.github.dandelion.datatables.model.Person; 6 | 7 | /** 8 | * Repository interface for the Person domain object. 9 | * 10 | * @author Thibault Duchateau 11 | */ 12 | public interface PersonRepository { 13 | 14 | /** 15 | * @return the complete list of persons stored in the repository. 16 | */ 17 | public List findAll(); 18 | 19 | /** 20 | * @param maxResult 21 | * Max number of persons. 22 | * @return a limited list of persons. 23 | */ 24 | public List findLimited(int maxResult); 25 | } 26 | -------------------------------------------------------------------------------- /datatables-thymeleaf-javaconfig/src/main/java/com/github/dandelion/datatables/service/PersonService.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.service; 2 | 3 | import java.util.List; 4 | 5 | import com.github.dandelion.datatables.model.Person; 6 | 7 | /** 8 | *

9 | * Person service mostly used as a facade for all controllers. 10 | * 11 | * @author Thibault Duchateau 12 | */ 13 | public interface PersonService { 14 | 15 | /** 16 | * @return the complete list of persons. 17 | */ 18 | public List findAll(); 19 | 20 | /** 21 | * @param maxResult 22 | * Max number of persons. 23 | * @return a maxResult limited list of persons. 24 | */ 25 | public List findLimited(int maxResult); 26 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-javaconfig/src/main/java/com/github/dandelion/datatables/service/PersonServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.service; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import com.github.dandelion.datatables.model.Person; 9 | import com.github.dandelion.datatables.repository.PersonRepository; 10 | 11 | /** 12 | * Implementation of the {@link PersonService}. 13 | * 14 | * @author Thibault Duchateau 15 | */ 16 | @Service 17 | public class PersonServiceImpl implements PersonService { 18 | 19 | @Autowired 20 | PersonRepository personRepository; 21 | 22 | public List findAll() { 23 | return personRepository.findAll(); 24 | } 25 | 26 | public List findLimited(int maxResult) { 27 | return personRepository.findLimited(maxResult); 28 | } 29 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-javaconfig/src/main/resources/dandelion/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "bundle" : "sample", 3 | "assets": [ 4 | { 5 | "name": "application", 6 | "version": "0.10.0", 7 | "type": "css", 8 | "locations": { 9 | "webapp": "/assets/css/application.css" 10 | } 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-javaconfig/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | %d{HH:mm:ss.SSS} %-5level %logger{60} - %msg%n 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /datatables-thymeleaf-javaconfig/src/main/webapp/assets/css/application.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 60px; 3 | padding-bottom: 40px; 4 | } 5 | 6 | .row-intro { 7 | margin-bottom: 30px; 8 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-plugins/.gitignore: -------------------------------------------------------------------------------- 1 | /.project 2 | /.settings 3 | /target 4 | /.classpath 5 | /src/main/resources/rebel.xml 6 | /datatables4j-demo-thymeleaf.iml 7 | -------------------------------------------------------------------------------- /datatables-thymeleaf-plugins/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # dandelion/dt-tml-plugins 3 | # 4 | FROM dandelion/sample-tomcat:7.0.62-jdk7 5 | MAINTAINER Thibault Duchateau 6 | 7 | ADD . /home/dandelion 8 | 9 | # Build the sample application 10 | # Deploy it to Tomcat 11 | # Remove sources to make the image thinner 12 | RUN cd /home/dandelion && \ 13 | mvn package && \ 14 | cp -r target/datatables-thymeleaf-plugins /usr/local/tomcat/webapps/ && \ 15 | rm -rf /home/dandelion 16 | -------------------------------------------------------------------------------- /datatables-thymeleaf-plugins/src/main/java/com/github/dandelion/datatables/model/Address.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.model; 2 | 3 | 4 | /** 5 | * A typical Address entity. 6 | * 7 | * @author tduchateau 8 | */ 9 | public class Address { 10 | 11 | private int id; 12 | private String street; 13 | private Town town; 14 | 15 | public Address() { 16 | 17 | } 18 | 19 | public Address(String street) { 20 | this.street = street; 21 | } 22 | 23 | public Address(String street, Town town) { 24 | this.street = street; 25 | this.town = town; 26 | } 27 | 28 | public Town getTown() { 29 | return town; 30 | } 31 | 32 | public void setTown(Town town) { 33 | this.town = town; 34 | } 35 | 36 | public int getId() { 37 | return id; 38 | } 39 | 40 | public void setId(int id) { 41 | this.id = id; 42 | } 43 | 44 | public String getStreet() { 45 | return street; 46 | } 47 | 48 | public void setStreet(String street) { 49 | this.street = street; 50 | } 51 | 52 | 53 | 54 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-plugins/src/main/java/com/github/dandelion/datatables/model/Company.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.model; 2 | 3 | 4 | public class Company { 5 | 6 | private int id; 7 | private String name; 8 | 9 | public Company(){ 10 | 11 | } 12 | public Company(int id, String name){ 13 | this.id = id; 14 | this.name = name; 15 | } 16 | 17 | public int getId() { 18 | return id; 19 | } 20 | 21 | public void setId(int id) { 22 | this.id = id; 23 | } 24 | 25 | public String getName() { 26 | return name; 27 | } 28 | 29 | public void setName(String name) { 30 | this.name = name; 31 | } 32 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-plugins/src/main/java/com/github/dandelion/datatables/model/Town.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.model; 2 | 3 | /** 4 | * A typical Town entity. 5 | * 6 | * @author tduchateau 7 | */ 8 | public class Town { 9 | 10 | private int id; 11 | private String name; 12 | private String postcode; 13 | 14 | public Town() { 15 | 16 | } 17 | 18 | public Town(int id, String name, String postcode){ 19 | this.id = id; 20 | this.name = name; 21 | this.postcode = postcode; 22 | } 23 | 24 | public int getId() { 25 | return id; 26 | } 27 | 28 | public void setId(int id) { 29 | this.id = id; 30 | } 31 | 32 | public Town(String label) { 33 | this.name = label; 34 | } 35 | 36 | public String getName() { 37 | return name; 38 | } 39 | 40 | public void setName(String label) { 41 | this.name = label; 42 | } 43 | 44 | public String getPostcode() { 45 | return postcode; 46 | } 47 | 48 | public void setPostcode(String postcode) { 49 | this.postcode = postcode; 50 | } 51 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-plugins/src/main/java/com/github/dandelion/datatables/repository/PersonRepository.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.repository; 2 | 3 | import java.util.List; 4 | 5 | import com.github.dandelion.datatables.model.Person; 6 | 7 | /** 8 | * Repository interface for the Person domain object. 9 | * 10 | * @author Thibault Duchateau 11 | */ 12 | public interface PersonRepository { 13 | 14 | /** 15 | * @return the complete list of persons stored in the repository. 16 | */ 17 | public List findAll(); 18 | 19 | /** 20 | * @param maxResult 21 | * Max number of persons. 22 | * @return a limited list of persons. 23 | */ 24 | public List findLimited(int maxResult); 25 | } 26 | -------------------------------------------------------------------------------- /datatables-thymeleaf-plugins/src/main/java/com/github/dandelion/datatables/service/PersonService.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.service; 2 | 3 | import java.util.List; 4 | 5 | import com.github.dandelion.datatables.model.Person; 6 | 7 | /** 8 | *

9 | * Person service mostly used as a facade for all controllers. 10 | * 11 | * @author Thibault Duchateau 12 | */ 13 | public interface PersonService { 14 | 15 | /** 16 | * @return the complete list of persons. 17 | */ 18 | public List findAll(); 19 | 20 | /** 21 | * @param maxResult 22 | * Max number of persons. 23 | * @return a maxResult limited list of persons. 24 | */ 25 | public List findLimited(int maxResult); 26 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-plugins/src/main/java/com/github/dandelion/datatables/service/PersonServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.service; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import com.github.dandelion.datatables.model.Person; 9 | import com.github.dandelion.datatables.repository.PersonRepository; 10 | 11 | /** 12 | * Implementation of the {@link PersonService}. 13 | * 14 | * @author Thibault Duchateau 15 | */ 16 | @Service 17 | public class PersonServiceImpl implements PersonService { 18 | 19 | @Autowired 20 | PersonRepository personRepository; 21 | 22 | public List findAll() { 23 | return personRepository.findAll(); 24 | } 25 | 26 | public List findLimited(int maxResult) { 27 | return personRepository.findLimited(maxResult); 28 | } 29 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-plugins/src/main/resources/dandelion/dandelion.properties: -------------------------------------------------------------------------------- 1 | ############################################ 2 | # Dandelion configuration 3 | ############################################ 4 | 5 | bundle.includes=sample,bootstrap2 -------------------------------------------------------------------------------- /datatables-thymeleaf-plugins/src/main/resources/dandelion/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "bundle" : "sample", 3 | "assets": [ 4 | { 5 | "name": "application", 6 | "version": "0.10.0", 7 | "type": "css", 8 | "locations": { 9 | "webapp": "/assets/css/application.css" 10 | } 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-plugins/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | %d{HH:mm:ss.SSS} %-5level %logger{60} - %msg%n 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /datatables-thymeleaf-plugins/src/main/resources/spring/business-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 13 | -------------------------------------------------------------------------------- /datatables-thymeleaf-plugins/src/main/resources/spring/mvc-core-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /datatables-thymeleaf-plugins/src/main/webapp/WEB-INF/views/common/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | datatables-thymeleaf-plugins 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /datatables-thymeleaf-plugins/src/main/webapp/WEB-INF/views/index.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 |

8 |
9 | 10 |
11 |
Feel free to browse the examples using the navbar!
12 |
13 |
14 | 15 | -------------------------------------------------------------------------------- /datatables-thymeleaf-plugins/src/main/webapp/assets/css/application.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 60px; 3 | padding-bottom: 40px; 4 | } 5 | 6 | .row-intro { 7 | margin-bottom: 30px; 8 | } 9 | 10 | .FixedHeader_Cloned th { 11 | background-color: white; 12 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-starter/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # dandelion/dt-tml-starter 3 | # 4 | FROM dandelion/sample-tomcat:7.0.62-jdk7 5 | MAINTAINER Thibault Duchateau 6 | 7 | ADD . /home/dandelion 8 | 9 | # Build the sample application 10 | # Deploy it to Tomcat 11 | # Remove sources to make the image thinner 12 | RUN cd /home/dandelion && \ 13 | mvn package && \ 14 | cp -r target/datatables-thymeleaf-starter /usr/local/tomcat/webapps/ && \ 15 | rm -rf /home/dandelion 16 | -------------------------------------------------------------------------------- /datatables-thymeleaf-starter/src/main/java/com/github/dandelion/datatables/model/Address.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.model; 2 | 3 | 4 | /** 5 | * A typical Address entity. 6 | * 7 | * @author tduchateau 8 | */ 9 | public class Address { 10 | 11 | private int id; 12 | private String street; 13 | private Town town; 14 | 15 | public Address() { 16 | 17 | } 18 | 19 | public Address(String street) { 20 | this.street = street; 21 | } 22 | 23 | public Address(String street, Town town) { 24 | this.street = street; 25 | this.town = town; 26 | } 27 | 28 | public Town getTown() { 29 | return town; 30 | } 31 | 32 | public void setTown(Town town) { 33 | this.town = town; 34 | } 35 | 36 | public int getId() { 37 | return id; 38 | } 39 | 40 | public void setId(int id) { 41 | this.id = id; 42 | } 43 | 44 | public String getStreet() { 45 | return street; 46 | } 47 | 48 | public void setStreet(String street) { 49 | this.street = street; 50 | } 51 | 52 | 53 | 54 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-starter/src/main/java/com/github/dandelion/datatables/model/Company.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.model; 2 | 3 | 4 | public class Company { 5 | 6 | private int id; 7 | private String name; 8 | 9 | public Company(){ 10 | 11 | } 12 | public Company(int id, String name){ 13 | this.id = id; 14 | this.name = name; 15 | } 16 | 17 | public int getId() { 18 | return id; 19 | } 20 | 21 | public void setId(int id) { 22 | this.id = id; 23 | } 24 | 25 | public String getName() { 26 | return name; 27 | } 28 | 29 | public void setName(String name) { 30 | this.name = name; 31 | } 32 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-starter/src/main/java/com/github/dandelion/datatables/model/Town.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.model; 2 | 3 | /** 4 | * A typical Town entity. 5 | * 6 | * @author tduchateau 7 | */ 8 | public class Town { 9 | 10 | private int id; 11 | private String name; 12 | private String postcode; 13 | 14 | public Town() { 15 | 16 | } 17 | 18 | public Town(int id, String name, String postcode){ 19 | this.id = id; 20 | this.name = name; 21 | this.postcode = postcode; 22 | } 23 | 24 | public int getId() { 25 | return id; 26 | } 27 | 28 | public void setId(int id) { 29 | this.id = id; 30 | } 31 | 32 | public Town(String label) { 33 | this.name = label; 34 | } 35 | 36 | public String getName() { 37 | return name; 38 | } 39 | 40 | public void setName(String label) { 41 | this.name = label; 42 | } 43 | 44 | public String getPostcode() { 45 | return postcode; 46 | } 47 | 48 | public void setPostcode(String postcode) { 49 | this.postcode = postcode; 50 | } 51 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-starter/src/main/java/com/github/dandelion/datatables/repository/PersonRepository.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.repository; 2 | 3 | import java.util.List; 4 | 5 | import com.github.dandelion.datatables.model.Person; 6 | 7 | /** 8 | * Repository interface for the Person domain object. 9 | * 10 | * @author Thibault Duchateau 11 | */ 12 | public interface PersonRepository { 13 | 14 | /** 15 | * @return the complete list of persons stored in the repository. 16 | */ 17 | public List findAll(); 18 | 19 | /** 20 | * @param maxResult 21 | * Max number of persons. 22 | * @return a limited list of persons. 23 | */ 24 | public List findLimited(int maxResult); 25 | } 26 | -------------------------------------------------------------------------------- /datatables-thymeleaf-starter/src/main/java/com/github/dandelion/datatables/service/PersonService.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.service; 2 | 3 | import java.util.List; 4 | 5 | import com.github.dandelion.datatables.model.Person; 6 | 7 | /** 8 | *

9 | * Person service mostly used as a facade for all controllers. 10 | * 11 | * @author Thibault Duchateau 12 | */ 13 | public interface PersonService { 14 | 15 | /** 16 | * @return the complete list of persons. 17 | */ 18 | public List findAll(); 19 | 20 | /** 21 | * @param maxResult 22 | * Max number of persons. 23 | * @return a maxResult limited list of persons. 24 | */ 25 | public List findLimited(int maxResult); 26 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-starter/src/main/java/com/github/dandelion/datatables/service/PersonServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.service; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import com.github.dandelion.datatables.model.Person; 9 | import com.github.dandelion.datatables.repository.PersonRepository; 10 | 11 | /** 12 | * Implementation of the {@link PersonService}. 13 | * 14 | * @author Thibault Duchateau 15 | */ 16 | @Service 17 | public class PersonServiceImpl implements PersonService { 18 | 19 | @Autowired 20 | PersonRepository personRepository; 21 | 22 | public List findAll() { 23 | return personRepository.findAll(); 24 | } 25 | 26 | public List findLimited(int maxResult) { 27 | return personRepository.findLimited(maxResult); 28 | } 29 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-starter/src/main/resources/dandelion/app-callback.json: -------------------------------------------------------------------------------- 1 | { 2 | "assets": [ 3 | { 4 | "locations": { 5 | "webapp": "/assets/js/app-callbacks.js" 6 | } 7 | } 8 | ] 9 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-starter/src/main/resources/dandelion/app-filtering.json: -------------------------------------------------------------------------------- 1 | { 2 | "assets": [ 3 | { 4 | "locations": { 5 | "webapp": "/assets/js/app-filtering.js" 6 | } 7 | } 8 | ] 9 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-starter/src/main/resources/dandelion/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "assets": [ 3 | { 4 | "locations": { 5 | "webapp": "/assets/css/app.css" 6 | } 7 | }, 8 | { 9 | "locations": { 10 | "webapp": "/assets/css/yadcf-custom.css" 11 | } 12 | } 13 | ] 14 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-starter/src/main/resources/dandelion/dandelion.properties: -------------------------------------------------------------------------------- 1 | ############################################ 2 | # Dandelion configuration 3 | ############################################ 4 | 5 | bundle.includes=app,bootstrap2 6 | -------------------------------------------------------------------------------- /datatables-thymeleaf-starter/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | %d{HH:mm:ss.SSS} %-5level %logger{60} - %msg%n 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /datatables-thymeleaf-starter/src/main/resources/spring/business-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 13 | -------------------------------------------------------------------------------- /datatables-thymeleaf-starter/src/main/resources/spring/mvc-core-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /datatables-thymeleaf-starter/src/main/webapp/WEB-INF/views/common/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | datatables-thymeleaf-basics 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /datatables-thymeleaf-starter/src/main/webapp/assets/css/app.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 60px; 3 | padding-bottom: 40px; 4 | } 5 | 6 | .row-intro { 7 | margin-bottom: 30px; 8 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-starter/src/main/webapp/assets/css/yadcf-custom.css: -------------------------------------------------------------------------------- 1 | .yadcf-filter-reset-button { 2 | display: inline-block; 3 | margin-bottom: 10px; 4 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-starter/src/main/webapp/assets/js/app-callbacks.js: -------------------------------------------------------------------------------- 1 | function createdRow(nRow, aData, iDataIndex) { 2 | $('td:eq(4)', nRow).css({ 3 | 'font-weight' : 'bold' 4 | }); 5 | } 6 | function info(oSettings, iStart, iEnd, iMax, iTotal, sPre) { 7 | return iStart + " to " + iEnd; 8 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-starter/src/main/webapp/assets/js/app-filtering.js: -------------------------------------------------------------------------------- 1 | var myPredefinedValues = ['Portland', 'Strasbourg', 'Stonewall']; -------------------------------------------------------------------------------- /datatables-thymeleaf-themes/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # dandelion/dt-tml-themes 3 | # 4 | FROM dandelion/sample-tomcat:7.0.62-jdk7 5 | MAINTAINER Thibault Duchateau 6 | 7 | ADD . /home/dandelion 8 | 9 | # Build the sample application 10 | # Deploy it to Tomcat 11 | # Remove sources to make the image thinner 12 | RUN cd /home/dandelion && \ 13 | mvn package && \ 14 | cp -r target/datatables-thymeleaf-themes /usr/local/tomcat/webapps/ && \ 15 | rm -rf /home/dandelion 16 | -------------------------------------------------------------------------------- /datatables-thymeleaf-themes/src/main/java/com/github/dandelion/datatables/model/Address.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.model; 2 | 3 | 4 | /** 5 | * A typical Address entity. 6 | * 7 | * @author tduchateau 8 | */ 9 | public class Address { 10 | 11 | private int id; 12 | private String street; 13 | private Town town; 14 | 15 | public Address() { 16 | 17 | } 18 | 19 | public Address(String street) { 20 | this.street = street; 21 | } 22 | 23 | public Address(String street, Town town) { 24 | this.street = street; 25 | this.town = town; 26 | } 27 | 28 | public Town getTown() { 29 | return town; 30 | } 31 | 32 | public void setTown(Town town) { 33 | this.town = town; 34 | } 35 | 36 | public int getId() { 37 | return id; 38 | } 39 | 40 | public void setId(int id) { 41 | this.id = id; 42 | } 43 | 44 | public String getStreet() { 45 | return street; 46 | } 47 | 48 | public void setStreet(String street) { 49 | this.street = street; 50 | } 51 | 52 | 53 | 54 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-themes/src/main/java/com/github/dandelion/datatables/model/Company.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.model; 2 | 3 | 4 | public class Company { 5 | 6 | private int id; 7 | private String name; 8 | 9 | public Company(){ 10 | 11 | } 12 | public Company(int id, String name){ 13 | this.id = id; 14 | this.name = name; 15 | } 16 | 17 | public int getId() { 18 | return id; 19 | } 20 | 21 | public void setId(int id) { 22 | this.id = id; 23 | } 24 | 25 | public String getName() { 26 | return name; 27 | } 28 | 29 | public void setName(String name) { 30 | this.name = name; 31 | } 32 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-themes/src/main/java/com/github/dandelion/datatables/model/Town.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.model; 2 | 3 | /** 4 | * A typical Town entity. 5 | * 6 | * @author tduchateau 7 | */ 8 | public class Town { 9 | 10 | private int id; 11 | private String name; 12 | private String postcode; 13 | 14 | public Town() { 15 | 16 | } 17 | 18 | public Town(int id, String name, String postcode){ 19 | this.id = id; 20 | this.name = name; 21 | this.postcode = postcode; 22 | } 23 | 24 | public int getId() { 25 | return id; 26 | } 27 | 28 | public void setId(int id) { 29 | this.id = id; 30 | } 31 | 32 | public Town(String label) { 33 | this.name = label; 34 | } 35 | 36 | public String getName() { 37 | return name; 38 | } 39 | 40 | public void setName(String label) { 41 | this.name = label; 42 | } 43 | 44 | public String getPostcode() { 45 | return postcode; 46 | } 47 | 48 | public void setPostcode(String postcode) { 49 | this.postcode = postcode; 50 | } 51 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-themes/src/main/java/com/github/dandelion/datatables/repository/PersonRepository.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.repository; 2 | 3 | import java.util.List; 4 | 5 | import com.github.dandelion.datatables.model.Person; 6 | 7 | /** 8 | * Repository interface for the Person domain object. 9 | * 10 | * @author Thibault Duchateau 11 | */ 12 | public interface PersonRepository { 13 | 14 | /** 15 | * @return the complete list of persons stored in the repository. 16 | */ 17 | public List findAll(); 18 | 19 | /** 20 | * @param maxResult 21 | * Max number of persons. 22 | * @return a limited list of persons. 23 | */ 24 | public List findLimited(int maxResult); 25 | } 26 | -------------------------------------------------------------------------------- /datatables-thymeleaf-themes/src/main/java/com/github/dandelion/datatables/service/PersonService.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.service; 2 | 3 | import java.util.List; 4 | 5 | import com.github.dandelion.datatables.model.Person; 6 | 7 | /** 8 | *

9 | * Person service mostly used as a facade for all controllers. 10 | * 11 | * @author Thibault Duchateau 12 | */ 13 | public interface PersonService { 14 | 15 | /** 16 | * @return the complete list of persons. 17 | */ 18 | public List findAll(); 19 | 20 | /** 21 | * @param maxResult 22 | * Max number of persons. 23 | * @return a maxResult limited list of persons. 24 | */ 25 | public List findLimited(int maxResult); 26 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-themes/src/main/java/com/github/dandelion/datatables/service/PersonServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.github.dandelion.datatables.service; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import com.github.dandelion.datatables.model.Person; 9 | import com.github.dandelion.datatables.repository.PersonRepository; 10 | 11 | /** 12 | * Implementation of the {@link PersonService}. 13 | * 14 | * @author Thibault Duchateau 15 | */ 16 | @Service 17 | public class PersonServiceImpl implements PersonService { 18 | 19 | @Autowired 20 | PersonRepository personRepository; 21 | 22 | public List findAll() { 23 | return personRepository.findAll(); 24 | } 25 | 26 | public List findLimited(int maxResult) { 27 | return personRepository.findLimited(maxResult); 28 | } 29 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-themes/src/main/resources/dandelion/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "assets": [ 3 | { 4 | "locations": { 5 | "webapp": "/assets/css/app.css" 6 | } 7 | } 8 | ] 9 | } -------------------------------------------------------------------------------- /datatables-thymeleaf-themes/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | %d{HH:mm:ss.SSS} %-5level %logger{60} - %msg%n 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /datatables-thymeleaf-themes/src/main/resources/spring/business-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 13 | -------------------------------------------------------------------------------- /datatables-thymeleaf-themes/src/main/resources/spring/mvc-core-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /datatables-thymeleaf-themes/src/main/webapp/WEB-INF/tiles/tiles-bootstrap2-defs.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /datatables-thymeleaf-themes/src/main/webapp/WEB-INF/tiles/tiles-bootstrap3-defs.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /datatables-thymeleaf-themes/src/main/webapp/WEB-INF/tiles/tiles-defs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /datatables-thymeleaf-themes/src/main/webapp/WEB-INF/tiles/tiles-jqueryui-defs.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /datatables-thymeleaf-themes/src/main/webapp/WEB-INF/views/index.html: -------------------------------------------------------------------------------- 1 |

2 |
Feel free to browse the examples using the navbar!
3 |
4 | -------------------------------------------------------------------------------- /datatables-thymeleaf-themes/src/main/webapp/assets/css/app.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 60px; 3 | padding-bottom: 40px; 4 | } 5 | 6 | .row-intro { 7 | margin-bottom: 30px; 8 | } --------------------------------------------------------------------------------