dom in thymeleaf html pages
dom in thymeleaf html pages
Hi.
Trying to add the code in: https://datatables.net/examples/basic_init/dom.html
in a thymeleaf html page, but it complains about this code:
"dom": '<"top"i>rt<"bottom"flp><"clear">'
I tried to change " by ' and use escape characters but no way.
This script in my html page, doesnt work:
<script>
$(document)
.ready(
function() {
$("#mensuales")
.DataTable(
{
"dom": '<"top"i>rt<"bottom"flp><"clear">',
"language" : {
"url" : "//cdn.datatables.net/plug-ins/1.10.15/i18n/Spanish.json"
},
"lenghtMenu" : [
[ 5, 12, 15, 20, -1 ],
[ 5, 12, 15, 20, "Todos" ] ],
"ordering" : true,
stateSave : true
});
});
</script>
2017-11-20 12:17:56.010 ERROR 10544 --- [nio-8080-exec-8] o.thymeleaf.templateparser.ErrorHandler : [THYMELEAF][http-nio-8080-exec-8] Fatal error during parsing
org.xml.sax.SAXParseException: El contenido de los elementos debe constar de marcadores o datos de carácter con un formato correcto.
Thanks
Answers
That looks perfectly valid to me. I haven't used thymelead though - perhaps is requires JSON style objects:
If that doesn't fix it your need to contract the thymeleaf developers.
Allan
ok, I'll post there. Thymeleaf is very strict with the syntax.
Thanks
Hi, Allan.
Could you please take a look at this post. It has a picture. Maybe if you see it you can image what is happen?
https://stackoverflow.com/questions/47397648/datatable-component-not-aligned-properly?noredirect=1#comment81749112_47397648
Looks like a CSS issue. Try adding:
to your CSS.
I'd need a link to the actual page to be sure though.
Allan