I have recently started to integrate datatables in my spring mvc 4 + hibernate 4 + tiles 3 Project.
I want it to display header with various language support.
So I started with this link.
As per this page suggests my header shows ???key??? message.
I want to display Id in column header but it is showing ???table.header.id???.
This link says
If the key cannot be found in the bundle, the ???key??? message will be displayed in the column header.
But I have put following in datatables.properties
i18n.locale.resolver=com.github.dandelion.datatables.extras.spring3.i18n.SpringLocaleResolver
global.i18n.message.resolver=com.github.dandelion.datatables.extras.spring3.i18n.SpringMessageResolver
Also have put in global_en.properties
table.header.id=Id
I also copied same file as global.properties.. but not worked.
My jsp file contains
<datatables:table id="users" ...>
<datatables:column titleKey="table.header.id" property="userId" />
<datatables:table />
My Resource folder structure is

Where should I put table.header.id=Id??
Any help is required. Thanks in advance.
Note: I am using AJAX source + server-side processing.
About the location of your messages
You seem to be using the Spring
ResourceBundleMessageSourcewithglobalas a basename. So it makes sense to put all translations of header columns inglobal_*.propertiesfiles.About the
???key???messageIt turns out to be a bug introduced in the v0.10.0.
Waiting for the next version to be released, there is a workaround, but working only with DOM sources. Here follows the steps.
1) Instead of using the
titleKeycolumn attribute, you will use the<spring:message>tag. Theorically, they do the exact same thing: lookup a resource in your configured resource bundle.Begin by declaring the Spring taglib in your JSP:
2) Then you need to update the usage of the Dandelion-Datatables taglib. As a workaround, you can use the
<datatables:columnHead>(docs here) tag to insert any content in a column header.Just use it as follows:
Some observations:
rowtable attribute if you need to access the object of the collection being iterated on, as it's done with the<c:out>tag of the JSTLpropertycolumn attribute, or the content of the<datatables:column>tag will not be evaluatedThis is a lot of work for very little return - sorry for that - but waiting for the next version to be released, at least it works. A new issue has been added.
If you are using
AJAX source+server-side processing.Make a variable first
and added it in
Also a fix is available here. Kindly upgrade to
0.10.1-SNAPSHOTversion.(Disclaimer required by StackOverflow: I'm the author of Dandelion)