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.component;
21  
22  import org.apache.myfaces.tobago.apt.annotation.DynamicExpression;
23  import org.apache.myfaces.tobago.apt.annotation.Facet;
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.UIComponentTag;
27  import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
28  import org.apache.myfaces.tobago.component.Facets;
29  import org.apache.myfaces.tobago.component.RendererTypes;
30  import org.apache.myfaces.tobago.internal.taglib.declaration.HasBinding;
31  import org.apache.myfaces.tobago.internal.taglib.declaration.HasCurrentMarkup;
32  import org.apache.myfaces.tobago.internal.taglib.declaration.HasId;
33  import org.apache.myfaces.tobago.internal.taglib.declaration.HasLabel;
34  import org.apache.myfaces.tobago.internal.taglib.declaration.HasMarkup;
35  import org.apache.myfaces.tobago.internal.taglib.declaration.IsGridLayoutComponentWithDimension;
36  import org.apache.myfaces.tobago.internal.taglib.declaration.IsGridLayoutContainer;
37  
38  import javax.faces.component.UIForm;
39  
40  /**
41   * Renders a page element.
42   */
43  @Tag(name = "page")
44  @UIComponentTag(
45      uiComponent = "org.apache.myfaces.tobago.component.UIPage",
46      uiComponentBaseClass = "org.apache.myfaces.tobago.internal.component.AbstractUIPage",
47      uiComponentFacesClass = "javax.faces.component.UIForm",
48      componentFamily = UIForm.COMPONENT_FAMILY,
49      rendererType = RendererTypes.PAGE,
50      facets =
51          { @Facet(name = Facets.ACTION,
52                  description ="Contains an instance of UICommand (tc:command) for an auto-action",
53                  allowedChildComponenents = "org.apache.myfaces.tobago.Command"),
54            @Facet(name = Facets.RESIZE,
55                  description ="Contains an instance of UICommand which will be executed when the"
56                      + "size of the user agent was changed. Typically a <tc:command immediate='true' />",
57                  allowedChildComponenents = {"org.apache.myfaces.tobago.Command", "org.apache.myfaces.tobago.Form"}),
58            @Facet(name = Facets.MENUBAR, description = "Menubar",
59                  allowedChildComponenents = "javax.faces.component.UIPanel"), //fake
60            @Facet(name=Facets.LAYOUT, description = "Contains an instance of AbstractUILayoutBase",
61                  allowedChildComponenents = "org.apache.myfaces.tobago.GridLayout")})
62  
63  public interface PageTagDeclaration
64      extends HasLabel, HasId, HasBinding, HasMarkup, HasCurrentMarkup,
65      IsGridLayoutComponentWithDimension, IsGridLayoutContainer {
66  
67    /**
68     * Contains the id of the component which should have the focus after
69     * loading the page.
70     * Set to empty string for disabling setting of focus.
71     * Default (null) enables the "auto focus" feature.
72     */
73    @TagAttribute
74    @UIComponentTagAttribute()
75    void setFocusId(String focusId);
76  
77    /**
78     * Absolute URL to an image or image name to lookup in tobago resource path
79     * representing the application. In HTML it is used as a favicon.
80     */
81    @TagAttribute
82    @UIComponentTagAttribute()
83    void setApplicationIcon(String icon);
84  
85    /**
86     * <strong>ValueBindingExpression</strong> pointing to a object to save the
87     * component's state.
88     * @deprecated since Tobago 1.5.0. Please set the min/max values with e. g. 
89     * a tc:gridLayoutConstraint tag.
90     */
91    @Deprecated
92    @TagAttribute
93    @UIComponentTagAttribute(
94        type = "java.lang.Object", expression = DynamicExpression.VALUE_EXPRESSION_REQUIRED)
95    void setState(String state);
96  
97    // XXX LAYOUT_GENERATE
98  //  @TagAttribute
99  //  @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure")
100 //  void setHeight(String height);
101 
102   // XXX LAYOUT_GENERATE
103 //  @TagAttribute
104 //  @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure")
105 //  void setWidth(String width);
106 
107 }