Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

After Refresh Event not firing for Content Row regions

cjb83Oct 23 2024

I have a Content Row region that is refreshed when an inline dialog is closed, using:

apex.region(<REGION_STATIC_ID>).refresh();

I also have a Dynamic Action that is set to fire on After Refresh of the Content Row region, but the Dynamic Action is not being triggered.

The documentation states that the refresh() function should return a promise, so I tried the following using a similar pattern as when using the promise from apex.server.process():

var myRefresh = apex.region(<REGION_STATIC_ID>).refresh();
myRefresh
  .done(function() {
    some callback code here.
  });

But this throws an error that myRefresh.done is not a function. The promise does to include a .finally callback, but that doesn't seem to work in the same way as a .done, and has resulted in me having to resort to setTimeouts, see below:

var myRefresh = apex.region(<REGION_STATIC_ID>).refresh();
myRefresh
  .finally(function() {
    setTimeout(function() {
      some callback code here.
    }, 500);
  });

This does not seem to work reliably through as sometimes the .finally appears to fire before the Content Row has completely refreshed, leading to me increasing the amount of time before the setTimeout fires.

So my questions are, is it a bug that an After Refresh Dynamic Action is not triggered by a Content Row region refresh? Is there a better work around than relying on .finally and setTimeouts to fire some additional JS after the Content Row has been refreshed?

Any advice or suggestions welcome!

Kind Regards,

Cj

This post has been answered by fac586 on Oct 23 2024
Jump to Answer
Comments
Post Details
Added on Oct 23 2024
3 comments
233 views