Revisiting Contextual Event : Dynamic Event Producer, Manual Region Refresh, Conditional Event Subscription and using Managed Bean as Event Handler
In this post I'm talking about a couple of features centered around Contextual Event that you might not have cared about ;) You can programmatically add contextual event definitions, register the event producer and even trigger the contextual event. This is useful when you build taskflows which needs to trigger different events based on the context(client that hosts the task flow) where its used. See the below code snippet: //The following is inside a managed bean, ideally part of //some event handling method DCBindingContainer bc = ( DCBindingContainer ) BindingContext . getCurrent (). getCurrentBindingsEntry (); bc . getEventDispatcher (). queueEvent ( new CustomEventProducer (), someCustomEventPayLoad ); bc . getEventDispatcher (). processContextualEvents (); Event producer class( CustomEventProducer ) used in the above code snippet is here: import oracle.adf.model.events.EventProducer; public class CustomEventProducer implements Ev...