|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectAbstractChainableUberspector
org.apache.velocity.tools.view.WebappUberspector
public class WebappUberspector
This custom uberspector allows getAttribute() and setAttribute() as standard getters and setters for the "request","session" and "application" keys.
It allows VTL statements like:
#set($session.foo = 'youpi') session parameter 'foo' has value: $session.foo
This uberspector requires Velocity 1.6+ ; to use it, you must specify org.apache.velocity.tools.view.WebappUberspector
as the last uberspector to the runtime.introspector.uberspect property in you velocity.properties file.
For instance:
runtime.introspector.uberspect = org.apache.velocity.util.introspection.UberspectImpl,org.apache.velocity.tools.view.WebappUberspector
| Nested Class Summary | |
|---|---|
class |
WebappUberspector.GetAttributeExecutor
Executor for getAttribute(name) method. |
class |
WebappUberspector.SetAttributeExecutor
Executor for setAttribute(name,value) method |
| Constructor Summary | |
|---|---|
WebappUberspector()
|
|
| Method Summary | |
|---|---|
VelPropertyGet |
getPropertyGet(java.lang.Object obj,
java.lang.String identifier,
Info i)
Property getter |
VelPropertySet |
getPropertySet(java.lang.Object obj,
java.lang.String identifier,
java.lang.Object arg,
Info i)
Property setter |
void |
init()
init method |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WebappUberspector()
| Method Detail |
|---|
public VelPropertyGet getPropertyGet(java.lang.Object obj,
java.lang.String identifier,
Info i)
throws java.lang.Exception
obj - identifier - i -
java.lang.Exceptionpublic void init()
public VelPropertySet getPropertySet(java.lang.Object obj,
java.lang.String identifier,
java.lang.Object arg,
Info i)
throws java.lang.Exception
obj - identifier - arg - i -
java.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||