How to maintain session state in APEX

Hi friends,
I have a form with two page items and two buttons( submit ----->submits the page and inserts a record, cancel ------>redirects to other page)
*)p1_A
*)p2_B
If i entered a value in the page item p1_A and p2_A, and after that without pressing "Submit" Button im pressing "Cancel" button means it is redirecting to the other page and again if i came back to my form page means, the values that i entered in the page item
*)p1_A and p2_B is disappearing.
Is is possible to maintain a values entered in the page item (p1_A and p1_B) without submitting it and navigating to some other page.
Brgds,
Mini

Hi Peter,
Thanks for the reply.
Generally i have two page 1 and page 2
page 1 contains 2 page items
<li> P1_A
<li> P1_B
in the page 1 itself i have a list called po order.
If i clicked that list po order means, it is navigating to the page 2. My page 2 also contains below two items and a button BACK
<li> P2_A
<li> P2_B
After i entered the values in P2_A, P2_B and if i press the back button means, it is redirecting to the page 1. Again if i click the list po order means it is navigating to the page 2 but the values that i entered in P2_A, P2_B is disappeared.
Whether it is possible to maintain the values that i entered in the page items P2_A, P2_B soon after redirection. Mainly im not submitting page 2, just redirecting back to it.
settings to do that at the Button settingsAnd u said of doing that settings in the button that i have in page 2.
yes i found the option set items with the values
set item: P2_A  with values: &P2_A.
But it didnt worked. Am i wrong.
Kindly help me with this issue peter.
Brgds,
Mini

