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.UIInput;
23 import javax.faces.context.FacesContext;
24 import org.apache.commons.lang.ArrayUtils;
25 import org.apache.commons.lang.StringUtils;
26 import org.apache.myfaces.tobago.internal.util.Deprecation;
27 import org.apache.myfaces.tobago.renderkit.MarginValues;
28 import org.apache.myfaces.tobago.renderkit.SpacingValues;
29 import org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer;
30 import javax.el.ELException;
31 import javax.faces.FacesException;
32 import java.util.ArrayList;
33 import java.util.List;
34 import javax.el.MethodExpression;
35 import javax.el.ValueExpression;
36
37
38
39
40
41
42 public class UIHidden
43 extends UIInput {
44
45 public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.Hidden";
46
47 public static final String COMPONENT_FAMILY = "javax.faces.Input";
48
49
50 enum PropertyKeys {
51 readonly,
52 disabled,
53 }
54
55 public String getFamily() {
56 return COMPONENT_FAMILY;
57 }
58
59
60
61
62
63
64 public boolean isReadonly() {
65 Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.readonly);
66 if (bool != null) {
67 return bool;
68 }
69 return false;
70 }
71
72 public void setReadonly(boolean readonly) {
73 getStateHelper().put(PropertyKeys.readonly, readonly);
74 }
75
76
77
78
79
80 public boolean isDisabled() {
81 Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.disabled);
82 if (bool != null) {
83 return bool;
84 }
85 return false;
86 }
87
88 public void setDisabled(boolean disabled) {
89 getStateHelper().put(PropertyKeys.disabled, disabled);
90 }
91
92
93
94 }