KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > strutsel > taglib > html > ELCancelTagBeanInfo


1 /*
2  * $Id: ELCancelTagBeanInfo.java 123585 2004-12-29 00:43:33Z martinc $
3  *
4  * Copyright 1999-2004 The Apache Software Foundation.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18
19 package org.apache.strutsel.taglib.html;
20
21 import java.beans.PropertyDescriptor JavaDoc;
22 import java.beans.IntrospectionException JavaDoc;
23 import java.util.ArrayList JavaDoc;
24 import java.beans.SimpleBeanInfo JavaDoc;
25
26 /**
27  * This is the <code>BeanInfo</code> descriptor for the
28  * <code>org.apache.strutsel.taglib.html.ELCancelTag</code> class. It is needed
29  * to override the default mapping of custom tag attribute names to class
30  * attribute names.
31  *<p>
32  * In particular, it provides for the mapping of the custom tag attribute
33  * <code>disabled</code> to the instance variable <code>disabledExpr</code>.
34  *<p>
35  * This is because the value of the unevaluated EL expression has to be kept
36  * separately from the evaluated value, which is stored in the base class. This
37  * is related to the fact that the JSP compiler can choose to reuse different
38  * tag instances if they received the same original attribute values, and the
39  * JSP compiler can choose to not re-call the setter methods, because it can
40  * assume the same values are already set.
41  */

