View Javadoc
1   // ---------- Attention: Generated code, please do not modify! -----------
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one or more
5    * contributor license agreements.  See the NOTICE file distributed with
6    * this work for additional information regarding copyright ownership.
7    * The ASF licenses this file to You under the Apache License, Version 2.0
8    * (the "License"); you may not use this file except in compliance with
9    * the License.  You may obtain a copy of the License at
10   *
11   *      http://www.apache.org/licenses/LICENSE-2.0
12   *
13   * Unless required by applicable law or agreed to in writing, software
14   * distributed under the License is distributed on an "AS IS" BASIS,
15   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   * See the License for the specific language governing permissions and
17   * limitations under the License.
18   */
19  
20  package org.apache.myfaces.tobago.component;
21  
22  import javax.faces.context.FacesContext;
23  import org.apache.myfaces.tobago.internal.component.AbstractUIMeta;
24  import org.apache.myfaces.tobago.internal.util.ArrayUtils;
25  import org.apache.myfaces.tobago.internal.util.StringUtils;
26  import org.apache.myfaces.tobago.internal.util.Deprecation;
27  import org.apache.myfaces.tobago.component.Tags;
28  import javax.annotation.Generated;
29  import javax.el.ELException;
30  import javax.faces.FacesException;
31  import java.util.Arrays;
32  import java.util.ArrayList;
33  import java.util.Collection;
34  import java.util.List;
35  import javax.el.MethodExpression;
36  import javax.el.ValueExpression;
37  
38  /**
39   This tag a meta tag in the header of the HTML output.
40    It's not possible to add more than one tag with the same
41    <ul>
42    <li>name + lang combination</li>
43    <li>httpEquiv</li>
44    <li>charset</li>
45    </ul>
46    The last inserted wins.
47    So, you may override the default Tobago meta tag in this way.
48    * UIComponent class, generated from template {@code component.stg} with class
49    * {@link org.apache.myfaces.tobago.internal.taglib.component.MetaTagDeclaration}.
50   */
51  @Generated("component.stg")
52  public class UIMeta
53      extends AbstractUIMeta  {
54  
55    public static final String COMPONENT_TYPE = Tags.meta.componentType();
56  
57    public static final String COMPONENT_FAMILY = "javax.faces.Output";
58  
59  
60    enum PropertyKeys {
61      charset,
62      httpEquiv,
63      name,
64      lang,
65      content,
66    }
67  
68    public String getFamily() {
69      return COMPONENT_FAMILY;
70    }
71  
72  
73    public java.lang.String getCharset() {
74      return (java.lang.String) getStateHelper().eval(PropertyKeys.charset);
75    }
76  
77    public void setCharset(java.lang.String charset) {
78      getStateHelper().put(PropertyKeys.charset, charset);
79    }
80  
81    public java.lang.String getHttpEquiv() {
82      return (java.lang.String) getStateHelper().eval(PropertyKeys.httpEquiv);
83    }
84  
85    public void setHttpEquiv(java.lang.String httpEquiv) {
86      getStateHelper().put(PropertyKeys.httpEquiv, httpEquiv);
87    }
88  
89    public java.lang.String getName() {
90      return (java.lang.String) getStateHelper().eval(PropertyKeys.name);
91    }
92  
93    public void setName(java.lang.String name) {
94      getStateHelper().put(PropertyKeys.name, name);
95    }
96  
97    public java.lang.String getLang() {
98      return (java.lang.String) getStateHelper().eval(PropertyKeys.lang);
99    }
100 
101   public void setLang(java.lang.String lang) {
102     getStateHelper().put(PropertyKeys.lang, lang);
103   }
104 
105   public java.lang.String getContent() {
106     return (java.lang.String) getStateHelper().eval(PropertyKeys.content);
107   }
108 
109   public void setContent(java.lang.String content) {
110     getStateHelper().put(PropertyKeys.content, content);
111   }
112 
113 
114   @Override
115   public void restoreState(FacesContext context, Object state) {
116     // FIXME HACK for mojarra SystemEventListener state restoring bug
117     pushComponentToEL(context, this);
118     super.restoreState(context, state);
119     popComponentFromEL(context);
120   }
121 
122 }