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 org.apache.myfaces.custom.suggest;
20  
21  import javax.faces.component.html.HtmlInputText;
22  
23  import org.apache.myfaces.component.ForceIdAware;
24  import org.apache.myfaces.component.LocationAware;
25  
26  /**
27   * Provides an input textbox with "suggest" functionality.
28   * 
29   * @JSFComponent
30   *   name = "s:inputSuggest"
31   *   class = "org.apache.myfaces.custom.suggest.InputSuggest"
32   *   tagClass = "org.apache.myfaces.custom.suggest.InputSuggestTag"
33   */
34  public abstract class AbstractInputSuggest extends HtmlInputText
35    implements ForceIdAware, LocationAware
36  {
37  
38      static public final String COMPONENT_FAMILY = "javax.faces.Input";
39      static public final String COMPONENT_TYPE = "org.apache.myfaces.InputSuggest";
40      static public final String DEFAULT_RENDERER_TYPE = "org.apache.myfaces.InputSuggest";
41  
42  
43      /**
44       * Gets If true, this component will force the use of the specified id when rendering.
45       * 
46       * @JSFProperty
47       *   literalOnly = "true"
48       *   defaultValue = "false"
49       * @return  the new forceId value
50       */
51      public abstract boolean isForceId();
52      
53      public abstract void setForceId(boolean forceId);
54  
55      /**
56       * Gets If false, this component will not append a '[n]' suffix (where 'n' is the row index) to components
57       *                 that are contained within a "list."  This value will be true by default and the value will be ignored if
58       *                 the value of forceId is false (or not specified.)
59       *
60       * @JSFProperty 
61       *   literalOnly = "true"
62       *   defaultValue = "true"
63       * @return  the new forceIdIndex value
64       */
65      public abstract boolean isForceIdIndex();
66  
67      /**
68       * Gets An alternate location to find javascript resources. If no values is specified, javascript will be loaded from the resources directory using AddResource and ExtensionsFilter.
69       *
70       * @JSFProperty
71       * @return  the new javascriptLocation value
72       */
73      public abstract String getJavascriptLocation();
74  
75      /**
76       * Gets An alternate location to find image resources. If no values is specified, images will be loaded from the resources directory using AddResource and ExtensionsFilter.
77       *
78       * @JSFProperty
79       * @return  the new imageLocation value
80       */
81      public abstract String getImageLocation();
82      
83      /**
84       * Gets An alternate location to find stylesheet resources. If no values is specified, stylesheets will be loaded from the resources directory using AddResource and ExtensionsFilter.
85       * @JSFProperty
86       * @return  the new styleLocation value
87       */
88      public abstract String getStyleLocation();
89      
90  }