sunlabs.brazil.beanshell
Class BeanShellTemplate

java.lang.Object
  extended by sunlabs.brazil.template.Template
      extended by sunlabs.brazil.beanshell.BeanShellServerTemplate
          extended by sunlabs.brazil.beanshell.BeanShellTemplate (view source)
All Implemented Interfaces:
TemplateInterface

public class BeanShellTemplate
extends BeanShellServerTemplate

Template to define new templates in beanshell, and use them later on in the current session (or page). This adds to the capability of the template in the following way:
The variable "tagMap", a Properties object, may be used to associate bsh code with a tag.

      tagMap.put("mytag","do_mytag();");
 
will cause the method do_mytag() to be called in response to: <mytag...>. The variable "rewriteContext" will be available to access the attributes of the tag.


Field Summary
 Properties tagMap
           
 
Fields inherited from class sunlabs.brazil.template.Template
debug
 
Constructor Summary
BeanShellTemplate()
           
 
Method Summary
 void defaultTag(RewriteContext hr)
          if a mapping exists for this tag, run the code
 
Methods inherited from class sunlabs.brazil.beanshell.BeanShellServerTemplate
init, tag_beanshell, tag_bsh, tag_server
 
Methods inherited from class sunlabs.brazil.template.Template
done
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tagMap

public Properties tagMap
Constructor Detail

BeanShellTemplate

public BeanShellTemplate()
Method Detail

defaultTag

public void defaultTag(RewriteContext hr)
if a mapping exists for this tag, run the code


Version Kenai-svn-r24, Generated 08/18/09
Copyright (c) 2001-2009, Sun Microsystems.