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.AbstractUISelectItems;
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 javax.el.ELException;
28  import javax.faces.FacesException;
29  import java.util.Arrays;
30  import java.util.ArrayList;
31  import java.util.Collection;
32  import java.util.List;
33  import javax.el.MethodExpression;
34  import javax.el.ValueExpression;
35  
36  /** 
37   Add a child UISelectItems component to the UIComponent
38    associated with the closed parent UIComponent custom
39    action.
40    * UIComponent class, generated from template {@code component.stg} with class
41    * {@link org.apache.myfaces.tobago.internal.taglib.component.SelectItemsTagDeclaration}.
42   */
43  public class UISelectItems
44      extends AbstractUISelectItems  {
45  
46    public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.SelectItems";
47  
48    public static final String COMPONENT_FAMILY = "";
49  
50  
51    enum PropertyKeys {
52      itemDisabled,
53      var,
54      itemValue,
55      tip,
56      itemLabel,
57      itemImage,
58    }
59  
60    public String getFamily() {
61      return COMPONENT_FAMILY;
62    }
63  
64  
65    /**
66    Flag indicating whether the option created
67     by this component is disabled.
68    <br>Default: <code>false</code>
69    */
70    public boolean isItemDisabled() {
71      Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.itemDisabled);
72      if (bool != null) {
73        return bool;
74      }
75      return false;
76    }
77  
78    public void setItemDisabled(boolean itemDisabled) {
79      getStateHelper().put(PropertyKeys.itemDisabled, itemDisabled);
80    }
81  
82    /**
83    Name of a variable under which the iterated data will be exposed.
84     It may be referred to in EL of other attributes.
85  
86    */
87    public java.lang.String getVar() {
88      return (java.lang.String) getStateHelper().eval(PropertyKeys.var);
89    }
90  
91    public void setVar(java.lang.String var) {
92      getStateHelper().put(PropertyKeys.var, var);
93    }
94  
95    /**
96    Value to be returned to the server if this option is selected by the user.
97  
98    */
99    public java.lang.Object getItemValue() {
100     return getStateHelper().eval(PropertyKeys.itemValue);
101   }
102 
103   public void setItemValue(java.lang.Object itemValue) {
104     getStateHelper().put(PropertyKeys.itemValue, itemValue);
105   }
106 
107   /**
108   Text value to display as tooltip.
109 
110   */
111   public java.lang.String getTip() {
112     return (java.lang.String) getStateHelper().eval(PropertyKeys.tip);
113   }
114 
115   public void setTip(java.lang.String tip) {
116     getStateHelper().put(PropertyKeys.tip, tip);
117   }
118 
119   /**
120   Label to be displayed to the user for this option.
121 
122   */
123   public java.lang.String getItemLabel() {
124     return (java.lang.String) getStateHelper().eval(PropertyKeys.itemLabel);
125   }
126 
127   public void setItemLabel(java.lang.String itemLabel) {
128     getStateHelper().put(PropertyKeys.itemLabel, itemLabel);
129   }
130 
131   /**
132   Image to be displayed to the user for this option.
133 
134   */
135   public java.lang.String getItemImage() {
136     return (java.lang.String) getStateHelper().eval(PropertyKeys.itemImage);
137   }
138 
139   public void setItemImage(java.lang.String itemImage) {
140     getStateHelper().put(PropertyKeys.itemImage, itemImage);
141   }
142 
143 
144 }