Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Oracle Apex - refresh all subregions with one refresh in dynamic action

Tags:

oracle-apex

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.

like image 677
jlee Avatar asked Nov 04 '25 21:11

jlee


1 Answers

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();
like image 137
Daniel Hochleitner Avatar answered Nov 07 '25 14:11

Daniel Hochleitner



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!