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.UITreeIndent;
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.TreeIndentTagDeclaration}.
33   */
34  public final class TreeIndentTag extends TobagoELTag {
35    private static final Logger LOG = LoggerFactory.getLogger(TreeIndentTag.class);
36    private javax.el.ValueExpression  markup;
37    private javax.el.ValueExpression  showJunctions;
38    private javax.el.ValueExpression  tip;
39  
40    @Override
41    public String getComponentType() {
42      return UITreeIndent.COMPONENT_TYPE;
43    }
44    @Override
45    public String getRendererType() {
46      return "TreeIndent";
47    }
48  
49    @Override
50    protected void setProperties(final UIComponent uiComponent) {
51      super.setProperties(uiComponent);
52      final UITreeIndent component = (UITreeIndent) uiComponent;
53      final FacesContext context = FacesContext.getCurrentInstance();
54      final Application application = context.getApplication();
55      if (markup != null) {
56        if (!markup.isLiteralText()) {
57          component.setValueExpression("markup", markup);
58        } else {
59          component.setMarkup(org.apache.myfaces.tobago.context.Markup.valueOf(markup.getExpressionString()));
60        }
61      }
62      if (showJunctions != null) {
63        if (!showJunctions.isLiteralText()) {
64          component.setValueExpression("showJunctions", showJunctions);
65        } else {
66          component.setShowJunctions(Boolean.parseBoolean(showJunctions.getExpressionString()));
67        }
68      }
69      if (tip != null) {
70        component.setValueExpression("tip", tip);
71      }
72  
73    }
74  
75    public javax.el.ValueExpression getMarkup() {
76      return markup;
77    }
78  
79    public void setMarkup(final javax.el.ValueExpression markup) {
80      this.markup = markup;
81    }
82  
83    public javax.el.ValueExpression getShowJunctions() {
84      return showJunctions;
85    }
86  
87    public void setShowJunctions(final javax.el.ValueExpression showJunctions) {
88      this.showJunctions = showJunctions;
89    }
90  
91    public javax.el.ValueExpression getTip() {
92      return tip;
93    }
94  
95    public void setTip(final javax.el.ValueExpression tip) {
96      this.tip = tip;
97    }
98  
99  
100 
101   @Override
102   public void release() {
103     super.release();
104     markup = null;
105     showJunctions = null;
106     tip = null;
107   }
108 }