01: // WARNING: This file was automatically generated. Do not edit it directly,
02: // or you will lose your changes.
03:
04: /*
05: * Licensed to the Apache Software Foundation (ASF) under one
06: * or more contributor license agreements. See the NOTICE file
07: * distributed with this work for additional information
08: * regarding copyright ownership. The ASF licenses this file
09: * to you under the Apache License, Version 2.0 (the
10: * "License"); you may not use this file except in compliance
11: * with the License. You may obtain a copy of the License at
12: *
13: * http://www.apache.org/licenses/LICENSE-2.0
14: *
15: * Unless required by applicable law or agreed to in writing,
16: * software distributed under the License is distributed on an
17: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18: * KIND, either express or implied. See the License for the
19: * specific language governing permissions and limitations
20: * under the License.
21: */
22: package javax.faces.component;
23:
24: import javax.el.ValueExpression;
25: import javax.faces.context.FacesContext;
26:
27: /**
28: */
29: public class UISelectItems extends UIComponentBase {
30:
31: static public final String COMPONENT_FAMILY = "javax.faces.SelectItems";
32: static public final String COMPONENT_TYPE = "javax.faces.SelectItems";
33:
34: /**
35: * Construct an instance of the UISelectItems.
36: */
37: public UISelectItems() {
38: setRendererType(null);
39: }
40:
41: // Property: value
42: private Object _value;
43:
44: /**
45: * Gets The initial value of this component.
46: *
47: * @return the new value value
48: */
49: public Object getValue() {
50: if (_value != null) {
51: return _value;
52: }
53: ValueExpression expression = getValueExpression("value");
54: if (expression != null) {
55: return expression
56: .getValue(getFacesContext().getELContext());
57: }
58: return null;
59: }
60:
61: /**
62: * Sets The initial value of this component.
63: *
64: * @param value the new value value
65: */
66: public void setValue(Object value) {
67: this ._value = value;
68: }
69:
70: @Override
71: public Object saveState(FacesContext facesContext) {
72: Object[] values = new Object[2];
73: values[0] = super .saveState(facesContext);
74: values[1] = _value;
75:
76: return values;
77: }
78:
79: @Override
80: public void restoreState(FacesContext facesContext, Object state) {
81: Object[] values = (Object[]) state;
82: super .restoreState(facesContext, values[0]);
83: _value = values[1];
84: }
85:
86: @Override
87: public String getFamily() {
88: return COMPONENT_FAMILY;
89: }
90: }
|