1 18 19 20 package org.apache.struts.taglib.bean; 21 22 23 import javax.servlet.jsp.tagext.TagData ; 24 import javax.servlet.jsp.tagext.TagExtraInfo ; 25 import javax.servlet.jsp.tagext.VariableInfo ; 26 27 28 34 35 public class DefineTei extends TagExtraInfo { 36 37 38 41 public VariableInfo [] getVariableInfo(TagData data) { 42 43 String type = (String )data.getAttribute("type"); 44 Object name = data.getAttribute("name"); 45 Object value = data.getAttribute("value"); 46 if (type == null) { 47 if ( (value!=null) || (name==null) ) 48 type = "java.lang.String"; 49 else 50 type = "java.lang.Object"; 51 } 52 53 return new VariableInfo [] { 54 new VariableInfo (data.getAttributeString("id"), 55 type, 56 true, 57 VariableInfo.AT_END ) 58 }; 59 60 } 61 62 63 } 64 | Popular Tags |