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