1 2 Previous Next 22 Replies Latest reply on Jan 29, 2013 8:57 PM by Howard (... in Training)

    problems with getting and setting session state in Apex via SelectList Item

    ridi67
      I made a very simple form in Apex, containing 5 items that consist on a database table called Participants. 5 columns like primary key, first_name, last_name, creation_date and description
      I added one item extra on the form: a SelectList. The SelectList has to retrieve all participants and then - by changing or setting the value in the selectlist - the form has to synchronize with that value in the selectlist. I added some extra coding in a dynamic_action attached to the SelectList. PL/SQL coding contains something like

      select participant_number, first_name, last_name, description, creation_date
      into l_pts_row
      from participants
      where participant_number = :P9_UPDATE;

      APEX_UTIL.SET_SESSION_STATE('P9_PARTICIPANT_NUMBER', L_PTS_ROW.PARTICIPANT_NUMBER);
      APEX_UTIL.SET_SESSION_STATE('P9_FIRST_NAME', L_PTS_ROW.FIRST_NAME);
      APEX_UTIL.SET_SESSION_STATE('P9_LAST_NAME', L_PTS_ROW.LAST_NAME);
      ... etc etc




      The :P9_UPDATE item is the SelectList.
      You can see the behaviour at
      http://apex.oracle.com/pls/apex/f?p=20292:9:15601355830114::NO:9::
      login in with user/pw = exam_demo/demo

      It works rather nice but ... I did <b>not</b> comprehend the mechanism of SessionState behaviour some how. The regular items get refreshed after selecting the new value in the select list, but the page itself wont render from starting point and wont switch over to the mode in whitch I can "Apply Changes". The "Create" button stays active and the button "Apply Changes" does not become available.

      How to approach this?
      Kind Regards Richard

      Edited by: richard_dirksen on Jan 28, 2013 5:15 AM
        1 2 Previous Next