|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.melati.template.velocity.VelocityTemplateContext
org.melati.template.velocity.VelocityServletTemplateContext
public class VelocityServletTemplateContext
Implements a template context for Melati with Velocity. The Request and Response are placed in the context so that they can be accessed by the Form object.
| Field Summary | |
|---|---|
static java.lang.String |
FORM
Mimicking the $Form behaviour of Webmacro. |
static java.lang.String |
REQUEST
The HTTP request object context key. |
static java.lang.String |
RESPONSE
The HTTP response object context key. |
| Fields inherited from class org.melati.template.velocity.VelocityTemplateContext |
|---|
velContext |
| Constructor Summary | |
|---|---|
VelocityServletTemplateContext(org.apache.velocity.VelocityContext vc)
Constructor. |
|
| Method Summary | |
|---|---|
java.lang.String |
getForm(java.lang.String s)
Get a field from an HTML Form. |
MultipartFormField |
getMultipartForm(java.lang.String s)
Return null, bad smell. |
javax.servlet.http.HttpSession |
getSession()
Get the HttpSession . |
| Methods inherited from class org.melati.template.velocity.VelocityTemplateContext |
|---|
get, getContext, put, setPassbackExceptionHandling, setPropagateExceptionHandling |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.melati.template.TemplateContext |
|---|
get, getContext, put, setPassbackExceptionHandling, setPropagateExceptionHandling |
| Field Detail |
|---|
public static final java.lang.String REQUEST
public static final java.lang.String RESPONSE
public static final java.lang.String FORM
| Constructor Detail |
|---|
public VelocityServletTemplateContext(org.apache.velocity.VelocityContext vc)
vc - context containing RESPONSE and REQUEST| Method Detail |
|---|
public java.lang.String getForm(java.lang.String s)
getForm in interface ServletTemplateContexts - the field's name
ServletTemplateContext.getForm(java.lang.String)public MultipartFormField getMultipartForm(java.lang.String s)
getMultipartForm in interface ServletTemplateContexts - the field's name
ServletTemplateContext.getMultipartForm(java.lang.String)public javax.servlet.http.HttpSession getSession()
HttpSession .
getSession in interface ServletTemplateContextServletTemplateContext.getSession()
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||