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 StrutsTei extends TagExtraInfo { 36 37 38 41 public VariableInfo [] getVariableInfo(TagData data) { 42 43 String type = null; 44 if (data.getAttribute("formBean") != null) 45 type = "org.apache.struts.action.ActionFormBean"; 46 else if (data.getAttribute("forward") != null) 47 type = "org.apache.struts.action.ActionForward"; 48 else if (data.getAttribute("mapping") != null) 49 type = "org.apache.struts.action.ActionMapping"; 50 else 51 type = "java.lang.Object"; 52 53 return new VariableInfo [] { 54 new VariableInfo (data.getAttributeString("id"), 55 type, 56 true, 57 VariableInfo.AT_BEGIN) 58 }; 59 60 } 61 62 63 } 64 | Popular Tags |