[TILES] put-list-attribute

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[TILES] put-list-attribute

p0w4p0ty
Hi,

is there any way to use put-list-attribute on thymeleaf template or get something like that?
I'm facing many troubles trying to get my js imports at the bottom of the page without this :P

Thank you!
Reply | Threaded
Open this post in threaded view
|

Re: [TILES] put-list-attribute

Eric Francis
There is a Tiles-Thymeleaf project: https://github.com/thymeleaf/thymeleaf-extras-tiles2

There is also the notion of Thymeleaf import: http://blog.springsource.org/2012/10/30/spring-mvc-from-jsp-and-tiles-to-thymeleaf/
Search for th:include
Reply | Threaded
Open this post in threaded view
|

Re: [TILES] put-list-attribute

balteo
In reply to this post by p0w4p0ty
Hello,

Have you managed to get the put-list-attribute to work? If so can you please kindly share a snippet?

Here is what I tried:

<put-list-attribute name="jsFilesList">
			<add-attribute value="/js/libs/jquery-1.8.1.js"/>
			<add-attribute value="/js/libs/jquery-ui-1.9.0.custom.js"/>
			<add-attribute value="/js/libs/bootstrap.js"/>
		</put-list-attribute>

<script th:each="jsFile : ${jsFilesList}" th:src="${jsFile}" type="text/javascript" ></script>

Nothing is rendered... It seems the list is empty from the thymeleaf template point of view...

Regards,

Julien.