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.picklist;
20  
21  import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFComponent;
22  import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFProperty;
23  import org.apache.myfaces.component.html.ext.HtmlSelectManyListbox;
24  
25  /**
26   * A picklist component that allows to select items from one list to another
27   * <p>
28   * In other words, is a selection component where a set of items 
29   * can be selected from a list that contains all the available items to a list
30   * that contains the selected items.
31   * </p>
32   * <p>
33   * The component is based on the t:selectManyListbox component, so it contains
34   * the same attributes. Soon, more specific attributes will be added.
35   * </p>
36   * 
37   * @since 1.1.7
38   * @author Bruno Aranda (latest modification by $Author: jakobk $)
39   * @version $Revision: 955214 $ $Date: 2010-06-16 07:16:02 -0500 (Wed, 16 Jun 2010) $
40   */
41  @JSFComponent(
42      name = "t:selectManyPicklist",
43      clazz = "org.apache.myfaces.custom.picklist.HtmlSelectManyPicklist",
44      tagClass = "org.apache.myfaces.custom.picklist.HtmlSelectManyPicklistTag")
45  public abstract class AbstractHtmlSelectManyPicklist extends HtmlSelectManyListbox
46  {
47      public static final String COMPONENT_TYPE = "org.apache.myfaces.HtmlSelectManyPicklist";
48      public static final String DEFAULT_RENDERER_TYPE = "org.apache.myfaces.PicklistRenderer";
49      
50      /**
51       * Define the text that goes inside the add button
52       * 
53       * @JSFProperty
54       */
55      public abstract String getAddButtonText();
56      
57      /**
58       * Define the text that goes inside the add all button
59       * 
60       * @JSFProperty
61       */
62      public abstract String getAddAllButtonText();    
63      
64      /**
65       * Define the text that goes inside the remove button
66       * 
67       * @JSFProperty
68       */
69      public abstract String getRemoveButtonText();
70      
71      /**
72       * Define the text that goes inside the remove all button
73       * 
74       * @JSFProperty
75       */
76      public abstract String getRemoveAllButtonText();    
77      
78      /**
79       * CSS style to be applied to the add button
80       * 
81       * @JSFProperty
82       */
83      public abstract String getAddButtonStyle();
84      
85      /**
86       * CSS style to be applied to the add all button
87       * 
88       * @JSFProperty
89       */
90      public abstract String getAddAllButtonStyle();    
91      
92      /**
93       * CSS style to be applied to the remove button
94       * 
95       * @JSFProperty
96       */
97      public abstract String getRemoveButtonStyle();
98      
99      /**
100      * CSS style to be applied to the remove all button
101      * 
102      * @JSFProperty
103      */
104     public abstract String getRemoveAllButtonStyle();    
105     
106     /**
107      * CSS styleClass to be applied to the add button
108      * 
109      * @JSFProperty
110      */
111     public abstract String getAddButtonStyleClass();
112     
113     /**
114      * CSS styleClass to be applied to the add all button
115      * 
116      * @JSFProperty
117      */
118     public abstract String getAddAllButtonStyleClass();    
119     
120     /**
121      * CSS styleClass to be applied to the remove button
122      * 
123      * @JSFProperty
124      */
125     public abstract String getRemoveButtonStyleClass();
126     
127     /**
128      * CSS styleClass to be applied to the remove all button
129      * 
130      * @JSFProperty
131      */
132     public abstract String getRemoveAllButtonStyleClass();    
133     
134     /**
135      * Specifies the value type of the selectable items. This attribute is
136      * similar to the collectionType attribute introduced in JSF 2.0. 
137      * It can be used to declare the type of the selectable items when using
138      * a Collection to store the values in the managed bean, because it is 
139      * not possible in Java to get the value type of a type-safe Collection
140      * (in contrast to arrays where this is possible). 
141      * 
142      * @since 2.0
143      */
144     @JSFProperty
145     public abstract String getValueType(); 
146 }