LessThanDot

Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.

LTD Social Sitings

Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.

Introduction

So last weekend I poste about Nancy an jtable and all was well. This morning I wanted to add a column with a link and a date with a datetime to it.
Neither were obvious but it is possible. And pretty easy once you know how.
I have put the code on github.

Column with a link

This is what I want.

And in a sense it is very easy to do.

When we configure our fields for jtable we have a display attribute that takes a function and in that function we can do our formatting.

Conclusion

jtable has some formatting posibilities builtin (date formatting, add textbox, textarea, checkbox, combos) but it’s not so much. Luckily you can do everything else with display, so that makes it all good.