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.internal.taglib;
21  
22  import javax.faces.application.Application;
23  import javax.faces.component.UIComponent;
24  import javax.faces.context.FacesContext;
25  import org.apache.myfaces.tobago.component.UIPage;
26  import org.apache.myfaces.tobago.internal.util.StringUtils;
27  import org.slf4j.Logger;
28  import org.slf4j.LoggerFactory;
29  
30  /** 
31   * JSP Tag class, generated from template {@code tag1.2.stg} with class 
32   * {@link org.apache.myfaces.tobago.internal.taglib.component.PageTagDeclaration}.
33   */
34  public final class PageTag extends TobagoELTag {
35    private static final Logger LOG = LoggerFactory.getLogger(PageTag.class);
36    private javax.el.ValueExpression  markup;
37    private javax.el.ValueExpression  state;
38    private javax.el.ValueExpression  focusId;
39    private javax.el.ValueExpression  height;
40    private javax.el.ValueExpression  width;
41    private javax.el.ValueExpression  label;
42    private javax.el.ValueExpression  applicationIcon;
43  
44    @Override
45    public String getComponentType() {
46      return UIPage.COMPONENT_TYPE;
47    }
48    @Override
49    public String getRendererType() {
50      return "Page";
51    }
52  
53    @Override
54    protected void setProperties(final UIComponent uiComponent) {
55      super.setProperties(uiComponent);
56      final UIPage component = (UIPage) uiComponent;
57      final FacesContext context = FacesContext.getCurrentInstance();
58      final Application application = context.getApplication();
59      if (markup != null) {
60        if (!markup.isLiteralText()) {
61          component.setValueExpression("markup", markup);
62        } else {
63          component.setMarkup(org.apache.myfaces.tobago.context.Markup.valueOf(markup.getExpressionString()));
64        }
65      }
66      if (state != null) {
67        if (!state.isLiteralText()) {
68          component.setValueExpression("state", state);
69        /*} else {
70          component.setState(state.getExpressionString());*/
71        }
72      }
73      if (focusId != null) {
74        component.setValueExpression("focusId", focusId);
75      }
76  
77      if (height != null) {
78        if (!height.isLiteralText()) {
79          component.setValueExpression("height", height);
80        } else {
81          component.setHeight(org.apache.myfaces.tobago.layout.Measure.valueOf(height.getExpressionString()));
82        }
83      }
84      if (width != null) {
85        if (!width.isLiteralText()) {
86          component.setValueExpression("width", width);
87        } else {
88          component.setWidth(org.apache.myfaces.tobago.layout.Measure.valueOf(width.getExpressionString()));
89        }
90      }
91      if (label != null) {
92        component.setValueExpression("label", label);
93      }
94  
95      if (applicationIcon != null) {
96        component.setValueExpression("applicationIcon", applicationIcon);
97      }
98  
99    }
100 
101   public javax.el.ValueExpression getMarkup() {
102     return markup;
103   }
104 
105   public void setMarkup(final javax.el.ValueExpression markup) {
106     this.markup = markup;
107   }
108 
109   public javax.el.ValueExpression getState() {
110     return state;
111   }
112 
113   public void setState(final javax.el.ValueExpression state) {
114     this.state = state;
115   }
116 
117   public javax.el.ValueExpression getFocusId() {
118     return focusId;
119   }
120 
121   public void setFocusId(final javax.el.ValueExpression focusId) {
122     this.focusId = focusId;
123   }
124 
125   public javax.el.ValueExpression getHeight() {
126     return height;
127   }
128 
129   public void setHeight(final javax.el.ValueExpression height) {
130     this.height = height;
131   }
132 
133   public javax.el.ValueExpression getWidth() {
134     return width;
135   }
136 
137   public void setWidth(final javax.el.ValueExpression width) {
138     this.width = width;
139   }
140 
141   public javax.el.ValueExpression getLabel() {
142     return label;
143   }
144 
145   public void setLabel(final javax.el.ValueExpression label) {
146     this.label = label;
147   }
148 
149   public javax.el.ValueExpression getApplicationIcon() {
150     return applicationIcon;
151   }
152 
153   public void setApplicationIcon(final javax.el.ValueExpression applicationIcon) {
154     this.applicationIcon = applicationIcon;
155   }
156 
157 
158 
159   @Override
160   public void release() {
161     super.release();
162     markup = null;
163     state = null;
164     focusId = null;
165     height = null;
166     width = null;
167     label = null;
168     applicationIcon = null;
169   }
170 }