View Javadoc
1   // ---------- Attention: Generated code, please do not modify! -----------
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one or more
5    * contributor license agreements.  See the NOTICE file distributed with
6    * this work for additional information regarding copyright ownership.
7    * The ASF licenses this file to You under the Apache License, Version 2.0
8    * (the "License"); you may not use this file except in compliance with
9    * the License.  You may obtain a copy of the License at
10   *
11   *      http://www.apache.org/licenses/LICENSE-2.0
12   *
13   * Unless required by applicable law or agreed to in writing, software
14   * distributed under the License is distributed on an "AS IS" BASIS,
15   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   * See the License for the specific language governing permissions and
17   * limitations under the License.
18   */
19  
20  package org.apache.myfaces.tobago.component;
21  
22  import javax.faces.context.FacesContext;
23  import org.apache.myfaces.tobago.internal.component.AbstractUISelectReference;
24  import org.apache.myfaces.tobago.internal.util.ArrayUtils;
25  import org.apache.myfaces.tobago.internal.util.StringUtils;
26  import org.apache.myfaces.tobago.internal.util.Deprecation;
27  import org.apache.myfaces.tobago.component.Tags;
28  import javax.annotation.Generated;
29  import javax.el.ELException;
30  import javax.faces.FacesException;
31  import java.util.Arrays;
32  import java.util.ArrayList;
33  import java.util.Collection;
34  import java.util.List;
35  import javax.el.MethodExpression;
36  import javax.el.ValueExpression;
37  
38  /**
39   Renders a set of option related to and same type as the <strong>for</strong>
40    component.
41    * UIComponent class, generated from template {@code component.stg} with class
42    * {@link org.apache.myfaces.tobago.internal.taglib.component.SelectReferenceTagDeclaration}.
43   */
44  @Generated("component.stg")
45  public class UISelectReference
46      extends AbstractUISelectReference  {
47  
48    public static final String COMPONENT_TYPE = Tags.selectReference.componentType();
49  
50    public static final String COMPONENT_FAMILY = "javax.faces.Output";
51  
52  
53    enum PropertyKeys {
54      forComponent,
55      renderRange,
56    }
57  
58    public String getFamily() {
59      return COMPONENT_FAMILY;
60    }
61  
62  
63    /**
64    Id of the component, this is related to.
65  
66    */
67    public java.lang.String getFor() {
68      return (java.lang.String) getStateHelper().eval(PropertyKeys.forComponent);
69    }
70  
71    public void setFor(java.lang.String forComponent) {
72      getStateHelper().put(PropertyKeys.forComponent, forComponent);
73    }
74  
75    /**
76    Range of items to render.
77  
78    */
79    public java.lang.String getRenderRange() {
80      return (java.lang.String) getStateHelper().eval(PropertyKeys.renderRange);
81    }
82  
83    public void setRenderRange(java.lang.String renderRange) {
84      getStateHelper().put(PropertyKeys.renderRange, renderRange);
85    }
86  
87  
88    @Override
89    public void restoreState(FacesContext context, Object state) {
90      // FIXME HACK for mojarra SystemEventListener state restoring bug
91      pushComponentToEL(context, this);
92      super.restoreState(context, state);
93      popComponentFromEL(context);
94    }
95  
96  }