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.AbstractUIHidden;
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   Renders a hidden input element.
38    * UIComponent class, generated from template {@code component.stg} with class
39    * {@link org.apache.myfaces.tobago.internal.taglib.component.HiddenTagDeclaration}.
40   */
41  public class UIHidden
42      extends AbstractUIHidden  {
43  
44    public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.Hidden";
45  
46    public static final String COMPONENT_FAMILY = "javax.faces.Input";
47  
48    private static final Collection<String> EVENT_NAMES = Arrays.asList("change");
49  
50    @Override
51    public Collection<String> getEventNames() {
52      return EVENT_NAMES;
53    }
54  
55    @Override
56    public String getDefaultEventName() {
57      return "change";
58    }
59  
60  
61    enum PropertyKeys {
62      readonly,
63      disabled,
64    }
65  
66    public String getFamily() {
67      return COMPONENT_FAMILY;
68    }
69  
70  
71    /**
72    Flag indicating that this component will prohibit changes by the user.
73    <br>Default: <code>false</code>
74    */
75    public boolean isReadonly() {
76      Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.readonly);
77      if (bool != null) {
78        return bool;
79      }
80      return false;
81    }
82  
83    public void setReadonly(boolean readonly) {
84      getStateHelper().put(PropertyKeys.readonly, readonly);
85    }
86  
87    /**
88    Flag indicating that this element is disabled.
89    <br>Default: <code>false</code>
90    */
91    public boolean isDisabled() {
92      Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.disabled);
93      if (bool != null) {
94        return bool;
95      }
96      return false;
97    }
98  
99    public void setDisabled(boolean disabled) {
100     getStateHelper().put(PropertyKeys.disabled, disabled);
101   }
102 
103 
104 }