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 org.slf4j.Logger;
23 import org.slf4j.LoggerFactory;
24
25 import java.lang.invoke.MethodHandles;
26
27
28
29
30 public enum Attributes {
31
32 accessKey,
33 action,
34 actionExpression,
35 actionListener,
36 actionListenerExpression,
37 align,
38 alignItems,
39 alt,
40 autocomplete,
41 autoReload,
42 backgroundImage,
43 bodyContent,
44 border,
45
46
47
48 borderBottom,
49
50
51
52 borderLeft,
53
54
55
56 borderRight,
57
58
59
60 borderTop,
61 bottom,
62 charset,
63 clientProperties,
64 closed,
65 collapsed,
66 collapsedMode,
67
68
69
70 @Deprecated
71 column,
72 columnSpan,
73 columnSpacing,
74 columns,
75
76
77
78 @Deprecated
79 compact,
80 confirmation,
81 content,
82 converter,
83 customClass,
84
85
86
87 @Deprecated
88 createSpan,
89 css,
90 cssClassesBlocks,
91 dateStyle,
92 defaultCommand,
93 delay,
94 directLinkCount,
95 disabled,
96 display,
97 enctype,
98 escape,
99 expanded,
100 execute,
101 event,
102 extraLarge,
103 extraSmall,
104 fieldId,
105 file,
106 filter,
107 first,
108 fixed,
109 flexGrow,
110 flexShrink,
111 flexBasis,
112 fragment,
113 frequency,
114 focus,
115 focusId,
116 formatPattern,
117 forValue("for"),
118 globalOnly,
119 gridColumn,
120 gridRow,
121 gridTemplateColumns,
122 gridTemplateRows,
123 help,
124 height,
125 hidden,
126 hover,
127 href,
128 hreflang,
129 httpEquiv,
130 i18n,
131 iconSize,
132 id,
133 immediate,
134 image,
135 inline,
136 itemDescription,
137 itemDisabled,
138 itemLabel,
139 itemImage,
140 itemValue,
141 justify,
142 justifyContent,
143 keepLineBreaks,
144 label,
145 labelLayout,
146 labelPosition,
147 labelWidth,
148 large,
149 layoutOrder,
150 lazy,
151 left,
152 level,
153 lang,
154 link,
155 localMenu,
156
157 @Deprecated
158 margin,
159
160
161
162 marginBottom,
163
164
165
166 marginExtraLarge,
167
168
169
170 marginExtraSmall,
171
172
173
174 marginLarge,
175
176
177
178 marginLeft,
179
180
181
182 marginMedium,
183
184
185
186 marginRight,
187
188
189
190 marginSmall,
191
192
193
194 marginTop,
195 marked,
196 markup,
197 max,
198 maxSeverity,
199 maxNumber,
200 maximumItems,
201 maximumHeight,
202 maximumWidth,
203 maxHeight,
204 maxWidth,
205 media,
206 method,
207 min,
208 minHeight,
209 minWidth,
210 minSeverity,
211 minimumCharacters,
212 minimumHeight,
213 minimumWidth,
214 medium,
215 modal,
216 mode,
217 multiple,
218 mutable,
219 name,
220 navigate,
221 numberStyle,
222
223
224
225 offsetExtraSmall,
226
227
228
229 offsetExtraLarge,
230
231
232
233 offsetLarge,
234
235
236
237 offsetMedium,
238
239
240
241 offsetSmall,
242
243
244
245 overwriteExtraLarge,
246
247
248
249 overwriteExtraSmall,
250
251
252
253 overwriteLarge,
254
255
256
257 overwriteMarginExtraLarge,
258
259
260
261 overwriteMarginExtraSmall,
262
263
264
265 overwriteMarginLarge,
266
267
268
269 overwriteMarginMedium,
270
271
272
273 overwriteMarginSmall,
274
275
276
277 overwriteMedium,
278
279
280
281 overwriteSmall,
282 omit,
283
284
285
286 @Deprecated
287 onclick,
288
289
290
291 @Deprecated
292 onchange,
293 open,
294 orderBy,
295 orientation,
296 outcome,
297 overflowX,
298 overflowY,
299
300
301
302 paddingBottom,
303
304
305
306 paddingLeft,
307
308
309
310 paddingRight,
311
312
313
314 paddingTop,
315 pagingTarget,
316 password,
317 placeholder,
318 plain,
319 popupClose,
320 popupList,
321 popupReset,
322 popupCalendarId,
323 position,
324 preferredHeight,
325 preferredWidth,
326 preformated,
327 readonly,
328 reference,
329 rel,
330 relative,
331 rendered,
332 renderedIndex,
333 rendererType,
334 renderAs,
335 renderRange,
336
337
338
339 @Deprecated
340 renderRangeExtern,
341 required,
342 resizable,
343 rev,
344 right,
345
346
347
348 @Deprecated
349 rigid,
350 rowId,
351
352
353
354 @Deprecated
355 row,
356 rowSpan,
357 rowSpacing,
358 rows,
359 sandbox,
360 sanitize,
361 scriptFiles,
362 scrollbarHeight,
363 scrollbars,
364
365
366 scrollPosition,
367 selectable,
368 selectedIndex,
369 selectedLabel,
370 selectedListString,
371 selector,
372 sheetAction,
373 showCheckbox,
374 showDirectLinks,
375 showDirectLinksArrows,
376 showHeader,
377 showJunctions,
378 showNavigationBar,
379 showPageRange,
380 showPageRangeArrows,
381 showPagingAlways,
382 showRoot,
383 showRootJunction,
384 showRowRange,
385 showSummary,
386 showDetail,
387 size,
388 sortable,
389 sortActionListener,
390 sortActionListenerExpression,
391 small,
392 spanX,
393 spanY,
394 src,
395 state,
396 stateChangeListener,
397 stateChangeListenerExpression,
398 statePreview,
399 step,
400 style,
401 suggestMethod,
402 suggestMethodExpression,
403 switchType,
404 tabChangeListener,
405 tabChangeListenerExpression,
406 tabIndex,
407 target,
408 timeStyle,
409 textAlign,
410 timezone,
411 title,
412 tip,
413 todayButton,
414 top,
415 totalCount,
416 transition,
417 type,
418 value,
419 valueChangeListener,
420 var,
421 verticalAlign,
422 unit,
423 unselectedLabel,
424 update,
425 validator,
426 viewport,
427 width,
428 widthList,
429 zIndex;
430
431
432 public static final String EXECUTE = "execute";
433
434 private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
435
436 private final String explicit;
437
438 Attributes() {
439 this(null);
440 }
441
442 Attributes(final String explicit) {
443 this.explicit = explicit;
444 }
445
446 public String getName() {
447 if (explicit != null) {
448 return explicit;
449 } else {
450 return name();
451 }
452 }
453
454 public static Attributes valueOfFailsafe(final String name) {
455 try {
456 return Attributes.valueOf(name);
457 } catch (final IllegalArgumentException e) {
458 LOG.warn("Can't find enum for {} with name '{}'", Attributes.class.getName(), name);
459 return null;
460 }
461 }
462
463 }