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
23 import org.apache.myfaces.shared_tomahawk.component.DisplayValueOnlyCapable;
24 import org.apache.myfaces.component.UserRoleAware;
25 import org.apache.myfaces.component.html.ext.HtmlInputTextarea;
26 import org.apache.myfaces.shared_tomahawk.renderkit.html.HTML;
27 import org.apache.myfaces.shared_tomahawk.taglib.html.HtmlInputTextareaTagBase;
28
29
30
31
32
33 public class HtmlInputTextareaTag
34 extends HtmlInputTextareaTagBase
35 {
36 public String getComponentType()
37 {
38 return HtmlInputTextarea.COMPONENT_TYPE;
39 }
40
41 public String getRendererType()
42 {
43 return HtmlInputTextarea.DEFAULT_RENDERER_TYPE;
44 }
45
46 private String _enabledOnUserRole;
47 private String _visibleOnUserRole;
48
49 private String _displayValueOnly;
50 private String _displayValueOnlyStyle;
51 private String _displayValueOnlyStyleClass;
52
53 private String _wrap;
54
55 public void release() {
56 super.release();
57
58 _enabledOnUserRole=null;
59 _visibleOnUserRole=null;
60
61 _displayValueOnly=null;
62 _displayValueOnlyStyle=null;
63 _displayValueOnlyStyleClass=null;
64
65 _wrap = null;
66 }
67
68 protected void setProperties(UIComponent component)
69 {
70 super.setProperties(component);
71 setStringProperty(component, UserRoleAware.ENABLED_ON_USER_ROLE_ATTR, _enabledOnUserRole);
72 setStringProperty(component, UserRoleAware.VISIBLE_ON_USER_ROLE_ATTR, _visibleOnUserRole);
73
74 setBooleanProperty(component, DisplayValueOnlyCapable.DISPLAY_VALUE_ONLY_ATTR, _displayValueOnly);
75 setStringProperty(component, DisplayValueOnlyCapable.DISPLAY_VALUE_ONLY_STYLE_ATTR, _displayValueOnlyStyle);
76 setStringProperty(component, DisplayValueOnlyCapable.DISPLAY_VALUE_ONLY_STYLE_CLASS_ATTR, _displayValueOnlyStyleClass);
77
78 setStringProperty(component, HTML.WRAP_ATTR, _wrap);
79
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 public void setWrap(String wrap)
107 {
108 _wrap = wrap;
109 }
110 }