1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package javax.faces.component;
20
21 import javax.el.ValueExpression;
22 import javax.faces.context.FacesContext;
23 import javax.faces.component.UIComponent;
24
25
26
27
28
29
30 public class UIMessage extends javax.faces.component.UIComponentBase
31 {
32
33 static public final String COMPONENT_FAMILY =
34 "javax.faces.Message";
35 static public final String COMPONENT_TYPE =
36 "javax.faces.Message";
37
38
39 public UIMessage()
40 {
41 setRendererType("javax.faces.Message");
42 }
43
44 @Override
45 public String getFamily()
46 {
47 return COMPONENT_FAMILY;
48 }
49
50
51
52
53
54
55 public String getFor()
56 {
57 return (String) getStateHelper().eval(PropertyKeys.forVal);
58 }
59
60 public void setFor(String forParam)
61 {
62 getStateHelper().put(PropertyKeys.forVal, forParam );
63 }
64
65
66 public boolean isShowDetail()
67 {
68 return (Boolean) getStateHelper().eval(PropertyKeys.showDetail, true);
69 }
70
71 public void setShowDetail(boolean showDetail)
72 {
73 getStateHelper().put(PropertyKeys.showDetail, showDetail );
74 }
75
76
77 public boolean isShowSummary()
78 {
79 return (Boolean) getStateHelper().eval(PropertyKeys.showSummary, false);
80 }
81
82 public void setShowSummary(boolean showSummary)
83 {
84 getStateHelper().put(PropertyKeys.showSummary, showSummary );
85 }
86
87
88 public boolean isRedisplay()
89 {
90 return (Boolean) getStateHelper().eval(PropertyKeys.redisplay, true);
91 }
92
93 public void setRedisplay(boolean redisplay)
94 {
95 getStateHelper().put(PropertyKeys.redisplay, redisplay );
96 }
97
98
99 enum PropertyKeys
100 {
101 forVal("for")
102 , showDetail
103 , showSummary
104 , redisplay
105 ;
106 String c;
107
108 PropertyKeys()
109 {
110 }
111
112
113 PropertyKeys(String c)
114 {
115 this.c = c;
116 }
117
118 public String toString()
119 {
120 return ((this.c != null) ? this.c : super.toString());
121 }
122 }
123
124 }