Actually, it is no so difficult.
Here is what I come up to this solution:
My goal was to refresh parent task flow component (af:table) from isolated BTF hosted in the af:popup. So popup's task flow does not share data control with "parent" t.f. and I want to refresh af:table iterator query in order to see changes made by popup task flow.
I though to use Contextual event generated from BTF in the popup, but problem with this solution was in that, the Contextual event closes the af:popup from which it is generated. The problem is described here: Contextual event closes the af:popup from which it is generated ?!?
- Being unable to solve this problem, I come up with Frank Nimphius idea to refreshing the Parent Component from a RegionNavigationListener Refreshing the Parent Component from a RegionNavigationListener
- But, after popup's button (BTF) action performed, I want to stay with the same View. In that case, region navigation event does not happens, so no region navigation listener.
So how to stay with the same View, still triggering RegionNavigationListener ?
Well, in popup button action method, it was easy to find parent RichRegion enclosing BTF fragment.
With this RichRegion's instance in hands, I just queeued new RegionNavigationEvent, as follows:
new RegionNavigationEvent(region, "someViewId", "someViewId").queue();
And voila ! My region navigation listener fires, while staying on the same View activity !
You may also extends RegionNavigationEvent class in order to share information between task flows and then fire such one RegionNavigationEvent, which have additional information for parent task flow (trought its navigation listener)
I think, I found a new way for task flow region communication ;-)