org.springframework.web.servlet.view.tiles3

## Class TilesViewResolver

- java.lang.Object
- - org.springframework.context.support.ApplicationObjectSupport
  - - org.springframework.web.context.support.WebApplicationObjectSupport
    - - org.springframework.web.servlet.view.AbstractCachingViewResolver
      - - org.springframework.web.servlet.view.UrlBasedViewResolver
        - - org.springframework.web.servlet.view.tiles3.TilesViewResolver

All Implemented Interfaces:
  Aware, ApplicationContextAware, Ordered, ServletContextAware, ViewResolver

    public class TilesViewResolver
    extends UrlBasedViewResolver

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

Since:
  3.2
Author:
  Nicolas Le Bas, Rossen Stoyanchev

### Field Summary

### Fields inherited from class org.springframework.web.servlet.view.UrlBasedViewResolver

`FORWARD_URL_PREFIX, REDIRECT_URL_PREFIX`

### Fields inherited from class org.springframework.web.servlet.view.AbstractCachingViewResolver

`DEFAULT_CACHE_LIMIT`

### Fields inherited from class org.springframework.context.support.ApplicationObjectSupport

`logger`

### Fields inherited from interface org.springframework.core.Ordered

`HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE`

### Constructor Summary

Constructors
Constructor and Description
`TilesViewResolver()`

### Method Summary

Methods
`protected TilesView` `buildView(String viewName)` Creates a new View instance of the specified view class and configures it.
`protected Class` `getViewClass()` Return the view class to be used to create views.
`void` `setRenderer(org.apache.tiles.request.render.Renderer renderer)` Set the `Renderer` to use.

### Methods inherited from class org.springframework.web.servlet.view.UrlBasedViewResolver

`canHandle, createView, getAttributesMap, getCacheKey, getContentType, getOrder, getPrefix, getRequestContextAttribute, getSuffix, getViewNames, initApplicationContext, isRedirectContextRelative, isRedirectHttp10Compatible, loadView, requiredViewClass, setAttributes, setAttributesMap, setContentType, setExposePathVariables, setOrder, setPrefix, setRedirectContextRelative, setRedirectHttp10Compatible, setRequestContextAttribute, setSuffix, setViewClass, setViewNames`

### Methods inherited from class org.springframework.web.servlet.view.AbstractCachingViewResolver

`clearCache, getCacheLimit, isCache, isCacheUnresolved, removeFromCache, resolveViewName, setCache, setCacheLimit, setCacheUnresolved`

### Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport

`getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext`

### Methods inherited from class org.springframework.context.support.ApplicationObjectSupport

`getApplicationContext, getMessageSourceAccessor, requiredContextClass, setApplicationContext`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### TilesViewResolver

    public TilesViewResolver()

### Method Detail

#### getViewClass

    protected Class getViewClass()

Description copied from class: `UrlBasedViewResolver`
Return the view class to be used to create views.

Overrides:
  `getViewClass` in class `UrlBasedViewResolver`

#### setRenderer

    public void setRenderer(org.apache.tiles.request.render.Renderer renderer)

Set the `Renderer` to use. If not set, by default `DefinitionRenderer` is used.

See Also:
  `TilesView.setRenderer(Renderer)`

#### buildView

    protected TilesView buildView(String viewName)
                           throws Exception

Description copied from class: `UrlBasedViewResolver`
Creates a new View instance of the specified view class and configures it. Does not perform any lookup for pre-defined View instances.

Spring lifecycle methods as defined by the bean container do not have to be called here; those will be applied by the `loadView` method after this method returns.

Subclasses will typically call `super.buildView(viewName)` first, before setting further properties themselves. `loadView` will then apply Spring lifecycle methods at the end of this process.

Overrides:
  `buildView` in class `UrlBasedViewResolver`
Parameters:
  `viewName` - the name of the view to build
Returns:
  the View instance
Throws:
  `Exception` - if the view couldn't be resolved
See Also:
  `UrlBasedViewResolver.loadView(String, java.util.Locale)`