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.html;
23  
24  import org.apache.myfaces.trinidad.bean.FacesBean;
25  import org.apache.myfaces.trinidad.bean.PropertyKey;
26  import org.apache.myfaces.trinidad.component.UIXComponentBase;
27  import org.apache.myfaces.trinidad.util.ComponentUtils;
28  
29  /**
30   *
31   * <html:p>
32   *           The html tag generates the &lt;html&gt; element for an HTML page.
33   * It will automatically generate &quot;locale&quot; and &quot;dir&quot; attributes
34   * based on the current locale.
35   *           </html:p>
36   *
37   * <h4>Events:</h4>
38   * <table border="1" width="100%" cellpadding="3" summary="">
39   * <tr bgcolor="#CCCCFF" class="TableHeadingColor">
40   * <th align="left">Type</th>
41   * <th align="left">Phases</th>
42   * <th align="left">Description</th>
43   * </tr>
44   * <tr class="TableRowColor">
45   * <td valign="top"><code>org.apache.myfaces.trinidad.event.AttributeChangeEvent</code></td>
46   * <td valign="top" nowrap>Invoke<br>Application<br>Apply<br>Request<br>Values</td>
47   * <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>
48   * </tr>
49   * </table>
50   */
51  public class HtmlHtml extends UIXComponentBase
52  {
53    static public final String MODE_DEFAULT = "default";
54    static public final String MODE_STRICT = "strict";
55    static public final String MODE_QUIRKS = "quirks";
56    static public final FacesBean.Type TYPE = new FacesBean.Type(
57      UIXComponentBase.TYPE);
58    static public final PropertyKey MODE_KEY =
59      TYPE.registerKey("mode", String.class, "default");
60  
61    static public final String COMPONENT_FAMILY =
62      "org.apache.myfaces.trinidad.Html";
63    static public final String COMPONENT_TYPE =
64      "org.apache.myfaces.trinidad.HtmlHtml";
65  
66    /**
67     * Construct an instance of the HtmlHtml.
68     */
69    public HtmlHtml()
70    {
71      super("org.apache.myfaces.trinidad.Html");
72    }
73  
74    /**
75     * Gets Set if the page should render in default standards mode, quirks mode, or strict mode.  Behavior of the modes are:<ul>
76     * <li>"default": renders as transitional doctypes for both XHTML and HTML,
77     * with <a href="http://developer.mozilla.org/en/docs/Gecko's_%22Almost_Standards%22_Mode">"almost standards"</a> rendering mode</li>
78     * <li>"strict": renders as a strict doctype for both XHTML and HTML, also
79     * in standards rendering mode</li>
80     * <li>"quirks": renders HTML pages in quirks mode, and XHTML with
81     * a transitional doctype, but standards mode  (there is no quirks mode for
82     * XHTML).</li></ul>
83     *
84     * @return  the new mode value
85     */
86    final public String getMode()
87    {
88      return ComponentUtils.resolveString(getProperty(MODE_KEY), "default");
89    }
90  
91    /**
92     * Sets Set if the page should render in default standards mode, quirks mode, or strict mode.  Behavior of the modes are:<ul>
93     * <li>"default": renders as transitional doctypes for both XHTML and HTML,
94     * with <a href="http://developer.mozilla.org/en/docs/Gecko's_%22Almost_Standards%22_Mode">"almost standards"</a> rendering mode</li>
95     * <li>"strict": renders as a strict doctype for both XHTML and HTML, also
96     * in standards rendering mode</li>
97     * <li>"quirks": renders HTML pages in quirks mode, and XHTML with
98     * a transitional doctype, but standards mode  (there is no quirks mode for
99     * XHTML).</li></ul>
100    * 
101    * @param mode  the new mode value
102    */
103   final public void setMode(String mode)
104   {
105     setProperty(MODE_KEY, (mode));
106   }
107 
108   @Override
109   public String getFamily()
110   {
111     return COMPONENT_FAMILY;
112   }
113 
114   @Override
115   protected FacesBean.Type getBeanType()
116   {
117     return TYPE;
118   }
119 
120   /**
121    * Construct an instance of the HtmlHtml.
122    */
123   protected HtmlHtml(
124     String rendererType
125     )
126   {
127     super(rendererType);
128   }
129 
130   static
131   {
132     TYPE.lockAndRegister("org.apache.myfaces.trinidad.Html","org.apache.myfaces.trinidad.Html");
133   }
134 }