2
votes

I am working with APEX 19.2.0.00.18. I have a page with a static region with 4 chart subregions, plus a radio button that allows the user to select which series (total, mean, median) to display in the charts. I have a dynamic action set up to refresh charts when the radio button value is changed. This dynamic action consists of:

  1. execute null PL/SQL code to submit the radio button value
  2. refresh chart subregion 1
  3. refresh chart subregion 2
  4. refresh chart subregion 3
  5. refresh chart subregion 4

Is there any way to simplify this to refresh all 4 chart subregions with a single refresh? I have multiple static regions like this (i.e., containing multiple chart subregions) on this page, so reloading the entire page is not an ideal option.

2

2 Answers

4
votes

Scott's answer is pretty much correct, but if you decide to use the newer apex.region JS API, you have to use it with a region static id. So just give the regions you want to refresh a static id and then use the API like this (e.g. in a Execute JavaScript Dynamic Action):

apex.region('MY_STATIC_ID1').refresh();
apex.region('MY_STATIC_ID2').refresh();
apex.region('MY_STATIC_ID3').refresh();
4
votes

Answer previously here https://stackoverflow.com/a/58126513/527513

Can be applied a number of ways, but you're using the JS API refresh any region with a given selector, in this case the refreshme class

$('.refreshme').trigger('apexrefresh');

The API offering has changed over time, apex.region being the newer method.

apex.region( "static_id1" );
apex.region( "static_id2" );

As Daniel noted, these need to be supplied as static IDs, not a given selector. I should have realised this since the example was absent the # of the static ID.