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 file input field 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:file 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 = "file")
47  @ExtensionTag(
48      baseClassName = "org.apache.myfaces.tobago.internal.taglib.FileTag",
49      faceletHandler = "org.apache.myfaces.tobago.facelets.extension.FileExtensionHandler")
50  public interface FileExtensionTag {
51  
52    /**
53     * Text value to display as label.
54     * If text contains an underscore the next character is used as accesskey.
55     */
56    @TagAttribute
57    @UIComponentTagAttribute()
58    void setLabel(final javax.el.ValueExpression label);
59  
60    /**
61     * The current value of this component.
62     */
63    @TagAttribute
64    @UIComponentTagAttribute(type = "java.lang.Object")
65    void setValue(final javax.el.ValueExpression value);
66  
67    /**
68     * MethodBinding representing a value change listener method
69     * that will be notified when a new value has been set for this input component.
70     * The expression must evaluate to a public method that takes a ValueChangeEvent
71     * parameter, with a return type of void.
72     */
73    @TagAttribute
74    @UIComponentTagAttribute(
75        type = {},
76        expression = DynamicExpression.METHOD_EXPRESSION_REQUIRED,
77        methodSignature = "javax.faces.event.ValueChangeEvent")
78    void setValueChangeListener(final javax.el.MethodExpression valueChangeListener);
79  
80    /**
81     * Clientside script function to add to this component's onchange handler.
82     */
83    @TagAttribute
84    @UIComponentTagAttribute()
85    void setOnchange(final javax.el.ValueExpression onchange);
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    * A method binding EL expression,
105    * accepting FacesContext, UIComponent,
106    * and Object parameters, and returning void, that validates
107    * the component's local value.
108    */
109   @TagAttribute
110   @UIComponentTagAttribute(type = {},
111       expression = DynamicExpression.METHOD_EXPRESSION,
112       methodSignature = {"javax.faces.context.FacesContext", "javax.faces.component.UIComponent", "java.lang.Object"})
113   void setValidator(final javax.el.MethodExpression validator);
114 
115   /**
116    * Flag indicating that this element is disabled.
117    */
118   @TagAttribute()
119   @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
120   void setDisabled(final javax.el.ValueExpression disabled);
121 
122   /**
123    * Text value to display as tooltip.
124    */
125   @TagAttribute
126   @UIComponentTagAttribute()
127   void setTip(final javax.el.ValueExpression tip);
128 
129   /**
130    * The width for the label component. Default: 'auto'.
131    * This value is used in the gridLayouts columns attribute.
132    * See gridLayout tag for valid values.
133    */
134   @TagAttribute
135   @UIComponentTagAttribute()
136   void setLabelWidth(final javax.el.ValueExpression labelWidth);
137 
138   /**
139    * Flag indicating that a value is required.
140    * If the value is an empty string a
141    * ValidationError occurs and a Error Message is rendered.
142    */
143   @TagAttribute
144   @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
145   void setRequired(final javax.el.ValueExpression required);
146 
147   @TagAttribute
148   @UIComponentTagAttribute(type = "java.lang.Integer")
149   void setTabIndex(final javax.el.ValueExpression tabIndex);
150 
151   /**
152    * Flag indicating this component should receive the focus.
153    */
154   @TagAttribute
155   @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
156   void setFocus(final javax.el.ValueExpression focus);
157 
158   /**
159    * An expression that specifies the validator message
160    */
161   @TagAttribute
162   @UIComponentTagAttribute()
163   void setValidatorMessage(final javax.el.ValueExpression validatorMessage);
164 
165   /**
166    * An expression that specifies the converter message
167    */
168   @TagAttribute
169   @UIComponentTagAttribute()
170   void setConverterMessage(final javax.el.ValueExpression converterMessage);
171 
172   /**
173    * An expression that specifies the required message
174    */
175   @TagAttribute
176   @UIComponentTagAttribute()
177   void setRequiredMessage(final javax.el.ValueExpression requiredMessage);
178 
179   /**
180    * The component identifier for the input field component inside of the container.
181    * This value must be unique within the closest parent component that is a naming container.
182    */
183   @TagAttribute(rtexprvalue = true)
184   @UIComponentTagAttribute
185   void setFieldId(final String fieldId);
186 
187   /**
188    * The component identifier for this component.
189    * This value must be unique within the closest parent component that is a naming container.
190    * For tx components the id will be set to the container (e. g. the panel).
191    * To set the id of the input field, you have to use the attribute "fieldId".
192    */
193   @TagAttribute(rtexprvalue = true)
194   @UIComponentTagAttribute
195   void setId(final String id);
196 }