I recently ran into a situation where we were creating model objects (in
this case, menu items) that have a direct client-side representation and
needed to provide client behavior (i.e. provide script to the parent UI
component). Logically, you would want the menu items to implement
BehaviorHolder. However, ClientBehaviorContext requires a UIComponent as
the sender, so doing so would require creating a UIComponent wrapper around
the model object, which is sketchy.
We came up with a work-around, but I wonder if ClientBehaviorContext should
be more open. Perhaps provide the ability for the sender to be an Object
instead of a UIComponent. Has anyone else run into this limitation?
Thoughts?
___
Kito D. Mann | @kito99 | Author, JSF in Action
Virtua, Inc. |
http://www.virtua.com | JSF/Java EE training and consulting
http://www.JSFCentral.com | @jsfcentral
+1 203-998-0403
* Listen to the Enterprise Java Newscast: *http://
<
http://blogs.jsfcentral.com/JSFNewscast/>enterprisejavanews.com
<
http://ww.enterprisejavanews.com>*
* JSFCentral Interviews Podcast:
http://www.jsfcentral.com/resources/jsfcentralpodcasts/
* Sign up for the JSFCentral Newsletter:
http://oi.vresp.com/?fid=ac048d0e17