spring-framework / org.springframework.web.servlet.view.tiles3

Package org.springframework.web.servlet.view.tiles3

Types

SimpleSpringPreparerFactory

open class SimpleSpringPreparerFactory : AbstractSpringPreparerFactory

Tiles org.apache.tiles.preparer.PreparerFactory implementation that expects preparer class names and builds preparer instances for those, creating them through the Spring ApplicationContext in order to apply Spring container callbacks and configured Spring BeanPostProcessors.

SpringBeanPreparerFactory

open class SpringBeanPreparerFactory : AbstractSpringPreparerFactory

Tiles org.apache.tiles.preparer.PreparerFactory implementation that expects preparer bean names and obtains preparer beans from the Spring ApplicationContext. The full bean creation process will be in the control of the Spring application context in this case, allowing for the use of scoped beans etc.

SpringLocaleResolver

open class SpringLocaleResolver : DefaultLocaleResolver

Tiles LocaleResolver adapter that delegates to a Spring org.springframework.web.servlet.LocaleResolver, exposing the DispatcherServlet-managed locale.

This adapter gets automatically registered by TilesConfigurer.

SpringWildcardServletTilesApplicationContext

open class SpringWildcardServletTilesApplicationContext : ServletApplicationContext

Spring-specific subclass of the Tiles ServletApplicationContext.

TilesConfigurer

open class TilesConfigurer : ServletContextAware, InitializingBean, DisposableBean

Helper class to configure Tiles 3.x for the Spring Framework. See http://tiles.apache.org for more information about Tiles, which basically is a templating mechanism for web applications using JSPs and other template engines.

The TilesConfigurer simply configures a TilesContainer using a set of files containing definitions, to be accessed by TilesView instances. This is a Spring-based alternative (for usage in Spring configuration) to the Tiles-provided ServletContextListener (e.g. org.apache.tiles.extras.complete.CompleteAutoloadTilesListener for usage in web.xml.

TilesViews can be managed by any org.springframework.web.servlet.ViewResolver. For simple convention-based view resolution, consider using TilesViewResolver.

A typical TilesConfigurer bean definition looks as follows:

 <bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles3.TilesConfigurer"> <property name="definitions"> <list> <value>/WEB-INF/defs/general.xml</value> <value>/WEB-INF/defs/widgets.xml</value> <value>/WEB-INF/defs/administrator.xml</value> <value>/WEB-INF/defs/customer.xml</value> <value>/WEB-INF/defs/templates.xml</value> </list> </property> </bean> 
The values in the list are the actual Tiles XML files containing the definitions. If the list is not specified, the default is "/WEB-INF/tiles.xml".

Note that in Tiles 3 an underscore in the name of a file containing Tiles definitions is used to indicate locale information, for example:

 <bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles3.TilesConfigurer"> <property name="definitions"> <list> <value>/WEB-INF/defs/tiles.xml</value> <value>/WEB-INF/defs/tiles_fr_FR.xml</value> </list> </property> </bean> 

TilesViewResolver

open class TilesViewResolver : UrlBasedViewResolver

Convenience subclass of UrlBasedViewResolver that supports TilesView (i.e. Tiles definitions) and custom subclasses of it.