Christoph's 2 Cents

A Backup for My Brain!

Oracle Developement

Set Session State with JavaScript and dynamic action

I have two page items, P1_FIRST_NAME and P1_LAST_NAME whose values I wish to remain in session state. Here are two ways you can achieve this.

To have item values persist in session state with JavaScript in APEX, you can use the following code:

apex.server.process(‘DUMMY’,{pageItems: ‘#P1_FIRST_NAME,#P2_LAST_NAME’},{dataType: “text”});

An alternative method would be using a dynamic action that fires a dummy PL/SQL process. The action allows you to specify page items to submit in session state.;

PL/SQL Process to Set Session State
PL/SQL Process to Set Session State

5 thoughts on “Set Session State with JavaScript and dynamic action

  • Hello
    Where are you adding the Javascript code or where are you creating the Dynamic Action:?
    Thanks!

  • Francesco Galante

    Great!!!!

  • should calling a PL/SQL call of null; have any kind of performance impact? mine seems to be quite slow. Is there a more efficient dummy code that I can call?

  • More efficient than null? Probably not.
    You may have a performance issue elsewhere on the page.

Comments are closed.