~ubuntu-branches/ubuntu/trusty/libstruts1.2-java/trusty-proposed

« back to all changes in this revision

Viewing changes to contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELMultiboxTagBeanInfo.java

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Vandyck
  • Date: 2004-11-19 15:35:25 UTC
  • Revision ID: james.westby@ubuntu.com-20041119153525-mdu08a76z4zo67xt
Tags: upstream-1.2.4
ImportĀ upstreamĀ versionĀ 1.2.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
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 $
 
3
 * $Revision: 1.4 $
 
4
 * $Date: 2004/03/14 07:15:01 $
 
5
 *
 
6
 * Copyright 1999-2004 The Apache Software Foundation.
 
7
 * 
 
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
 
11
 * 
 
12
 *      http://www.apache.org/licenses/LICENSE-2.0
 
13
 * 
 
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.
 
19
 */
 
20
 
 
21
package org.apache.strutsel.taglib.html;
 
22
 
 
23
import java.beans.PropertyDescriptor;
 
24
import java.beans.IntrospectionException;
 
25
import java.util.ArrayList;
 
26
import java.beans.SimpleBeanInfo;
 
27
 
 
28
/**
 
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
 
32
 * attribute names.
 
33
 *<p>
 
34
 * In particular, it provides for the mapping of the custom tag attribute
 
35
 * <code>disabled</code> to the instance variable <code>disabledExpr</code>.
 
36
 *<p>
 
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.
 
43
 */
 
44
public class ELMultiboxTagBeanInfo extends SimpleBeanInfo
 
