Class VelocityUtil

java.lang.Object
org.apache.tiles.request.velocity.autotag.VelocityUtil

public final class VelocityUtil extends Object
Utilities for Velocity usage in Tiles.
  • 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

      public static Object getObject(Object value, Object defaultValue)
      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, if value is null.
      Returns:
      The value, defaulted if necessary.