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

  • April 2, 2015 at 7:47 am
    Permalink

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

    Reply
  • July 22, 2015 at 4:37 pm
    Permalink

    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?

    Reply
    • July 23, 2015 at 10:23 am
      Permalink

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

      Reply

Leave a Reply

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