001    package org.apache.myfaces.tobago.taglib.component;
002    
003    /*
004     * Licensed to the Apache Software Foundation (ASF) under one or more
005     * contributor license agreements.  See the NOTICE file distributed with
006     * this work for additional information regarding copyright ownership.
007     * The ASF licenses this file to You under the Apache License, Version 2.0
008     * (the "License"); you may not use this file except in compliance with
009     * the License.  You may obtain a copy of the License at
010     *
011     *      http://www.apache.org/licenses/LICENSE-2.0
012     *
013     * Unless required by applicable law or agreed to in writing, software
014     * distributed under the License is distributed on an "AS IS" BASIS,
015     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
016     * See the License for the specific language governing permissions and
017     * limitations under the License.
018     */
019    
020    import org.apache.myfaces.tobago.apt.annotation.Facet;
021    import org.apache.myfaces.tobago.apt.annotation.Tag;
022    import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
023    import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
024    import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
025    import org.apache.myfaces.tobago.taglib.decl.HasBinding;
026    import org.apache.myfaces.tobago.taglib.decl.HasDimension;
027    import org.apache.myfaces.tobago.taglib.decl.HasId;
028    import org.apache.myfaces.tobago.taglib.decl.HasLabel;
029    import org.apache.myfaces.tobago.taglib.decl.HasState;
030    
031    /**
032     * Renders a page element.
033     */
034    @Tag(name = "page")
035    @UIComponentTag(
036        uiComponent = "org.apache.myfaces.tobago.component.UIPage",
037        rendererType = "Page",
038        facets =
039            {@Facet(name = "action", description = "Contains an instance of UICommand (tc:command) for an auto-action"),
040            @Facet(name = "menuBar", description = "Menubar"),
041            @Facet(name = "layout", description = "Contains an instance of UILayout")})
042    
043    public interface PageTagDeclaration extends TobagoBodyTagDeclaration, HasLabel, HasId, HasDimension, HasBinding,
044        HasState {
045      /**
046       * Possible values for doctype are:
047       * <dl>
048       * <dt>strict</dt><dd>HTML 4.01 Strict DTD</dd>
049       * <dt>loose</dt><dd>HTML 4.01 Transitional DTD</dd>
050       * <dt>frameset</dt><dd>HTML 4.01 Frameset DTD</dd>
051       * </dl>
052       * All other values are ignored and no DOCTYPE is set.
053       */
054      @TagAttribute
055      @UIComponentTagAttribute(defaultValue = "loose")
056      @Deprecated
057      void setDoctype(String doctype);
058    
059      /**
060       * Contains the id of the component wich should have the focus after
061       * loading the page.
062       * Set to emtpy string for disabling setting of focus.
063       * Default (null) enables the "auto focus" feature.
064       */
065      @TagAttribute
066      @UIComponentTagAttribute()
067      void setFocusId(String focusId);
068    
069      /**
070       * Absolute URL to an image or image name to lookup in tobago resource path
071       * representing the application. In HTML it is used as a favicon.
072       */
073      @TagAttribute
074      @UIComponentTagAttribute()
075      void setApplicationIcon(String icon);
076    
077    }