1 5 package com.opensymphony.webwork.views.velocity; 6 7 import org.apache.velocity.context.InternalContextAdapter; 8 import org.apache.velocity.exception.MethodInvocationException; 9 import org.apache.velocity.exception.ParseErrorException; 10 import org.apache.velocity.runtime.parser.node.Node; 11 12 import java.util.HashMap ; 13 import java.util.Map ; 14 15 16 24 public class BodyTagDirective extends AbstractTagDirective { 25 public String getName() { 26 return "bodytag"; 27 } 28 29 public int getType() { 30 return BLOCK; 31 } 32 33 44 protected Map createPropertyMap(InternalContextAdapter contextAdapter, Node node) throws ParseErrorException, MethodInvocationException { 45 Map propertyMap = new HashMap (); 46 47 for (int index = 1, length = node.jjtGetNumChildren() - 1; 48 index < length; index++) { 49 this.putProperty(propertyMap, contextAdapter, node.jjtGetChild(index)); 50 } 51 52 return propertyMap; 53 } 54 } 55 | Popular Tags |