View Javadoc

1   /*
2    * $Id: ELMessageTagBeanInfo.java 376778 2006-02-10 18:08:07Z husted $
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  package org.apache.strutsel.taglib.bean;
19  
20  import java.beans.IntrospectionException;
21  import java.beans.PropertyDescriptor;
22  import java.beans.SimpleBeanInfo;
23  
24  import java.util.ArrayList;
25  
26  /***
27   * This is the <code>BeanInfo</code> descriptor for the
28   * <code>org.apache.strutsel.taglib.bean.ELMessageTag</code> class.  It is
29   * needed to override the default mapping of custom tag attribute names to
30   * class attribute names.
31   */
32  public class ELMessageTagBeanInfo extends SimpleBeanInfo {
33      public PropertyDescriptor[] getPropertyDescriptors() {
34          ArrayList proplist = new ArrayList();
35  
36          try {
37              proplist.add(new PropertyDescriptor("arg0", ELMessageTag.class,
38                      null, "setArg0Expr"));
39          } catch (IntrospectionException ex) {
40          }
41  
42          try {
43              proplist.add(new PropertyDescriptor("arg1", ELMessageTag.class,
44                      null, "setArg1Expr"));
45          } catch (IntrospectionException ex) {
46          }
47  
48          try {
49              proplist.add(new PropertyDescriptor("arg2", ELMessageTag.class,
50                      null, "setArg2Expr"));
51          } catch (IntrospectionException ex) {
52          }
53  
54          try {
55              proplist.add(new PropertyDescriptor("arg3", ELMessageTag.class,
56                      null, "setArg3Expr"));
57          } catch (IntrospectionException ex) {
58          }
59  
60          try {
61              proplist.add(new PropertyDescriptor("arg4", ELMessageTag.class,
62                      null, "setArg4Expr"));
63          } catch (IntrospectionException ex) {
64          }
65  
66          try {
67              proplist.add(new PropertyDescriptor("bundle", ELMessageTag.class,
68                      null, "setBundleExpr"));
69          } catch (IntrospectionException ex) {
70          }
71  
72          try {
73              proplist.add(new PropertyDescriptor("key", ELMessageTag.class,
74                      null, "setKeyExpr"));
75          } catch (IntrospectionException ex) {
76          }
77  
78          try {
79              proplist.add(new PropertyDescriptor("locale", ELMessageTag.class,
80                      null, "setLocaleExpr"));
81          } catch (IntrospectionException ex) {
82          }
83  
84          try {
85              proplist.add(new PropertyDescriptor("name", ELMessageTag.class,
86                      null, "setNameExpr"));
87          } catch (IntrospectionException ex) {
88          }
89  
90          try {
91              proplist.add(new PropertyDescriptor("property", ELMessageTag.class,
92                      null, "setPropertyExpr"));
93          } catch (IntrospectionException ex) {
94          }
95  
96          try {
97              proplist.add(new PropertyDescriptor("scope", ELMessageTag.class,
98                      null, "setScopeExpr"));
99          } catch (IntrospectionException ex) {
100         }
101 
102         PropertyDescriptor[] result = new PropertyDescriptor[proplist.size()];
103 
104         return ((PropertyDescriptor[]) proplist.toArray(result));
105     }
106 }