1 package net.sf.cantina.tags; 2 3 import net.sf.cantina.util.BeanUtils; 4 5 import javax.servlet.jsp.tagext.TagData; 6 import javax.servlet.jsp.tagext.TagExtraInfo; 7 import javax.servlet.jsp.tagext.VariableInfo; 8 9 /*** 10 * @author Stephane JAIS 11 */ 12 13 public class DefineTei 14 extends TagExtraInfo 15 { 16 public VariableInfo[] getVariableInfo(TagData data) 17 { 18 try 19 { 20 Class returnType = (data.getAttributeString("property") == null 21 || data.getAttributeString("property").equals("")) 22 ? java.lang.String.class 23 : BeanUtils.getPropertyClass(net.sf.cantina.Document.class,data.getAttributeString("property")); 24 return new VariableInfo[]{ 25 new VariableInfo(data.getAttributeString("id"), 26 returnType.getName(), 27 true, 28 VariableInfo.AT_END) 29 }; 30 } catch (Exception e) 31 { 32 return null; 33 } 34 } 35 }