Sunday, February 13, 2011

JDev/ADF sample - ADF Region Communication - Region Refresh Through Contextual Event

  • ADF Region Communication - Region Refresh Through Contextual Event. I will extend previous sample application - ADF Region Communication - Data Exchange Through Shared Data Control Java Class and will describe how you can enrich it and apply contextual events. Even you would think about contextual events as about something cool, be careful - its not a panacea for all problems, and should be used carefully to avoid system architecture complexity explosion. While its not always true, I would prefer to use contextual events mostly for dependent region refresh, without passing payload directly. When system grows, its easier to track data references from Data Control Java class (see referenced blog post above), than contextual events payload variables. Its possible to refresh dependent region through ADF bounded task flow parameters - but contextual events provide better separation level between two regions.
    Download - ADFRegionCommunication2.zip

2 comments:

Kade said...

Here it is explianing the Java Developement samples.The zip file link
http://jdevsamples.googlecode.com/files/ADFRegionCommunication2.zip and
application like ADF Region Communication - Data Exchange Through Shared Data Control Java Class are very useful.

Thanks.




Sample Documents

Hemant said...

Hi,

Thanks for explaining this.

But,I need to refresh the region using ADS.
The scenario is,
I am creating a jsff which contains dynamic tables rendering. This jsff is bound to a task flow (having input parameter and refresh property set to "ifNeeded). The bounded task flow is dropped on a jspx as a region.
Now in order to refresh the region, I need to pass the updated param value, which would cause the region refresh.

I am able to do so on a button click from jspx page. But I have to make it auto refresh using ADS as per app requirement.
The issue is "AdfFacesContext.getCurrentInstance return null..if I am using it in startActive Data or changeData Update (where I am using ActiveDataUpdateEvent)".