tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jakub Vavřík <jakub.vav...@gmail.com>
Subject how to enable exposeSpringMacroHelpers in Tiles 3 for freemarker and velocity
Date Thu, 04 Jul 2013 06:45:49 GMT
Hi,

I have a question related to setting exposeSpringMacroHelpers value to true.
I use Tiles 3.0.0 with Spring MVC 3.2.3 configured as follows:
Tiles is configured in java config class:
@Bean
    public ViewResolver getTiles3ViewResolver() {
        return new TilesViewResolver();
    }

    @Bean
    public TilesConfigurer getTiles3Configurer() {
        TilesConfigurer tilesConfigurer = new TilesConfigurer();
        tilesConfigurer.setDefinitions(new
String[]{"classpath*:WEB-INF/tiles.xml"});
        tilesConfigurer.setCompleteAutoload(true);
        return tilesConfigurer;
    }
 I just defined a simple template inside tiles.xml that uses .ftl file or
.vm file as inserted attribute:
<definition name="base" template="/WEB-INF/tiles/layouts/baseLayout.jsp">
      <put-attribute name="body" value="/WEB-INF/tiles/common/somefile.vm"/>
      <put-attribute name="body2"
value="/WEB-INF/tiles/common/somefile.ftl"/>
</definition>
Everything is rendered just fine both ftl and vm files are evaluated
correctly.
Now I need to enable spring form bindings(there is a form inside vm or ftl
file) but I somehow dont get where/how to set it?
Tiles 3 somehow automagically renders ftl or vm files - I guess it
instantiates render servlets in the background somehow or something
simillar but I have no clue how to configure those renderers to
exposeSpringMacroHelpers.

Any hint would be very appretiated.

Thanks
Jakub

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message