1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
|
18 | |
|
19 | |
package javax.faces.component.html; |
20 | |
|
21 | |
import javax.faces.el.ValueBinding; |
22 | |
import javax.el.ValueExpression; |
23 | |
import javax.faces.context.FacesContext; |
24 | |
import javax.faces.component.UIComponent; |
25 | |
|
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
public class HtmlMessage extends javax.faces.component.UIMessage |
32 | |
{ |
33 | |
|
34 | |
static public final String COMPONENT_FAMILY = |
35 | |
"javax.faces.Message"; |
36 | |
static public final String COMPONENT_TYPE = |
37 | |
"javax.faces.HtmlMessage"; |
38 | |
|
39 | |
|
40 | |
public HtmlMessage() |
41 | 0 | { |
42 | 0 | setRendererType("javax.faces.Message"); |
43 | 0 | } |
44 | |
|
45 | |
@Override |
46 | |
public String getFamily() |
47 | |
{ |
48 | 0 | return COMPONENT_FAMILY; |
49 | |
} |
50 | |
|
51 | |
|
52 | |
|
53 | |
|
54 | |
|
55 | |
|
56 | |
public String getStyle() |
57 | |
{ |
58 | 0 | return (String) getStateHelper().eval(PropertyKeys.style); |
59 | |
} |
60 | |
|
61 | |
public void setStyle(String style) |
62 | |
{ |
63 | 0 | getStateHelper().put(PropertyKeys.style, style ); |
64 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.STYLE_PROP); |
65 | 0 | } |
66 | |
|
67 | |
|
68 | |
public String getStyleClass() |
69 | |
{ |
70 | 0 | return (String) getStateHelper().eval(PropertyKeys.styleClass); |
71 | |
} |
72 | |
|
73 | |
public void setStyleClass(String styleClass) |
74 | |
{ |
75 | 0 | getStateHelper().put(PropertyKeys.styleClass, styleClass ); |
76 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.STYLECLASS_PROP); |
77 | 0 | } |
78 | |
|
79 | |
|
80 | |
public String getErrorClass() |
81 | |
{ |
82 | 0 | return (String) getStateHelper().eval(PropertyKeys.errorClass); |
83 | |
} |
84 | |
|
85 | |
public void setErrorClass(String errorClass) |
86 | |
{ |
87 | 0 | getStateHelper().put(PropertyKeys.errorClass, errorClass ); |
88 | 0 | } |
89 | |
|
90 | |
|
91 | |
public String getErrorStyle() |
92 | |
{ |
93 | 0 | return (String) getStateHelper().eval(PropertyKeys.errorStyle); |
94 | |
} |
95 | |
|
96 | |
public void setErrorStyle(String errorStyle) |
97 | |
{ |
98 | 0 | getStateHelper().put(PropertyKeys.errorStyle, errorStyle ); |
99 | 0 | } |
100 | |
|
101 | |
|
102 | |
public String getFatalClass() |
103 | |
{ |
104 | 0 | return (String) getStateHelper().eval(PropertyKeys.fatalClass); |
105 | |
} |
106 | |
|
107 | |
public void setFatalClass(String fatalClass) |
108 | |
{ |
109 | 0 | getStateHelper().put(PropertyKeys.fatalClass, fatalClass ); |
110 | 0 | } |
111 | |
|
112 | |
|
113 | |
public String getFatalStyle() |
114 | |
{ |
115 | 0 | return (String) getStateHelper().eval(PropertyKeys.fatalStyle); |
116 | |
} |
117 | |
|
118 | |
public void setFatalStyle(String fatalStyle) |
119 | |
{ |
120 | 0 | getStateHelper().put(PropertyKeys.fatalStyle, fatalStyle ); |
121 | 0 | } |
122 | |
|
123 | |
|
124 | |
public String getInfoClass() |
125 | |
{ |
126 | 0 | return (String) getStateHelper().eval(PropertyKeys.infoClass); |
127 | |
} |
128 | |
|
129 | |
public void setInfoClass(String infoClass) |
130 | |
{ |
131 | 0 | getStateHelper().put(PropertyKeys.infoClass, infoClass ); |
132 | 0 | } |
133 | |
|
134 | |
|
135 | |
public String getInfoStyle() |
136 | |
{ |
137 | 0 | return (String) getStateHelper().eval(PropertyKeys.infoStyle); |
138 | |
} |
139 | |
|
140 | |
public void setInfoStyle(String infoStyle) |
141 | |
{ |
142 | 0 | getStateHelper().put(PropertyKeys.infoStyle, infoStyle ); |
143 | 0 | } |
144 | |
|
145 | |
|
146 | |
public boolean isTooltip() |
147 | |
{ |
148 | 0 | return (Boolean) getStateHelper().eval(PropertyKeys.tooltip, false); |
149 | |
} |
150 | |
|
151 | |
public void setTooltip(boolean tooltip) |
152 | |
{ |
153 | 0 | getStateHelper().put(PropertyKeys.tooltip, tooltip ); |
154 | 0 | } |
155 | |
|
156 | |
|
157 | |
public String getWarnClass() |
158 | |
{ |
159 | 0 | return (String) getStateHelper().eval(PropertyKeys.warnClass); |
160 | |
} |
161 | |
|
162 | |
public void setWarnClass(String warnClass) |
163 | |
{ |
164 | 0 | getStateHelper().put(PropertyKeys.warnClass, warnClass ); |
165 | 0 | } |
166 | |
|
167 | |
|
168 | |
public String getWarnStyle() |
169 | |
{ |
170 | 0 | return (String) getStateHelper().eval(PropertyKeys.warnStyle); |
171 | |
} |
172 | |
|
173 | |
public void setWarnStyle(String warnStyle) |
174 | |
{ |
175 | 0 | getStateHelper().put(PropertyKeys.warnStyle, warnStyle ); |
176 | 0 | } |
177 | |
|
178 | |
|
179 | |
public String getRole() |
180 | |
{ |
181 | 0 | return (String) getStateHelper().eval(PropertyKeys.role); |
182 | |
} |
183 | |
|
184 | |
public void setRole(String role) |
185 | |
{ |
186 | 0 | getStateHelper().put(PropertyKeys.role, role ); |
187 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ROLE_PROP); |
188 | 0 | } |
189 | |
|
190 | |
|
191 | |
public String getDir() |
192 | |
{ |
193 | 0 | return (String) getStateHelper().eval(PropertyKeys.dir); |
194 | |
} |
195 | |
|
196 | |
public void setDir(String dir) |
197 | |
{ |
198 | 0 | getStateHelper().put(PropertyKeys.dir, dir ); |
199 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.DIR_PROP); |
200 | 0 | } |
201 | |
|
202 | |
|
203 | |
public String getLang() |
204 | |
{ |
205 | 0 | return (String) getStateHelper().eval(PropertyKeys.lang); |
206 | |
} |
207 | |
|
208 | |
public void setLang(String lang) |
209 | |
{ |
210 | 0 | getStateHelper().put(PropertyKeys.lang, lang ); |
211 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.LANG_PROP); |
212 | 0 | } |
213 | |
|
214 | |
|
215 | |
public String getTitle() |
216 | |
{ |
217 | 0 | return (String) getStateHelper().eval(PropertyKeys.title); |
218 | |
} |
219 | |
|
220 | |
public void setTitle(String title) |
221 | |
{ |
222 | 0 | getStateHelper().put(PropertyKeys.title, title ); |
223 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.TITLE_PROP); |
224 | 0 | } |
225 | |
|
226 | |
public void setValueBinding(String name, ValueBinding binding) |
227 | |
{ |
228 | 0 | super.setValueBinding(name, binding); |
229 | 0 | _CommonPropertyConstants.markProperty(this, name); |
230 | 0 | } |
231 | |
|
232 | |
public void setValueExpression(String name, ValueExpression expression) |
233 | |
{ |
234 | 0 | super.setValueExpression(name, expression); |
235 | 0 | _CommonPropertyConstants.markProperty(this, name); |
236 | 0 | } |
237 | |
|
238 | 0 | protected enum PropertyKeys |
239 | |
{ |
240 | 0 | style |
241 | 0 | , styleClass |
242 | 0 | , errorClass |
243 | 0 | , errorStyle |
244 | 0 | , fatalClass |
245 | 0 | , fatalStyle |
246 | 0 | , infoClass |
247 | 0 | , infoStyle |
248 | 0 | , tooltip |
249 | 0 | , warnClass |
250 | 0 | , warnStyle |
251 | 0 | , role |
252 | 0 | , dir |
253 | 0 | , lang |
254 | 0 | , title |
255 | |
} |
256 | |
|
257 | |
} |