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