Keep value state in apex page

Go To StackoverFlow.com

1

Does anyone know to keep the state in an apex page when I go to another page and return?. It doesn't keep the values entered in the fields, it appears all empty. I appreciate anyone can help. Thanks

2012-04-03 20:19
by avatar713


3

What is your ApEx version ?

By default, when you submit a page, item values are automatically set in session state, so you should find them again when you go back to the page.

enter image description here Be aware that Firefox retain form element values on page refresh, so displayed values may not correspond to values that are really in session state... A solution is to set the «Form Auto Complete» attribute to "Off" in your page security attributes, or use $('#wwvFlowForm').attr('autocomplete','off'); on page load.

If you want to set a value into session state manually without submitting the page :

  • from PL/SQL, you can use APEX_UTIL.SET_SESSION_STATE (see documentation)
  • from JavaScript, you have to call a dummy application process, like :
setItemInSessionState: function(p_item, p_value) {    
      var l_get = new htmldb_Get(null,$('#pFlowId').val(),'APPLICATION_PROCESS=dummy',0);
      l_get.add(p_item, p_value);
      l_get.get();
}

Finally you can choose to maintain session state per session, or for a user across sessions, by changing «Maintain session state» attribute in the source tab of your item. And if your data is sensitive, you can set «Session State Protection» attribute to "Yes" for your item.

There are a lot of other solutions to keep item values between pages : passing values in the URL into hidden items, apex collections, basic database storage, cookies, etc.

If this does not answer your question, you might give more details.

2012-04-04 14:15
by Yann39


0

Maybe you should use session in order to save the inputs and then when the client returns to that page, you will just put the data you have stored in the sessions.

2012-04-03 20:22
by idish
Ads