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.Behavior;
23  import org.apache.myfaces.tobago.apt.annotation.Facet;
24  import org.apache.myfaces.tobago.apt.annotation.Markup;
25  import org.apache.myfaces.tobago.apt.annotation.Tag;
26  import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
27  import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
28  import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
29  import org.apache.myfaces.tobago.component.ClientBehaviors;
30  import org.apache.myfaces.tobago.component.Facets;
31  import org.apache.myfaces.tobago.component.RendererTypes;
32  import org.apache.myfaces.tobago.internal.taglib.declaration.HasBinding;
33  import org.apache.myfaces.tobago.internal.taglib.declaration.HasId;
34  import org.apache.myfaces.tobago.internal.taglib.declaration.HasLabel;
35  import org.apache.myfaces.tobago.internal.taglib.declaration.IsVisual;
36  
37  import javax.faces.component.UIForm;
38  
39  /**
40   * <p>
41   * Renders a page element.
42   * </p>
43   * <p>
44   * The markup {@link org.apache.myfaces.tobago.context.Markup#SPREAD}
45   * means the page should spread over the hole available area.
46   * So the content will use the full height of the browser window.
47   * <b>Warning: This feature is preliminary and may change, if necessary, in minor releases!</b>
48   * </p>
49   */
50  @Tag(name = "page")
51  @UIComponentTag(
52      uiComponent = "org.apache.myfaces.tobago.component.UIPage",
53      uiComponentBaseClass = "org.apache.myfaces.tobago.internal.component.AbstractUIPage",
54      uiComponentFacesClass = "javax.faces.component.UIForm",
55      componentFamily = UIForm.COMPONENT_FAMILY,
56      rendererType = RendererTypes.PAGE,
57      facets = {
58          @Facet(name = Facets.LAYOUT, description = "Deprecated! Contains an layout manager. "
59              + "The layout manager tag should surround the content instead.")},
60      behaviors = {
61          @Behavior(
62              name = ClientBehaviors.CLICK,
63              isDefault = true),
64          @Behavior(
65              name = ClientBehaviors.DBLCLICK),
66          @Behavior(
67              name = ClientBehaviors.LOAD),
68          @Behavior(
69              name = ClientBehaviors.RESIZE)
70      },
71      markups = {
72          @Markup(
73              name = "spread",
74              description = "Use the full browser height for the HTML content."
75          )
76      })
77  
78  public interface PageTagDeclaration
79      extends HasLabel, HasId, HasBinding, IsVisual {
80  
81    /**
82     * Contains the id of the component which should have the focus after
83     * loading the page.
84     * Set to empty string for disabling setting of focus.
85     * Default (null) enables the "auto focus" feature.
86     */
87    @TagAttribute
88    @UIComponentTagAttribute()
89    void setFocusId(String focusId);
90  
91    /**
92     * Absolute URL to an image or image name to lookup in tobago resource path
93     * representing the application. In HTML it is used as a favicon.
94     */
95    @TagAttribute
96    @UIComponentTagAttribute()
97    void setApplicationIcon(String icon);
98  }