45
{
 
46
    public  PropertyDescriptor[] getPropertyDescriptors()
 
47
    {
 
48
        ArrayList proplist = new ArrayList();
 
49
 
 
50
        try {
 
51
            proplist.add(new PropertyDescriptor("accesskey", ELMultiboxTag.class,
 
52
                                                null, "setAccesskeyExpr"));
 
53
        } catch (IntrospectionException ex) {}
 
54
        try {
 
55
            proplist.add(new PropertyDescriptor("alt", ELMultiboxTag.class,
 
56
                                                null, "setAltExpr"));
 
57
        } catch (IntrospectionException ex) {}
 
58
        try {
 
59
            proplist.add(new PropertyDescriptor("altKey", ELMultiboxTag.class,
 
60
                                                null, "setAltKeyExpr"));
 
61
        } catch (IntrospectionException ex) {}
 
62
        try {
 
63
            proplist.add(new PropertyDescriptor("disabled", ELMultiboxTag.class,
 
64
                                                null, "setDisabledExpr"));
 
65
        } catch (IntrospectionException ex) {}
 
66
        try {
 
67
            proplist.add(new PropertyDescriptor("name", ELMultiboxTag.class,
 
68
                                                null, "setNameExpr"));
 
69
        } catch (IntrospectionException ex) {}
 
70
        try {
 
71
            proplist.add(new PropertyDescriptor("onblur", ELMultiboxTag.class,
 
72
                                                null, "setOnblurExpr"));
 
73
        } catch (IntrospectionException ex) {}
 
74
        try {
 
75
            proplist.add(new PropertyDescriptor("onchange", ELMultiboxTag.class,
 
76
                                                null, "setOnchangeExpr"));
 
77
        } catch (IntrospectionException ex) {}
 
78
        try {
 
79
            proplist.add(new PropertyDescriptor("onclick", ELMultiboxTag.class,
 
80
                                                null, "setOnclickExpr"));
 
81
        } catch (IntrospectionException ex) {}
 
82
        try {
 
83
            proplist.add(new PropertyDescriptor("ondblclick", ELMultiboxTag.class,
 
84
                                                null, "setOndblclickExpr"));
 
85
        } catch (IntrospectionException ex) {}
 
86
        try {
 
87
            proplist.add(new PropertyDescriptor("onfocus", ELMultiboxTag.class,
 
88
                                                null, "setOnfocusExpr"));
 
89
        } catch (IntrospectionException ex) {}
 
90
        try {
 
91
            proplist.add(new PropertyDescriptor("onkeydown", ELMultiboxTag.class,
 
92
                                                null, "setOnkeydownExpr"));
 
93
        } catch (IntrospectionException ex) {}
 
94
        try {
 
95
            proplist.add(new PropertyDescriptor("onkeypress", ELMultiboxTag.class,
 
96
                                                null, "setOnkeypressExpr"));
 
97
        } catch (IntrospectionException ex) {}
 
98
        try {
 
99
            proplist.add(new PropertyDescriptor("onkeyup", ELMultiboxTag.class,
 
100
                                                null, "setOnkeyupExpr"));
 
101
        } catch (IntrospectionException ex) {}
 
102
        try {
 
103
            proplist.add(new PropertyDescriptor("onmousedown", ELMultiboxTag.class,
 
104
                                                null, "setOnmousedownExpr"));
 
105
        } catch (IntrospectionException ex) {}
 
106
        try {
 
107
            proplist.add(new PropertyDescriptor("onmousemove", ELMultiboxTag.class,
 
108
                                                null, "setOnmousemoveExpr"));
 
109
        } catch (IntrospectionException ex) {}
 
110
        try {
 
111
            proplist.add(new PropertyDescriptor("onmouseout", ELMultiboxTag.class,
 
112
                                                null, "setOnmouseoutExpr"));
 
113
        } catch (IntrospectionException ex) {}
 
114
        try {
 
115
            proplist.add(new PropertyDescriptor("onmouseover", ELMultiboxTag.class,
 
116
                                                null, "setOnmouseoverExpr"));
 
117
        } catch (IntrospectionException ex) {}
 
118
        try {
 
119
            proplist.add(new PropertyDescriptor("onmouseup", ELMultiboxTag.class,
 
120
                                                null, "setOnmouseupExpr"));
 
121
        } catch (IntrospectionException ex) {}
 
122
        try {
 
123
            proplist.add(new PropertyDescriptor("property", ELMultiboxTag.class,
 
124
                                                null, "setPropertyExpr"));
 
125
        } catch (IntrospectionException ex) {}
 
126
        try {
 
127
            proplist.add(new PropertyDescriptor("style", ELMultiboxTag.class,
 
128
                                                null, "setStyleExpr"));
 
129
        } catch (IntrospectionException ex) {}
 
130
        try {
 
131
            proplist.add(new PropertyDescriptor("styleClass", ELMultiboxTag.class,
 
132
                                                null, "setStyleClassExpr"));
 
133
        } catch (IntrospectionException ex) {}
 
134
        try {
 
135
            proplist.add(new PropertyDescriptor("styleId", ELMultiboxTag.class,
 
136
                                                null, "setStyleIdExpr"));
 
137
        } catch (IntrospectionException ex) {}
 
138
        try {
 
139
            proplist.add(new PropertyDescriptor("tabindex", ELMultiboxTag.class,
 
140
                                                null, "setTabindexExpr"));
 
141
        } catch (IntrospectionException ex) {}
 
142
        try {
 
143
            proplist.add(new PropertyDescriptor("title", ELMultiboxTag.class,
 
144
                                                null, "setTitleExpr"));
 
145
        } catch (IntrospectionException ex) {}
 
146
        try {
 
147
            proplist.add(new PropertyDescriptor("titleKey", ELMultiboxTag.class,
 
148
                                                null, "setTitleKeyExpr"));
 
149
        } catch (IntrospectionException ex) {}
 
150
        try {
 
151
            proplist.add(new PropertyDescriptor("value", ELMultiboxTag.class,
 
152
                                                null, "setValueExpr"));
 
153
        } catch (IntrospectionException ex) {}
 
154
        
 
155
        PropertyDescriptor[] result =
 
156
            new PropertyDescriptor[proplist.size()];
 
157
        return ((PropertyDescriptor[]) proplist.toArray(result));
 
158
    }
 
159
}