AJAX Page Process – easy to call from JavaScript

Have you ever tried to create a truly interactive Form with APEX?

Struggling with JavaScript, AJAX calls in APEX, Application Processes and still it doesn’t work as you like?

Using the new ApexLib 2.1 all you need to do is create a PL/SQL Page Process and call it from a button with apexlib.process.executePageProcess.

Check out the ApexLib AJAX Page Process over here.

How does it work?

Basically all you need is a PL/SQL Page Process and a Button to trigger the Process execution. ApexLib deals with binding variables and calling the Process via AJAX and writes changed Page-Items back into your Page. So if your Process changes a Page-Item you’ll instantly see it in your Browser.

The function apexlib.process.executePageProcess can be called from JavaScript or from your Button, just set the Button Target to “URL” and the URL Target to “javascript:apexlib.process.executePageProcess(‘pageProcessName’);”.

You can pass a JavaScript function as second argument in call to executePageProcess, which will be executed when the Page Process is finished.
The optional third argument is a REQUEST Keyword, which tells ApexLib that you want to submit the Page after the process was executed and the function from the second argument was executed.

At the Page Process please set Condition to “Never” to assure it isn’t called in standard page processing. Also you have to set the ApexLib Property $APEXLIB_AJAX_PROCESS$ , which tells ApexLib it should prepare some stuff to be able to call this Proces via AJAX.

Still confused? -> Download the latest Version of ApexLib and install the Feature Demonstration Application in your Workspace. Check how i implemented the Demo on Page 100, this should help you to use this Feature in your Application as well.

4 thoughts on “AJAX Page Process – easy to call from JavaScript

  1. Hi,

    I have a question regarding following text. I’m using apex 4.0.

    you have to set the ApexLib Property $APEXLIB_AJAX_PROCESS$ , which tells ApexLib it should prepare some stuff to be able to call this Proces via AJAX

    How do you do this ?

    now I got the error : apexlib.process.sProcessList[].oReferenceId is null or not an object.

    The process point of the process that I call = On demand – run this process when called by ajax

  2. Hi Peter,

    Thanks for your quick answer. I just added $APEXLIB_AJAX_PROCESS$ in de comments field of my page process but it still gives the same error.

    Kind regards,
    Eveline

  3. Hi..
    Good morning, how to pass value to Pop-up lov using dynamic action in apex 5.0, please guid me, Thanks in advance..

Leave a Reply

Your email address will not be published. Required fields are marked *