View Javadoc

1   // WARNING: This file was automatically generated. Do not edit it directly,
2   //          or you will lose your changes.
3   
4   /*
5    * Licensed to the Apache Software Foundation (ASF) under one
6    * or more contributor license agreements.  See the NOTICE file
7    * distributed with this work for additional information
8    * regarding copyright ownership.  The ASF licenses this file
9    * to you under the Apache License, Version 2.0 (the
10   * "License"); you may not use this file except in compliance
11   * with the License.  You may obtain a copy of the License at
12   *
13   *   http://www.apache.org/licenses/LICENSE-2.0
14   *
15   * Unless required by applicable law or agreed to in writing,
16   * software distributed under the License is distributed on an
17   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18   * KIND, either express or implied.  See the License for the
19   * specific language governing permissions and limitations
20   * under the License.
21  */
22  package org.apache.myfaces.trinidad.component;
23  
24  import javax.faces.FacesException;
25  import javax.faces.component.ContextCallback;
26  import javax.faces.component.NamingContainer;
27  import javax.faces.component.UIComponent;
28  import javax.faces.context.FacesContext;
29  import org.apache.myfaces.trinidad.bean.FacesBean;
30  
31  /**
32   *
33   * Signifies an element that can contain a series of UIXCommand components.
34   *
35   * <h4>Events:</h4>
36   * <table border="1" width="100%" cellpadding="3" summary="">
37   * <tr bgcolor="#CCCCFF" class="TableHeadingColor">
38   * <th align="left">Type</th>
39   * <th align="left">Phases</th>
40   * <th align="left">Description</th>
41   * </tr>
42   * <tr class="TableRowColor">
43   * <td valign="top"><code>org.apache.myfaces.trinidad.event.AttributeChangeEvent</code></td>
44   * <td valign="top" nowrap>Invoke<br>Application<br>Apply<br>Request<br>Values</td>
45   * <td valign="top">Event delivered to describe an attribute change.  Attribute change events are not delivered for any programmatic change to a property.  They are only delivered when a renderer changes a property without the application's specific request.  An example of an attribute change event might include the width of a column that supported client-side resizing.</td>
46   * </tr>
47   * </table>
48   */
49  public class UIXMenu extends UIXComponentBase
50                       implements NamingContainer
51  {
52    static public final FacesBean.Type TYPE = new FacesBean.Type(
53      UIXComponentBase.TYPE);
54    static public final String POPUP_MENU_FACET = "popupMenu";
55  
56    static public final String COMPONENT_FAMILY =
57      "org.apache.myfaces.trinidad.Menu";
58    static public final String COMPONENT_TYPE =
59      "org.apache.myfaces.trinidad.Menu";
60  
61    /**
62     * Construct an instance of the UIXMenu.
63     */
64    public UIXMenu()
65    {
66      super("org.apache.myfaces.trinidad.List");
67    }
68    
69  
70    @Override
71    public boolean invokeOnComponent(FacesContext context,
72                                     String clientId,
73                                     ContextCallback callback)
74      throws FacesException
75    {
76      // optimize case where clientId isn't in NamingContainer
77      return invokeOnNamingContainerComponent(context, clientId, callback);
78    }
79  
80    /**
81     * the popup menu associated with this menu
82     */
83    final public UIComponent getPopupMenu()
84    {
85      return getFacet(POPUP_MENU_FACET);
86    }
87  
88    /**
89     * the popup menu associated with this menu
90     */
91    @SuppressWarnings("unchecked")
92    final public void setPopupMenu(UIComponent popupMenuFacet)
93    {
94      getFacets().put(POPUP_MENU_FACET, popupMenuFacet);
95    }
96  
97    @Override
98    public String getFamily()
99    {
100     return COMPONENT_FAMILY;
101   }
102 
103   @Override
104   protected FacesBean.Type getBeanType()
105   {
106     return TYPE;
107   }
108 
109   /**
110    * Construct an instance of the UIXMenu.
111    */
112   protected UIXMenu(
113     String rendererType
114     )
115   {
116     super(rendererType);
117   }
118 
119   static
120   {
121     TYPE.lockAndRegister("org.apache.myfaces.trinidad.Menu","org.apache.myfaces.trinidad.List");
122   }
123 }