1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
|
18 | |
|
19 | |
package org.apache.myfaces.view.facelets.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 JsfElement extends javax.faces.component.UIPanel |
31 | |
implements javax.faces.component.behavior.ClientBehaviorHolder |
32 | |
{ |
33 | |
|
34 | |
static public final String COMPONENT_FAMILY = |
35 | |
"javax.faces.Panel"; |
36 | |
static public final String COMPONENT_TYPE = |
37 | |
"oam.passthrough.Element"; |
38 | |
|
39 | |
|
40 | |
public JsfElement() |
41 | 0 | { |
42 | 0 | setRendererType("javax.faces.passthrough.Element"); |
43 | 0 | } |
44 | |
|
45 | |
@Override |
46 | |
public String getFamily() |
47 | |
{ |
48 | 0 | return COMPONENT_FAMILY; |
49 | |
} |
50 | |
|
51 | |
|
52 | 0 | static private final java.util.Collection<String> CLIENT_EVENTS_LIST = |
53 | |
java.util.Collections.unmodifiableCollection( |
54 | |
java.util.Arrays.asList( |
55 | |
"load" |
56 | |
, "unload" |
57 | |
, "blur" |
58 | |
, "focus" |
59 | |
, "change" |
60 | |
, "select" |
61 | |
, "click" |
62 | |
, "dblclick" |
63 | |
, "keydown" |
64 | |
, "keypress" |
65 | |
, "keyup" |
66 | |
, "mousedown" |
67 | |
, "mousemove" |
68 | |
, "mouseout" |
69 | |
, "mouseover" |
70 | |
, "mouseup" |
71 | |
)); |
72 | |
|
73 | |
public java.util.Collection<String> getEventNames() |
74 | |
{ |
75 | 0 | return CLIENT_EVENTS_LIST; |
76 | |
} |
77 | |
|
78 | |
@Override |
79 | |
public void addClientBehavior(String eventName, javax.faces.component.behavior.ClientBehavior behavior) |
80 | |
{ |
81 | 0 | super.addClientBehavior(eventName, behavior); |
82 | 0 | _CommonEventConstants.markEvent(this, eventName); |
83 | 0 | } |
84 | |
|
85 | |
|
86 | |
public String getDefaultEventName() |
87 | |
{ |
88 | 0 | return "click"; |
89 | |
} |
90 | |
|
91 | |
|
92 | |
|
93 | |
|
94 | |
public String getOnload() |
95 | |
{ |
96 | 0 | return (String) getStateHelper().eval(PropertyKeys.onload); |
97 | |
} |
98 | |
|
99 | |
public void setOnload(String onload) |
100 | |
{ |
101 | 0 | getStateHelper().put(PropertyKeys.onload, onload ); |
102 | 0 | } |
103 | |
|
104 | |
|
105 | |
public String getOnunload() |
106 | |
{ |
107 | 0 | return (String) getStateHelper().eval(PropertyKeys.onunload); |
108 | |
} |
109 | |
|
110 | |
public void setOnunload(String onunload) |
111 | |
{ |
112 | 0 | getStateHelper().put(PropertyKeys.onunload, onunload ); |
113 | 0 | } |
114 | |
|
115 | |
|
116 | |
public String getStyle() |
117 | |
{ |
118 | 0 | return (String) getStateHelper().eval(PropertyKeys.style); |
119 | |
} |
120 | |
|
121 | |
public void setStyle(String style) |
122 | |
{ |
123 | 0 | getStateHelper().put(PropertyKeys.style, style ); |
124 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.STYLE_PROP); |
125 | 0 | } |
126 | |
|
127 | |
|
128 | |
public String getStyleClass() |
129 | |
{ |
130 | 0 | return (String) getStateHelper().eval(PropertyKeys.styleClass); |
131 | |
} |
132 | |
|
133 | |
public void setStyleClass(String styleClass) |
134 | |
{ |
135 | 0 | getStateHelper().put(PropertyKeys.styleClass, styleClass ); |
136 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.STYLECLASS_PROP); |
137 | 0 | } |
138 | |
|
139 | |
|
140 | |
public String getOnblur() |
141 | |
{ |
142 | 0 | return (String) getStateHelper().eval(PropertyKeys.onblur); |
143 | |
} |
144 | |
|
145 | |
public void setOnblur(String onblur) |
146 | |
{ |
147 | 0 | getStateHelper().put(PropertyKeys.onblur, onblur ); |
148 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONBLUR_PROP); |
149 | 0 | } |
150 | |
|
151 | |
|
152 | |
public String getOnfocus() |
153 | |
{ |
154 | 0 | return (String) getStateHelper().eval(PropertyKeys.onfocus); |
155 | |
} |
156 | |
|
157 | |
public void setOnfocus(String onfocus) |
158 | |
{ |
159 | 0 | getStateHelper().put(PropertyKeys.onfocus, onfocus ); |
160 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONFOCUS_PROP); |
161 | 0 | } |
162 | |
|
163 | |
|
164 | |
public String getOnchange() |
165 | |
{ |
166 | 0 | return (String) getStateHelper().eval(PropertyKeys.onchange); |
167 | |
} |
168 | |
|
169 | |
public void setOnchange(String onchange) |
170 | |
{ |
171 | 0 | getStateHelper().put(PropertyKeys.onchange, onchange ); |
172 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONCHANGE_PROP); |
173 | 0 | } |
174 | |
|
175 | |
|
176 | |
public String getOnselect() |
177 | |
{ |
178 | 0 | return (String) getStateHelper().eval(PropertyKeys.onselect); |
179 | |
} |
180 | |
|
181 | |
public void setOnselect(String onselect) |
182 | |
{ |
183 | 0 | getStateHelper().put(PropertyKeys.onselect, onselect ); |
184 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONSELECT_PROP); |
185 | 0 | } |
186 | |
|
187 | |
|
188 | |
public String getOnclick() |
189 | |
{ |
190 | 0 | return (String) getStateHelper().eval(PropertyKeys.onclick); |
191 | |
} |
192 | |
|
193 | |
public void setOnclick(String onclick) |
194 | |
{ |
195 | 0 | getStateHelper().put(PropertyKeys.onclick, onclick ); |
196 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONCLICK_PROP); |
197 | 0 | } |
198 | |
|
199 | |
|
200 | |
public String getOndblclick() |
201 | |
{ |
202 | 0 | return (String) getStateHelper().eval(PropertyKeys.ondblclick); |
203 | |
} |
204 | |
|
205 | |
public void setOndblclick(String ondblclick) |
206 | |
{ |
207 | 0 | getStateHelper().put(PropertyKeys.ondblclick, ondblclick ); |
208 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONDBLCLICK_PROP); |
209 | 0 | } |
210 | |
|
211 | |
|
212 | |
public String getOnkeydown() |
213 | |
{ |
214 | 0 | return (String) getStateHelper().eval(PropertyKeys.onkeydown); |
215 | |
} |
216 | |
|
217 | |
public void setOnkeydown(String onkeydown) |
218 | |
{ |
219 | 0 | getStateHelper().put(PropertyKeys.onkeydown, onkeydown ); |
220 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONKEYDOWN_PROP); |
221 | 0 | } |
222 | |
|
223 | |
|
224 | |
public String getOnkeypress() |
225 | |
{ |
226 | 0 | return (String) getStateHelper().eval(PropertyKeys.onkeypress); |
227 | |
} |
228 | |
|
229 | |
public void setOnkeypress(String onkeypress) |
230 | |
{ |
231 | 0 | getStateHelper().put(PropertyKeys.onkeypress, onkeypress ); |
232 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONKEYPRESS_PROP); |
233 | 0 | } |
234 | |
|
235 | |
|
236 | |
public String getOnkeyup() |
237 | |
{ |
238 | 0 | return (String) getStateHelper().eval(PropertyKeys.onkeyup); |
239 | |
} |
240 | |
|
241 | |
public void setOnkeyup(String onkeyup) |
242 | |
{ |
243 | 0 | getStateHelper().put(PropertyKeys.onkeyup, onkeyup ); |
244 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONKEYUP_PROP); |
245 | 0 | } |
246 | |
|
247 | |
|
248 | |
public String getOnmousedown() |
249 | |
{ |
250 | 0 | return (String) getStateHelper().eval(PropertyKeys.onmousedown); |
251 | |
} |
252 | |
|
253 | |
public void setOnmousedown(String onmousedown) |
254 | |
{ |
255 | 0 | getStateHelper().put(PropertyKeys.onmousedown, onmousedown ); |
256 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONMOUSEDOWN_PROP); |
257 | 0 | } |
258 | |
|
259 | |
|
260 | |
public String getOnmousemove() |
261 | |
{ |
262 | 0 | return (String) getStateHelper().eval(PropertyKeys.onmousemove); |
263 | |
} |
264 | |
|
265 | |
public void setOnmousemove(String onmousemove) |
266 | |
{ |
267 | 0 | getStateHelper().put(PropertyKeys.onmousemove, onmousemove ); |
268 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONMOUSEMOVE_PROP); |
269 | 0 | } |
270 | |
|
271 | |
|
272 | |
public String getOnmouseout() |
273 | |
{ |
274 | 0 | return (String) getStateHelper().eval(PropertyKeys.onmouseout); |
275 | |
} |
276 | |
|
277 | |
public void setOnmouseout(String onmouseout) |
278 | |
{ |
279 | 0 | getStateHelper().put(PropertyKeys.onmouseout, onmouseout ); |
280 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONMOUSEOUT_PROP); |
281 | 0 | } |
282 | |
|
283 | |
|
284 | |
public String getOnmouseover() |
285 | |
{ |
286 | 0 | return (String) getStateHelper().eval(PropertyKeys.onmouseover); |
287 | |
} |
288 | |
|
289 | |
public void setOnmouseover(String onmouseover) |
290 | |
{ |
291 | 0 | getStateHelper().put(PropertyKeys.onmouseover, onmouseover ); |
292 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONMOUSEOVER_PROP); |
293 | 0 | } |
294 | |
|
295 | |
|
296 | |
public String getOnmouseup() |
297 | |
{ |
298 | 0 | return (String) getStateHelper().eval(PropertyKeys.onmouseup); |
299 | |
} |
300 | |
|
301 | |
public void setOnmouseup(String onmouseup) |
302 | |
{ |
303 | 0 | getStateHelper().put(PropertyKeys.onmouseup, onmouseup ); |
304 | 0 | _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONMOUSEUP_PROP); |
305 | 0 | } |
306 | |
|
307 | |
|
308 | 0 | enum PropertyKeys |
309 | |
{ |
310 | 0 | onload |
311 | 0 | , onunload |
312 | 0 | , style |
313 | 0 | , styleClass |
314 | 0 | , onblur |
315 | 0 | , onfocus |
316 | 0 | , onchange |
317 | 0 | , onselect |
318 | 0 | , onclick |
319 | 0 | , ondblclick |
320 | 0 | , onkeydown |
321 | 0 | , onkeypress |
322 | 0 | , onkeyup |
323 | 0 | , onmousedown |
324 | 0 | , onmousemove |
325 | 0 | , onmouseout |
326 | 0 | , onmouseover |
327 | 0 | , onmouseup |
328 | |
} |
329 | |
|
330 | |
} |