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.UISheetLayout;
27 import org.slf4j.Logger;
28 import org.slf4j.LoggerFactory;
29
30
31
32
33
34 public final class SheetLayoutTag extends TobagoELTag {
35 private static final Logger LOG = LoggerFactory.getLogger(SheetLayoutTag.class);
36 private javax.el.ValueExpression markup;
37
38 @Override
39 public String getComponentType() {
40 return UISheetLayout.COMPONENT_TYPE;
41 }
42 @Override
43 public String getRendererType() {
44 return "SheetLayout";
45 }
46
47 @Override
48 protected void setProperties(final UIComponent uiComponent) {
49 super.setProperties(uiComponent);
50 final UISheetLayout component = (UISheetLayout) uiComponent;
51 final FacesContext context = FacesContext.getCurrentInstance();
52 final Application application = context.getApplication();
53 if (markup != null) {
54 if (!markup.isLiteralText()) {
55 component.setValueExpression("markup", markup);
56 } else {
57 component.setMarkup(org.apache.myfaces.tobago.context.Markup.valueOf(markup.getExpressionString()));
58 }
59 }
60 }
61
62 public javax.el.ValueExpression getMarkup() {
63 return markup;
64 }
65
66 public void setMarkup(final javax.el.ValueExpression markup) {
67 this.markup = markup;
68 }
69
70
71
72 @Override
73 public void release() {
74 super.release();
75 markup = null;
76 }
77 }