public abstract class OldDecorator2NewStrutsDecorator
extends com.opensymphony.sitemesh.webapp.decorator.BaseWebAppDecorator
implements com.opensymphony.module.sitemesh.RequestConstants
Decorator
to a
SiteMesh 3 Decorator
.Modifier and Type | Field and Description |
---|---|
protected com.opensymphony.module.sitemesh.Decorator |
oldDecorator |
Constructor and Description |
---|
OldDecorator2NewStrutsDecorator() |
OldDecorator2NewStrutsDecorator(com.opensymphony.module.sitemesh.Decorator oldDecorator) |
Modifier and Type | Method and Description |
---|---|
protected String |
getEncoding()
Gets the L18N encoding of the system.
|
protected Locale |
getLocale(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,
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().
|
public OldDecorator2NewStrutsDecorator(com.opensymphony.module.sitemesh.Decorator oldDecorator)
public OldDecorator2NewStrutsDecorator()
protected abstract void render(com.opensymphony.sitemesh.Content content, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.ServletContext servletContext, ActionContext ctx) throws javax.servlet.ServletException, IOException
content
- The contentrequest
- The servlet requestresponse
- The servlet responseservletContext
- The servlet contextctx
- The action context for this request, populated with the server statejavax.servlet.ServletException
IOException
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
render
in class com.opensymphony.sitemesh.webapp.decorator.BaseWebAppDecorator
content
- The contentrequest
- The servlet requestresponse
- The servlet responseservletContext
- The servlet contextwebAppContext
- The web app contextIOException
javax.servlet.ServletException
protected Locale getLocale(ActionInvocation invocation, freemarker.template.Configuration configuration)
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,protected String getEncoding()
Copyright © 2000–2020 Apache Software Foundation. All rights reserved.