On Mon, 19 Jul 2010, Greg Brown wrote:

I think of these kinds of events as a part of the public interface of a component. Listeners respond to events they're interested in. One such event may be---to use a very verbose and impractical name---"add a new address form". Or "refresh this data model". Or "follow this link". Usually these events are dispatched by a push button, but sometimes they can be dispatched from selections in a list or table, or selection made with a radio button or check buttons.

These are exactly the kind of events that EventBus and Pivot's pub/sub API are intended to support. I'd suggest taking a look at one of those - you may find a simpler solution to your problem.

I did. That system supports application global events, no? I want to use hierarchy-scoped events. If I send a "refresh the data model" or "follow this link" event, I don't want notify every possible listener in the application. I want to notify an ancestor. For example, I may have n data models. Or different components may have different interpretations of "follow this link".

Michael

Reply via email to