1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one 3 * or more contributor license agreements. See the NOTICE file 4 * distributed with this work for additional information 5 * regarding copyright ownership. The ASF licenses this file 6 * to you under the Apache License, Version 2.0 (the 7 * "License"); you may not use this file except in compliance 8 * with the License. You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, 13 * software distributed under the License is distributed on an 14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 * KIND, either express or implied. See the License for the 16 * specific language governing permissions and limitations 17 * under the License. 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 // Generated from class javax.faces.component._UISelectItems. 27 // 28 // WARNING: This file was automatically generated. Do not edit it directly, 29 // or you will lose your changes. 30 public class UISelectItems extends javax.faces.component.UIComponentBase 31 { 32 33 static public final String COMPONENT_FAMILY = 34 "javax.faces.SelectItems"; 35 static public final String COMPONENT_TYPE = 36 "javax.faces.SelectItems"; 37 38 //BEGIN CODE COPIED FROM javax.faces.component._UISelectItems 39 public void setRendered(boolean state) 40 { 41 super.setRendered(state); 42 //call parent method due TCK problems 43 //throw new UnsupportedOperationException(); 44 } 45 46 protected javax.faces.context.FacesContext getFacesContext() 47 { 48 //In theory the parent most of the times has 49 //the cached FacesContext instance, because this 50 //element is purely logical, and the parent is the one 51 //where encodeXXX was invoked. But only limit the 52 //search to the closest parent. 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 //END CODE COPIED FROM javax.faces.component._UISelectItems 66 67 public UISelectItems() 68 { 69 setRendererType(null); 70 } 71 72 @Override 73 public String getFamily() 74 { 75 return COMPONENT_FAMILY; 76 } 77 78 79 80 81 // Property: value 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 enum PropertyKeys 95 { 96 value 97 } 98 99 }