1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.strutsel.taglib.html;
19
20 import java.beans.IntrospectionException;
21 import java.beans.PropertyDescriptor;
22 import java.beans.SimpleBeanInfo;
23
24 import java.util.ArrayList;
25
26 /***
27 * This is the <code>BeanInfo</code> descriptor for the
28 * <code>org.apache.strutsel.taglib.html.ELFileTag</code> class. It is needed
29 * to override the default mapping of custom tag attribute names to class
30 * attribute names. <p> This is because the value of the unevaluated EL
31 * expression has to be kept separately from the evaluated value, which is
32 * stored in the base class. This is related to the fact that the JSP compiler
33 * can choose to reuse different tag instances if they received the same
34 * original attribute values, and the JSP compiler can choose to not re-call
35 * the setter methods, because it can assume the same values are already set.
36 */
37 public class ELFileTagBeanInfo extends SimpleBeanInfo {
38 public PropertyDescriptor[] getPropertyDescriptors() {
39 ArrayList proplist = new ArrayList();
40
41 try {
42 proplist.add(new PropertyDescriptor("accesskey", ELFileTag.class,
43 null, "setAccesskeyExpr"));
44 } catch (IntrospectionException ex) {
45 }
46
47 try {
48 proplist.add(new PropertyDescriptor("accept", ELFileTag.class,
49 null, "setAcceptExpr"));
50 } catch (IntrospectionException ex) {
51 }
52
53 try {
54 proplist.add(new PropertyDescriptor("alt", ELFileTag.class, null,
55 "setAltExpr"));
56 } catch (IntrospectionException ex) {
57 }
58
59 try {
60 proplist.add(new PropertyDescriptor("altKey", ELFileTag.class,
61 null, "setAltKeyExpr"));
62 } catch (IntrospectionException ex) {
63 }
64
65 try {
66 proplist.add(new PropertyDescriptor("bundle", ELFileTag.class,
67 null, "setBundleExpr"));
68 } catch (IntrospectionException ex) {
69 }
70
71 try {
72 proplist.add(new PropertyDescriptor("disabled", ELFileTag.class,
73 null, "setDisabledExpr"));
74 } catch (IntrospectionException ex) {
75 }
76
77 try {
78 proplist.add(new PropertyDescriptor("errorKey", ELFileTag.class,
79 null, "setErrorKeyExpr"));
80 } catch (IntrospectionException ex) {
81 }
82
83 try {
84 proplist.add(new PropertyDescriptor("errorStyle", ELFileTag.class,
85 null, "setErrorStyleExpr"));
86 } catch (IntrospectionException ex) {
87 }
88
89 try {
90 proplist.add(new PropertyDescriptor("errorStyleClass",
91 ELFileTag.class, null, "setErrorStyleClassExpr"));
92 } catch (IntrospectionException ex) {
93 }
94
95 try {
96 proplist.add(new PropertyDescriptor("errorStyleId",
97 ELFileTag.class, null, "setErrorStyleIdExpr"));
98 } catch (IntrospectionException ex) {
99 }
100
101 try {
102 proplist.add(new PropertyDescriptor("indexed", ELFileTag.class,
103 null, "setIndexedExpr"));
104 } catch (IntrospectionException ex) {
105 }
106
107 try {
108 proplist.add(new PropertyDescriptor("maxlength", ELFileTag.class,
109 null, "setMaxlengthExpr"));
110 } catch (IntrospectionException ex) {
111 }
112
113 try {
114 proplist.add(new PropertyDescriptor("name", ELFileTag.class, null,
115 "setNameExpr"));
116 } catch (IntrospectionException ex) {
117 }
118
119 try {
120 proplist.add(new PropertyDescriptor("onblur", ELFileTag.class,
121 null, "setOnblurExpr"));
122 } catch (IntrospectionException ex) {
123 }
124
125 try {
126 proplist.add(new PropertyDescriptor("onchange", ELFileTag.class,
127 null, "setOnchangeExpr"));
128 } catch (IntrospectionException ex) {
129 }
130
131 try {
132 proplist.add(new PropertyDescriptor("onclick", ELFileTag.class,
133 null, "setOnclickExpr"));
134 } catch (IntrospectionException ex) {
135 }
136
137 try {
138 proplist.add(new PropertyDescriptor("ondblclick", ELFileTag.class,
139 null, "setOndblclickExpr"));
140 } catch (IntrospectionException ex) {
141 }
142
143 try {
144 proplist.add(new PropertyDescriptor("onfocus", ELFileTag.class,
145 null, "setOnfocusExpr"));
146 } catch (IntrospectionException ex) {
147 }
148
149 try {
150 proplist.add(new PropertyDescriptor("onkeydown", ELFileTag.class,
151 null, "setOnkeydownExpr"));
152 } catch (IntrospectionException ex) {
153 }
154
155 try {
156 proplist.add(new PropertyDescriptor("onkeypress", ELFileTag.class,
157 null, "setOnkeypressExpr"));
158 } catch (IntrospectionException ex) {
159 }
160
161 try {
162 proplist.add(new PropertyDescriptor("onkeyup", ELFileTag.class,
163 null, "setOnkeyupExpr"));
164 } catch (IntrospectionException ex) {
165 }
166
167 try {
168 proplist.add(new PropertyDescriptor("onmousedown", ELFileTag.class,
169 null, "setOnmousedownExpr"));
170 } catch (IntrospectionException ex) {
171 }
172
173 try {
174 proplist.add(new PropertyDescriptor("onmousemove", ELFileTag.class,
175 null, "setOnmousemoveExpr"));
176 } catch (IntrospectionException ex) {
177 }
178
179 try {
180 proplist.add(new PropertyDescriptor("onmouseout", ELFileTag.class,
181 null, "setOnmouseoutExpr"));
182 } catch (IntrospectionException ex) {
183 }
184
185 try {
186 proplist.add(new PropertyDescriptor("onmouseover", ELFileTag.class,
187 null, "setOnmouseoverExpr"));
188 } catch (IntrospectionException ex) {
189 }
190
191 try {
192 proplist.add(new PropertyDescriptor("onmouseup", ELFileTag.class,
193 null, "setOnmouseupExpr"));
194 } catch (IntrospectionException ex) {
195 }
196
197 try {
198 proplist.add(new PropertyDescriptor("property", ELFileTag.class,
199 null, "setPropertyExpr"));
200 } catch (IntrospectionException ex) {
201 }
202
203 try {
204 proplist.add(new PropertyDescriptor("size", ELFileTag.class, null,
205 "setSizeExpr"));
206 } catch (IntrospectionException ex) {
207 }
208
209 try {
210 proplist.add(new PropertyDescriptor("style", ELFileTag.class, null,
211 "setStyleExpr"));
212 } catch (IntrospectionException ex) {
213 }
214
215 try {
216 proplist.add(new PropertyDescriptor("styleClass", ELFileTag.class,
217 null, "setStyleClassExpr"));
218 } catch (IntrospectionException ex) {
219 }
220
221 try {
222 proplist.add(new PropertyDescriptor("styleId", ELFileTag.class,
223 null, "setStyleIdExpr"));
224 } catch (IntrospectionException ex) {
225 }
226
227 try {
228 proplist.add(new PropertyDescriptor("tabindex", ELFileTag.class,
229 null, "setTabindexExpr"));
230 } catch (IntrospectionException ex) {
231 }
232
233 try {
234 proplist.add(new PropertyDescriptor("title", ELFileTag.class, null,
235 "setTitleExpr"));
236 } catch (IntrospectionException ex) {
237 }
238
239 try {
240 proplist.add(new PropertyDescriptor("titleKey", ELFileTag.class,
241 null, "setTitleKeyExpr"));
242 } catch (IntrospectionException ex) {
243 }
244
245 try {
246 proplist.add(new PropertyDescriptor("value", ELFileTag.class, null,
247 "setValueExpr"));
248 } catch (IntrospectionException ex) {
249 }
250
251 PropertyDescriptor[] result = new PropertyDescriptor[proplist.size()];
252
253 return ((PropertyDescriptor[]) proplist.toArray(result));
254 }
255 }