001: /*
002: * $Id: ELMultiboxTagBeanInfo.java 471754 2006-11-06 14:55:09Z husted $
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.ELMultiboxTag</code> class. It is
032: * needed to override the default mapping of custom tag attribute names to
033: * class attribute names. <p> In particular, it provides for the mapping of
034: * the custom tag attribute <code>disabled</code> to the instance variable
035: * <code>disabledExpr</code>. <p> This is because the value of the unevaluated
036: * EL expression has to be kept separately from the evaluated value, which is
037: * stored in the base class. This is related to the fact that the JSP compiler
038: * can choose to reuse different tag instances if they received the same
039: * original attribute values, and the JSP compiler can choose to not re-call
040: * the setter methods, because it can assume the same values are already set.
041: */
042: public class ELMultiboxTagBeanInfo extends SimpleBeanInfo {
043: public PropertyDescriptor[] getPropertyDescriptors() {
044: ArrayList proplist = new ArrayList();
045:
046: try {
047: proplist.add(new PropertyDescriptor("accesskey",
048: ELMultiboxTag.class, null, "setAccesskeyExpr"));
049: } catch (IntrospectionException ex) {
050: }
051:
052: try {
053: proplist.add(new PropertyDescriptor("alt",
054: ELMultiboxTag.class, null, "setAltExpr"));
055: } catch (IntrospectionException ex) {
056: }
057:
058: try {
059: proplist.add(new PropertyDescriptor("altKey",
060: ELMultiboxTag.class, null, "setAltKeyExpr"));
061: } catch (IntrospectionException ex) {
062: }
063:
064: try {
065: proplist.add(new PropertyDescriptor("bundle",
066: ELMultiboxTag.class, null, "setBundleExpr"));
067: } catch (IntrospectionException ex) {
068: }
069:
070: try {
071: proplist.add(new PropertyDescriptor("disabled",
072: ELMultiboxTag.class, null, "setDisabledExpr"));
073: } catch (IntrospectionException ex) {
074: }
075:
076: try {
077: proplist.add(new PropertyDescriptor("errorKey",
078: ELMultiboxTag.class, null, "setErrorKeyExpr"));
079: } catch (IntrospectionException ex) {
080: }
081:
082: try {
083: proplist.add(new PropertyDescriptor("errorStyle",
084: ELMultiboxTag.class, null, "setErrorStyleExpr"));
085: } catch (IntrospectionException ex) {
086: }
087:
088: try {
089: proplist
090: .add(new PropertyDescriptor("errorStyleClass",
091: ELMultiboxTag.class, null,
092: "setErrorStyleClassExpr"));
093: } catch (IntrospectionException ex) {
094: }
095:
096: try {
097: proplist.add(new PropertyDescriptor("errorStyleId",
098: ELMultiboxTag.class, null, "setErrorStyleIdExpr"));
099: } catch (IntrospectionException ex) {
100: }
101:
102: try {
103: proplist.add(new PropertyDescriptor("name",
104: ELMultiboxTag.class, null, "setNameExpr"));
105: } catch (IntrospectionException ex) {
106: }
107:
108: try {
109: proplist.add(new PropertyDescriptor("onblur",
110: ELMultiboxTag.class, null, "setOnblurExpr"));
111: } catch (IntrospectionException ex) {
112: }
113:
114: try {
115: proplist.add(new PropertyDescriptor("onchange",
116: ELMultiboxTag.class, null, "setOnchangeExpr"));
117: } catch (IntrospectionException ex) {
118: }
119:
120: try {
121: proplist.add(new PropertyDescriptor("onclick",
122: ELMultiboxTag.class, null, "setOnclickExpr"));
123: } catch (IntrospectionException ex) {
124: }
125:
126: try {
127: proplist.add(new PropertyDescriptor("ondblclick",
128: ELMultiboxTag.class, null, "setOndblclickExpr"));
129: } catch (IntrospectionException ex) {
130: }
131:
132: try {
133: proplist.add(new PropertyDescriptor("onfocus",
134: ELMultiboxTag.class, null, "setOnfocusExpr"));
135: } catch (IntrospectionException ex) {
136: }
137:
138: try {
139: proplist.add(new PropertyDescriptor("onkeydown",
140: ELMultiboxTag.class, null, "setOnkeydownExpr"));
141: } catch (IntrospectionException ex) {
142: }
143:
144: try {
145: proplist.add(new PropertyDescriptor("onkeypress",
146: ELMultiboxTag.class, null, "setOnkeypressExpr"));
147: } catch (IntrospectionException ex) {
148: }
149:
150: try {
151: proplist.add(new PropertyDescriptor("onkeyup",
152: ELMultiboxTag.class, null, "setOnkeyupExpr"));
153: } catch (IntrospectionException ex) {
154: }
155:
156: try {
157: proplist.add(new PropertyDescriptor("onmousedown",
158: ELMultiboxTag.class, null, "setOnmousedownExpr"));
159: } catch (IntrospectionException ex) {
160: }
161:
162: try {
163: proplist.add(new PropertyDescriptor("onmousemove",
164: ELMultiboxTag.class, null, "setOnmousemoveExpr"));
165: } catch (IntrospectionException ex) {
166: }
167:
168: try {
169: proplist.add(new PropertyDescriptor("onmouseout",
170: ELMultiboxTag.class, null, "setOnmouseoutExpr"));
171: } catch (IntrospectionException ex) {
172: }
173:
174: try {
175: proplist.add(new PropertyDescriptor("onmouseover",
176: ELMultiboxTag.class, null, "setOnmouseoverExpr"));
177: } catch (IntrospectionException ex) {
178: }
179:
180: try {
181: proplist.add(new PropertyDescriptor("onmouseup",
182: ELMultiboxTag.class, null, "setOnmouseupExpr"));
183: } catch (IntrospectionException ex) {
184: }
185:
186: try {
187: proplist.add(new PropertyDescriptor("property",
188: ELMultiboxTag.class, null, "setPropertyExpr"));
189: } catch (IntrospectionException ex) {
190: }
191:
192: try {
193: proplist.add(new PropertyDescriptor("style",
194: ELMultiboxTag.class, null, "setStyleExpr"));
195: } catch (IntrospectionException ex) {
196: }
197:
198: try {
199: proplist.add(new PropertyDescriptor("styleClass",
200: ELMultiboxTag.class, null, "setStyleClassExpr"));
201: } catch (IntrospectionException ex) {
202: }
203:
204: try {
205: proplist.add(new PropertyDescriptor("styleId",
206: ELMultiboxTag.class, null, "setStyleIdExpr"));
207: } catch (IntrospectionException ex) {
208: }
209:
210: try {
211: proplist.add(new PropertyDescriptor("tabindex",
212: ELMultiboxTag.class, null, "setTabindexExpr"));
213: } catch (IntrospectionException ex) {
214: }
215:
216: try {
217: proplist.add(new PropertyDescriptor("title",
218: ELMultiboxTag.class, null, "setTitleExpr"));
219: } catch (IntrospectionException ex) {
220: }
221:
222: try {
223: proplist.add(new PropertyDescriptor("titleKey",
224: ELMultiboxTag.class, null, "setTitleKeyExpr"));
225: } catch (IntrospectionException ex) {
226: }
227:
228: try {
229: proplist.add(new PropertyDescriptor("value",
230: ELMultiboxTag.class, null, "setValueExpr"));
231: } catch (IntrospectionException ex) {
232: }
233:
234: PropertyDescriptor[] result = new PropertyDescriptor[proplist
235: .size()];
236:
237: return ((PropertyDescriptor[]) proplist.toArray(result));
238: }
239: }
|