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.component.UserRoleAware;
22 import org.apache.myfaces.component.html.ext.HtmlOutputLabel;
23 import org.apache.myfaces.shared_tomahawk.taglib.html.HtmlOutputLabelTagBase;
24
25 import javax.faces.component.UIComponent;
26
27
28
29
30
31 public class HtmlOutputLabelTag
32 extends HtmlOutputLabelTagBase
33 {
34 public String getComponentType()
35 {
36 return HtmlOutputLabel.COMPONENT_TYPE;
37 }
38
39 public String getRendererType()
40 {
41 return HtmlOutputLabel.DEFAULT_RENDERER_TYPE;
42 }
43
44 private String _enabledOnUserRole;
45 private String _visibleOnUserRole;
46
47 public void release() {
48 super.release();
49 _enabledOnUserRole=null;
50 _visibleOnUserRole=null;
51 }
52
53 protected void setProperties(UIComponent component)
54 {
55 super.setProperties(component);
56 setStringProperty(component, UserRoleAware.ENABLED_ON_USER_ROLE_ATTR, _enabledOnUserRole);
57 setStringProperty(component, UserRoleAware.VISIBLE_ON_USER_ROLE_ATTR, _visibleOnUserRole);
58 }
59
60 public void setEnabledOnUserRole(String enabledOnUserRole)
61 {
62 _enabledOnUserRole = enabledOnUserRole;
63 }
64
65 public void setVisibleOnUserRole(String visibleOnUserRole)
66 {
67 _visibleOnUserRole = visibleOnUserRole;
68 }
69
70 }