4 Replies Latest reply on Jul 24, 2013 5:50 PM by Ingenio

    keep item value after &LOGOUT_URL.  is called


      Hi there

      I need to keep the value of the item after I click logout url.

      When logout is called, it takes me to the page 1 but i need the item P1_SCHEMA to keep its value before i logout,

      is it possible?


      apex 4.2

      database EE 11.2



        • 1. Re: keep item value after &LOGOUT_URL.  is called
          Jorge Rimblas

          You could save the value in a cookie and read it again on Page 1 if the value is null. 

          See a standard Login Page 101 to see how the cookies are read and set.  See the "Get Username Cookie" and "Set Username Cookie" processes.




          • 2. Re: keep item value after &LOGOUT_URL.  is called

            I did the following to resolve my need.


            -created page 102

            -changed the navigation bar entry settings to "redirect to page 102"

            -created on load process on page 102 as to create the coockie as follows


                  owa_util.mime_header('text/html', FALSE);      




                      expires => sysdate + 1); 

                  apex_application.g_unrecoverable_error := true; 


            exception when others then null; 



            so page 102 creates the coockie ant sets the value of the application item, then goes to &logout_url. automatically


            - createn on load process on page 1 (default home page) to read the coockie value as follows


               cookie  OWA_COOKIE.cookie;   


                cookie := OWA_COOKIE.get('SCHID_COOKIE'); 

                  if cookie.vals.First IS not NULL then  

                    :SCHID := cookie.vals(1); 

               end if;  




            now I have a question... Do i need to owa_cookie.remove() somewhere?


            • 3. Re: keep item value after &LOGOUT_URL.  is called
              Jorge Rimblas


              Sorry, for some reason I didn't see an email for this.


              It depends on your requirement, but no, probably not.  You could also specify an expiration for the cookie so that it goes away on it's own after X time. The browser will do that for you.





              PS. Could I also recommend you flag the posters answers as useful or correct so that they get the incentive of the points?  I only mention this because you used my suggestion, but flagged your answer as the correct one. 

              1 person found this helpful
              • 4. Re: keep item value after &LOGOUT_URL.  is called

                I understand, actually I set to expire tomorrow...

                expires => sysdate + 1);


                thank you  jrimblas..