Package org.apache.velocity.tools.view
Class ViewContextTool
- java.lang.Object
-
- org.apache.velocity.tools.generic.SafeConfig
-
- org.apache.velocity.tools.generic.ContextTool
-
- org.apache.velocity.tools.view.ViewContextTool
-
- All Implemented Interfaces:
java.io.Serializable
public class ViewContextTool extends org.apache.velocity.tools.generic.ContextToolExtension of
ContextToolthat includes keys and values from theHttpServletRequest,HttpSessionandServletContext.Template example(s):
#foreach( $key in $context.keys ) $key = $context.get($key) #endToolbox configuration:
<tools> <toolbox scope="request"> <tool class="org.apache.velocity.tools.view.ViewContextTool"/> </toolbox> </tools>This class is only designed for use as a request-scope VelocityView tool.
- Since:
- VelocityTools 2.0
- Version:
- $Id: ViewContextTool.java 385122 2006-03-11 18:37:42Z nbubna $
- Author:
- Nathan Bubna
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.servlet.ServletContextapplicationprotected javax.servlet.http.HttpServletRequestrequestprotected javax.servlet.http.HttpSessionsession
-
Constructor Summary
Constructors Constructor Description ViewContextTool()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidconfigure(org.apache.velocity.tools.generic.ValueParser parser)protected voidfillKeyset(java.util.Set keys)-
Methods inherited from class org.apache.velocity.tools.generic.ContextTool
contains, get, getKeys, getThis, getToolbox, getValues
-
-
-
-
Method Detail
-
configure
protected void configure(org.apache.velocity.tools.generic.ValueParser parser)
- Overrides:
configurein classorg.apache.velocity.tools.generic.ContextTool
-
fillKeyset
protected void fillKeyset(java.util.Set keys)
- Overrides:
fillKeysetin classorg.apache.velocity.tools.generic.ContextTool
-
-