View Javadoc

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.html;
20  
21  import javax.faces.component.UIInput;
22  
23  import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFComponent;
24  import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFProperty;
25  
26  /**
27   * Renders a HTML input element.
28   *
29   */
30  @JSFComponent
31  (name = "h:inputText",
32  clazz = "javax.faces.component.html.HtmlInputText",template=true,
33  tagClass = "org.apache.myfaces.taglib.html.HtmlInputTextTag",
34  defaultRendererType = "javax.faces.Text"
35  )
36  abstract class _HtmlInputText extends UIInput
37      implements _AccesskeyProperty,
38      _AltProperty, _UniversalProperties, _DisabledReadonlyProperties,
39      _FocusBlurProperties, _ChangeSelectProperties, _EventProperties,
40      _StyleProperties, _TabindexProperty, _LabelProperty
41  {
42  
43    static public final String COMPONENT_FAMILY =
44      "javax.faces.Input";
45    static public final String COMPONENT_TYPE =
46      "javax.faces.HtmlInputText";
47  
48    /**
49     * HTML: The maximum number of characters allowed to be entered.
50     * 
51     * @JSFProperty
52     *   defaultValue = "Integer.MIN_VALUE"
53     */
54    public abstract int getMaxlength();
55  
56    /**
57     * HTML: The initial width of this control, in characters.
58     * 
59     * @JSFProperty
60     *   defaultValue = "Integer.MIN_VALUE"
61     */
62    public abstract int getSize();
63  
64    /**
65     * If the value of this attribute is "off", render "off" as the value of the attribute.
66     * This indicates that the browser should disable its autocomplete feature for this component.
67     * This is useful for components that perform autocompletion and do not want the browser interfering.
68     * If this attribute is not set or the value is "on", render nothing.
69     *
70     * @return  the new autocomplete value
71     */
72    @JSFProperty
73    public abstract String getAutocomplete();
74  
75  }