com.opensymphony.webwork.views.velocity
Class ParamDirective

java.lang.Object
  extended byorg.apache.velocity.runtime.directive.Directive
      extended bycom.opensymphony.webwork.views.velocity.ParamDirective
All Implemented Interfaces:
Cloneable, org.apache.velocity.runtime.directive.DirectiveConstants

public class ParamDirective
extends org.apache.velocity.runtime.directive.Directive

The ParamDirective allows for additional parameters to be passed in to a given tag before the tag is rendered. By default these parameters are not evaluated through the value stack. However, the user can specify using a third parameter that they are evaluated.

For example:

      #param( hello $world ) - adds the velocity resolved value of world to the tag
      #param( hello world true) - adds the ognl resolved value of world to the tag
      #param( hello world false) - adds the string world to the tag
 

Version:
$Id: ParamDirective.java,v 1.14 2004/10/02 05:40:09 jcarreira Exp $
Author:
Matt Ho <matt@enginegreen.com>

Field Summary
 
Fields inherited from class org.apache.velocity.runtime.directive.Directive
rsvc
 
Fields inherited from interface org.apache.velocity.runtime.directive.DirectiveConstants
BLOCK, LINE
 
Constructor Summary
ParamDirective()
           
 
Method Summary
 String getName()
           
 int getType()
           
 boolean render(org.apache.velocity.context.InternalContextAdapter contextAdapter, Writer writer, org.apache.velocity.runtime.parser.node.Node node)
           
 
Methods inherited from class org.apache.velocity.runtime.directive.Directive
getColumn, getLine, init, setLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParamDirective

public ParamDirective()
Method Detail

getName

public String getName()

getType

public int getType()

render

public boolean render(org.apache.velocity.context.InternalContextAdapter contextAdapter,
                      Writer writer,
                      org.apache.velocity.runtime.parser.node.Node node)
               throws IOException,
                      org.apache.velocity.exception.ResourceNotFoundException,
                      org.apache.velocity.exception.ParseErrorException,
                      org.apache.velocity.exception.MethodInvocationException
Parameters:
contextAdapter -
writer -
node -
Throws:
IOException
org.apache.velocity.exception.ResourceNotFoundException
org.apache.velocity.exception.ParseErrorException
org.apache.velocity.exception.MethodInvocationException

WebWork Project Page