1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.apache.myfaces.tobago.component;
21
22 import javax.faces.context.FacesContext;
23 import org.apache.myfaces.tobago.context.Markup;
24 import org.apache.myfaces.tobago.internal.component.AbstractUITextarea;
25 import org.apache.myfaces.tobago.renderkit.css.CustomClass;
26 import org.apache.myfaces.tobago.sanitizer.SanitizeMode;
27 import org.apache.myfaces.tobago.internal.util.ArrayUtils;
28 import org.apache.myfaces.tobago.internal.util.StringUtils;
29 import org.apache.myfaces.tobago.internal.util.Deprecation;
30 import org.apache.myfaces.tobago.component.Tags;
31 import javax.annotation.Generated;
32 import javax.el.ELException;
33 import javax.faces.FacesException;
34 import java.util.Arrays;
35 import java.util.ArrayList;
36 import java.util.Collection;
37 import java.util.List;
38 import javax.el.MethodExpression;
39 import javax.el.ValueExpression;
40
41
42
43
44
45
46 @Generated("component.stg")
47 public class UITextarea
48 extends AbstractUITextarea {
49
50 public static final String COMPONENT_TYPE = Tags.textarea.componentType();
51
52 public static final String COMPONENT_FAMILY = "javax.faces.Input";
53
54 private static final Collection<String> EVENT_NAMES = Arrays.asList("change", "click", "dblclick", "focus", "blur");
55
56 @Override
57 public Collection<String> getEventNames() {
58 return EVENT_NAMES;
59 }
60
61 @Override
62 public String getDefaultEventName() {
63 return "change";
64 }
65
66
67 enum PropertyKeys {
68 markup,
69 labelLayout,
70 focus,
71 tabIndex,
72 label,
73 rows,
74 help,
75 readonly,
76 accessKey,
77 customClass,
78 disabled,
79 tip,
80 placeholder,
81 sanitize,
82 }
83
84 public String getFamily() {
85 return COMPONENT_FAMILY;
86 }
87
88
89 public org.apache.myfaces.tobago.context.Markup getMarkup() {
90 Object object = getStateHelper().eval(PropertyKeys.markup);
91 if (object != null) {
92 return Markup.valueOf(object);
93 }
94 return null;
95 }
96
97 public void setMarkup(org.apache.myfaces.tobago.context.Markup markup) {
98 getStateHelper().put(PropertyKeys.markup, markup);
99 }
100
101
102
103
104
105
106
107
108 public org.apache.myfaces.tobago.component.LabelLayout getLabelLayout() {
109 org.apache.myfaces.tobago.component.LabelLayout labelLayout = (org.apache.myfaces.tobago.component.LabelLayout) getStateHelper().eval(PropertyKeys.labelLayout);
110 if (labelLayout != null) {
111 return labelLayout;
112 }
113 return getLabel() != null ? org.apache.myfaces.tobago.component.LabelLayout.flexLeft : org.apache.myfaces.tobago.component.LabelLayout.none;
114 }
115
116 public void setLabelLayout(org.apache.myfaces.tobago.component.LabelLayout labelLayout) {
117 getStateHelper().put(PropertyKeys.labelLayout, labelLayout);
118 }
119
120
121
122
123
124 public boolean isFocus() {
125 Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.focus);
126 if (bool != null) {
127 return bool;
128 }
129 return false;
130 }
131
132 public void setFocus(boolean focus) {
133 getStateHelper().put(PropertyKeys.focus, focus);
134 }
135
136
137
138
139
140
141
142
143
144
145
146
147 public java.lang.Integer getTabIndex() {
148 Number value = (Number) getStateHelper().eval(PropertyKeys.tabIndex);
149 if (value != null) {
150 return value.intValue();
151 }
152 return null;
153 }
154
155 public void setTabIndex(java.lang.Integer tabIndex) {
156 getStateHelper().put(PropertyKeys.tabIndex, tabIndex);
157 }
158
159
160
161
162
163 public java.lang.String getLabel() {
164 return (java.lang.String) getStateHelper().eval(PropertyKeys.label);
165 }
166
167 public void setLabel(java.lang.String label) {
168 getStateHelper().put(PropertyKeys.label, label);
169 }
170
171
172
173
174
175 public java.lang.Integer getRows() {
176 Number value = (Number) getStateHelper().eval(PropertyKeys.rows);
177 if (value != null) {
178 return value.intValue();
179 }
180 return null;
181 }
182
183 public void setRows(java.lang.Integer rows) {
184 getStateHelper().put(PropertyKeys.rows, rows);
185 }
186
187
188
189
190
191 public java.lang.String getHelp() {
192 return (java.lang.String) getStateHelper().eval(PropertyKeys.help);
193 }
194
195 public void setHelp(java.lang.String help) {
196 getStateHelper().put(PropertyKeys.help, help);
197 }
198
199
200
201
202
203 public boolean isReadonly() {
204 Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.readonly);
205 if (bool != null) {
206 return bool;
207 }
208 return false;
209 }
210
211 public void setReadonly(boolean readonly) {
212 getStateHelper().put(PropertyKeys.readonly, readonly);
213 }
214
215
216
217
218
219 public java.lang.Character getAccessKey() {
220 return (java.lang.Character) getStateHelper().eval(PropertyKeys.accessKey);
221 }
222
223 public void setAccessKey(java.lang.Character accessKey) {
224 getStateHelper().put(PropertyKeys.accessKey, accessKey);
225 }
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244 public org.apache.myfaces.tobago.renderkit.css.CustomClass getCustomClass() {
245 return (org.apache.myfaces.tobago.renderkit.css.CustomClass) getStateHelper().eval(PropertyKeys.customClass);
246 }
247
248 public void setCustomClass(org.apache.myfaces.tobago.renderkit.css.CustomClass customClass) {
249 getStateHelper().put(PropertyKeys.customClass, customClass);
250 }
251
252
253
254
255
256 public boolean isDisabled() {
257 Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.disabled);
258 if (bool != null) {
259 return bool;
260 }
261 return false;
262 }
263
264 public void setDisabled(boolean disabled) {
265 getStateHelper().put(PropertyKeys.disabled, disabled);
266 }
267
268
269
270
271
272 public java.lang.String getTip() {
273 return (java.lang.String) getStateHelper().eval(PropertyKeys.tip);
274 }
275
276 public void setTip(java.lang.String tip) {
277 getStateHelper().put(PropertyKeys.tip, tip);
278 }
279
280
281
282
283
284
285
286 public java.lang.String getPlaceholder() {
287 return (java.lang.String) getStateHelper().eval(PropertyKeys.placeholder);
288 }
289
290 public void setPlaceholder(java.lang.String placeholder) {
291 getStateHelper().put(PropertyKeys.placeholder, placeholder);
292 }
293
294
295
296
297
298
299
300
301
302
303
304
305 public org.apache.myfaces.tobago.sanitizer.SanitizeMode getSanitize() {
306 org.apache.myfaces.tobago.sanitizer.SanitizeMode sanitize = (org.apache.myfaces.tobago.sanitizer.SanitizeMode) getStateHelper().eval(PropertyKeys.sanitize);
307 if (sanitize != null) {
308 return sanitize;
309 }
310 return org.apache.myfaces.tobago.sanitizer.SanitizeMode.auto;
311 }
312
313 public void setSanitize(org.apache.myfaces.tobago.sanitizer.SanitizeMode sanitize) {
314 getStateHelper().put(PropertyKeys.sanitize, sanitize);
315 }
316
317
318 @Override
319 public void restoreState(FacesContext context, Object state) {
320
321 pushComponentToEL(context, this);
322 super.restoreState(context, state);
323 popComponentFromEL(context);
324 }
325
326 }