1 16 package org.apache.commons.jelly.tags.define; 17 18 import org.apache.commons.jelly.JellyTagException; 19 import org.apache.commons.jelly.TagSupport; 20 import org.apache.commons.jelly.XMLOutput; 21 22 30 public class ScriptTag extends TagSupport { 31 32 private String var; 33 34 public ScriptTag() { 35 } 36 37 public void doTag(XMLOutput output) throws JellyTagException { 40 if ( var == null ) { 41 throw new JellyTagException( "<define:script> must have a var attribute" ); 42 } 43 context.setVariable( var, getBody() ); 44 } 45 46 49 50 public String getVar() { 51 return var; 52 } 53 54 55 public void setVar(String var) { 56 this.var = var; 57 } 58 } 59 | Popular Tags |