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 org.apache.myfaces.shared_tomahawk.component.DisplayValueOnlyCapable;
22 import org.apache.myfaces.shared_tomahawk.renderkit.JSFAttr;
23 import org.apache.myfaces.shared_tomahawk.taglib.html.HtmlSelectBooleanCheckboxTagBase;
24 import org.apache.myfaces.component.UserRoleAware;
25 import org.apache.myfaces.component.html.ext.HtmlSelectBooleanCheckbox;
26
27 import javax.faces.component.UIComponent;
28
29
30
31
32
33
34 public class HtmlSelectBooleanCheckboxTag
35 extends HtmlSelectBooleanCheckboxTagBase
36 {
37 public String getComponentType()
38 {
39 return HtmlSelectBooleanCheckbox.COMPONENT_TYPE;
40 }
41
42 public String getRendererType()
43 {
44 return HtmlSelectBooleanCheckbox.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 _escape;
55
56 public void release() {
57 super.release();
58 _enabledOnUserRole=null;
59 _visibleOnUserRole=null;
60
61 _displayValueOnly=null;
62 _displayValueOnlyStyle=null;
63 _displayValueOnlyStyleClass=null;
64 _escape = null;
65 }
66
67 protected void setProperties(UIComponent component)
68 {
69 super.setProperties(component);
70 setStringProperty(component, UserRoleAware.ENABLED_ON_USER_ROLE_ATTR, _enabledOnUserRole);
71 setStringProperty(component, UserRoleAware.VISIBLE_ON_USER_ROLE_ATTR, _visibleOnUserRole);
72
73 setBooleanProperty(component, DisplayValueOnlyCapable.DISPLAY_VALUE_ONLY_ATTR, _displayValueOnly);
74 setStringProperty(component, DisplayValueOnlyCapable.DISPLAY_VALUE_ONLY_STYLE_ATTR, _displayValueOnlyStyle);
75 setStringProperty(component, DisplayValueOnlyCapable.DISPLAY_VALUE_ONLY_STYLE_CLASS_ATTR, _displayValueOnlyStyleClass);
76 setBooleanProperty(component, JSFAttr.ESCAPE_ATTR, _escape);
77 }
78
79 public void setEscape(String escape)
80 {
81 _escape = escape;
82 }
83
84 public void setEnabledOnUserRole(String enabledOnUserRole)
85 {
86 _enabledOnUserRole = enabledOnUserRole;
87 }
88
89 public void setVisibleOnUserRole(String visibleOnUserRole)
90 {
91 _visibleOnUserRole = visibleOnUserRole;
92 }
93
94 public void setDisplayValueOnly(String displayValueOnly)
95 {
96 _displayValueOnly = displayValueOnly;
97 }
98
99 public void setDisplayValueOnlyStyle(String displayValueOnlyStyle)
100 {
101 _displayValueOnlyStyle = displayValueOnlyStyle;
102 }
103
104 public void setDisplayValueOnlyStyleClass(String displayValueOnlyStyleClass)
105 {
106 _displayValueOnlyStyleClass = displayValueOnlyStyleClass;
107 }
108 }