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.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.ClientBehaviors;
29  import org.apache.myfaces.tobago.component.Facets;
30  import org.apache.myfaces.tobago.component.RendererTypes;
31  import org.apache.myfaces.tobago.internal.taglib.declaration.HasBinding;
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.IsVisual;
35  
36  import javax.faces.component.UIForm;
37  
38  /**
39   * Renders a page element.
40   */
41  @Tag(name = "page")
42  @UIComponentTag(
43      uiComponent = "org.apache.myfaces.tobago.component.UIPage",
44      uiComponentBaseClass = "org.apache.myfaces.tobago.internal.component.AbstractUIPage",
45      uiComponentFacesClass = "javax.faces.component.UIForm",
46      componentFamily = UIForm.COMPONENT_FAMILY,
47      rendererType = RendererTypes.PAGE,
48      facets =
49          { @Facet(name=Facets.LAYOUT, description = "Deprecated! Contains an layout manager. "
50                + "The layout manager tag should surround the content instead.")},
51      behaviors = {
52          @Behavior(
53              name = ClientBehaviors.CLICK,
54              isDefault = true),
55          @Behavior(
56              name = ClientBehaviors.DBLCLICK),
57          @Behavior(
58              name = ClientBehaviors.LOAD),
59          @Behavior(
60              name = ClientBehaviors.RESIZE)
61      })
62  
63  public interface PageTagDeclaration
64      extends HasLabel, HasId, HasBinding, IsVisual {
65  
66    /**
67     * Contains the id of the component which should have the focus after
68     * loading the page.
69     * Set to empty string for disabling setting of focus.
70     * Default (null) enables the "auto focus" feature.
71     */
72    @TagAttribute
73    @UIComponentTagAttribute()
74    void setFocusId(String focusId);
75  
76    /**
77     * Absolute URL to an image or image name to lookup in tobago resource path
78     * representing the application. In HTML it is used as a favicon.
79     */
80    @TagAttribute
81    @UIComponentTagAttribute()
82    void setApplicationIcon(String icon);
83  }