org.springbyexample.web.servlet.view.tiles2
Class TilesUrlBasedViewResolver

java.lang.Object
  extended by org.springframework.context.support.ApplicationObjectSupport
      extended by org.springframework.web.context.support.WebApplicationObjectSupport
          extended by org.springframework.web.servlet.view.AbstractCachingViewResolver
              extended by org.springframework.web.servlet.view.UrlBasedViewResolver
                  extended by org.springbyexample.web.servlet.view.tiles2.TilesUrlBasedViewResolver
All Implemented Interfaces:
ApplicationContextAware, Ordered, ServletContextAware, ViewResolver

public class TilesUrlBasedViewResolver
extends UrlBasedViewResolver

Extends UrlBasedViewResolver and provides some properties to set tiles values if the view is a DynamicTilesView.

Author:
David Winterfeldt

Field Summary
 
Fields inherited from class org.springframework.web.servlet.view.UrlBasedViewResolver
FORWARD_URL_PREFIX, REDIRECT_URL_PREFIX
 
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport
logger
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
TilesUrlBasedViewResolver()
           
 
Method Summary
protected  AbstractUrlBasedView buildView(String viewName)
          Does everything the UrlBasedViewResolver does and also sets some Tiles specific values on the view.
 void setTilesBodyAttributeName(String tilesBodyAttributeName)
          Tiles body attribute name.
 void setTilesDefinitionDelimiter(String tilesDefinitionDelimiter)
          Sets Tiles definition delimiter.
 void setTilesDefinitionName(String tilesDefinitionName)
          Main template name.
 
Methods inherited from class org.springframework.web.servlet.view.UrlBasedViewResolver
canHandle, createView, getAttributesMap, getCacheKey, getContentType, getOrder, getPrefix, getRequestContextAttribute, getSuffix, getViewClass, getViewNames, initApplicationContext, isRedirectContextRelative, isRedirectHttp10Compatible, loadView, requiredViewClass, setAttributes, setAttributesMap, setContentType, setOrder, setPrefix, setRedirectContextRelative, setRedirectHttp10Compatible, setRequestContextAttribute, setSuffix, setViewClass, setViewNames
 
Methods inherited from class org.springframework.web.servlet.view.AbstractCachingViewResolver
clearCache, isCache, removeFromCache, resolveViewName, setCache
 
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

TilesUrlBasedViewResolver

public TilesUrlBasedViewResolver()
Method Detail

setTilesDefinitionName

public void setTilesDefinitionName(String tilesDefinitionName)
Main template name.


setTilesBodyAttributeName

public void setTilesBodyAttributeName(String tilesBodyAttributeName)
Tiles body attribute name.


setTilesDefinitionDelimiter

public void setTilesDefinitionDelimiter(String tilesDefinitionDelimiter)
Sets Tiles definition delimiter.


buildView

protected AbstractUrlBasedView buildView(String viewName)
                                  throws Exception
Does everything the UrlBasedViewResolver does and also sets some Tiles specific values on the view.

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)


Copyright © 2008 Spring by Example. All Rights Reserved.