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.component.behavior.ClientBehaviorHolder;
23 import javax.faces.context.FacesContext;
24 import org.apache.myfaces.tobago.context.Markup;
25 import org.apache.myfaces.tobago.internal.component.AbstractUIOut;
26 import org.apache.myfaces.tobago.renderkit.css.CustomClass;
27 import org.apache.myfaces.tobago.sanitizer.SanitizeMode;
28 import org.apache.myfaces.tobago.internal.util.ArrayUtils;
29 import org.apache.myfaces.tobago.internal.util.StringUtils;
30 import org.apache.myfaces.tobago.internal.util.Deprecation;
31 import org.apache.myfaces.tobago.component.Tags;
32 import javax.annotation.Generated;
33 import javax.el.ELException;
34 import javax.faces.FacesException;
35 import java.util.Arrays;
36 import java.util.ArrayList;
37 import java.util.Collection;
38 import java.util.List;
39 import javax.el.MethodExpression;
40 import javax.el.ValueExpression;
41
42
43
44
45
46
47 @Generated("component.stg")
48 public class UIOut
49 extends AbstractUIOut implements ClientBehaviorHolder {
50
51 public static final String COMPONENT_TYPE = Tags.out.componentType();
52
53 public static final String COMPONENT_FAMILY = "javax.faces.Output";
54
55
56 enum PropertyKeys {
57 markup,
58 compact,
59 labelLayout,
60 label,
61 plain,
62 customClass,
63 keepLineBreaks,
64 tip,
65 createSpan,
66 escape,
67 sanitize,
68 }
69
70 public String getFamily() {
71 return COMPONENT_FAMILY;
72 }
73
74
75 public org.apache.myfaces.tobago.context.Markup getMarkup() {
76 Object object = getStateHelper().eval(PropertyKeys.markup);
77 if (object != null) {
78 return Markup.valueOf(object);
79 }
80 return null;
81 }
82
83 public void setMarkup(org.apache.myfaces.tobago.context.Markup markup) {
84 getStateHelper().put(PropertyKeys.markup, markup);
85 }
86
87
88
89
90
91
92
93 @Deprecated
94 public boolean isCompact() {
95 Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.compact);
96 if (bool != null) {
97 return bool;
98 }
99 return false;
100 }
101
102 @Deprecated
103 public void setCompact(boolean compact) {
104 Deprecation.LOG.error("The attribute 'compact' of 'UIOut' is deprecated. "
105 + "Please refer the documentation for further information.");
106 getStateHelper().put(PropertyKeys.compact, compact);
107 }
108
109
110
111
112
113
114
115
116 public org.apache.myfaces.tobago.component.LabelLayout getLabelLayout() {
117 org.apache.myfaces.tobago.component.LabelLayout labelLayout = (org.apache.myfaces.tobago.component.LabelLayout) getStateHelper().eval(PropertyKeys.labelLayout);
118 if (labelLayout != null) {
119 return labelLayout;
120 }
121 return getLabel() != null ? org.apache.myfaces.tobago.component.LabelLayout.flexLeft : org.apache.myfaces.tobago.component.LabelLayout.none;
122 }
123
124 public void setLabelLayout(org.apache.myfaces.tobago.component.LabelLayout labelLayout) {
125 getStateHelper().put(PropertyKeys.labelLayout, labelLayout);
126 }
127
128
129
130
131
132 public java.lang.String getLabel() {
133 return (java.lang.String) getStateHelper().eval(PropertyKeys.label);
134 }
135
136 public void setLabel(java.lang.String label) {
137 getStateHelper().put(PropertyKeys.label, label);
138 }
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154 public boolean isPlain() {
155 Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.plain);
156 if (bool != null) {
157 return bool;
158 }
159 return false;
160 }
161
162 public void setPlain(boolean plain) {
163 getStateHelper().put(PropertyKeys.plain, plain);
164 }
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183 public org.apache.myfaces.tobago.renderkit.css.CustomClass getCustomClass() {
184 return (org.apache.myfaces.tobago.renderkit.css.CustomClass) getStateHelper().eval(PropertyKeys.customClass);
185 }
186
187 public void setCustomClass(org.apache.myfaces.tobago.renderkit.css.CustomClass customClass) {
188 getStateHelper().put(PropertyKeys.customClass, customClass);
189 }
190
191
192
193
194
195
196
197 public boolean isKeepLineBreaks() {
198 Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.keepLineBreaks);
199 if (bool != null) {
200 return bool;
201 }
202 return true;
203 }
204
205 public void setKeepLineBreaks(boolean keepLineBreaks) {
206 getStateHelper().put(PropertyKeys.keepLineBreaks, keepLineBreaks);
207 }
208
209
210
211
212
213 public java.lang.String getTip() {
214 return (java.lang.String) getStateHelper().eval(PropertyKeys.tip);
215 }
216
217 public void setTip(java.lang.String tip) {
218 getStateHelper().put(PropertyKeys.tip, tip);
219 }
220
221
222
223
224
225
226
227
228 @Deprecated
229 public boolean isCreateSpan() {
230 Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.createSpan);
231 if (bool != null) {
232 return bool;
233 }
234 return true;
235 }
236
237 @Deprecated
238 public void setCreateSpan(boolean createSpan) {
239 Deprecation.LOG.error("The attribute 'createSpan' of 'UIOut' is deprecated. "
240 + "Please refer the documentation for further information.");
241 getStateHelper().put(PropertyKeys.createSpan, createSpan);
242 }
243
244
245
246
247
248
249 public boolean isEscape() {
250 Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.escape);
251 if (bool != null) {
252 return bool;
253 }
254 return true;
255 }
256
257 public void setEscape(boolean escape) {
258 getStateHelper().put(PropertyKeys.escape, escape);
259 }
260
261
262
263
264
265
266
267
268
269
270
271
272 public org.apache.myfaces.tobago.sanitizer.SanitizeMode getSanitize() {
273 org.apache.myfaces.tobago.sanitizer.SanitizeMode sanitize = (org.apache.myfaces.tobago.sanitizer.SanitizeMode) getStateHelper().eval(PropertyKeys.sanitize);
274 if (sanitize != null) {
275 return sanitize;
276 }
277 return org.apache.myfaces.tobago.sanitizer.SanitizeMode.auto;
278 }
279
280 public void setSanitize(org.apache.myfaces.tobago.sanitizer.SanitizeMode sanitize) {
281 getStateHelper().put(PropertyKeys.sanitize, sanitize);
282 }
283
284
285 @Override
286 public void restoreState(FacesContext context, Object state) {
287
288 pushComponentToEL(context, this);
289 super.restoreState(context, state);
290 popComponentFromEL(context);
291 }
292
293 }