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.AbstractTemplateViewResolver | |||||
↳ | org.springframework.web.servlet.view.velocity.VelocityViewResolver |
Known Direct Subclasses |
Convenience subclass of UrlBasedViewResolver
that supports VelocityView
(i.e. Velocity templates) and custom subclasses of it.
The view class for all views generated by this resolver can be specified via the "viewClass" property. See UrlBasedViewResolver's javadoc for details.
Note: When chaining ViewResolvers, a VelocityViewResolver will check for the existence of the specified template resources and only return a non-null View object if the template was actually found.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.web.servlet.view.UrlBasedViewResolver
| |||||||||||
From interface
org.springframework.core.Ordered
|
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.context.support.ApplicationObjectSupport
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Set the name of the DateTool helper object to expose in the Velocity context
of this view, or
null if not needed. | |||||||||||
Set the name of the NumberTool helper object to expose in the Velocity context
of this view, or
null if not needed. | |||||||||||
Set a Velocity Toolbox config location, for example "/WEB-INF/toolbox.xml",
to automatically load a Velocity Tools toolbox definition file and expose
all defined tools in the specified scopes.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new View instance of the specified view class and configures it.
| |||||||||||
Subclasses can override this for custom initialization behavior.
| |||||||||||
Requires
VelocityView . |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.web.servlet.view.AbstractTemplateViewResolver
| |||||||||||
From class
org.springframework.web.servlet.view.UrlBasedViewResolver
| |||||||||||
From class
org.springframework.web.servlet.view.AbstractCachingViewResolver
| |||||||||||
From class
org.springframework.web.context.support.WebApplicationObjectSupport
| |||||||||||
From class
org.springframework.context.support.ApplicationObjectSupport
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.context.ApplicationContextAware
| |||||||||||
From interface
org.springframework.core.Ordered
| |||||||||||
From interface
org.springframework.web.context.ServletContextAware
| |||||||||||
From interface
org.springframework.web.servlet.ViewResolver
|
Set the name of the DateTool helper object to expose in the Velocity context
of this view, or null
if not needed. DateTool is part of Velocity Tools 1.0.
setDateToolAttribute(String)
Set the name of the NumberTool helper object to expose in the Velocity context
of this view, or null
if not needed. NumberTool is part of Velocity Tools 1.1.
setNumberToolAttribute(String)
Set a Velocity Toolbox config location, for example "/WEB-INF/toolbox.xml", to automatically load a Velocity Tools toolbox definition file and expose all defined tools in the specified scopes. If no config location is specified, no toolbox will be loaded and exposed.
The specfied location string needs to refer to a ServletContext resource, as expected by ServletToolboxManager which is part of the view package of Velocity Tools.
Note: Specifying a toolbox config location will lead to VelocityToolboxView instances being created.
setToolboxConfigLocation(String)
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.
viewName | the name of the view to build |
---|
Exception |
---|
Subclasses can override this for custom initialization behavior.
The default implementation is empty. Called by
initApplicationContext(org.springframework.context.ApplicationContext)
.