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.UIOut;
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.OutTagDeclaration}.
33   */
34  public final class OutTag extends TobagoELTag {
35    private static final Logger LOG = LoggerFactory.getLogger(OutTag.class);
36    private javax.el.ValueExpression  markup;
37    private javax.el.ValueExpression  escape;
38    private javax.el.ValueExpression  tip;
39    private javax.el.ValueExpression  converter;
40    private javax.el.ValueExpression  inline;
41    private javax.el.ValueExpression  value;
42  
43    @Override
44    public String getComponentType() {
45      return UIOut.COMPONENT_TYPE;
46    }
47    @Override
48    public String getRendererType() {
49      return "Out";
50    }
51  
52    @Override
53    protected void setProperties(final UIComponent uiComponent) {
54      super.setProperties(uiComponent);
55      final UIOut component = (UIOut) uiComponent;
56      final FacesContext context = FacesContext.getCurrentInstance();
57      final Application application = context.getApplication();
58      if (markup != null) {
59        if (!markup.isLiteralText()) {
60          component.setValueExpression("markup", markup);
61        } else {
62          component.setMarkup(org.apache.myfaces.tobago.context.Markup.valueOf(markup.getExpressionString()));
63        }
64      }
65      if (escape != null) {
66        if (!escape.isLiteralText()) {
67          component.setValueExpression("escape", escape);
68        } else {
69          component.setEscape(Boolean.parseBoolean(escape.getExpressionString()));
70        }
71      }
72      if (tip != null) {
73        component.setValueExpression("tip", tip);
74      }
75  
76      if (converter != null) {
77        if (!converter.isLiteralText()) {
78          component.setValueExpression("converter", converter);
79        } else {
80          component.setConverter(application.createConverter(converter.getExpressionString()));
81        }
82      }
83      if (inline != null) {
84        if (!inline.isLiteralText()) {
85          component.setValueExpression("inline", inline);
86        } else {
87          component.setInline(Boolean.parseBoolean(inline.getExpressionString()));
88        }
89      }
90      if (value != null) {
91        component.setValueExpression("value", value);
92      }
93  
94    }
95  
96    public javax.el.ValueExpression getMarkup() {
97      return markup;
98    }
99  
100   public void setMarkup(final javax.el.ValueExpression markup) {
101     this.markup = markup;
102   }
103 
104   public javax.el.ValueExpression getEscape() {
105     return escape;
106   }
107 
108   public void setEscape(final javax.el.ValueExpression escape) {
109     this.escape = escape;
110   }
111 
112   public javax.el.ValueExpression getTip() {
113     return tip;
114   }
115 
116   public void setTip(final javax.el.ValueExpression tip) {
117     this.tip = tip;
118   }
119 
120   public javax.el.ValueExpression getConverter() {
121     return converter;
122   }
123 
124   public void setConverter(final javax.el.ValueExpression converter) {
125     this.converter = converter;
126   }
127 
128   public javax.el.ValueExpression getInline() {
129     return inline;
130   }
131 
132   public void setInline(final javax.el.ValueExpression inline) {
133     this.inline = inline;
134   }
135 
136   public javax.el.ValueExpression getValue() {
137     return value;
138   }
139 
140   public void setValue(final javax.el.ValueExpression value) {
141     this.value = value;
142   }
143 
144 
145 
146   @Override
147   public void release() {
148     super.release();
149     markup = null;
150     escape = null;
151     tip = null;
152     converter = null;
153     inline = null;
154     value = null;
155   }
156 }