Skip to Main Content
Feature Request FR-3901
Product Area User Interface
Status ROADMAP

25 Voters

Add "Before Refresh" and "After Refresh" Event to Template Components

matze276 Public
· Jul 11 2024

Idea Summary
It's possible to Refresh a Template Component, but there's no “Before Refresh” and “After Refresh” Event yet. A “Content Row” is also based on the Template Component Architecture, so therefore it's also not possible to listen to those Events.

Use Case
For mostly all other components you have those Events, You could want to Refresh other Regions as well, there are multiple Use cases for this.

This is currently on the roadmap for a future release of Oracle APEX.

Comments

Comments

  • j_schuster OP 11 months ago

    100% Agree, simple fix, huge impact.

  • pvdn OP 9 months ago

    Is there a workaround for this in 24.1 ?

    In 23.1 there was a workaround with a subscribe on the model widget, but that doesn't work anymore because the template component is no longer a widget.

    
    const model = apex.region(regionid).getModel();
    var viewId = model.subscribe({
       onChange: function(changeType, change) {
           // respond to model changes
           if (changeType === "addData") {
               apex.debug("addData", change);
               //do stuff
           }
       }
    });
    
  • patrick wolf Admin OP 8 months ago

    Have you tried the tablemodelviewpagechange event on the region? In Dynamic Actions you can use “Custom” as event.

  • fac586 OP 8 months ago

    Have you tried the tablemodelviewpagechange event on the region?

    I have now! I will be able to use that on Monday…

    Thanks @patrick wolf

  • matze276 OP 8 months ago

    Nice, the event is triggered once After Refresh. A “Before Refresh” Event is still missing though, but it's not as important as “After Refresh” 😊 Thank you @patrick wolf - Maxime already used that in apex.world, I should have asked him 😅

    This should definitely be part of the native “Component Events” to be preselected, nobody knows about this event 😊