1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.myfaces.component.html.ext;
20
21 import javax.faces.context.FacesContext;
22
23 import org.apache.myfaces.component.DataProperties;
24 import org.apache.myfaces.component.DisplayValueOnlyAware;
25 import org.apache.myfaces.component.ForceIdAware;
26 import org.apache.myfaces.component.UserRoleAware;
27 import org.apache.myfaces.component.UserRoleUtils;
28 import org.apache.myfaces.component.html.util.HtmlComponentUtils;
29 import org.apache.myfaces.shared_tomahawk.component.DisplayValueOnlyCapable;
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44 public abstract class AbstractHtmlInputTextarea
45 extends javax.faces.component.html.HtmlInputTextarea
46 implements UserRoleAware, DisplayValueOnlyCapable,
47 ForceIdAware, DisplayValueOnlyAware, DataProperties
48 {
49 public static final String COMPONENT_TYPE = "org.apache.myfaces.HtmlInputTextarea";
50 public static final String DEFAULT_RENDERER_TYPE = "org.apache.myfaces.Textarea";
51
52 public String getClientId(FacesContext context)
53 {
54 String clientId = HtmlComponentUtils.getClientId(this, getRenderer(context), context);
55 if (clientId == null)
56 {
57 clientId = super.getClientId(context);
58 }
59
60 return clientId;
61 }
62
63 public boolean isRendered()
64 {
65 if (!UserRoleUtils.isVisibleOnUserRole(this)) return false;
66 return super.isRendered();
67 }
68
69 public boolean isSetDisplayValueOnly(){
70 return getDisplayValueOnly() != null ? true : false;
71 }
72
73 public boolean isDisplayValueOnly(){
74 return getDisplayValueOnly() != null ? getDisplayValueOnly().booleanValue() : false;
75 }
76
77 public void setDisplayValueOnly(boolean displayValueOnly){
78 this.setDisplayValueOnly((Boolean) Boolean.valueOf(displayValueOnly));
79 }
80
81
82
83
84
85
86
87
88 public abstract String getWrap();
89
90 }