Class VelocityUtil
java.lang.Object
org.apache.tiles.request.velocity.autotag.VelocityUtil
Utilities for Velocity usage in Tiles.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectReturns the "value" parameter if it is not null, otherwise returns "defaultValue".getParameters(org.apache.velocity.context.InternalContextAdapter context, org.apache.velocity.runtime.parser.node.Node node) Extracts the parameters from the directives, by getting the child at position 0 supposing it is a map.
-
Method Details
-
getParameters
public static Map<String,Object> getParameters(org.apache.velocity.context.InternalContextAdapter context, org.apache.velocity.runtime.parser.node.Node node) Extracts the parameters from the directives, by getting the child at position 0 supposing it is a map.- Parameters:
context- The Velocity context.node- The node to use.- Returns:
- The extracted parameters.
-
getObject
Returns the "value" parameter if it is not null, otherwise returns "defaultValue".- Parameters:
value- The value to return, if it is not null.defaultValue- The value to return, ifvalueis null.- Returns:
- The value, defaulted if necessary.
-