2
* $Header: /home/cvs/jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELMultiboxTagBeanInfo.java,v 1.4 2004/03/14 07:15:01 sraeburn Exp $
4
* $Date: 2004/03/14 07:15:01 $
6
* Copyright 1999-2004 The Apache Software Foundation.
8
* Licensed under the Apache License, Version 2.0 (the "License");
9
* you may not use this file except in compliance with the License.
10
* You may obtain a copy of the License at
12
* http://www.apache.org/licenses/LICENSE-2.0
14
* Unless required by applicable law or agreed to in writing, software
15
* distributed under the License is distributed on an "AS IS" BASIS,
16
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
* See the License for the specific language governing permissions and
18
* limitations under the License.
21
package org.apache.strutsel.taglib.html;
23
import java.beans.PropertyDescriptor;
24
import java.beans.IntrospectionException;
25
import java.util.ArrayList;
26
import java.beans.SimpleBeanInfo;
29
* This is the <code>BeanInfo</code> descriptor for the
30
* <code>org.apache.strutsel.taglib.html.ELMultiboxTag</code> class. It is needed
31
* to override the default mapping of custom tag attribute names to class
34
* In particular, it provides for the mapping of the custom tag attribute
35
* <code>disabled</code> to the instance variable <code>disabledExpr</code>.
37
* This is because the value of the unevaluated EL expression has to be kept
38
* separately from the evaluated value, which is stored in the base class. This
39
* is related to the fact that the JSP compiler can choose to reuse different
40
* tag instances if they received the same original attribute values, and the
41
* JSP compiler can choose to not re-call the setter methods, because it can
42
* assume the same values are already set.
44
public class ELMultiboxTagBeanInfo extends SimpleBeanInfo
46
public PropertyDescriptor[] getPropertyDescriptors()
48
ArrayList proplist = new ArrayList();
51
proplist.add(new PropertyDescriptor("accesskey", ELMultiboxTag.class,
52
null, "setAccesskeyExpr"));
53
} catch (IntrospectionException ex) {}
55
proplist.add(new PropertyDescriptor("alt", ELMultiboxTag.class,
57
} catch (IntrospectionException ex) {}
59
proplist.add(new PropertyDescriptor("altKey", ELMultiboxTag.class,
60
null, "setAltKeyExpr"));
61
} catch (IntrospectionException ex) {}
63
proplist.add(new PropertyDescriptor("disabled", ELMultiboxTag.class,
64
null, "setDisabledExpr"));
65
} catch (IntrospectionException ex) {}
67
proplist.add(new PropertyDescriptor("name", ELMultiboxTag.class,
68
null, "setNameExpr"));
69
} catch (IntrospectionException ex) {}
71
proplist.add(new PropertyDescriptor("onblur", ELMultiboxTag.class,
72
null, "setOnblurExpr"));
73
} catch (IntrospectionException ex) {}
75
proplist.add(new PropertyDescriptor("onchange", ELMultiboxTag.class,
76
null, "setOnchangeExpr"));
77
} catch (IntrospectionException ex) {}
79
proplist.add(new PropertyDescriptor("onclick", ELMultiboxTag.class,
80
null, "setOnclickExpr"));
81
} catch (IntrospectionException ex) {}
83
proplist.add(new PropertyDescriptor("ondblclick", ELMultiboxTag.class,
84
null, "setOndblclickExpr"));
85
} catch (IntrospectionException ex) {}
87
proplist.add(new PropertyDescriptor("onfocus", ELMultiboxTag.class,
88
null, "setOnfocusExpr"));
89
} catch (IntrospectionException ex) {}
91
proplist.add(new PropertyDescriptor("onkeydown", ELMultiboxTag.class,
92
null, "setOnkeydownExpr"));
93
} catch (IntrospectionException ex) {}
95
proplist.add(new PropertyDescriptor("onkeypress", ELMultiboxTag.class,
96
null, "setOnkeypressExpr"));
97
} catch (IntrospectionException ex) {}
99
proplist.add(new PropertyDescriptor("onkeyup", ELMultiboxTag.class,
100
null, "setOnkeyupExpr"));
101
} catch (IntrospectionException ex) {}
103
proplist.add(new PropertyDescriptor("onmousedown", ELMultiboxTag.class,
104
null, "setOnmousedownExpr"));
105
} catch (IntrospectionException ex) {}
107
proplist.add(new PropertyDescriptor("onmousemove", ELMultiboxTag.class,
108
null, "setOnmousemoveExpr"));
109
} catch (IntrospectionException ex) {}
111
proplist.add(new PropertyDescriptor("onmouseout", ELMultiboxTag.class,
112
null, "setOnmouseoutExpr"));
113
} catch (IntrospectionException ex) {}
115
proplist.add(new PropertyDescriptor("onmouseover", ELMultiboxTag.class,
116
null, "setOnmouseoverExpr"));
117
} catch (IntrospectionException ex) {}
119
proplist.add(new PropertyDescriptor("onmouseup", ELMultiboxTag.class,
120
null, "setOnmouseupExpr"));
121
} catch (IntrospectionException ex) {}
123
proplist.add(new PropertyDescriptor("property", ELMultiboxTag.class,
124
null, "setPropertyExpr"));
125
} catch (IntrospectionException ex) {}
127
proplist.add(new PropertyDescriptor("style", ELMultiboxTag.class,
128
null, "setStyleExpr"));
129
} catch (IntrospectionException ex) {}
131
proplist.add(new PropertyDescriptor("styleClass", ELMultiboxTag.class,
132
null, "setStyleClassExpr"));
133
} catch (IntrospectionException ex) {}
135
proplist.add(new PropertyDescriptor("styleId", ELMultiboxTag.class,
136
null, "setStyleIdExpr"));
137
} catch (IntrospectionException ex) {}
139
proplist.add(new PropertyDescriptor("tabindex", ELMultiboxTag.class,
140
null, "setTabindexExpr"));
141
} catch (IntrospectionException ex) {}
143
proplist.add(new PropertyDescriptor("title", ELMultiboxTag.class,
144
null, "setTitleExpr"));
145
} catch (IntrospectionException ex) {}
147
proplist.add(new PropertyDescriptor("titleKey", ELMultiboxTag.class,
148
null, "setTitleKeyExpr"));
149
} catch (IntrospectionException ex) {}
151
proplist.add(new PropertyDescriptor("value", ELMultiboxTag.class,
152
null, "setValueExpr"));
153
} catch (IntrospectionException ex) {}
155
PropertyDescriptor[] result =
156
new PropertyDescriptor[proplist.size()];
157
return ((PropertyDescriptor[]) proplist.toArray(result));