1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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.commons.lang.StringUtils;
26 import org.apache.myfaces.tobago.component.UIPanel;
27 import org.slf4j.Logger;
28 import org.slf4j.LoggerFactory;
29
30
31
32
33
34 public final class PanelTag extends TobagoELTag {
35 private static final Logger LOG = LoggerFactory.getLogger(PanelTag.class);
36 private javax.el.ValueExpression markup;
37 private javax.el.ValueExpression tip;
38
39 @Override
40 public String getComponentType() {
41 return UIPanel.COMPONENT_TYPE;
42 }
43 @Override
44 public String getRendererType() {
45 return "Panel";
46 }
47
48 @Override
49 protected void setProperties(final UIComponent uiComponent) {
50 super.setProperties(uiComponent);
51 final UIPanel component = (UIPanel) uiComponent;
52 final FacesContext context = FacesContext.getCurrentInstance();
53 final Application application = context.getApplication();
54 if (markup != null) {
55 if (!markup.isLiteralText()) {
56 component.setValueExpression("markup", markup);
57 } else {
58 component.setMarkup(org.apache.myfaces.tobago.context.Markup.valueOf(markup.getExpressionString()));
59 }
60 }
61 if (tip != null) {
62 component.setValueExpression("tip", tip);
63 }
64
65 }
66
67 public javax.el.ValueExpression getMarkup() {
68 return markup;
69 }
70
71 public void setMarkup(final javax.el.ValueExpression markup) {
72 this.markup = markup;
73 }
74
75 public javax.el.ValueExpression getTip() {
76 return tip;
77 }
78
79 public void setTip(final javax.el.ValueExpression tip) {
80 this.tip = tip;
81 }
82
83
84
85 @Override
86 public void release() {
87 super.release();
88 markup = null;
89 tip = null;
90 }
91 }