42 public class ELCancelTagBeanInfo extends SimpleBeanInfo JavaDoc
43 {
44     public PropertyDescriptor JavaDoc[] getPropertyDescriptors()
45     {
46         ArrayList JavaDoc proplist = new ArrayList JavaDoc();
47
48         try {
49             proplist.add(new PropertyDescriptor JavaDoc("accesskey", ELCancelTag.class,
50                                                 null, "setAccesskeyExpr"));
51         } catch (IntrospectionException JavaDoc ex) {}
52         try {
53             proplist.add(new PropertyDescriptor JavaDoc("alt", ELCancelTag.class,
54                                                 null, "setAltExpr"));
55         } catch (IntrospectionException JavaDoc ex) {}
56         try {
57             proplist.add(new PropertyDescriptor JavaDoc("altKey", ELCancelTag.class,
58                                                 null, "setAltKeyExpr"));
59         } catch (IntrospectionException JavaDoc ex) {}
60         try {
61             proplist.add(new PropertyDescriptor JavaDoc("bundle", ELCancelTag.class,
62                                                 null, "setBundleExpr"));
63         } catch (IntrospectionException JavaDoc ex) {}
64         try {
65             proplist.add(new PropertyDescriptor JavaDoc("disabled", ELCancelTag.class,
66                                                 null, "setDisabledExpr"));
67         } catch (IntrospectionException JavaDoc ex) {}
68         try {
69             proplist.add(new PropertyDescriptor JavaDoc("onblur", ELCancelTag.class,
70                                                 null, "setOnblurExpr"));
71         } catch (IntrospectionException JavaDoc ex) {}
72         try {
73             proplist.add(new PropertyDescriptor JavaDoc("onchange", ELCancelTag.class,
74                                                 null, "setOnchangeExpr"));
75         } catch (IntrospectionException JavaDoc ex) {}
76         try {
77             proplist.add(new PropertyDescriptor JavaDoc("onclick", ELCancelTag.class,
78                                                 null, "setOnclickExpr"));
79         } catch (IntrospectionException JavaDoc ex) {}
80         try {
81             proplist.add(new PropertyDescriptor JavaDoc("ondblclick", ELCancelTag.class,
82                                                 null, "setOndblclickExpr"));
83         } catch (IntrospectionException JavaDoc ex) {}
84         try {
85             proplist.add(new PropertyDescriptor JavaDoc("onfocus", ELCancelTag.class,
86                                                 null, "setOnfocusExpr"));
87         } catch (IntrospectionException JavaDoc ex) {}
88         try {
89             proplist.add(new PropertyDescriptor JavaDoc("onkeydown", ELCancelTag.class,
90                                                 null, "setOnkeydownExpr"));
91         } catch (IntrospectionException JavaDoc ex) {}
92         try {
93             proplist.add(new PropertyDescriptor JavaDoc("onkeypress", ELCancelTag.class,
94                                                 null, "setOnkeypressExpr"));
95         } catch (IntrospectionException JavaDoc ex) {}
96         try {
97             proplist.add(new PropertyDescriptor JavaDoc("onkeyup", ELCancelTag.class,
98                                                 null, "setOnkeyupExpr"));
99         } catch (IntrospectionException JavaDoc ex) {}
100         try {
101             proplist.add(new PropertyDescriptor JavaDoc("onmousedown", ELCancelTag.class,
102                                                 null, "setOnmousedownExpr"));
103         } catch (IntrospectionException JavaDoc ex) {}
104         try {
105             proplist.add(new PropertyDescriptor JavaDoc("onmousemove", ELCancelTag.class,
106                                                 null, "setOnmousemoveExpr"));
107         } catch (IntrospectionException JavaDoc ex) {}
108         try {
109             proplist.add(new PropertyDescriptor JavaDoc("onmouseout", ELCancelTag.class,
110                                                 null, "setOnmouseoutExpr"));
111         } catch (IntrospectionException JavaDoc ex) {}
112         try {
113             proplist.add(new PropertyDescriptor JavaDoc("onmouseover", ELCancelTag.class,
114                                                 null, "setOnmouseoverExpr"));
115         } catch (IntrospectionException JavaDoc ex) {}
116         try {
117             proplist.add(new PropertyDescriptor JavaDoc("onmouseup", ELCancelTag.class,
118                                                 null, "setOnmouseupExpr"));
119         } catch (IntrospectionException JavaDoc ex) {}
120         try {
121             proplist.add(new PropertyDescriptor JavaDoc("property", ELCancelTag.class,
122                                                 null, "setPropertyExpr"));
123         } catch (IntrospectionException JavaDoc ex) {}
124         try {
125             proplist.add(new PropertyDescriptor JavaDoc("style", ELCancelTag.class,
126                                                 null, "setStyleExpr"));
127         } catch (IntrospectionException JavaDoc ex) {}
128         try {
129             proplist.add(new PropertyDescriptor JavaDoc("styleClass", ELCancelTag.class,
130                                                 null, "setStyleClassExpr"));
131         } catch (IntrospectionException JavaDoc ex) {}
132         try {
133             proplist.add(new PropertyDescriptor JavaDoc("styleId", ELCancelTag.class,
134                                                 null, "setStyleIdExpr"));
135         } catch (IntrospectionException JavaDoc ex) {}
136         try {
137             proplist.add(new PropertyDescriptor JavaDoc("tabindex", ELCancelTag.class,
138                                                 null, "setTabindexExpr"));
139         } catch (IntrospectionException JavaDoc ex) {}
140         try {
141             proplist.add(new PropertyDescriptor JavaDoc("title", ELCancelTag.class,
142                                                 null, "setTitleExpr"));
143         } catch (IntrospectionException JavaDoc ex) {}
144         try {
145             proplist.add(new PropertyDescriptor JavaDoc("titleKey", ELCancelTag.class,
146                                                 null, "setTitleKeyExpr"));
147         } catch (IntrospectionException JavaDoc ex) {}
148         try {
149             proplist.add(new PropertyDescriptor JavaDoc("value", ELCancelTag.class,
150                                                 null, "setValueExpr"));
151         } catch (IntrospectionException JavaDoc ex) {}
152         
153         PropertyDescriptor JavaDoc[] result =
154             new PropertyDescriptor JavaDoc[proplist.size()];
155         return ((PropertyDescriptor JavaDoc[]) proplist.toArray(result));
156     }
157 }
158
Popular Tags