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.UIWizard;
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.WizardTagDeclaration}.
33   */
34  public final class WizardTag extends TobagoELTag {
35    private static final Logger LOG = LoggerFactory.getLogger(WizardTag.class);
36    private javax.el.ValueExpression  markup;
37    private String var;
38    private javax.el.ValueExpression  title;
39    private String outcome;
40    private javax.el.ValueExpression  allowJumpForward;
41    private javax.el.ValueExpression  controller;
42  
43    @Override
44    public String getComponentType() {
45      return UIWizard.COMPONENT_TYPE;
46    }
47    @Override
48    public String getRendererType() {
49      return "Wizard";
50    }
51  
52    @Override
53    protected void setProperties(final UIComponent uiComponent) {
54      super.setProperties(uiComponent);
55      final UIWizard component = (UIWizard) 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 (var != null) {
66        component.setVar(var);
67      }
68  
69      if (title != null) {
70        component.setValueExpression("title", title);
71      }
72  
73      if (outcome != null) {
74        component.setOutcome(outcome);
75      }
76  
77      if (allowJumpForward != null) {
78        if (!allowJumpForward.isLiteralText()) {
79          component.setValueExpression("allowJumpForward", allowJumpForward);
80        } else {
81          component.setAllowJumpForward(Boolean.parseBoolean(allowJumpForward.getExpressionString()));
82        }
83      }
84      if (controller != null) {
85        if (!controller.isLiteralText()) {
86          component.setValueExpression("controller", controller);
87        /*} else {
88          component.setController(controller.getExpressionString());*/
89        }
90      }
91    }
92  
93    public javax.el.ValueExpression getMarkup() {
94      return markup;
95    }
96  
97    public void setMarkup(final javax.el.ValueExpression markup) {
98      this.markup = markup;
99    }
100 
101   public String getVar() {
102     return var;
103   }
104 
105   public void setVar(final String var) {
106     this.var = var;
107   }
108 
109   public javax.el.ValueExpression getTitle() {
110     return title;
111   }
112 
113   public void setTitle(final javax.el.ValueExpression title) {
114     this.title = title;
115   }
116 
117   public String getOutcome() {
118     return outcome;
119   }
120 
121   public void setOutcome(final String outcome) {
122     this.outcome = outcome;
123   }
124 
125   public javax.el.ValueExpression getAllowJumpForward() {
126     return allowJumpForward;
127   }
128 
129   public void setAllowJumpForward(final javax.el.ValueExpression allowJumpForward) {
130     this.allowJumpForward = allowJumpForward;
131   }
132 
133   public javax.el.ValueExpression getController() {
134     return controller;
135   }
136 
137   public void setController(final javax.el.ValueExpression controller) {
138     this.controller = controller;
139   }
140 
141 
142 
143   @Override
144   public void release() {
145     super.release();
146     markup = null;
147     var = null;
148     title = null;
149     outcome = null;
150     allowJumpForward = null;
151     controller = null;
152   }
153 }