Skip to Main Content

Ajax callback in R20.1 using ListView link feature

AmbaJan 1 2021 — edited Jan 1 2021

Hello! Ajax has been covered in depth on this forum ~ I could not find content regarding this issue though..
My objective is to use the ListView Region's Attribute LINK feature to call an ajax PL/SQL on the same page.. so that I can pass the ID attribute of the ListView to the ajax. I use the URL feature to specify the link
The problem is that - I run into a JavaScript "Uncaught Syntax Exception" even through the brower's JS debug console shows a blank. :-/
The example is here: https://
username external1 password problem@Apex2020

The details are as follows:
The page displays a ListView component loaded from DEPT table.
The user selects a listview item
The ListView's Attribute LINK TARGET (Specified as a URL) is activated: javascript:apex.server.process( "ajax1",{x01: “msg”,pageItems: “#P3_MESSAGE”});
The expected behaviour here is that x01 parameter is passed from page item P3_MESSAGE to the callback ajax1. 'ajax1' is declared on the same page as such:

  message varchar2(200); 
  message := apex_application.g_x01;

 Instead, the APEX 20.1 debug log shows that the ajax1 is never called. The JS Syntax error stops the call in its tracks..
[Of course, ultimately I want to use a statement similar to

 javascript:apex.server.process( "ajax1",{x01: “msg”,&DEPTNO.});

..but this is not working, hence the roundabout way to use item P3_MESSAGE. ]
[Incidentally, the oracle apex doc for ajax functionality apex.server is super helpful otherwise, I would not have even have got this far. https: // ]
Any insight appreciated :) and once again, the link to App "ListViewTrouble" page 3 is provided above if you would like to take a look.

This post has been answered by Amba on Jan 1 2021
Jump to Answer
Post Details
Added on Jan 1 2021