2 Replies Latest reply: Jan 7, 2013 1:49 AM by 980458 RSS

    How to refresh a  region using Active Data Service

    980458
      Hi,

      I need to refresh the region using ADS.
      I am creating 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)".

      Please guide me how can I achieve this.

      I am using Jdev 11.1.1.4.

      Thanks.

      Edited by: 977455 on Jan 3, 2013 7:35 PM
        • 1. Re: How to refresh a  region using Active Data Service
          Frank Nimphius-Oracle
          Hi,

          try a variation of this blog entry: http://matthiaswessendorf.wordpress.com/2010/01/22/flexible-active-data-service/

          Instead of showing a popup, you do the following

          1. set clientComponent=true for the hidden field
          2. configured the PartialTrigger property of the region to point to the hidden component

          If this doesn't work then try this

          1. use <af:clientListener type="propertyChange" method="activeDataCallback" /> as used in the sample
          2. define an af:serverListener that points to a managed bean that has access to the region (RichRegion) instance
          3. The af:serverListener needs to be defined as a child of the outputText
          4. change "activeDataCallback" to queue the server listener event (CustomEvent)
          5. Use the managed bean to refresh the region

          Frank
          • 2. Re: How to refresh a  region using Active Data Service
            980458
            Thanks Frank.
            It worked.- :)