Similar Messages

  • Maintaining Session State

    Hello,
    Does anyone know how to maintain session and application variables through server restarts? I want to be able to shutdown and startup my Tomcat server without having the users lose their session and application variables (and consequently, their data and login state).
    Any ideas?
    Thanks!
    -David

    I dont think its possbile since stopping and restarting gets new sessions. Only way that I would know would be to use cookies.
    But then again i dont like the idea of saving passwords in cookies

  • How to reference session state in a list entry label

    You can use &<item>. to reference session state values which can then be used in titles and item labels but it seems it does not work in the label for a list entry (i.e. to build a menu).  Is there a workaround?
    thanks in advance
    PaulP

    OK I just realized that referencing session state doesn't work for lists used by Enkitec's NavBar plugin solution.  It does reference the &<ITEM>. correctly for normal APEX lists. Anyone know how to reference session state when using Enkitec's NavBar plugin solution?
    PaulP

  • How to update session state from form field values without submitting page?

    Hi,
    I am new to Oracle APEX. I am using Oracle Apex 4.2 on Oracle 11g release 2. The problem is that when I am entering data on a form, when I enter a value in one field and move to the next field, how can I use the value of first field in the validation procedure of next field? I know that when we enter data in fields, the session state is not updated with these values until we submit the page... right... but I have seen that if there is a control of List box type, then Apex gives an option "Action When List changes" where we can choose option to update corresponding session state field with the value of list box item, without submitting the page.
    Now my questions is why this option is only available for List box items? why not for other item types like Text box, Check box,... ? can someone please help me with this?
    (the issue with update of session state depending on page submitting, is that we need a complete network round trip from client to server in order for it. However if we can update session state variables without submitting page, then we can avoid this network traffic).
    Any help will be greatly appreciated. Thanks in advance.

    Create a dynamic action on change and run a PL/SQL process there with the following code:
    BEGIN
       NULL;
    END;Page items to submit > your item.
    This will set the session state without submitting the form.
    Further examples here:
    http://apex.oracle.com/pls/apex/f?p=31517:229
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    http://apex.oracle.com/pls/apex/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • Application Item values in Session State in APEX 4.2

    In 4.2, I am not able to see the session state values of my Application Items if I click "Session" at the bottom of a page. We just migrated from 4.1 and we login to a separate app than where we land upon login. I thought the "Global" scope of the Application Item would allow this to track across apps, but its not working. Is this a known issue?

    fac586 wrote:
    Johnny98 wrote:
    In 4.2, I am not able to see the session state values of my Application Items if I click "Session" at the bottom of a page. We just migrated from 4.1 and we login to a separate app than where we land upon login. I thought the "Global" scope of the Application Item would allow this to track across apps, but its not working. Is this a known issue?When you say +"Global" scope of the Application Item+ do you mean the true global scope introduced in APEX 4.2, or are you using the term colloquially, as in "not a page item"?The new global scope introduced in 4.2
    >
    Johnny98 wrote:
    I login to App 1, but land in App 2. My Application Item lives in App 2. Upon login of App 1, an authentication scheme calls a back end function that assigns variables to the Application Item in App 2. What back end function? How does this function assign values to application items in App 2?APEX_UTIL.SET_SESSION_STATE('APP_ROLE', rec.user_type);
    >
    In APEX 4.1 I can see the session state of my Application Items by clicking on the Session button. I cannot see the session state of Application Items after moving everything to APEX 4.2.Have you selected Application Items from the View select list on the session tab and clicked the Set button?Yes, thats what started this thread

  • Corrupt Session State? - Apex form posts text value as Null

    Recently I've discovered an issue with our Apex installation in which any value chosen as a source for a text field ends up being posted as a null to the database.
    We are running APEX version 3.2 within an Oracle 10.2.0.4 database using the Oracle HTTP Server from the 10g companion disk.
    At first glance, everything appears to function as expected; I have created a simple table called "oracle_sr" with 2 columns both not null:
    SQL> desc capacity.oracle_sr
    Name Null? Type
    ORACLE_SR_ID NOT NULL NUMBER
    TIMESTAMP NOT NULL DATE
    Within APEX the form wizard was used to create a form on this table.
    After executing the pages and entering a value for the timestamp field I can create records without issue.
    The issue arises when I choose a source value for the timestamp field.
    Any of the source options result in the same error (including a static value) so I will focus on the SQL Query for the source as:
    select sysdate from dual;
    This should substitute the system date within the timestamp text field when the page is executed.
    As expected, the value appears in the text box but when I submit the form to create the record I receive the error:
    ORA-01400: cannot insert NULL into ("CAPACITY"."ORACLE_SR"."TIMESTAMP")
    I have been working with APEX for quite some time and have successfully used this technique in many applications but just started to see this error over the past few days. What is particularly odd about this message is that default "not null" validations created by the form wizard sees the timestamp filed as having a value. The session state information included below is reporting a value yet the database is throwing the ORA-01400.
    Has anyone experienced a similar issue? I've spent a fair amount of time trying to research this issue but cannot seem to find any similar posts.
    I have included the debug output from my test page, from what I can see, there does seem to be a value associated with the timestamp filed:
    0.00: A C C E P T: Request="CREATE"
    0.00: Metadata: Fetch application definition and shortcuts
    0.00: NLS: wwv_flow.g_flow_language_derived_from=FLOW_PRIMARY_LANGUAGE: wwv_flow.g_browser_language=en-us
    0.00: alter session set nls_language="AMERICAN"
    0.00: alter session set nls_territory="AMERICA"
    0.00: NLS: CSV charset=WE8MSWIN1252
    0.00: ...NLS: Set Decimal separator="."
    0.00: ...NLS: Set NLS Group separator=","
    0.00: ...NLS: Set date format="DD-MON-RR"
    0.01: ...Setting session time_zone to -06:00
    0.01: Setting NLS_DATE_FORMAT to application date format: DD-MON-RR
    0.01: ...NLS: Set date format="DD-MON-RR"
    0.01: Fetch session state from database
    0.01: ...Check session 2303701116904676 owner
    0.01: Setting NLS_DATE_FORMAT to application date format: DD-MON-RR
    0.02: ...NLS: Set date format="DD-MON-RR"
    0.02: ...Check for session expiration:
    0.02: ...Metadata: Fetch Page, Computation, Process, and Branch
    0.02: Session: Fetch session header information
    0.02: ...Metadata: Fetch page attributes for application 109, page 50
    0.02: ...Validate item page affinity.
    0.02: ...Validate hidden_protected items.
    0.03: ...Check authorization security schemes
    0.03: Session State: Save form items and p_arg_values
    0.03: *...Session State: Save Item "P50_ORACLE_SR_ID" newValue="" "escape_on_input="N"*0.03: *...Session State: Save Item "P50_TIMESTAMP" newValue="26-MAY-09" "escape_on_input="N"*
    0.03: ...Session State: Save "P0_CURRENT_PERSONNEL_ID" - saving same value: "1"
    0.03: ...Session State: Save "P0_OFFSET" - saving same value: "0"
    0.03: ...Session State: Save "P0_ACTIVE_WEEK" - saving same value: "24-MAY-09"
    0.03: Processing point: ON_SUBMIT_BEFORE_COMPUTATION
    0.03: Branch point: BEFORE_COMPUTATION
    0.03: Computation point: AFTER_SUBMIT
    0.03: Tabs: Perform Branching for Tab Requests
    0.03: Branch point: BEFORE_VALIDATION
    0.03: Perform validations:
    0.03: ...Item Not Null Validation: P50_TIMESTAMP
    0.04: Branch point: BEFORE_PROCESSING
    0.04: Processing point: AFTER_SUBMIT
    0.04: ...Process "Get PK": PLSQL (AFTER_SUBMIT) declare function get_pk return varchar2 is begin for c1 in (select ORACLE_SR_SEQ.nextval next_val from dual) loop return c1.next_val; end loop; end; begin :P50_ORACLE_SR_ID := get_pk; end;
    0.04: ...*Session State: Saved Item "P50_ORACLE_SR_ID" New Value="6"*
    0.04: ...Process "Process Row of ORACLE_SR": DML_PROCESS_ROW (AFTER_SUBMIT) #OWNER#:ORACLE_SR:P50_ORACLE_SR_ID:ORACLE_SR_ID|IUD
    0.04: Show ERROR page...
    0.04: Performing rollback...
    ORA-01400: cannot insert NULL into ("CAPACITY"."ORACLE_SR"."TIMESTAMP")
    Unable to process row of table ORACLE_SR.
    Return to application.
    Any thoughts would be appreciated.
    Thank you,
    Justin.

    If you changed the Source Type of an item from Database Column to something else, then it cannot participate in the Automated Row Fetch/Automatic Row Processing (DML) choreography. You should leave the Source Type as it was and change the item's Default Value to populate it when the ARF process fetches a null for the column.
    Scott

  • How to maintain the state in Extn

    Dear all,
    I have created the extn using creative suite for photpshop. when i click my extn name, it will initilize everytime. e.g.if user login the extn and he/she will close the extn. Aftre that when user again hit on my extn. it will initilize, and ask for login again. how could i maintain the state in that case? Any suggestion or solution will appreciated..

    Hi,
    use a setPropertyListener to save the row key of this select item and then restore this key as the current selected key.
    Frank
    Ps.: I don't ask why you call clearForRecreate() on the iterator. I am sure you have a reason.

  • How to use session state protection

    I use Apex 3.2.1
    I access my site by a url passing a parameter like this : f?p=101:1:0::::ITEM1:1234567. There is no login and password to access the site.
    The value of the parameter ITEM1 is the authorization of the first page, with a database function for the verification.
    To secure my site I want to use session state protection so, I enabled it , then I defined "Arguments Must have checksum" for the page 1.
    Now , when i try to acces my site with the same url it does not work.
    it is the first time a try to use session state protection, could someone tell me what's wrong?

    Hi user5719906,
    I would suggest that as you need to pass an item and are unable to generate a checksum as you are not yet logged in, that you will need to allow arguments without checksum for this page.
    This could be a bit of a hole in your security, but as long as you know it is there and clear the cache for all pages that you branch to, you should be able work around it.
    The issue is that a malicious user can set page and application items via the url to an unsecured page.
    Regards
    Michael

  • [urgent] How to enable session state without modifying web.config ?

    HI ,
    We have customized a new master page to our site. We have a requirement to use session (HTTContext.current.session) , to save data , then we have an error session is null , so we excuted the
    Enable-SPSessionStateService-DefaultProvision
    We have no access to the web.config ! so we cant change the ligne from <pages enablesessionstate="false"  to <pages enablesessionstate="true" , so we wanted to add enablesessionstate="true" in the page wich caused
    the probleme and we had a new error "enablesessionstate is not allowed in this page".
    How can we resolve this problem without modifying the Web.config ?? a have benn blocked since 2 days ! Any help will be great. Thanks in advance :)

    Hi Bouhmind,
    Thanks for posting this issue, you can enable session by setting enablesessionstat="true" in page directive as you try. Also, you need to do some configuration in your IIS. Kindly browse the below mentioned  URL to do that configuration in
    IIS.
    http://ammarfassy.wordpress.com/2012/04/06/session-state-can-only-be-used-when-enablesessionstate-is-set-to-true/
    I hope this is helpful to you. If this works, Please mark it as Answered. 
    Regards, 
    Dharmendra Singh (MCPD-EA | MCTS) 
    Blog :
    http://sharepoint-community.net/profile/DharmendraSingh

  • How to maintain Session between two ear files?

    HI Guys
    I have deployed two ear files in oc4j. One is used to open applet and other for business operations.
    My problem is after calling applet my session gets invalidate. How to save session between two context
    I am new in this field please help!!
    the sooner the better
    Rahul

    Can I do this if I integrate oc4j with apache!!
    Can I maintain session
    Plz. Help
    Rahul

  • How to maintain a state in webdynpro?

    HI Experts,
    I have one  node and some value attributes(dynamic attributes) in this node.
    I am using these dynamic attributes in wdDoModifyView() to customize my table.I am setting the customisation properties in the Customization view and when I click "OK",the table is getting changed in the Table view.Everything is working fine.But when I again try to customize the table ,I open the Customization view ,the previously modified changes are not there in the Customization view  .Customization view is not holding the state.Its getting reset.
    Please suggest me how to retain the state.
    Regards
    -Sandip

    HI Ayyaparaj,
    I did it in the same way.I created the node in the component controller and maped it with the the two views (Table View and Customization View).The first time when I customize,its working.But next time when I open the Customize view,Customize view not holding the previous state.
    Do i need to do any setting in the Node property?
    Please suggest me.
    Regards
    -Sandip

  • How to save session state for a text item

    hi @averyone,
    i designed in interactive report with one apex_item.text field, let's name it "count"
    normally the report has more then one pages.
    the report should work like a kind of a shopcart.
    the user enters some data into "count" and moves on to the next page(s) enters some more date and so on.
    at the end he/she will press an button to save the data into his shopcart.
    now the problem:
    whenever the page is changed, all data in "count" is lost because the column has no sesseion state.
    any suggestions how to solve this issue without saviing the date in the database everytime the page ist changed?
    thanks in advance
    peter

    Simon,
    i solved the issue using an existing table, which should act quite similar to collections:
    at user request i store all entries in this table & a the end a list of selected rows is presented to the end-user.
    thanks 4 ur assistance
    p.s have a look at the apex api "APEX_ITEM.DISPLAY_AND_SAVE" ?

  • Jaxm - Maintaining Session State

    Hi,
    I have the following problem:
    My client dispatches jaxm-soap-messages to a java-servlet using the reference implementation of sun (wsdp). For each time I use the same SOAP-connection object. The problem is, that the servlet opens with each inquiry a new session. How can I maintain the session ( for example setting a cookie in case of http as the protocoll)? Is there a mapping between parameter in soap-header to http-header ?
    Greetings,
    Zubow

    Hi. I ran into the same situation a while back. I'll tell you how
    I resolved the problem.
    You have to build your own handler class. Extend the javax.xml.rpc.handler.GenericHandler class. Implementing the handleRequest(MessageContext msg) method.
    1 public boolean handleRequest(MessageContext context)
    2 {
    3 try
    4 {
    5 SOAPMessageContext smc = (SOAPMessageContext)context;
    6 SOAPMessage message = smc.getMessage();
    7 MimeHeaders mimeHeaders = message.getMimeHeaders();
    8 if(mimeHeaders.getHeader("Cookie")==null && getCookie()!=null)
    9 {
    10 mimeHeaders.setHeader("Cookie",getCookie());
    11 }
    12 }
    13 catch(Exception e)
    14 {
    15 throw new JAXRPCException(e);
    16 }
    17 return true;
    18 }
    19 public boolean handleResponse(MessageContext context)
    20 {
    21 try
    22 {
    23 SOAPMessageContext smc = (SOAPMessageContext)context;
    24 SOAPMessage message = smc.getMessage();
    25 MimeHeaders mimeHeaders = message.getMimeHeaders();
    26 if(mimeHeaders.getHeader("Set-Cookie")!=null && getCookie()==null)
    27 {
    28 String[] headerValues = mimeHeaders.getHeader("Set-Cookie");
    29 String cookie = headerValues[0];
    30 if(cookie.indexOf(";") >= 0)
    31 {
    32 cookie = cookie.substring(0,cookie.indexOf(";"));
    33 }
    34 setCookie(cookie);
    35 }
    36 }
    37 catch(Exception e)
    38 {
    39 throw new JAXRPCException(e);
    40 }
    41 return true;
    42 }
    The overall concept is to handle the soap message before it goes back
    to the server. You need to add the COOKIE header variable set to JSESSIONID=your session id
    to the message header before every request goes to the server. The handleResponse looks for set-Cookie variable that comes back from the
    very first request.
    Hope that helps.
    Mike
    first request.

  • Problems with maintaining session state using mod_ose

    I am using 9i AS(version 1.0.2.0) and oracle 8i(version 815).
    Because i need to maintain client sessions for my application, I
    have activated mod_ose(for stateful session). As suggested in
    the oracle documentation, i created a package containing
    variables for which state needs to be maintain per client. The
    state is maintained by the app server but it is not maintained
    properly. All the new clients that connect to the app server
    share the same session variable values. If I change a package
    variable value from one client, other clients take the same
    value.
    Any solution?
    Suggestions are most welcome.
    Thanks in advance.

    We installed oracle9i AS on solaris, configured OSE and the
    problem is not occuring now. Not sure whether its solaris that
    worked or 9i AS had some problem on NT machine earlier.
    Regards,
    Sharad

  • How to maintain session in jsp

    Hello Techies,
    I am very new jsp and doing xperimentation in jsp. I am having 3 jsp's namely a.jsp,b.jsp,c.jsp.
    In b.jsp I am having one combo box , after selecting the combo box I want to put the value in session.
    How can I do this one.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <%@ page language="java" contentType="text/html; charset=iso-8859-1" %>
    <html>
    <head>
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
      <title>Untitled Document</title>
       <script language="javascript">
           function ll() {
                   alert("test");
    //            var sel=document.forms[0].rule;
                       document.forms[0].submit();
                   alert("form is submitted")
          </script>
    </head>
    <body>
    <select  name="comboBox" size="1" onchange="ll()">
         <option value="">1</option>
         <option value="">2</option>
         <option value="">3</option>
    </select>
    </body>
    </html>How can I set the selected value in this combo box into session.
    Can u guys help me out in fixing this problem.

    Well you have to submit the form first.
    In the java code:
    String comboValue = request.getParameter("comboBox");
    session.setAttribute("comboValue", comboValue);

Maybe you are looking for

  • Power adapter not charging my nano

    I bought a Sonnet USB Power Adapter for iPod some time ago when I owned an iPod nano 1st generation. Now I have a 3rd generation nano. I went to Sonnet's website and noticed that the 3rd generation iPods are the only ones the adapter is not compatabl

  • Oracle 8i over W2K Server

    Dear sirs: i have installed Oracle 8i over W2K Server + SP2 on a Windows NT domain, over a independient server. The clients runs W9X. My question is: is it possible work with oracle databases and the server do not appair on the Network Neightboor, an

  • Unable to launch organizer in photoshop elements 11

    hi does anyone know how to repair organizer in 11? unable to launch from shortcut or from within editor

  • Facebook messener chat heads

    hellow guys, i had a problem with my new iphone i bought recently. first of all i want to mention that i am an android user, and this is my first iphone. i am also using a xperia ion alond with my iphone. so basically the problem is i have installed

  • Illustrator CS5 Lag - Any insight is appreciated

    i'm running the latest version of Illustrator CS5, and i'm experiencing some strange lag.  for example, if i have a shape on an artboard, and i move it, there is a very short, 1-3 second delay until the shape appears where i have moved it too, even i