1 12 package org.displaytag.tags; 13 14 import java.beans.IntrospectionException ; 15 import java.beans.PropertyDescriptor ; 16 import java.beans.SimpleBeanInfo ; 17 import java.util.ArrayList ; 18 import java.util.List ; 19 20 import org.apache.commons.lang.UnhandledException; 21 22 23 29 public class TableTagBeanInfo extends SimpleBeanInfo 30 { 31 32 35 public PropertyDescriptor [] getPropertyDescriptors() 36 { 37 List proplist = new ArrayList (); 38 39 try 40 { 41 proplist.add(new PropertyDescriptor ("cellpadding", TableTag.class, null, "setCellpadding")); proplist.add(new PropertyDescriptor ("cellspacing", TableTag.class, null, "setCellspacing")); proplist.add(new PropertyDescriptor ("class", TableTag.class, null, "setClass")); proplist.add(new PropertyDescriptor ("decorator", TableTag.class, null, "setDecorator")); proplist.add(new PropertyDescriptor ("defaultorder", TableTag.class, null, "setDefaultorder")); proplist.add(new PropertyDescriptor ("defaultsort", TableTag.class, null, "setDefaultsort")); proplist.add(new PropertyDescriptor ("export", TableTag.class, null, "setExport")); proplist.add(new PropertyDescriptor ("frame", TableTag.class, null, "setFrame")); proplist.add(new PropertyDescriptor ("length", TableTag.class, null, "setLength")); proplist.add(new PropertyDescriptor ("offset", TableTag.class, null, "setOffset")); proplist.add(new PropertyDescriptor ("pagesize", TableTag.class, null, "setPagesize")); proplist.add(new PropertyDescriptor ("partialList", TableTag.class, null, "setPartialList")); proplist.add(new PropertyDescriptor ("requestURI", TableTag.class, null, "setRequestURI")); proplist.add(new PropertyDescriptor ("requestURIcontext", TableTag.class, null, "setRequestURIcontext")); proplist.add(new PropertyDescriptor ("rules", TableTag.class, null, "setRules")); proplist.add(new PropertyDescriptor ("sort", TableTag.class, null, "setSort")); proplist.add(new PropertyDescriptor ("style", TableTag.class, null, "setStyle")); proplist.add(new PropertyDescriptor ("summary", TableTag.class, null, "setSummary")); proplist.add(new PropertyDescriptor ("excludedParams", TableTag.class, null, "setExcludedParams")); proplist.add(new PropertyDescriptor ("id", TableTag.class, null, "setUid")); proplist.add(new PropertyDescriptor ("uid", TableTag.class, null, "setUid")); proplist.add(new PropertyDescriptor ("htmlId", TableTag.class, null, "setHtmlId")); proplist.add(new PropertyDescriptor ("varTotals", TableTag.class, null, "setVarTotals")); 88 proplist.add(new PropertyDescriptor ("list", TableTag.class, null, "setList")); 92 proplist.add(new PropertyDescriptor ("className", TableTag.class, null, "setClass")); 96 try 97 { 98 Class.forName("javax.servlet.jsp.tagext.IterationTag"); proplist.add(new PropertyDescriptor ("name", TableTag.class, null, "setName")); proplist.add(new PropertyDescriptor ("size", TableTag.class, null, "setSize")); } 105 catch (ClassNotFoundException e) 106 { 107 proplist.add(new PropertyDescriptor ("name", TableTag.class, null, "setNameString")); proplist.add(new PropertyDescriptor ("size", TableTag.class, null, "setSizeObjectName")); } 113 114 } 115 catch (IntrospectionException ex) 116 { 117 throw new UnhandledException("You got an introspection exception - maybe defining a property that is not" 118 + " defined in the TableTag?: " 119 + ex.getMessage(), ex); 120 } 121 122 PropertyDescriptor [] result = new PropertyDescriptor [proplist.size()]; 123 return ((PropertyDescriptor []) proplist.toArray(result)); 124 } 125 } | Popular Tags |