|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.velocity.util.introspection.UberspectImpl
org.apache.velocity.util.introspection.AbstractChainableUberspector
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 |
| Nested classes/interfaces inherited from class org.apache.velocity.util.introspection.UberspectImpl |
|---|
org.apache.velocity.util.introspection.UberspectImpl.VelGetterImpl, org.apache.velocity.util.introspection.UberspectImpl.VelMethodImpl, org.apache.velocity.util.introspection.UberspectImpl.VelSetterImpl |
| Field Summary |
|---|
| Fields inherited from class org.apache.velocity.util.introspection.AbstractChainableUberspector |
|---|
inner |
| Fields inherited from class org.apache.velocity.util.introspection.UberspectImpl |
|---|
introspector, log |
| Constructor Summary | |
|---|---|
WebappUberspector()
|
|
| Method Summary | |
|---|---|
org.apache.velocity.util.introspection.VelPropertyGet |
getPropertyGet(java.lang.Object obj,
java.lang.String identifier,
org.apache.velocity.util.introspection.Info i)
Property getter |
org.apache.velocity.util.introspection.VelPropertySet |
getPropertySet(java.lang.Object obj,
java.lang.String identifier,
java.lang.Object arg,
org.apache.velocity.util.introspection.Info i)
Property setter |
void |
init()
init method |
| Methods inherited from class org.apache.velocity.util.introspection.AbstractChainableUberspector |
|---|
getIterator, getMethod, wrap |
| Methods inherited from class org.apache.velocity.util.introspection.UberspectImpl |
|---|
setLog, setRuntimeLogger |
| 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 org.apache.velocity.util.introspection.VelPropertyGet getPropertyGet(java.lang.Object obj,
java.lang.String identifier,
org.apache.velocity.util.introspection.Info i)
throws java.lang.Exception
getPropertyGet in interface org.apache.velocity.util.introspection.UberspectgetPropertyGet in class org.apache.velocity.util.introspection.AbstractChainableUberspectorobj - identifier - i -
java.lang.Exceptionpublic void init()
init in interface org.apache.velocity.util.introspection.Uberspectinit in class org.apache.velocity.util.introspection.AbstractChainableUberspector
public org.apache.velocity.util.introspection.VelPropertySet getPropertySet(java.lang.Object obj,
java.lang.String identifier,
java.lang.Object arg,
org.apache.velocity.util.introspection.Info i)
throws java.lang.Exception
getPropertySet in interface org.apache.velocity.util.introspection.UberspectgetPropertySet in class org.apache.velocity.util.introspection.AbstractChainableUberspectorobj - identifier - arg - i -
java.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||