001: /*
002: * $Id: ELFormTagBeanInfo.java 479637 2006-11-27 14:35:06Z pbenedict $
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.ELFormTag</code> class. It is needed
032: * to override the default mapping of custom tag attribute names to class
033: * attribute names.
034: */
035: public class ELFormTagBeanInfo extends SimpleBeanInfo {
036: public PropertyDescriptor[] getPropertyDescriptors() {
037: ArrayList proplist = new ArrayList();
038:
039: try {
040: proplist.add(new PropertyDescriptor("action",
041: ELFormTag.class, null, "setActionExpr"));
042: } catch (IntrospectionException ex) {
043: }
044:
045: try {
046: proplist.add(new PropertyDescriptor("dir", ELFormTag.class,
047: null, "setDirExpr"));
048: } catch (IntrospectionException ex) {
049: }
050:
051: try {
052: proplist.add(new PropertyDescriptor("disabled",
053: ELFormTag.class, null, "setDisabledExpr"));
054: } catch (IntrospectionException ex) {
055: }
056:
057: try {
058: proplist.add(new PropertyDescriptor("enctype",
059: ELFormTag.class, null, "setEnctypeExpr"));
060: } catch (IntrospectionException ex) {
061: }
062:
063: try {
064: proplist.add(new PropertyDescriptor("focus",
065: ELFormTag.class, null, "setFocusExpr"));
066: } catch (IntrospectionException ex) {
067: }
068:
069: try {
070: proplist.add(new PropertyDescriptor("focusIndex",
071: ELFormTag.class, null, "setFocusIndexExpr"));
072: } catch (IntrospectionException ex) {
073: }
074:
075: try {
076: proplist.add(new PropertyDescriptor("lang",
077: ELFormTag.class, null, "setLangExpr"));
078: } catch (IntrospectionException ex) {
079: }
080:
081: try {
082: proplist.add(new PropertyDescriptor("method",
083: ELFormTag.class, null, "setMethodExpr"));
084: } catch (IntrospectionException ex) {
085: }
086:
087: try {
088: proplist.add(new PropertyDescriptor("name",
089: ELFormTag.class, null, "setNameExpr"));
090: } catch (IntrospectionException ex) {
091: }
092:
093: try {
094: proplist.add(new PropertyDescriptor("onreset",
095: ELFormTag.class, null, "setOnresetExpr"));
096: } catch (IntrospectionException ex) {
097: }
098:
099: try {
100: proplist.add(new PropertyDescriptor("onsubmit",
101: ELFormTag.class, null, "setOnsubmitExpr"));
102: } catch (IntrospectionException ex) {
103: }
104:
105: try {
106: proplist.add(new PropertyDescriptor("readonly",
107: ELFormTag.class, null, "setReadonlyExpr"));
108: } catch (IntrospectionException ex) {
109: }
110:
111: try {
112: proplist.add(new PropertyDescriptor("scope",
113: ELFormTag.class, null, "setScopeExpr"));
114: } catch (IntrospectionException ex) {
115: }
116:
117: try {
118: proplist.add(new PropertyDescriptor("scriptLanguage",
119: ELFormTag.class, null, "setScriptLanguageExpr"));
120: } catch (IntrospectionException ex) {
121: }
122:
123: try {
124: proplist.add(new PropertyDescriptor("style",
125: ELFormTag.class, null, "setStyleExpr"));
126: } catch (IntrospectionException ex) {
127: }
128:
129: try {
130: proplist.add(new PropertyDescriptor("styleClass",
131: ELFormTag.class, null, "setStyleClassExpr"));
132: } catch (IntrospectionException ex) {
133: }
134:
135: try {
136: proplist.add(new PropertyDescriptor("styleId",
137: ELFormTag.class, null, "setStyleIdExpr"));
138: } catch (IntrospectionException ex) {
139: }
140:
141: try {
142: proplist.add(new PropertyDescriptor("target",
143: ELFormTag.class, null, "setTargetExpr"));
144: } catch (IntrospectionException ex) {
145: }
146:
147: try {
148: proplist.add(new PropertyDescriptor("type",
149: ELFormTag.class, null, "setTypeExpr"));
150: } catch (IntrospectionException ex) {
151: }
152:
153: try {
154: proplist.add(new PropertyDescriptor("acceptCharset",
155: ELFormTag.class, null, "setAcceptCharsetExpr"));
156: } catch (IntrospectionException ex) {
157: }
158:
159: PropertyDescriptor[] result = new PropertyDescriptor[proplist
160: .size()];
161:
162: return ((PropertyDescriptor[]) proplist.toArray(result));
163: }
164: }
|