1 /***
2 * Licensed under the Artistic License; you may not use this file
3 * except in compliance with the License.
4 * You may obtain a copy of the License at
5 *
6 * http://displaytag.sourceforge.net/license.html
7 *
8 * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
9 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
10 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11 */
12 package org.displaytag.tags.el;
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
21 /***
22 * BeanInfo descriptor for the <code>ELCaptionTag</code> class. Unevaluated EL expression has to be kept separately
23 * from the evaluated value, since the JSP compiler can choose to reuse different tag instances if they received the
24 * same original attribute values, and the JSP compiler can choose to not re-call the setter methods.
25 * @author Fabrizio Giustina
26 * @version $Revision: 1.3 $ ($Author: fgiust $)
27 */
28 public class ELCaptionTagBeanInfo extends SimpleBeanInfo
29 {
30
31 /***
32 * @see java.beans.BeanInfo#getPropertyDescriptors()
33 */
34 public PropertyDescriptor[] getPropertyDescriptors()
35 {
36 List proplist = new ArrayList();
37
38 try
39 {
40 proplist.add(new PropertyDescriptor("class",
41 ELCaptionTag.class, null, "setClass"));
42 proplist.add(new PropertyDescriptor("dir",
43 ELCaptionTag.class, null, "setDir"));
44 proplist.add(new PropertyDescriptor("id",
45 ELCaptionTag.class, null, "setId"));
46 proplist.add(new PropertyDescriptor("lang",
47 ELCaptionTag.class, null, "setLang"));
48 proplist.add(new PropertyDescriptor("style",
49 ELCaptionTag.class, null, "setStyle"));
50 proplist.add(new PropertyDescriptor("title",
51 ELCaptionTag.class, null, "setTitle"));
52 }
53 catch (IntrospectionException ex)
54 {
55
56 }
57
58 PropertyDescriptor[] result = new PropertyDescriptor[proplist.size()];
59 return ((PropertyDescriptor[]) proplist.toArray(result));
60 }
61
62 }