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