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 menu items like radio buttons (select one).
30   * <pre>
31   * &lt;tx:menuRadio&gt;
32   *   &lt;tc:selectItems/&gt; &lt;!-- body --&gt;
33   * &lt;/tx:menuRadio&gt;</pre>
34   * is the short form of
35   * <pre>
36   * &lt;tc:menuCommand&gt;
37   *   &lt;f:facet name="radio"&gt;
38   *     &lt;tc:selectOneRadio&gt;
39   *       &lt;tc:selectItems/&gt; &lt;!-- body --&gt;
40   *     &lt;/tc:selectOneRadio&gt;
41   *   &lt;/f:facet&gt;
42   * &lt;/tc:menuCommand&gt;</pre>
43   *
44   * @deprecated since Tobago 3.0. The tx-library is deprecated, please use the tc-library.
45   */
46  @Tag(name = "menuRadio")
47  @ExtensionTag(
48      baseClassName = "org.apache.myfaces.tobago.internal.taglib.MenuRadioTag",
49      componentType = "org.apache.myfaces.tobago.MenuCommand",
50      rendererType = "MenuCommand",
51      faceletHandler = "org.apache.myfaces.tobago.facelets.extension.MenuRadioExtensionHandler")
52  public interface MenuRadioExtensionTag {
53  
54    /**
55     * Action to invoke when clicked.
56     * This must be a MethodExpression or a String representing the application action to invoke when
57     * this component is activated by the user.
58     * The MethodExpression must evaluate to a public method that takes no parameters,
59     * and returns a String (the logical outcome) which is passed to the
60     * NavigationHandler for this application.
61     * The String is directly passed to the Navigationhandler.
62     */
63    @TagAttribute
64    @UIComponentTagAttribute(type = {}, expression = DynamicExpression.METHOD_EXPRESSION,
65        methodReturnType = "java.lang.Object")
66    void setAction(final javax.el.MethodExpression action);
67  
68    /**
69     * MethodExpression representing an action listener method that will be
70     * notified when this component is activated by the user.
71     * The expression must evaluate to a public method that takes an ActionEvent
72     * parameter, with a return type of void.
73     */
74    @TagAttribute
75    @UIComponentTagAttribute(type = {}, expression = DynamicExpression.METHOD_EXPRESSION_REQUIRED,
76        methodSignature = "javax.faces.event.ActionEvent")
77    void setActionListener(final javax.el.MethodExpression actionListener);
78  
79    /**
80     * Script to be invoked when clicked
81     */
82    @TagAttribute
83    @UIComponentTagAttribute()
84    void setOnclick(final javax.el.ValueExpression onclick);
85  
86    /**
87     * Link to an arbitrary URL
88     */
89    @TagAttribute
90    @UIComponentTagAttribute()
91    void setLink(final javax.el.ValueExpression link);
92  
93    /**
94     * The value binding expression linking this
95     * component to a property in a backing bean.
96     */
97    @TagAttribute
98    @UIComponentTagAttribute(type = "javax.faces.component.UIComponent")
99    void setBinding(final javax.el.ValueExpression binding);
100 
101   /**
102    * Flag indicating whether or not this component should be rendered
103    * (during Render Response Phase), or processed on any subsequent form submit.
104    */
105   @TagAttribute
106   @UIComponentTagAttribute(type = "boolean", defaultValue = "true")
107   void setRendered(final javax.el.ValueExpression rendered);
108 
109   /**
110    * Flag indicating that this element is disabled.
111    */
112   @TagAttribute()
113   @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
114   void setDisabled(final javax.el.ValueExpression disabled);
115 
116   /**
117    * The current value of this component.
118    */
119   @TagAttribute
120   @UIComponentTagAttribute(type = "java.lang.Object")
121   void setValue(final javax.el.ValueExpression value);
122 
123   /**
124    * Text value to display as label.
125    * If text contains an underscore the next character is used as accesskey.
126    */
127   @TagAttribute
128   @UIComponentTagAttribute()
129   void setLabel(final javax.el.ValueExpression label);
130 
131   /**
132    * Flag indicating that, if this component is activated by the user,
133    * notifications should be delivered to interested listeners and actions
134    * immediately (that is, during Apply Request Values phase) rather than
135    * waiting until Invoke Application phase.
136    */
137   @TagAttribute
138   @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
139   void setImmediate(final javax.el.ValueExpression immediate);
140 
141   /**
142    * Specify, if the command calls an JSF-Action.
143    * Useful to switch off the Double-Submit-Check and Waiting-Behavior.
144    *
145    * @param transition Indicates the transition.
146    */
147   @TagAttribute
148   @UIComponentTagAttribute(type = "boolean", defaultValue = "true")
149   void setTransition(final javax.el.ValueExpression transition);
150 
151   /**
152    * An expression that specifies the Converter for this component.
153    * If the value binding expression is a String,
154    * the String is used as an ID to look up a Converter.
155    * If the value binding expression is a Converter,
156    * uses that instance as the converter.
157    * The value can either be a static value (ID case only)
158    * or an EL expression.
159    */
160   @TagAttribute
161   @UIComponentTagAttribute(type = "javax.faces.convert.Converter",
162       expression = DynamicExpression.VALUE_EXPRESSION)
163   void setConverter(final javax.el.ValueExpression converter);
164 
165   /**
166    * The component identifier for the input field component inside of the container.
167    * This value must be unique within the closest parent component that is a naming container.
168    */
169   @TagAttribute(rtexprvalue = true)
170   @UIComponentTagAttribute
171   void setFieldId(final String fieldId);
172 
173   /**
174    * The component identifier for this component.
175    * This value must be unique within the closest parent component that is a naming container.
176    * For tx components the id will be set to the container (e. g. the panel).
177    * To set the id of the input field, you have to use the attribute "fieldId".
178    */
179   @TagAttribute(rtexprvalue = true)
180   @UIComponentTagAttribute
181   void setId(final String id);
182 }