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 28 public class CaptionTagBeanInfo extends SimpleBeanInfo 29 { 30 31 34 public PropertyDescriptor [] getPropertyDescriptors() 35 { 36 List proplist = new ArrayList (); 37 38 try 39 { 40 proplist.add(new PropertyDescriptor ("class", CaptionTag.class, null, "setClass")); proplist.add(new PropertyDescriptor ("dir", CaptionTag.class, null, "setDir")); proplist.add(new PropertyDescriptor ("id", CaptionTag.class, null, "setId")); proplist.add(new PropertyDescriptor ("lang", CaptionTag.class, null, "setLang")); proplist.add(new PropertyDescriptor ("media", CaptionTag.class, null, "setMedia")); proplist.add(new PropertyDescriptor ("style", CaptionTag.class, null, "setStyle")); proplist.add(new PropertyDescriptor ("title", CaptionTag.class, null, "setTitle")); 55 proplist.add(new PropertyDescriptor ("className", CaptionTag.class, null, "setClass")); } 61 catch (IntrospectionException ex) 62 { 63 throw new UnhandledException("You got an introspection exception - maybe defining a property that is not" 64 + " defined in the CaptionTag?: " 65 + ex.getMessage(), ex); 66 } 67 68 PropertyDescriptor [] result = new PropertyDescriptor [proplist.size()]; 69 return ((PropertyDescriptor []) proplist.toArray(result)); 70 } 71 72 } | Popular Tags |