org.springframework.web.servlet.view.tiles
Class TilesView

java.lang.Object
  extended byorg.springframework.context.support.ApplicationObjectSupport
      extended byorg.springframework.web.context.support.WebApplicationObjectSupport
          extended byorg.springframework.web.servlet.view.AbstractView
              extended byorg.springframework.web.servlet.view.AbstractUrlBasedView
                  extended byorg.springframework.web.servlet.view.InternalResourceView
                      extended byorg.springframework.web.servlet.view.tiles.TilesView
All Implemented Interfaces:
ApplicationContextAware, BeanNameAware, View
Direct Known Subclasses:
TilesJstlView

public class TilesView
extends InternalResourceView

View implementation that retrieves a Tiles definition. The "url" property is interpreted as name of a Tiles definition.

TilesJstlView with JSTL support is a separate class, mainly to avoid JSTL dependencies in this class.

Depends on a Tiles DefinitionsFactory which must be available in the ServletContext. This factory is typically set up via a TilesConfigurer bean definition in the application context.

A component controller specified in the Tiles definition will receive a reference to the current Spring ApplicationContext if it implements ApplicationContextAware. The ComponentControllerSupport class provides a convenient base class for such Spring-aware component controllers.

Author:
Alef Arendsen, Juergen Hoeller
See Also:
AbstractUrlBasedView.setUrl(java.lang.String), TilesJstlView, TilesConfigurer, ComponentControllerSupport, ApplicationContextAware

Field Summary
 
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport
logger
 
Constructor Summary
TilesView()
           
 
Method Summary
protected  void initApplicationContext()
          Overridden lifecycle method to check that 'url' property is set.
protected  void renderMergedOutputModel(java.util.Map model, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          The actual rendering of the Tiles definition.
 
Methods inherited from class org.springframework.web.servlet.view.InternalResourceView
exposeModelAsRequestAttributes
 
Methods inherited from class org.springframework.web.servlet.view.AbstractUrlBasedView
getUrl, setUrl
 
Methods inherited from class org.springframework.web.servlet.view.AbstractView
addStaticAttribute, getBeanName, getContentType, getStaticAttributes, render, setAttributes, setAttributesCSV, setAttributesMap, setBeanName, setContentType, setRequestContextAttribute
 
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, requiredContextClass
 
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, setApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TilesView

public TilesView()
Method Detail

initApplicationContext

protected void initApplicationContext()
                               throws ApplicationContextException
Description copied from class: AbstractUrlBasedView
Overridden lifecycle method to check that 'url' property is set.

Overrides:
initApplicationContext in class AbstractUrlBasedView
Throws:
ApplicationContextException

renderMergedOutputModel

protected void renderMergedOutputModel(java.util.Map model,
                                       javax.servlet.http.HttpServletRequest request,
                                       javax.servlet.http.HttpServletResponse response)
                                throws java.lang.Exception
The actual rendering of the Tiles definition.

Overrides:
renderMergedOutputModel in class InternalResourceView
Throws:
java.lang.Exception


Copyright (C) 2003-2004 The Spring Framework Project.