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.UIToolBar;
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.ToolBarTagDeclaration}.
33   */
34  public final class ToolBarTag extends TobagoELTag {
35    private static final Logger LOG = LoggerFactory.getLogger(ToolBarTag.class);
36    private javax.el.ValueExpression  markup;
37    private javax.el.ValueExpression  tip;
38    private javax.el.ValueExpression  orientation;
39    private javax.el.ValueExpression  labelPosition;
40    private javax.el.ValueExpression  iconSize;
41  
42    @Override
43    public String getComponentType() {
44      return UIToolBar.COMPONENT_TYPE;
45    }
46    @Override
47    public String getRendererType() {
48      return "ToolBar";
49    }
50  
51    @Override
52    protected void setProperties(final UIComponent uiComponent) {
53      super.setProperties(uiComponent);
54      final UIToolBar component = (UIToolBar) uiComponent;
55      final FacesContext context = FacesContext.getCurrentInstance();
56      final Application application = context.getApplication();
57      if (markup != null) {
58        if (!markup.isLiteralText()) {
59          component.setValueExpression("markup", markup);
60        } else {
61          component.setMarkup(org.apache.myfaces.tobago.context.Markup.valueOf(markup.getExpressionString()));
62        }
63      }
64      if (tip != null) {
65        component.setValueExpression("tip", tip);
66      }
67  
68      if (orientation != null) {
69        component.setValueExpression("orientation", orientation);
70      }
71  
72      if (labelPosition != null) {
73        component.setValueExpression("labelPosition", labelPosition);
74      }
75  
76      if (iconSize != null) {
77        component.setValueExpression("iconSize", iconSize);
78      }
79  
80    }
81  
82    public javax.el.ValueExpression getMarkup() {
83      return markup;
84    }
85  
86    public void setMarkup(final javax.el.ValueExpression markup) {
87      this.markup = markup;
88    }
89  
90    public javax.el.ValueExpression getTip() {
91      return tip;
92    }
93  
94    public void setTip(final javax.el.ValueExpression tip) {
95      this.tip = tip;
96    }
97  
98    public javax.el.ValueExpression getOrientation() {
99      return orientation;
100   }
101 
102   public void setOrientation(final javax.el.ValueExpression orientation) {
103     this.orientation = orientation;
104   }
105 
106   public javax.el.ValueExpression getLabelPosition() {
107     return labelPosition;
108   }
109 
110   public void setLabelPosition(final javax.el.ValueExpression labelPosition) {
111     this.labelPosition = labelPosition;
112   }
113 
114   public javax.el.ValueExpression getIconSize() {
115     return iconSize;
116   }
117 
118   public void setIconSize(final javax.el.ValueExpression iconSize) {
119     this.iconSize = iconSize;
120   }
121 
122 
123 
124   @Override
125   public void release() {
126     super.release();
127     markup = null;
128     tip = null;
129     orientation = null;
130     labelPosition = null;
131     iconSize = null;
132   }
133 }