|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 org.springframework.web.servlet.view.velocity.VelocityLayoutViewResolver
public class VelocityLayoutViewResolver
Convenience subclass of VelocityViewResolver, adding support for VelocityLayoutView and its properties.
See VelocityViewResolver's javadoc for general usage info.
VelocityViewResolver
,
VelocityLayoutView
,
setLayoutUrl(java.lang.String)
,
setLayoutKey(java.lang.String)
,
setScreenContentKey(java.lang.String)
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 |
Constructor Summary | |
---|---|
VelocityLayoutViewResolver()
|
Method Summary | |
---|---|
protected AbstractUrlBasedView |
buildView(String viewName)
Creates a new View instance of the specified view class and configures it. |
protected Class |
requiredViewClass()
Requires VelocityLayoutView. |
void |
setLayoutKey(String layoutKey)
Set the context key used to specify an alternate layout to be used instead of the default layout. |
void |
setLayoutUrl(String layoutUrl)
Set the layout template to use. |
void |
setScreenContentKey(String screenContentKey)
Set the name of the context key that will hold the content of the screen within the layout template. |
Methods inherited from class org.springframework.web.servlet.view.velocity.VelocityViewResolver |
---|
initApplicationContext, setDateToolAttribute, setNumberToolAttribute, setToolboxConfigLocation, setVelocityFormatterAttribute |
Methods inherited from class org.springframework.web.servlet.view.AbstractTemplateViewResolver |
---|
setAllowRequestOverride, setAllowSessionOverride, setExposeRequestAttributes, setExposeSessionAttributes, setExposeSpringMacroHelpers |
Methods inherited from class org.springframework.web.servlet.view.UrlBasedViewResolver |
---|
createView, getAttributesMap, getCacheKey, getContentType, getPrefix, getRequestContextAttribute, getSuffix, getViewClass, isRedirectContextRelative, isRedirectHttp10Compatible, loadView, setAttributes, setAttributesMap, setContentType, setPrefix, setRedirectContextRelative, setRedirectHttp10Compatible, setRequestContextAttribute, setSuffix, setViewClass |
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, isContextRequired |
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 |
---|
public VelocityLayoutViewResolver()
Method Detail |
---|
protected Class requiredViewClass()
requiredViewClass
in class VelocityViewResolver
VelocityLayoutView
public void setLayoutUrl(String layoutUrl)
layoutUrl
- the template location (relative to the template
root directory)VelocityLayoutView.setLayoutUrl(java.lang.String)
public void setLayoutKey(String layoutKey)
#set( $layout = "MyLayout.vm" )
The default key is "layout", as illustrated above.
layoutKey
- the name of the key you wish to use in your
screen content templates to override the layout templateVelocityLayoutView.setLayoutKey(java.lang.String)
public void setScreenContentKey(String screenContentKey)
Default is "screen_content": accessed in VTL as
$screen_content
.
screenContentKey
- the name of the screen content key to useVelocityLayoutView.setScreenContentKey(java.lang.String)
protected AbstractUrlBasedView buildView(String viewName) throws Exception
UrlBasedViewResolver
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.
buildView
in class VelocityViewResolver
Exception
UrlBasedViewResolver.loadView(String, java.util.Locale)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |