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