| |
|
| java.lang.Object com.opensymphony.webwork.views.velocity.VelocityManager
VelocityManager | public class VelocityManager (Code) | | Manages the environment for Velocity result types
author: Matt Ho |
PARENT | final public static String PARENT(Code) | | the parent JSP tag
|
toolboxManager | protected ToolboxManager toolboxManager(Code) | | A reference to the toolbox manager.
|
VelocityManager | protected VelocityManager()(Code) | | |
createContext | public Context createContext(OgnlValueStack stack, HttpServletRequest req, HttpServletResponse res)(Code) | | This method is responsible for creating the standard VelocityContext used by all WW2 velocity views. The
following context parameters are defined:
a new WebWorkVelocityContext |
getInstance | public static synchronized VelocityManager getInstance()(Code) | | retrieve an instance to the current VelocityManager
|
getVelocityEngine | public VelocityEngine getVelocityEngine()(Code) | | a reference to the VelocityEngine used by all webwork velocity thingies with the exception ofdirectly accessed *.vm pages |
getVelocityProperties | public Properties getVelocityProperties()(Code) | | the velocityProperties |
init | public synchronized void init(ServletContext context)(Code) | | initializes the VelocityManager. this should be called during the initialization process, say by
ServletDispatcher. this may be called multiple times safely although calls beyond the first won't do anything
Parameters: context - the current servlet context |
init | protected void init()(Code) | | performs one-time initializations
|
initChainedContexts | protected void initChainedContexts()(Code) | | allow users to specify via the webwork.properties file a set of additional VelocityContexts to chain to the
the WebWorkVelocityContext. The intent is to allow these contexts to store helper objects that the ui
developer may want access to. Examples of reasonable VelocityContexts would be an IoCVelocityContext, a
SpringReferenceVelocityContext, and a ToolboxVelocityContext
|
initToolbox | protected void initToolbox(ServletContext context)(Code) | | Initializes the ServletToolboxManager for this servlet's
toolbox (if any).
|
loadConfiguration | public Properties loadConfiguration(ServletContext context)(Code) | | load optional velocity properties using the following loading strategy
- relative to the servlet context path
- relative to the WEB-INF directory
- on the classpath
Parameters: context - the current ServletContext. may not be null the optional properties if webwork.velocity.configfile was specified, an empty Properties file otherwise |
newVelocityEngine | protected VelocityEngine newVelocityEngine(ServletContext context)(Code) | |
Instantiates a new VelocityEngine.
The following is the default Velocity configuration
resource.loader = file, class
file.resource.loader.path = real path of webapp
class.resource.loader.description = Velocity Classpath Resource Loader
class.resource.loader.class = com.opensymphony.webwork.views.velocity.WebWorkResourceLoader
this default configuration can be overridden by specifying a webwork.velocity.configfile property in the
webwork.properties file. the specified config file will be searched for in the following order:
- relative to the servlet context path
- relative to the WEB-INF directory
- on the classpath
Parameters: context - the current ServletContext. may not be null |
prepareChainedContexts | protected VelocityContext[] prepareChainedContexts(HttpServletRequest servletRequest, HttpServletResponse servletResponse, Map extraContext)(Code) | | constructs contexts for chaining on this request. This method does not
perform any initialization of the contexts. All that must be done in the
context itself.
Parameters: servletRequest - Parameters: servletResponse - Parameters: extraContext - an VelocityContext[] of contexts to chain |
setVelocityProperties | public void setVelocityProperties(Properties velocityProperties)(Code) | | Parameters: velocityProperties - the velocityProperties to set |
|
|
|