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.UIGridLayout;
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.GridLayoutTagDeclaration}.
33   */
34  public final class GridLayoutTag extends TobagoELTag {
35    private static final Logger LOG = LoggerFactory.getLogger(GridLayoutTag.class);
36    private javax.el.ValueExpression  rowOverflow;
37    private javax.el.ValueExpression  markup;
38    private javax.el.ValueExpression  marginLeft;
39    private javax.el.ValueExpression  marginTop;
40    private javax.el.ValueExpression  marginRight;
41    private javax.el.ValueExpression  columns;
42    private javax.el.ValueExpression  rigid;
43    private javax.el.ValueExpression  cellspacing;
44    private javax.el.ValueExpression  rows;
45    private javax.el.ValueExpression  marginBottom;
46    private javax.el.ValueExpression  columnOverflow;
47    private javax.el.ValueExpression  rowSpacing;
48    private javax.el.ValueExpression  margin;
49    private javax.el.ValueExpression  border;
50    private javax.el.ValueExpression  columnSpacing;
51  
52    @Override
53    public String getComponentType() {
54      return UIGridLayout.COMPONENT_TYPE;
55    }
56    @Override
57    public String getRendererType() {
58      return "GridLayout";
59    }
60  
61    @Override
62    protected void setProperties(final UIComponent uiComponent) {
63      super.setProperties(uiComponent);
64      final UIGridLayout component = (UIGridLayout) uiComponent;
65      final FacesContext context = FacesContext.getCurrentInstance();
66      final Application application = context.getApplication();
67      if (rowOverflow != null) {
68        if (!rowOverflow.isLiteralText()) {
69          component.setValueExpression("rowOverflow", rowOverflow);
70        } else {
71          component.setRowOverflow(Boolean.parseBoolean(rowOverflow.getExpressionString()));
72        }
73      }
74      if (markup != null) {
75        if (!markup.isLiteralText()) {
76          component.setValueExpression("markup", markup);
77        } else {
78          component.setMarkup(org.apache.myfaces.tobago.context.Markup.valueOf(markup.getExpressionString()));
79        }
80      }
81      if (marginLeft != null) {
82        if (!marginLeft.isLiteralText()) {
83          component.setValueExpression("marginLeft", marginLeft);
84        } else {
85          component.setMarginLeft(org.apache.myfaces.tobago.layout.Measure.valueOf(marginLeft.getExpressionString()));
86        }
87      }
88      if (marginTop != null) {
89        if (!marginTop.isLiteralText()) {
90          component.setValueExpression("marginTop", marginTop);
91        } else {
92          component.setMarginTop(org.apache.myfaces.tobago.layout.Measure.valueOf(marginTop.getExpressionString()));
93        }
94      }
95      if (marginRight != null) {
96        if (!marginRight.isLiteralText()) {
97          component.setValueExpression("marginRight", marginRight);
98        } else {
99          component.setMarginRight(org.apache.myfaces.tobago.layout.Measure.valueOf(marginRight.getExpressionString()));
100       }
101     }
102     if (columns != null) {
103       component.setValueExpression("columns", columns);
104     }
105 
106     if (rigid != null) {
107       if (!rigid.isLiteralText()) {
108         component.setValueExpression("rigid", rigid);
109       } else {
110         component.setRigid(Boolean.parseBoolean(rigid.getExpressionString()));
111       }
112     }
113     if (cellspacing != null) {
114       if (!cellspacing.isLiteralText()) {
115         component.setValueExpression("cellspacing", cellspacing);
116       } else {
117         component.setCellspacing(org.apache.myfaces.tobago.layout.Measure.valueOf(cellspacing.getExpressionString()));
118       }
119     }
120     if (rows != null) {
121       component.setValueExpression("rows", rows);
122     }
123 
124     if (marginBottom != null) {
125       if (!marginBottom.isLiteralText()) {
126         component.setValueExpression("marginBottom", marginBottom);
127       } else {
128         component.setMarginBottom(org.apache.myfaces.tobago.layout.Measure.valueOf(marginBottom.getExpressionString()));
129       }
130     }
131     if (columnOverflow != null) {
132       if (!columnOverflow.isLiteralText()) {
133         component.setValueExpression("columnOverflow", columnOverflow);
134       } else {
135         component.setColumnOverflow(Boolean.parseBoolean(columnOverflow.getExpressionString()));
136       }
137     }
138     if (rowSpacing != null) {
139       if (!rowSpacing.isLiteralText()) {
140         component.setValueExpression("rowSpacing", rowSpacing);
141       } else {
142         component.setRowSpacing(org.apache.myfaces.tobago.layout.Measure.valueOf(rowSpacing.getExpressionString()));
143       }
144     }
145     if (margin != null) {
146       if (!margin.isLiteralText()) {
147         component.setValueExpression("margin", margin);
148       } else {
149         component.setMargin(org.apache.myfaces.tobago.layout.Measure.valueOf(margin.getExpressionString()));
150       }
151     }
152     if (border != null) {
153       component.setValueExpression("border", border);
154     }
155 
156     if (columnSpacing != null) {
157       if (!columnSpacing.isLiteralText()) {
158         component.setValueExpression("columnSpacing", columnSpacing);
159       } else {
160         component.setColumnSpacing(org.apache.myfaces.tobago.layout.Measure.valueOf(columnSpacing.getExpressionString()));
161       }
162     }
163   }
164 
165   public javax.el.ValueExpression getRowOverflow() {
166     return rowOverflow;
167   }
168 
169   public void setRowOverflow(final javax.el.ValueExpression rowOverflow) {
170     this.rowOverflow = rowOverflow;
171   }
172 
173   public javax.el.ValueExpression getMarkup() {
174     return markup;
175   }
176 
177   public void setMarkup(final javax.el.ValueExpression markup) {
178     this.markup = markup;
179   }
180 
181   public javax.el.ValueExpression getMarginLeft() {
182     return marginLeft;
183   }
184 
185   public void setMarginLeft(final javax.el.ValueExpression marginLeft) {
186     this.marginLeft = marginLeft;
187   }
188 
189   public javax.el.ValueExpression getMarginTop() {
190     return marginTop;
191   }
192 
193   public void setMarginTop(final javax.el.ValueExpression marginTop) {
194     this.marginTop = marginTop;
195   }
196 
197   public javax.el.ValueExpression getMarginRight() {
198     return marginRight;
199   }
200 
201   public void setMarginRight(final javax.el.ValueExpression marginRight) {
202     this.marginRight = marginRight;
203   }
204 
205   public javax.el.ValueExpression getColumns() {
206     return columns;
207   }
208 
209   public void setColumns(final javax.el.ValueExpression columns) {
210     this.columns = columns;
211   }
212 
213   public javax.el.ValueExpression getRigid() {
214     return rigid;
215   }
216 
217   public void setRigid(final javax.el.ValueExpression rigid) {
218     this.rigid = rigid;
219   }
220 
221   public javax.el.ValueExpression getCellspacing() {
222     return cellspacing;
223   }
224 
225   public void setCellspacing(final javax.el.ValueExpression cellspacing) {
226     this.cellspacing = cellspacing;
227   }
228 
229   public javax.el.ValueExpression getRows() {
230     return rows;
231   }
232 
233   public void setRows(final javax.el.ValueExpression rows) {
234     this.rows = rows;
235   }
236 
237   public javax.el.ValueExpression getMarginBottom() {
238     return marginBottom;
239   }
240 
241   public void setMarginBottom(final javax.el.ValueExpression marginBottom) {
242     this.marginBottom = marginBottom;
243   }
244 
245   public javax.el.ValueExpression getColumnOverflow() {
246     return columnOverflow;
247   }
248 
249   public void setColumnOverflow(final javax.el.ValueExpression columnOverflow) {
250     this.columnOverflow = columnOverflow;
251   }
252 
253   public javax.el.ValueExpression getRowSpacing() {
254     return rowSpacing;
255   }
256 
257   public void setRowSpacing(final javax.el.ValueExpression rowSpacing) {
258     this.rowSpacing = rowSpacing;
259   }
260 
261   public javax.el.ValueExpression getMargin() {
262     return margin;
263   }
264 
265   public void setMargin(final javax.el.ValueExpression margin) {
266     this.margin = margin;
267   }
268 
269   public javax.el.ValueExpression getBorder() {
270     return border;
271   }
272 
273   public void setBorder(final javax.el.ValueExpression border) {
274     this.border = border;
275   }
276 
277   public javax.el.ValueExpression getColumnSpacing() {
278     return columnSpacing;
279   }
280 
281   public void setColumnSpacing(final javax.el.ValueExpression columnSpacing) {
282     this.columnSpacing = columnSpacing;
283   }
284 
285 
286 
287   @Override
288   public void release() {
289     super.release();
290     rowOverflow = null;
291     markup = null;
292     marginLeft = null;
293     marginTop = null;
294     marginRight = null;
295     columns = null;
296     rigid = null;
297     cellspacing = null;
298     rows = null;
299     marginBottom = null;
300     columnOverflow = null;
301     rowSpacing = null;
302     margin = null;
303     border = null;
304     columnSpacing = null;
305   }
306 }