1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.myfaces.taglib.html.ext;
20
21 import javax.faces.component.UIComponent;
22 import org.apache.myfaces.shared_tomahawk.component.DisplayValueOnlyCapable;
23 import org.apache.myfaces.component.UserRoleAware;
24 import org.apache.myfaces.component.html.ext.HtmlPanelGroup;
25 import org.apache.myfaces.shared_tomahawk.renderkit.html.HTML;
26 import org.apache.myfaces.shared_tomahawk.taglib.html.HtmlPanelGroupTagBase;
27
28
29
30
31
32 public class HtmlPanelGroupTag
33 extends HtmlPanelGroupTagBase
34 {
35 private static final String LAYOUT_ATTR = "layout";
36
37 public String getComponentType()
38 {
39 return HtmlPanelGroup.COMPONENT_TYPE;
40 }
41
42 public String getRendererType()
43 {
44 return HtmlPanelGroup.DEFAULT_RENDERER_TYPE;
45 }
46
47 private String _enabledOnUserRole;
48 private String _visibleOnUserRole;
49
50 private String _displayValueOnly;
51 private String _displayValueOnlyStyle;
52 private String _displayValueOnlyStyleClass;
53
54 private String _layout;
55
56 private String _colspan;
57
58 public void release() {
59 super.release();
60 _enabledOnUserRole=null;
61 _visibleOnUserRole=null;
62 _colspan=null;
63 _layout = null;
64 _displayValueOnly = null;
65 _displayValueOnlyStyle = null;
66 _displayValueOnlyStyleClass = null;
67 }
68
69 protected void setProperties(UIComponent component)
70 {
71 super.setProperties(component);
72 setStringProperty(component, UserRoleAware.ENABLED_ON_USER_ROLE_ATTR, _enabledOnUserRole);
73 setStringProperty(component, UserRoleAware.VISIBLE_ON_USER_ROLE_ATTR, _visibleOnUserRole);
74
75 setBooleanProperty(component, DisplayValueOnlyCapable.DISPLAY_VALUE_ONLY_ATTR, _displayValueOnly);
76 setStringProperty(component, DisplayValueOnlyCapable.DISPLAY_VALUE_ONLY_STYLE_ATTR, _displayValueOnlyStyle);
77 setStringProperty(component, DisplayValueOnlyCapable.DISPLAY_VALUE_ONLY_STYLE_CLASS_ATTR, _displayValueOnlyStyleClass);
78 setIntegerProperty(component, HTML.COLSPAN_ATTR, _colspan);
79 setStringProperty(component, LAYOUT_ATTR, _layout);
80 }
81
82 public void setEnabledOnUserRole(String enabledOnUserRole)
83 {
84 _enabledOnUserRole = enabledOnUserRole;
85 }
86
87 public void setVisibleOnUserRole(String visibleOnUserRole)
88 {
89 _visibleOnUserRole = visibleOnUserRole;
90 }
91
92 public void setDisplayValueOnly(String displayValueOnly)
93 {
94 _displayValueOnly = displayValueOnly;
95 }
96
97 public void setDisplayValueOnlyStyle(String displayValueOnlyStyle)
98 {
99 _displayValueOnlyStyle = displayValueOnlyStyle;
100 }
101
102 public void setDisplayValueOnlyStyleClass(String displayValueOnlyStyleClass)
103 {
104 _displayValueOnlyStyleClass = displayValueOnlyStyleClass;
105 }
106
107 public void setLayout(String layout)
108 {
109 _layout = layout;
110 }
111 public void setColspan(String colspan)
112 {
113 _colspan = colspan;
114 }
115 }