1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package javax.faces.component;
20
21 import javax.el.ValueExpression;
22 import javax.faces.context.FacesContext;
23 import javax.faces.component.UIComponent;
24
25
26
27
28
29
30 public class UIParameter extends javax.faces.component.UIComponentBase
31 {
32
33 static public final String COMPONENT_FAMILY =
34 "javax.faces.Parameter";
35 static public final String COMPONENT_TYPE =
36 "javax.faces.Parameter";
37
38
39 public void setRendered(boolean state)
40 {
41 super.setRendered(state);
42
43
44 }
45
46 protected javax.faces.context.FacesContext getFacesContext()
47 {
48
49
50
51
52
53 UIComponent parent = getParent();
54 if (parent != null && parent.isCachedFacesContext())
55 {
56 return parent.getFacesContext();
57 }
58 else
59 {
60 return super.getFacesContext();
61 }
62 }
63
64
65
66
67 public UIParameter()
68 {
69 setRendererType(null);
70 }
71
72 @Override
73 public String getFamily()
74 {
75 return COMPONENT_FAMILY;
76 }
77
78
79
80
81
82
83 public Object getValue()
84 {
85 return getStateHelper().eval(PropertyKeys.value);
86 }
87
88 public void setValue(Object value)
89 {
90 getStateHelper().put(PropertyKeys.value, value );
91 }
92
93
94 public String getName()
95 {
96 return (String) getStateHelper().eval(PropertyKeys.name);
97 }
98
99 public void setName(String name)
100 {
101 getStateHelper().put(PropertyKeys.name, name );
102 }
103
104
105 public boolean isDisable()
106 {
107 return (Boolean) getStateHelper().eval(PropertyKeys.disable, false);
108 }
109
110 public void setDisable(boolean disable)
111 {
112 getStateHelper().put(PropertyKeys.disable, disable );
113 }
114
115
116 enum PropertyKeys
117 {
118 value
119 , name
120 , disable
121 }
122
123 }