View Full Version : Tiles problem solved .. or?
sim085
Apr 28th, 2006, 06:56 AM
Hi,
Yesterday I had several problems with tiles and spring (not using struts). I checked with several websites and the only thing different I had was the extention of the files to be loaded by tiles (mine where .ftl and not .jsp).
Now, after changing the extentions, everything is working fine :)
but I still have a question... What if I want to use FreeMarker as well? Does this mean that tiles and freemarker can be developed together?
I know yesterday had another similar post to this, but now it seems more important, since I really would like to use the power of freemarker, and the tile technology of tiles?!
thanks and regards,
sim085
ervalerio
Apr 28th, 2006, 08:29 AM
if you haven' done that yet, take a look at:
http://static.springframework.org/spring/docs/1.2.x/reference/view.html
where it explains how to integrate multiple view technologies.
sim085
Apr 28th, 2006, 09:46 AM
Hi,
Thanks for your reply. No I had never read that one, What I read was another document (http://www.springframework.org/docs/reference/index.html).
Now from the document you gave me I can notice something that seem to be what I need. This is the ResourceBundleViewResolver. I will read about it and see how I go :)
thanks for your sugestion :D
regards,
sim085
sim085
Apr 29th, 2006, 07:16 PM
Hi,
I have read and tried out the ResourceBundleViewResolver. However this does not seem to be the thing I am searching for :(
The ResourceBundleViewResolver allows you to define a view resolver for each single page. This means I could have a view resolver for my 'home' page, and another one for my 'about' page.
However this is not what I want. I want that when I enter the url /home.htm The view resolver will use tiles to load the page layout, however it would use FreeMarker to generate the home.ftl part.
This means that I have header.ftl, footer.ftl, and home.ftl (these should be managed by freeMarker, however they can only be joined in one single page with tiles!
Is there a way so that after tiles is ready, the contents of these pages is then handeled by freeMarker?
regards,
sim085
ps: Tried to find an example sample of ResourceBundleViewResolver, but the only thing I found was a post by someone else (http://forum.springframework.org/archive/index.php/t-10218.html)
sim085
Apr 30th, 2006, 06:21 AM
Hi again :)
I think that what I explained above is imposible, altough not sure. The definition of Tiles and FreeMarker are the same .. that is that both are templating languages.
Now I like how tiles created the same layout by using a tiles-def.xml file. However really wanted to use FreeMarker in this project. So in my mind I tought that it was possible to have a view build out with tiles (using the tiles:insert) and then those pages being inserted could be handled by freemarker!
I am still not sure, but I think that is impossible right!?
regards,
sim085
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.