[jsr372-experts] ClientBehaviorContext()

From: Kito Mann <kito.mann_at_virtua.com>
Date: Mon, 22 Jun 2015 11:58:45 -0400

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?

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://
* JSFCentral Interviews Podcast:
* Sign up for the JSFCentral Newsletter: http://oi.vresp.com/?fid=ac048d0e17