001: /*
002: * $Id: ELPasswordTagBeanInfo.java 479635 2006-11-27 14:27:18Z pbenedict $
003: *
004: * Licensed to the Apache Software Foundation (ASF) under one
005: * or more contributor license agreements. See the NOTICE file
006: * distributed with this work for additional information
007: * regarding copyright ownership. The ASF licenses this file
008: * to you under the Apache License, Version 2.0 (the
009: * "License"); you may not use this file except in compliance
010: * with the License. You may obtain a copy of the License at
011: *
012: * http://www.apache.org/licenses/LICENSE-2.0
013: *
014: * Unless required by applicable law or agreed to in writing,
015: * software distributed under the License is distributed on an
016: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017: * KIND, either express or implied. See the License for the
018: * specific language governing permissions and limitations
019: * under the License.
020: */
021: package org.apache.strutsel.taglib.html;
022:
023: import java.beans.IntrospectionException;
024: import java.beans.PropertyDescriptor;
025: import java.beans.SimpleBeanInfo;
026:
027: import java.util.ArrayList;
028:
029: /**
030: * This is the <code>BeanInfo</code> descriptor for the
031: * <code>org.apache.strutsel.taglib.html.ELPasswordTag</code> class. It is
032: * needed to override the default mapping of custom tag attribute names to
033: * class attribute names. <p> This is because the value of the unevaluated EL
034: * expression has to be kept separately from the evaluated value, which is
035: * stored in the base class. This is related to the fact that the JSP compiler
036: * can choose to reuse different tag instances if they received the same
037: * original attribute values, and the JSP compiler can choose to not re-call
038: * the setter methods, because it can assume the same values are already set.
039: */
040: public class ELPasswordTagBeanInfo extends SimpleBeanInfo {
041: public PropertyDescriptor[] getPropertyDescriptors() {
042: ArrayList proplist = new ArrayList();
043:
044: try {
045: proplist.add(new PropertyDescriptor("accesskey",
046: ELPasswordTag.class, null, "setAccesskeyExpr"));
047: } catch (IntrospectionException ex) {
048: }
049:
050: try {
051: proplist.add(new PropertyDescriptor("alt",
052: ELPasswordTag.class, null, "setAltExpr"));
053: } catch (IntrospectionException ex) {
054: }
055:
056: try {
057: proplist.add(new PropertyDescriptor("altKey",
058: ELPasswordTag.class, null, "setAltKeyExpr"));
059: } catch (IntrospectionException ex) {
060: }
061:
062: try {
063: proplist.add(new PropertyDescriptor("bundle",
064: ELPasswordTag.class, null, "setBundleExpr"));
065: } catch (IntrospectionException ex) {
066: }
067:
068: try {
069: proplist.add(new PropertyDescriptor("dir",
070: ELPasswordTag.class, null, "setDirExpr"));
071: } catch (IntrospectionException ex) {
072: }
073:
074: try {
075: proplist.add(new PropertyDescriptor("disabled",
076: ELPasswordTag.class, null, "setDisabledExpr"));
077: } catch (IntrospectionException ex) {
078: }
079:
080: try {
081: proplist.add(new PropertyDescriptor("errorKey",
082: ELPasswordTag.class, null, "setErrorKeyExpr"));
083: } catch (IntrospectionException ex) {
084: }
085:
086: try {
087: proplist.add(new PropertyDescriptor("errorStyle",
088: ELPasswordTag.class, null, "setErrorStyleExpr"));
089: } catch (IntrospectionException ex) {
090: }
091:
092: try {
093: proplist
094: .add(new PropertyDescriptor("errorStyleClass",
095: ELPasswordTag.class, null,
096: "setErrorStyleClassExpr"));
097: } catch (IntrospectionException ex) {
098: }
099:
100: try {
101: proplist.add(new PropertyDescriptor("errorStyleId",
102: ELPasswordTag.class, null, "setErrorStyleIdExpr"));
103: } catch (IntrospectionException ex) {
104: }
105:
106: try {
107: proplist.add(new PropertyDescriptor("indexed",
108: ELPasswordTag.class, null, "setIndexedExpr"));
109: } catch (IntrospectionException ex) {
110: }
111:
112: try {
113: proplist.add(new PropertyDescriptor("lang",
114: ELPasswordTag.class, null, "setLangExpr"));
115: } catch (IntrospectionException ex) {
116: }
117:
118: try {
119: proplist.add(new PropertyDescriptor("maxlength",
120: ELPasswordTag.class, null, "setMaxlengthExpr"));
121: } catch (IntrospectionException ex) {
122: }
123:
124: try {
125: proplist.add(new PropertyDescriptor("name",
126: ELPasswordTag.class, null, "setNameExpr"));
127: } catch (IntrospectionException ex) {
128: }
129:
130: try {
131: proplist.add(new PropertyDescriptor("onblur",
132: ELPasswordTag.class, null, "setOnblurExpr"));
133: } catch (IntrospectionException ex) {
134: }
135:
136: try {
137: proplist.add(new PropertyDescriptor("onchange",
138: ELPasswordTag.class, null, "setOnchangeExpr"));
139: } catch (IntrospectionException ex) {
140: }
141:
142: try {
143: proplist.add(new PropertyDescriptor("onclick",
144: ELPasswordTag.class, null, "setOnclickExpr"));
145: } catch (IntrospectionException ex) {
146: }
147:
148: try {
149: proplist.add(new PropertyDescriptor("ondblclick",
150: ELPasswordTag.class, null, "setOndblclickExpr"));
151: } catch (IntrospectionException ex) {
152: }
153:
154: try {
155: proplist.add(new PropertyDescriptor("onfocus",
156: ELPasswordTag.class, null, "setOnfocusExpr"));
157: } catch (IntrospectionException ex) {
158: }
159:
160: try {
161: proplist.add(new PropertyDescriptor("onkeydown",
162: ELPasswordTag.class, null, "setOnkeydownExpr"));
163: } catch (IntrospectionException ex) {
164: }
165:
166: try {
167: proplist.add(new PropertyDescriptor("onkeypress",
168: ELPasswordTag.class, null, "setOnkeypressExpr"));
169: } catch (IntrospectionException ex) {
170: }
171:
172: try {
173: proplist.add(new PropertyDescriptor("onkeyup",
174: ELPasswordTag.class, null, "setOnkeyupExpr"));
175: } catch (IntrospectionException ex) {
176: }
177:
178: try {
179: proplist.add(new PropertyDescriptor("onmousedown",
180: ELPasswordTag.class, null, "setOnmousedownExpr"));
181: } catch (IntrospectionException ex) {
182: }
183:
184: try {
185: proplist.add(new PropertyDescriptor("onmousemove",
186: ELPasswordTag.class, null, "setOnmousemoveExpr"));
187: } catch (IntrospectionException ex) {
188: }
189:
190: try {
191: proplist.add(new PropertyDescriptor("onmouseout",
192: ELPasswordTag.class, null, "setOnmouseoutExpr"));
193: } catch (IntrospectionException ex) {
194: }
195:
196: try {
197: proplist.add(new PropertyDescriptor("onmouseover",
198: ELPasswordTag.class, null, "setOnmouseoverExpr"));
199: } catch (IntrospectionException ex) {
200: }
201:
202: try {
203: proplist.add(new PropertyDescriptor("onmouseup",
204: ELPasswordTag.class, null, "setOnmouseupExpr"));
205: } catch (IntrospectionException ex) {
206: }
207:
208: try {
209: proplist.add(new PropertyDescriptor("property",
210: ELPasswordTag.class, null, "setPropertyExpr"));
211: } catch (IntrospectionException ex) {
212: }
213:
214: try {
215: proplist.add(new PropertyDescriptor("readonly",
216: ELPasswordTag.class, null, "setReadonlyExpr"));
217: } catch (IntrospectionException ex) {
218: }
219:
220: try {
221: proplist.add(new PropertyDescriptor("redisplay",
222: ELPasswordTag.class, null, "setRedisplayExpr"));
223: } catch (IntrospectionException ex) {
224: }
225:
226: try {
227: proplist.add(new PropertyDescriptor("style",
228: ELPasswordTag.class, null, "setStyleExpr"));
229: } catch (IntrospectionException ex) {
230: }
231:
232: try {
233: proplist.add(new PropertyDescriptor("styleClass",
234: ELPasswordTag.class, null, "setStyleClassExpr"));
235: } catch (IntrospectionException ex) {
236: }
237:
238: try {
239: proplist.add(new PropertyDescriptor("styleId",
240: ELPasswordTag.class, null, "setStyleIdExpr"));
241: } catch (IntrospectionException ex) {
242: }
243:
244: try {
245: proplist.add(new PropertyDescriptor("size",
246: ELPasswordTag.class, null, "setSizeExpr"));
247: } catch (IntrospectionException ex) {
248: }
249:
250: try {
251: proplist.add(new PropertyDescriptor("tabindex",
252: ELPasswordTag.class, null, "setTabindexExpr"));
253: } catch (IntrospectionException ex) {
254: }
255:
256: try {
257: proplist.add(new PropertyDescriptor("title",
258: ELPasswordTag.class, null, "setTitleExpr"));
259: } catch (IntrospectionException ex) {
260: }
261:
262: try {
263: proplist.add(new PropertyDescriptor("titleKey",
264: ELPasswordTag.class, null, "setTitleKeyExpr"));
265: } catch (IntrospectionException ex) {
266: }
267:
268: try {
269: proplist.add(new PropertyDescriptor("value",
270: ELPasswordTag.class, null, "setValueExpr"));
271: } catch (IntrospectionException ex) {
272: }
273:
274: PropertyDescriptor[] result = new PropertyDescriptor[proplist
275: .size()];
276:
277: return ((PropertyDescriptor[]) proplist.toArray(result));
278: }
279: }
|