1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.myfaces.shared_orchestra.taglib;
20
21 import org.apache.myfaces.shared_orchestra.renderkit.JSFAttr;
22
23 import javax.faces.component.UIComponent;
24 import javax.faces.webapp.UIComponentTag;
25
26
27
28
29
30 public abstract class UIComponentTagBase
31 extends UIComponentTag
32 {
33
34
35
36 private String _forceId;
37 private String _forceIdIndex = "true";
38 private String _javascriptLocation;
39 private String _imageLocation;
40 private String _styleLocation;
41
42
43 private String _value;
44 private String _converter;
45
46
47 public void release() {
48 super.release();
49
50 _forceId=null;
51
52 _forceIdIndex = "true";
53
54 _value=null;
55 _converter=null;
56
57 _javascriptLocation = null;
58 _imageLocation = null;
59 _styleLocation = null;
60 }
61
62 protected void setProperties(UIComponent component)
63 {
64 super.setProperties(component);
65
66 setBooleanProperty(component, org.apache.myfaces.shared_orchestra.renderkit.JSFAttr.FORCE_ID_ATTR, _forceId);
67 setBooleanProperty(component, org.apache.myfaces.shared_orchestra.renderkit.JSFAttr.FORCE_ID_INDEX_ATTR, _forceIdIndex);
68 if (_javascriptLocation != null) setStringProperty(component, JSFAttr.JAVASCRIPT_LOCATION, _javascriptLocation);
69 if (_imageLocation != null) setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.JSFAttr.IMAGE_LOCATION, _imageLocation);
70 if (_styleLocation != null) setStringProperty(component, JSFAttr.STYLE_LOCATION, _styleLocation);
71
72
73
74 setValueProperty(component, _value);
75 setConverterProperty(component, _converter);
76 }
77
78
79
80
81
82
83
84
85 public void setForceId(String aForceId)
86 {
87 _forceId = aForceId;
88 }
89
90
91
92
93
94
95
96 public void setForceIdIndex(String aForceIdIndex)
97 {
98 _forceIdIndex = aForceIdIndex;
99 }
100
101 public void setValue(String value)
102 {
103 _value = value;
104 }
105
106 public void setConverter(String converter)
107 {
108 _converter = converter;
109 }
110
111
112
113
114
115
116
117
118 public void setJavascriptLocation(String aJavascriptLocation)
119 {
120 _javascriptLocation = aJavascriptLocation;
121 }
122
123
124
125
126
127
128
129 public void setImageLocation(String aImageLocation)
130 {
131 _imageLocation = aImageLocation;
132 }
133
134
135
136
137
138
139
140 public void setStyleLocation(String aStyleLocation)
141 {
142 _styleLocation = aStyleLocation;
143 }
144
145
146
147 protected void setIntegerProperty(UIComponent component, String propName, String value)
148 {
149 UIComponentTagUtils.setIntegerProperty(getFacesContext(), component, propName, value);
150 }
151
152 protected void setLongProperty(UIComponent component, String propName, String value)
153 {
154 UIComponentTagUtils.setLongProperty(getFacesContext(), component, propName, value);
155 }
156
157 protected void setStringProperty(UIComponent component, String propName, String value)
158 {
159 UIComponentTagUtils.setStringProperty(getFacesContext(), component, propName, value);
160 }
161
162 protected void setBooleanProperty(UIComponent component, String propName, String value)
163 {
164 UIComponentTagUtils.setBooleanProperty(getFacesContext(), component, propName, value);
165 }
166
167 private void setValueProperty(UIComponent component, String value)
168 {
169 UIComponentTagUtils.setValueProperty(getFacesContext(), component, value);
170 }
171
172 private void setConverterProperty(UIComponent component, String value)
173 {
174 UIComponentTagUtils.setConverterProperty(getFacesContext(), component, value);
175 }
176
177 protected void setValidatorProperty(UIComponent component, String value)
178 {
179 UIComponentTagUtils.setValidatorProperty(getFacesContext(), component, value);
180 }
181
182 protected void setActionProperty(UIComponent component, String action)
183 {
184 UIComponentTagUtils.setActionProperty(getFacesContext(), component, action);
185 }
186
187 protected void setActionListenerProperty(UIComponent component, String actionListener)
188 {
189 UIComponentTagUtils.setActionListenerProperty(getFacesContext(), component, actionListener);
190 }
191
192 protected void setValueChangedListenerProperty(UIComponent component, String valueChangedListener)
193 {
194 UIComponentTagUtils.setValueChangedListenerProperty(getFacesContext(), component, valueChangedListener);
195 }
196
197 protected void setValueBinding(UIComponent component,
198 String propName,
199 String value)
200 {
201 UIComponentTagUtils.setValueBinding(getFacesContext(), component, propName, value);
202 }
203
204
205 }
206