Skip to Main Content
Feature Request FR-3883
Product Area Application Builder
Status CLOSED

4 Voters

Create a new Dynamic Action type "Invoke Ajax Callback" that allows you to declaratively call an Ajax Callback process.

anton nielsen Public
· Jul 3 2024

Idea Summary
Create a new Dynamic Action type "Invoke Ajax Callback" that allows you to declaratively call an Ajax Callback process.

When I want to invoke a server side process from a dynamic action (DA), I have two choices:

Create a DA Action of type "Execute Server-side Code"

Create a DA Action of type "Execute Javascript Code" and then write the javascript to invoke an Ajax Callback process.

Option 1 seems like a lot less work. It has a drawback, though: the only way to pass data from the browser to the "Execute Server-side Code" action is by passing page items using the "Items to Submit" attribute. (OK, there is a corresponding drawback: the only way to get data back is via the "Items to Return" attribute). That often requires you to create hidden items (that are not session state protected and that do not warn on unsaved changes). Then you have to process subsequent actions based upon those items.

Option 2 allows you to pass data into the apex_application.g_f0x PL/SQL variables; you don't need to create those extra hidden items. But option 2 requires you to remember how to call the APEX Ajax Callback process via Javascript--and to write it and test it.

Use Case
Any time you want to use an Ajax Callback process.

Preferred Solution (Optional)
See APEX Instant Tips episode 147
https://www.youtube.com/watch?v=mpp6h07eZLE&list=PLCAYBJ7ynpQQQrdwKFBZu8Kx9VTFt-pRP&index=1

and the apexdebug.com blog post.

We reviewed this idea carefully, and while it was interesting, we concluded that due to all the internal implications we need to take into account, it is unlikely to make its way into APEX.

Comments

Comments

  • vincent morneau Admin OP 1 years ago

    Hi Anton, we had a great internal discussion about this idea. Ultimately APEX should improve how it invokes AJAX calls. We're looking at different concepts that would render this idea obsolete.

  • anton nielsen OP 1 years ago

    Thanks @vincent morneau ! We will publish the DA we created  (on https://apexdebug.com and https://apex.world ). That way people can use it until the APEX engine has a better approach.