dom in thymeleaf html pages

dom in thymeleaf html pages

davisoskidavisoski Posts: 17Questions: 1Answers: 0
edited November 2017 in Free community support

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

This discussion has been closed.