I made a quick mock-up: try it here
This is my page setup:
Dynamic Action on my button, Execute Javascript code (i used a button, could just as well bind this to any other element):
var oDBGet = new htmldb_Get(null, $v('pFlowId'), "APPLICATION_PROCESS=SAVE_COORDS", $v('pFlowStepId'));
oDBGet.addParam('x01', $v("P25_NAME"));
oDBGet.addParam('x02', $v("P25_XCOORD"));
oDBGet.addParam('x03', $v("P25_YCOORD"));
oDBGet.get();
the refresh is on the report region, to show it works.
htmldb_Get is a bit of an undocumented function in apex.
- parameter 1: session id -> unnecessary hence null
- parameter 2: application id (so you could use
&APP_ID.
for
substitution string, but this is unusable in a .js file)
- parameter 3: the process to be executed. This can be an application
or page process. Defined by parameter 4
- parameter 4: page id (again,
&APP_PAGE_ID.
is usable). If not
provided the process is assumed to be an application level process
(shared components->...)
apex_application.g_x##
, 01 through 10 are 10 possible variables used for temporary storage. You pass them on like i showed: x01
, x02
, ... In the application process you can then reference them through apex_application.g_x##
.
Page Process, AJAX Callback:
insert into coordinates
(name, xcoord, ycoord)
values
(apex_application.g_x01, apex_application.g_x02, apex_application.g_x03);
To customize this to your needs, you'll need to bind the event to the correct selectors, and provide the correct variables.