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  
20  package org.apache.myfaces.tobago.internal.taglib.extension;
21  
22  import org.apache.myfaces.tobago.apt.annotation.DynamicExpression;
23  import org.apache.myfaces.tobago.apt.annotation.ExtensionTag;
24  import org.apache.myfaces.tobago.apt.annotation.Tag;
25  import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
26  import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
27  
28  /**
29   * Render a single selection dropdown list with a label.
30   *
31   * @deprecated since Tobago 3.0. The tx-library is deprecated, please use the tc-library.
32   */
33  @Tag(name = "selectOneChoice")
34  @ExtensionTag(
35      baseClassName = "org.apache.myfaces.tobago.internal.taglib.SelectOneChoiceTag",
36      faceletHandler = "org.apache.myfaces.tobago.facelets.extension.SelectOneChoiceExtensionHandler")
37  public interface SelectOneChoiceExtensionTag {
38  
39    /**
40     * Flag indicating that a value is required.
41     * If the value is an empty string a
42     * ValidationError occurs and a Error Message is rendered.
43     */
44    @TagAttribute
45    @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
46    void setRequired(final javax.el.ValueExpression required);
47  
48    /**
49     * The current value of this component.
50     */
51    @TagAttribute
52    @UIComponentTagAttribute(type = "java.lang.Object")
53    void setValue(final javax.el.ValueExpression value);
54  
55    /**
56     * MethodExpression representing a value change listener method
57     * that will be notified when a new value has been set for this input component.
58     * The expression must evaluate to a public method that takes a ValueChangeEvent
59     * parameter, with a return type of void.
60     */
61    @TagAttribute
62    @UIComponentTagAttribute(
63        type = {},
64        expression = DynamicExpression.METHOD_EXPRESSION_REQUIRED,
65        methodSignature = "javax.faces.event.ValueChangeEvent")
66    void setValueChangeListener(final javax.el.MethodExpression valueChangeListener);
67  
68    /**
69     * A method binding EL expression,
70     * accepting FacesContext, UIComponent,
71     * and Object parameters, and returning void, that validates
72     * the component's local value.
73     */
74    @TagAttribute
75    @UIComponentTagAttribute(type = {},
76        expression = DynamicExpression.METHOD_EXPRESSION,
77        methodSignature = {"javax.faces.context.FacesContext", "javax.faces.component.UIComponent", "java.lang.Object"})
78    void setValidator(final javax.el.MethodExpression validator);
79  
80    /**
81     * Flag indicating that this element is disabled.
82     */
83    @TagAttribute()
84    @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
85    void setDisabled(final javax.el.ValueExpression disabled);
86  
87    /**
88     * Flag indicating that this component will prohibit changes by the user.
89     */
90    @TagAttribute
91    @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
92    void setReadonly(final javax.el.ValueExpression readonly);
93  
94    /**
95     * Clientside script function to add to this component's onchange handler.
96     */
97    @TagAttribute
98    @UIComponentTagAttribute()
99    void setOnchange(final javax.el.ValueExpression onchange);
100 
101   /**
102    * An expression that specifies the Converter for this component.
103    * If the value binding expression is a String,
104    * the String is used as an ID to look up a Converter.
105    * If the value binding expression is a Converter,
106    * uses that instance as the converter.
107    * The value can either be a static value (ID case only)
108    * or an EL expression.
109    */
110   @TagAttribute
111   @UIComponentTagAttribute(type = "javax.faces.convert.Converter",
112       expression = DynamicExpression.VALUE_EXPRESSION)
113   void setConverter(final javax.el.ValueExpression converter);
114 
115   /**
116    * Flag indicating this component should rendered as an inline element.
117    *
118    * @deprecated This should be handled by e.g. a flow layout manager (since 1.5.0)
119    */
120   @TagAttribute
121   @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
122   @Deprecated
123   void setInline(final javax.el.ValueExpression inline);
124 
125   /**
126    * Text value to display as label.
127    * If text contains an underscore the next character is used as accesskey.
128    */
129   @TagAttribute
130   @UIComponentTagAttribute()
131   void setLabel(final javax.el.ValueExpression label);
132 
133   /**
134    * Flag indicating whether or not this component should be rendered
135    * (during Render Response Phase), or processed on any subsequent form submit.
136    */
137   @TagAttribute
138   @UIComponentTagAttribute(type = "boolean", defaultValue = "true")
139   void setRendered(final javax.el.ValueExpression rendered);
140 
141   /**
142    * The value binding expression linking this
143    * component to a property in a backing bean.
144    */
145   @TagAttribute
146   @UIComponentTagAttribute(type = "javax.faces.component.UIComponent")
147   void setBinding(final javax.el.ValueExpression binding);
148 
149   /**
150    * Text value to display as tooltip.
151    */
152   @TagAttribute
153   @UIComponentTagAttribute()
154   void setTip(final javax.el.ValueExpression tip);
155 
156   /**
157    * The width for the label component. Default: 'auto'.
158    * This value is used in the gridLayouts columns attribute.
159    * See gridLayout tag for valid values.
160    */
161   @TagAttribute
162   @UIComponentTagAttribute()
163   void setLabelWidth(final javax.el.ValueExpression labelWidth);
164 
165   @TagAttribute
166   @UIComponentTagAttribute(type = "java.lang.Integer")
167   void setTabIndex(final javax.el.ValueExpression tabIndex);
168 
169   /**
170    * Flag indicating this component should receive the focus.
171    */
172   @TagAttribute
173   @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
174   void setFocus(final javax.el.ValueExpression focus);
175 
176   /**
177    * Indicate markup of this component.
178    * Possible value is 'none'. But this can be overridden in the theme.
179    */
180   @TagAttribute
181   @UIComponentTagAttribute(defaultValue = "none", type = "java.lang.String[]")
182   void setMarkup(final javax.el.ValueExpression markup);
183 
184   /**
185    * An expression that specifies the validator message
186    */
187   @TagAttribute
188   @UIComponentTagAttribute()
189   void setValidatorMessage(final javax.el.ValueExpression validatorMessage);
190 
191   /**
192    * An expression that specifies the converter message
193    */
194   @TagAttribute
195   @UIComponentTagAttribute()
196   void setConverterMessage(final javax.el.ValueExpression converterMessage);
197 
198   /**
199    * An expression that specifies the required message
200    */
201   @TagAttribute
202   @UIComponentTagAttribute()
203   void setRequiredMessage(final javax.el.ValueExpression requiredMessage);
204 
205   /**
206    * The component identifier for the input field component inside of the container.
207    * This value must be unique within the closest parent component that is a naming container.
208    */
209   @TagAttribute(rtexprvalue = true)
210   @UIComponentTagAttribute
211   void setFieldId(final String fieldId);
212 
213   /**
214    * The component identifier for this component.
215    * This value must be unique within the closest parent component that is a naming container.
216    * For tx components the id will be set to the container (e. g. the panel).
217    * To set the id of the input field, you have to use the attribute "fieldId".
218    */
219   @TagAttribute(rtexprvalue = true)
220   @UIComponentTagAttribute
221   void setId(final String id);
222 }