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