org.apache.struts2.sitemesh
Class OldDecorator2NewStrutsDecorator
java.lang.Object
com.opensymphony.sitemesh.webapp.decorator.BaseWebAppDecorator
org.apache.struts2.sitemesh.OldDecorator2NewStrutsDecorator
- All Implemented Interfaces:
- com.opensymphony.module.sitemesh.RequestConstants, com.opensymphony.sitemesh.Decorator
- Direct Known Subclasses:
- OldDecorator2NewStrutsFreemarkerDecorator, OldDecorator2NewStrutsVelocityDecorator
public abstract class OldDecorator2NewStrutsDecorator
- extends com.opensymphony.sitemesh.webapp.decorator.BaseWebAppDecorator
- implements com.opensymphony.module.sitemesh.RequestConstants
Adapts a SiteMesh 2 Decorator to a
SiteMesh 3 Decorator.
- Since:
- SiteMesh 3
|
Field Summary |
protected com.opensymphony.module.sitemesh.Decorator |
oldDecorator
|
| Fields inherited from interface com.opensymphony.module.sitemesh.RequestConstants |
DECORATOR, PAGE, ROBOT |
|
Method Summary |
protected String |
getEncoding()
Gets the L18N encoding of the system. |
protected Locale |
getLocale(com.opensymphony.xwork2.ActionInvocation invocation,
freemarker.template.Configuration configuration)
Returns the locale used for the Configuration.getTemplate(String, java.util.Locale) call. |
protected abstract void |
render(com.opensymphony.sitemesh.Content content,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext servletContext,
com.opensymphony.xwork2.ActionContext ctx)
Applies the decorator, using the relevent contexts |
protected void |
render(com.opensymphony.sitemesh.Content content,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext servletContext,
com.opensymphony.sitemesh.webapp.SiteMeshWebAppContext webAppContext)
Applies the decorator, creating the relevent contexts and delegating to
the extended applyDecorator(). |
| Methods inherited from class com.opensymphony.sitemesh.webapp.decorator.BaseWebAppDecorator |
render |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
oldDecorator
protected com.opensymphony.module.sitemesh.Decorator oldDecorator
OldDecorator2NewStrutsDecorator
public OldDecorator2NewStrutsDecorator(com.opensymphony.module.sitemesh.Decorator oldDecorator)
OldDecorator2NewStrutsDecorator
public OldDecorator2NewStrutsDecorator()
render
protected abstract void render(com.opensymphony.sitemesh.Content content,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext servletContext,
com.opensymphony.xwork2.ActionContext ctx)
throws javax.servlet.ServletException,
IOException
- Applies the decorator, using the relevent contexts
- Parameters:
content - The contentrequest - The servlet requestresponse - The servlet responseservletContext - The servlet contextctx - The action context for this request, populated with the server state
- Throws:
javax.servlet.ServletException
IOException
render
protected void render(com.opensymphony.sitemesh.Content content,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext servletContext,
com.opensymphony.sitemesh.webapp.SiteMeshWebAppContext webAppContext)
throws IOException,
javax.servlet.ServletException
- Applies the decorator, creating the relevent contexts and delegating to
the extended applyDecorator().
- Specified by:
render in class com.opensymphony.sitemesh.webapp.decorator.BaseWebAppDecorator
- Parameters:
content - The contentrequest - The servlet requestresponse - The servlet responseservletContext - The servlet contextwebAppContext - The web app context
- Throws:
IOException
javax.servlet.ServletException
getLocale
protected Locale getLocale(com.opensymphony.xwork2.ActionInvocation invocation,
freemarker.template.Configuration configuration)
- Returns the locale used for the
Configuration.getTemplate(String, java.util.Locale) call. The base implementation
simply returns the locale setting of the action (assuming the action implements LocaleProvider) or, if
the action does not the configuration's locale is returned. Override this method to provide different behaviour,
getEncoding
protected String getEncoding()
- Gets the L18N encoding of the system. The default is UTF-8.
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.