1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.strutsel.taglib.logic;
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.logic.ELRedirectTag</code> class. It is
29 * needed to override the default mapping of custom tag attribute names to
30 * class attribute names. <p> This is because the value of the unevaluated EL
31 * expression has to be kept separately from the evaluated value, which is
32 * stored in the base class. This is related to the fact that the JSP compiler
33 * can choose to reuse different tag instances if they received the same
34 * original attribute values, and the JSP compiler can choose to not re-call
35 * the setter methods, because it can assume the same values are already set.
36 */
37 public class ELRedirectTagBeanInfo extends SimpleBeanInfo {
38 public PropertyDescriptor[] getPropertyDescriptors() {
39 ArrayList proplist = new ArrayList();
40
41 try {
42 proplist.add(new PropertyDescriptor("action", ELRedirectTag.class,
43 null, "setActionExpr"));
44 } catch (IntrospectionException ex) {
45 }
46
47 try {
48 proplist.add(new PropertyDescriptor("anchor", ELRedirectTag.class,
49 null, "setAnchorExpr"));
50 } catch (IntrospectionException ex) {
51 }
52
53 try {
54 proplist.add(new PropertyDescriptor("forward", ELRedirectTag.class,
55 null, "setForwardExpr"));
56 } catch (IntrospectionException ex) {
57 }
58
59 try {
60 proplist.add(new PropertyDescriptor("href", ELRedirectTag.class,
61 null, "setHrefExpr"));
62 } catch (IntrospectionException ex) {
63 }
64
65 try {
66 proplist.add(new PropertyDescriptor("name", ELRedirectTag.class,
67 null, "setNameExpr"));
68 } catch (IntrospectionException ex) {
69 }
70
71 try {
72 proplist.add(new PropertyDescriptor("page", ELRedirectTag.class,
73 null, "setPageExpr"));
74 } catch (IntrospectionException ex) {
75 }
76
77 try {
78 proplist.add(new PropertyDescriptor("paramId", ELRedirectTag.class,
79 null, "setParamIdExpr"));
80 } catch (IntrospectionException ex) {
81 }
82
83 try {
84 proplist.add(new PropertyDescriptor("paramName",
85 ELRedirectTag.class, null, "setParamNameExpr"));
86 } catch (IntrospectionException ex) {
87 }
88
89 try {
90 proplist.add(new PropertyDescriptor("paramProperty",
91 ELRedirectTag.class, null, "setParamPropertyExpr"));
92 } catch (IntrospectionException ex) {
93 }
94
95 try {
96 proplist.add(new PropertyDescriptor("paramScope",
97 ELRedirectTag.class, null, "setParamScopeExpr"));
98 } catch (IntrospectionException ex) {
99 }
100
101 try {
102 proplist.add(new PropertyDescriptor("property",
103 ELRedirectTag.class, null, "setPropertyExpr"));
104 } catch (IntrospectionException ex) {
105 }
106
107 try {
108 proplist.add(new PropertyDescriptor("scope", ELRedirectTag.class,
109 null, "setScopeExpr"));
110 } catch (IntrospectionException ex) {
111 }
112
113 try {
114 proplist.add(new PropertyDescriptor("transaction",
115 ELRedirectTag.class, null, "setTransactionExpr"));
116 } catch (IntrospectionException ex) {
117 }
118
119 try {
120 proplist.add(new PropertyDescriptor("useLocalEncoding",
121 ELRedirectTag.class, null, "setUseLocalEncodingExpr"));
122 } catch (IntrospectionException ex) {
123 }
124
125 PropertyDescriptor[] result = new PropertyDescriptor[proplist.size()];
126
127 return ((PropertyDescriptor[]) proplist.toArray(result));
128 }
129 }