DataTables Taglib is a set of JSP tags that allows you to quickly create DataTables in your Java/JEE based web application without even writing any Javascript code !
Currently, the taglib implements nearly all the basic features within DataTables but supports only DOM datasource. The missing features will be added over the time.
This taglib is highly inspired by the excellent DisplayTag framework and also by Spring tags available in the Spring Roo project.
The taglib allows you to build nice HTML tables thanks to the excellent DataTables Javascript library. It looks exactly as standart (Data)tables :
Id | Name | City | Street | |
---|---|---|---|---|
1 | Ezekiel | sem@Curabitur.org | Moline | Ap #808-9250 Metus. Ave |
2 | Elijah | non.enim.commodo@urna.edu | Martinsburg | 5876 Adipiscing Rd. |
3 | Colette | non.leo@Nullafacilisi.edu | Jefferson City | Ap #186-4229 Nec Road |
4 | Barry | Aliquam.auctor.velit@gravidamolestie.org | Detroit | P.O. Box 121, 2022 Interdum. Avenue |
5 | Leila | cubilia@Nuncmauris.org | City of Industry | P.O. Box 501, 3857 Risus. St. |
6 | Cedric | mus.Donec.dignissim@musProin.ca | Westfield | 669 Ullamcorper. Rd. |
7 | Athena | pharetra.nibh@velnisl.com | Meriden | Ap #506-5573 Tincidunt Avenue |
8 | Cathleen | Vestibulum@rhoncusProinnisl.ca | Iowa City | 374-5661 Eget St. |
9 | Rogan | vel@velfaucibus.com | Las Cruces | 2394 Consectetuer St. |
10 | Lillian | amet@eget.com | Sacramento | 3982 Lacus Rd. |
11 | Karyn | cubilia@Utsemperpretium.edu | Davis | P.O. Box 189, 3416 Lacus. Av. |
12 | Jamal | In.at.pede@eleifendnuncrisus.ca | Port Huron | 4537 Lorem Rd. |
13 | Robert | eleifend.egestas.Sed@penatibuset.com | Jeffersontown | Ap #343-8246 Fusce Avenue |
14 | Cullen | sed.sapien@magnis.edu | Gloucester | P.O. Box 530, 4839 Lorem Rd. |
15 | Judith | tempor.augue@sem.edu | New Britain | 325-6830 Sit St. |
16 | Roanna | pharetra.Nam.ac@acipsumPhasellus.ca | Macomb | Ap #693-8370 Dolor Rd. |
17 | Mark | purus.ac.tellus@et.ca | Omaha | 7336 Tempor Road |
18 | Clayton | dui.semper.et@Nuncsollicitudincommodo.ca | Butte | 3452 Eget Rd. |
19 | Eden | sociis.natoque.penatibus@vehiculaaliquetlibero.ca | Hartford | P.O. Box 165, 1761 A Ave |
20 | Chester | Suspendisse@consectetuereuismodest.com | Pittsfield | Ap #801-5772 Enim Ave |
21 | Kimberley | est.Nunc@ut.org | Los Alamitos | 2472 Varius Rd. |
22 | Travis | justo.Proin.non@Quisqueaclibero.org | Batavia | P.O. Box 686, 6731 Ultrices Av. |
23 | Thaddeus | Mauris@temporerat.ca | Buffalo | Ap #202-7051 Aliquet Rd. |
24 | Salvador | mauris.eu@Cras.edu | Little Rock | P.O. Box 109, 655 Rutrum Ave |
25 | Oscar | ipsum@quamvel.edu | Dearborn | Ap #562-2088 Odio. Road |
26 | Lars | diam.at@Duis.org | Santa Rosa | P.O. Box 460, 4598 Rhoncus Road |
27 | Asher | nibh.sit.amet@etarcuimperdiet.com | Sonoma | 371-8324 Sed Rd. |
28 | Macy | elit.Curabitur@consequatdolorvitae.org | Cleveland | 8071 Nunc St. |
29 | Jared | Duis.cursus@Duisvolutpat.org | Aguadilla | 8036 Pede. Ave |
30 | Joseph | ornare.libero.at@ornareplacerat.ca | Revere | 543-6899 Mi. Ave |
31 | Gemma | pede.nonummy@nonfeugiat.com | Galesburg | 7338 Magna. Av. |
32 | Ina | tristique.ac.eleifend@dolorquam.edu | Grafton | 218-9122 Eu Rd. |
33 | Vance | bibendum.fermentum.metus@loremfringillaornare.edu | Hilo | P.O. Box 602, 8965 Lorem Road |
34 | Faith | Sed.eget.lacus@duiSuspendisse.edu | Chicago | Ap #647-8210 Aliquet Av. |
35 | Lisandra | pede.nec.ante@Nulla.ca | Billings | Ap #134-4463 Cursus Ave |
36 | Quinn | mollis.dui@vestibulum.com | Asheville | 254-180 Metus Street |
37 | Fatima | cursus@Nam.ca | Utica | Ap #676-9538 Nisi Ave |
38 | Griffith | non.arcu.Vivamus@ipsum.edu | Moorhead | 444-9916 Consequat Rd. |
39 | Olivia | tincidunt.Donec@loremsitamet.ca | Abilene | P.O. Box 171, 1083 Feugiat. Street |
40 | Xavier | Mauris.magna.Duis@Vestibulumuteros.edu | Ontario | 878 Vulputate, Avenue |
41 | Hollee | blandit.viverra.Donec@porttitorinterdum.edu | Artesia | 262-7612 Non, Ave |
42 | Brenden | dolor@pede.ca | College Park | P.O. Box 989, 6227 Est. Avenue |
43 | Paul | arcu@Vivamusnonlorem.edu | Rohnert Park | 267-3911 Dictum Avenue |
44 | Jana | tellus@lacus.edu | Woonsocket | Ap #902-4279 Libero St. |
45 | Nadine | morbi@augueSed.ca | Danbury | 714-1669 Dolor St. |
46 | Kelsie | lobortis.ultrices@eteros.ca | Spokane Valley | Ap #599-7679 Dis St. |
47 | Nathaniel | nec.mauris@adipiscingMaurismolestie.com | Dallas | P.O. Box 616, 7774 Nec, Rd. |
48 | Tarik | Etiam.ligula.tortor@pharetranibhAliquam.com | Bethlehem | 3001 Varius Avenue |
49 | Quinlan | enim.Suspendisse@ipsum.ca | Ocean City | P.O. Box 166, 3209 Nascetur Rd. |
50 | Jerry | euismod.enim@quamelementum.org | Appleton | 5953 Cras Rd. |
51 | Holly | orci@mifelis.ca | Elsmere | 3782 Primis Ave |
52 | Ross | vel.turpis.Aliquam@pedenonummy.org | Oneida | P.O. Box 819, 5692 Arcu. St. |
53 | Leslie | aliquam.eros.turpis@venenatislacus.org | Kalamazoo | Ap #366-5411 Velit. St. |
54 | Jessamine | ornare@liberoProinmi.org | Bentonville | 325-6292 Sit Road |
55 | Abel | semper.erat.in@Nunc.org | Nashua | 2691 Eu Rd. |
56 | Ciara | aliquet.lobortis@diamvel.edu | Reedsport | 7830 Vitae, Ave |
57 | Iola | nisi.Cum.sociis@scelerisquedui.ca | San Luis Obispo | 9021 Auctor, Rd. |
58 | Jasmine | non.lobortis.quis@est.org | Port Washington | 5964 Mauris Av. |
59 | Kirestin | pede.ac@estmollisnon.edu | Manitowoc | 633 Sit Av. |
60 | Erasmus | elit.erat@tincidunt.ca | Sandpoint | 919-6405 Ut Ave |
61 | Iona | primis.in@sed.edu | Bell Gardens | 256-4406 Enim. Rd. |
62 | Kenyon | et@sedhendrerit.ca | Pembroke Pines | 551-6928 Conubia Road |
63 | Donovan | nunc@MaurismagnaDuis.org | Murrieta | 1650 Consectetuer St. |
64 | Laura | primis.in.faucibus@ultriciesligulaNullam.org | Toledo | P.O. Box 944, 8422 Odio, St. |
65 | Alma | Sed.eu.nibh@non.edu | Santa Ana | P.O. Box 762, 2567 Auctor Street |
66 | Mercedes | Pellentesque.habitant@consequatenimdiam.org | Shamokin | P.O. Box 762, 1204 Lacus. Rd. |
67 | Nora | iaculis.odio@euismodestarcu.edu | Rohnert Park | 139-1835 Metus Avenue |
68 | Evelyn | cursus.luctus.ipsum@feugiatnon.ca | South Pasadena | Ap #355-7344 Cursus, Street |
69 | Gregory | congue@atsemmolestie.com | Azusa | P.O. Box 820, 8229 Risus St. |
70 | Camille | vestibulum.Mauris@fringilla.org | Dearborn | 787-4084 Molestie Rd. |
71 | Demetria | sapien.gravida@Nunclectus.com | Fairfield | P.O. Box 648, 5804 Sem Road |
72 | Kane | odio.a@insodales.com | Kenosha | P.O. Box 998, 6765 Pede. Av. |
73 | Macy | aliquam@magna.org | Lakewood | 461-5245 Malesuada St. |
74 | Reuben | felis.Nulla.tempor@vel.ca | San Bernardino | P.O. Box 869, 2615 In Rd. |
75 | Judith | In@facilisis.edu | Yonkers | 232 Cras Road |
76 | Ainsley | tempor.est@duiCumsociis.ca | Elsmere | 3607 Sem Av. |
77 | Zeph | non.enim.Mauris@liberoMorbiaccumsan.org | Anaheim | Ap #150-828 Dui, Av. |
78 | September | tincidunt.tempus@feugiatnecdiam.org | Orangeburg | P.O. Box 834, 5924 Sociis Ave |
79 | Paki | neque.sed.sem@hendreritconsectetuercursus.ca | Eatontown | 422-3859 Non, Rd. |
80 | Alexander | sagittis.semper@lectussitamet.edu | White Plains | P.O. Box 618, 8728 Metus Rd. |
81 | Walter | sit@euodio.edu | Easthampton | P.O. Box 977, 4060 Nullam Av. |
82 | Uta | tellus@eudui.com | San Fernando | 5680 Lorem, Ave |
83 | MacKenzie | nibh@vestibulumlorem.ca | Walnut | P.O. Box 762, 3967 Ante, Ave |
84 | Kameko | sociis.natoque.penatibus@ipsumcursus.ca | Miami Beach | 9424 Hendrerit Ave |
85 | Beau | egestas.Duis@Aliquamnecenim.ca | Santa Clarita | 2055 Fringilla Rd. |
86 | Xyla | nec.imperdiet@dolorvitaedolor.org | Beverly | Ap #645-7386 Sed St. |
87 | Chaney | dui@sagittissemperNam.edu | Manitowoc | 3590 Ut Street |
88 | Camille | velit@orciluctuset.ca | Sutter Creek | 912-8440 Mi, Avenue |
89 | Laura | dictum.mi@lobortisultrices.org | Atwater | P.O. Box 931, 4510 Dictum Ave |
90 | Gavin | nec@molestiedapibus.ca | Rye | P.O. Box 544, 7381 Vulputate St. |
91 | Aurora | viverra.Donec@varius.org | Springfield | 8423 Urna St. |
92 | Sloane | mi@et.edu | Danville | 490-8587 Duis Road |
93 | Neil | malesuada.vel@Maecenas.org | Prescott | P.O. Box 801, 8392 Magna. Av. |
94 | Ulric | neque.pellentesque@blandit.com | Chico | P.O. Box 705, 7966 Volutpat. Av. |
95 | Caesar | eget.dictum.placerat@mauriseu.org | Kalispell | P.O. Box 224, 4480 Enim. St. |
96 | Rooney | malesuada.malesuada.Integer@nuncullamcorper.com | Lake Forest | P.O. Box 275, 2052 Erat Ave |
97 | Marsden | magna.Nam@justofaucibus.edu | Dayton | 218-3571 Libero. St. |
98 | Carissa | lobortis.Class@iaculis.com | Orangeburg | P.O. Box 181, 2213 Augue Street |
99 | Kyle | interdum.enim@vitae.com | Kansas City | P.O. Box 826, 560 Maecenas Rd. |
100 | Devin | orci@Fuscemi.org | Riverton | P.O. Box 895, 9385 Donec Street |
1/4 First, the taglib internally uses the JSTL (JSP Standard Tag Library). So you need the JSTL jar in your classpath.
You can do it manually or if you use Maven, just add the following dependency in your pom :
2/4 As for the JSTL, you'll need the Datatables-taglib jar. See the Download tab.
3/4 Then, as Javascript libraries and CSS are not imported in the tags, you'll have to do it by yourself (anyway, you probably already use JQuery, don't you ? :))
If you want to use the default configuration (which uses the Twitter's Bootstrap), add the Bootstrap's CSS.
And if you want to use the filterable attribute of the column tag, TableTools is needed :
4/4 In your JSP, reference the tag library with a JSP directive :
Then, you can finally use the taglib !
See the basic examples tab to start.
See all the DataTables features that are embedded in the taglib and the corresponding tag attributes in the features page.
If you need some details, visit the full reference.
The taglib also comes with some extra features !
Don't hesitate to add an issue on GitHub or even fork the taglib !
Please use the DataTables forum.
DataTables Taglib is licensed under the GPLv2 licence and use DataTables under the BSD one