|
1 |
| |
|
2 |
| |
|
3 |
| |
|
4 |
| |
|
5 |
| |
|
6 |
| |
|
7 |
| |
|
8 |
| |
|
9 |
| |
|
10 |
| |
|
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 |
| import org.apache.commons.lang.UnhandledException; |
|
21 |
| |
|
22 |
| |
|
23 |
| |
|
24 |
| |
|
25 |
| |
|
26 |
| |
|
27 |
| |
|
28 |
| |
|
29 |
| |
|
30 |
| public class ELColumnTagBeanInfo extends SimpleBeanInfo |
|
31 |
| { |
|
32 |
| |
|
33 |
| |
|
34 |
| |
|
35 |
| |
|
36 |
1
| public PropertyDescriptor[] getPropertyDescriptors()
|
|
37 |
| { |
|
38 |
1
| List proplist = new ArrayList();
|
|
39 |
| |
|
40 |
1
| try
|
|
41 |
| { |
|
42 |
1
| proplist.add(new PropertyDescriptor("autolink",
|
|
43 |
| ELColumnTag.class, |
|
44 |
| null, |
|
45 |
| "setAutolink")); |
|
46 |
1
| proplist.add(new PropertyDescriptor("escapeXml",
|
|
47 |
| ELColumnTag.class, |
|
48 |
| null, |
|
49 |
| "setEscapeXml")); |
|
50 |
1
| proplist.add(new PropertyDescriptor("class",
|
|
51 |
| ELColumnTag.class, |
|
52 |
| null, |
|
53 |
| "setClass")); |
|
54 |
1
| proplist.add(new PropertyDescriptor("decorator",
|
|
55 |
| ELColumnTag.class, |
|
56 |
| null, |
|
57 |
| "setDecorator")); |
|
58 |
1
| proplist.add(new PropertyDescriptor("group",
|
|
59 |
| ELColumnTag.class, |
|
60 |
| null, |
|
61 |
| "setGroup")); |
|
62 |
1
| proplist.add(new PropertyDescriptor("headerClass",
|
|
63 |
| ELColumnTag.class, |
|
64 |
| null, |
|
65 |
| "setHeaderClass")); |
|
66 |
1
| proplist.add(new PropertyDescriptor("href",
|
|
67 |
| ELColumnTag.class, |
|
68 |
| null, |
|
69 |
| "setHref")); |
|
70 |
1
| proplist.add(new PropertyDescriptor("maxLength",
|
|
71 |
| ELColumnTag.class, |
|
72 |
| null, |
|
73 |
| "setMaxLength")); |
|
74 |
1
| proplist.add(new PropertyDescriptor("maxWords",
|
|
75 |
| ELColumnTag.class, |
|
76 |
| null, |
|
77 |
| "setMaxWords")); |
|
78 |
1
| proplist.add(new PropertyDescriptor("media",
|
|
79 |
| ELColumnTag.class, |
|
80 |
| null, |
|
81 |
| "setMedia")); |
|
82 |
1
| proplist.add(new PropertyDescriptor("nulls",
|
|
83 |
| ELColumnTag.class, |
|
84 |
| null, |
|
85 |
| "setNulls")); |
|
86 |
1
| proplist.add(new PropertyDescriptor("paramId",
|
|
87 |
| ELColumnTag.class, |
|
88 |
| null, |
|
89 |
| "setParamId")); |
|
90 |
1
| proplist.add(new PropertyDescriptor("paramName",
|
|
91 |
| ELColumnTag.class, |
|
92 |
| null, |
|
93 |
| "setParamName")); |
|
94 |
1
| proplist.add(new PropertyDescriptor("paramProperty",
|
|
95 |
| ELColumnTag.class, |
|
96 |
| null, |
|
97 |
| "setParamProperty")); |
|
98 |
1
| proplist.add(new PropertyDescriptor("paramScope",
|
|
99 |
| ELColumnTag.class, |
|
100 |
| null, |
|
101 |
| "setParamScope")); |
|
102 |
1
| proplist.add(new PropertyDescriptor("property",
|
|
103 |
| ELColumnTag.class, |
|
104 |
| null, |
|
105 |
| "setProperty")); |
|
106 |
1
| proplist.add(new PropertyDescriptor("sortable",
|
|
107 |
| ELColumnTag.class, |
|
108 |
| null, |
|
109 |
| "setSortable")); |
|
110 |
1
| proplist.add(new PropertyDescriptor("sortName",
|
|
111 |
| ELColumnTag.class, |
|
112 |
| null, |
|
113 |
| "setSortName")); |
|
114 |
1
| proplist.add(new PropertyDescriptor("style",
|
|
115 |
| ELColumnTag.class, |
|
116 |
| null, |
|
117 |
| "setStyle")); |
|
118 |
1
| proplist.add(new PropertyDescriptor("total",
|
|
119 |
| ELColumnTag.class, |
|
120 |
| null, |
|
121 |
| "setTotal")); |
|
122 |
1
| proplist.add(new PropertyDescriptor("title",
|
|
123 |
| ELColumnTag.class, |
|
124 |
| null, |
|
125 |
| "setTitle")); |
|
126 |
1
| proplist.add(new PropertyDescriptor("titleKey",
|
|
127 |
| ELColumnTag.class, |
|
128 |
| null, |
|
129 |
| "setTitleKey")); |
|
130 |
1
| proplist.add(new PropertyDescriptor("url",
|
|
131 |
| ELColumnTag.class, |
|
132 |
| null, |
|
133 |
| "setUrl")); |
|
134 |
1
| proplist.add(new PropertyDescriptor("sortProperty",
|
|
135 |
| ELColumnTag.class, |
|
136 |
| null, |
|
137 |
| "setSortProperty")); |
|
138 |
1
| proplist.add(new PropertyDescriptor("comparator",
|
|
139 |
| ELColumnTag.class, |
|
140 |
| null, |
|
141 |
| "setComparator")); |
|
142 |
1
| proplist.add(new PropertyDescriptor("defaultorder",
|
|
143 |
| ELColumnTag.class, |
|
144 |
| null, |
|
145 |
| "setDefaultorder")); |
|
146 |
1
| proplist.add(new PropertyDescriptor("headerScope",
|
|
147 |
| ELColumnTag.class, |
|
148 |
| null, |
|
149 |
| "setHeaderScope")); |
|
150 |
1
| proplist.add(new PropertyDescriptor("scope",
|
|
151 |
| ELColumnTag.class, |
|
152 |
| null, |
|
153 |
| "setScope")); |
|
154 |
1
| proplist.add(new PropertyDescriptor("format",
|
|
155 |
| ELColumnTag.class, |
|
156 |
| null, |
|
157 |
| "setFormat")); |
|
158 |
1
| proplist.add(new PropertyDescriptor("value",
|
|
159 |
| ELColumnTag.class, |
|
160 |
| null, |
|
161 |
| "setValue")); |
|
162 |
| |
|
163 |
| } |
|
164 |
| catch (IntrospectionException ex) |
|
165 |
| { |
|
166 |
0
| throw new UnhandledException("You got an introspection exception - maybe defining a property that is not"
|
|
167 |
| + " defined in the bean?: " |
|
168 |
| + ex.getMessage(), ex); |
|
169 |
| } |
|
170 |
| |
|
171 |
1
| PropertyDescriptor[] result = new PropertyDescriptor[proplist.size()];
|
|
172 |
1
| return ((PropertyDescriptor[]) proplist.toArray(result));
|
|
173 |
| } |
|
174 |
| |
|
175 |
| } |