1 16 package org.apache.commons.jelly.tags.define; 17 18 import org.apache.commons.jelly.JellyTagException; 19 import org.apache.commons.jelly.MissingAttributeException; 20 import org.apache.commons.jelly.Script; 21 import org.apache.commons.jelly.TagSupport; 22 import org.apache.commons.jelly.XMLOutput; 23 import org.apache.commons.logging.Log; 24 import org.apache.commons.logging.LogFactory; 25 26 34 public class InvokeTag extends TagSupport { 35 36 37 private static final Log log = LogFactory.getLog(InvokeTag.class); 38 39 private Script script; 40 41 42 public InvokeTag() { 43 } 44 45 49 public void setScript(Script script) { 50 this.script = script; 51 } 52 53 public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException { 56 if ( script == null ) { 57 throw new MissingAttributeException("script"); 58 } 59 script.run(context, output); 60 } 61 } 62 | Popular Tags |