1 16 17 package org.apache.taglibs.jndi; 18 19 import javax.servlet.jsp.tagext.*; 20 21 26 public class LookupTEI extends TagExtraInfo { 27 28 29 public LookupTEI() { 30 } 31 32 public VariableInfo[] getVariableInfo(TagData data) { 33 String clazz = data.getAttributeString("type"); 34 if (clazz == null) { 35 clazz = "java.lang.Object"; 36 } 37 return new VariableInfo[] { 38 new VariableInfo(data.getId(), clazz, true, VariableInfo.AT_END)}; 39 } 40 41 public boolean isValid(TagData data) { 42 if (data.getId() == null) { 43 return false; 44 } 45 if ( 46 (data.getAttribute("context") == null) 47 && (data.getAttribute("contextRef") == null)) { 48 return false; 49 } 50 return true; 52 } 53 54 } 55 | Popular Tags |