Edit D:\app\Administrator\product\11.2.0\dbhome_1\apex\images\doc\concept_ses_clear.htm
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <title>Clearing Session State</title> <meta name="generator" content="Oracle DARB XHTML Converter (Mode = ohj/ohw) - Version 5.1" /> <meta name="date" content="2009-04-14T16:11:25Z" /> <meta name="robots" content="noarchive" /> <meta name="doctitle" content="Clearing Session State" /> <meta name="relnum" content="Release 3.2" /> <meta name="partnum" content="E11947-01" /> <link rel="copyright" href="dcommon/html/cpyr.htm" title="Copyright" type="text/html" /> <link rel="stylesheet" href="dcommon/css/blafdoc.css" title="Oracle BLAFDoc" type="text/css" /> <link rel="contents" href="toc.htm" title="Contents" type="text/html" /> <link rel="up" href="preface.htm" title="Home" type="text/html" /> <link rel="up" href="concept.htm" title="Application Builder Concepts" type="text/html" /> <link rel="up" href="concept_ses_val.htm" title="Managing Session State Values" type="text/html" /> <link rel="up" href="concept_ses_clear.htm" title="Clearing Session State" type="text/html" /> <link rel="prev" href="concept_ses_set.htm" title="Previous" type="text/html" /> <link rel="next" href="concept_bind_var.htm" title="Next" type="text/html" /> </head> <body> <p id="BREADCRUMBING"><a href="preface.htm" title="Home">Home</a> > <a href="concept.htm" title="Application Builder Concepts">Application Builder Concepts</a> > <a href="concept_ses_val.htm" title="Managing Session State Values">Managing Session State Values</a> > Clearing Session State</p> <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%"> <col width="86%" /> <col width="*" /> <tr valign="bottom"> <td align="left"></td> <td align="center"><a href="concept_ses_set.htm"><img src="dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="concept_bind_var.htm"><img src="dcommon/gifs/rightnav.gif" alt="Next" /><br /> <span class="icon">Next</span></a></td> </tr> </table> <p><a id="BEIHCICF" name="BEIHCICF"></a></p> <div class="sect2"><!-- infolevel="all" infotype="General" --> <h1><a name="HTMDB03014|Clearing Session State"></a>Clearing Session <a id="sthref185" name="sthref185"></a>State</h1> <p>As you develop your applications, you may find it useful to clear the cached value for specific items, all items on a page, all pages in an application, or the current user session. Clearing a cached value resets the value to null. The topics that follow offer specific examples of clearing session state.</p> <a id="sthref186" name="sthref186"></a> <p class="subhead2">Topics:</p> <ul> <li> <p><a href="#BCEGGJAH">Clearing Cache by Item</a></p> </li> <li> <p><a href="#BCEFGFFB">Clearing Cache by Page</a></p> </li> <li> <p><a href="#BCEFJGCI">Clearing Cache for an Entire Application</a></p> </li> <li> <p><a href="#BCEGAFHH">Clearing Cache for the Current User Session</a></p> </li> </ul> <a id="BCEGGJAH" name="BCEGGJAH"></a> <div class="sect3"><!-- infolevel="all" infotype="General" --> <h2><a name="HTMDB25023" id="HTMDB25023"></a>Clearing Cache by <a id="sthref187" name="sthref187"></a>Item</h2> <p>Clearing cache for a single item resets the value of the item to null. For example, you might use this approach to make sure a specific item's value is null when a page is prepared for rendering.</p> <p>The following example uses standard <code>f?p</code> syntax to clear the cache for an item. This example calls page 5 of application 100. Placing <code>MY_ITEM</code> in the <code>ClearCache</code> position of the <code>f?p</code> syntax resets the value of <code>MY_ITEM</code> to <code>NULL</code>.</p> <pre xml:space="preserve" class="oac_no_warn"> f?p=100:5:&APP_SESSION.::NO:MY_ITEM </pre> <p>The following example resets the value of the items <code><span class="codeinlineitalic">THE_EMPNO</span></code> and <code><span class="codeinlineitalic">THE_DEPTNO</span></code>.</p> <pre xml:space="preserve" class="oac_no_warn"> f?p=100:5:&APP_SESSION.::NO:THE_EMPNO,THE_DEPTNO </pre></div> <!-- class="sect3" --> <a id="BCEFGFFB" name="BCEFGFFB"></a> <div class="sect3"><!-- infolevel="all" infotype="General" --> <h2><a name="HTMDB25024" id="HTMDB25024"></a>Clearing Cache by <a id="sthref188" name="sthref188"></a>Page</h2> <p>Caching application items provides an effective way to maintain session state. However, there are occasions when you may want to clear the cache for all items on a page. For example, suppose you needed to clear all fields on a page when a user clicks a link that creates a new order. By clearing the cache for an entire page, you set the value of all items on the page to null.</p> <div class="sect4"><!-- infolevel="all" infotype="General" --><a id="sthref189" name="sthref189"></a> <h3><a name="HTMDB25025" id="HTMDB25025"></a>Clearing Session Cache for Two Pages While Resetting <a id="sthref190" name="sthref190"></a>Pagination</h3> <p>This example clears the session cache for two pages and resets pagination.</p> <pre xml:space="preserve" class="oac_no_warn"> f?p=6000:6003:&APP_SESSION.::NO:RP,6004,6014 </pre> <p>This example:</p> <ul> <li> <p>Runs page 6003 of application 6000 and uses the current session ID</p> </li> <li> <p>Indicates to not show debug information (<code>NO</code>)</p> </li> <li> <p>Clears all values maintained by the current session's cache for items of pages 6004 and 6014</p> </li> <li> <p>Resets region pagination (<code>RP</code>) on page 6003 (the requested page)</p> </li> </ul> </div> <!-- class="sect4" --> <div class="sect4"><!-- infolevel="all" infotype="General" --><a id="sthref191" name="sthref191"></a> <h3><a name="HTMDB25026" id="HTMDB25026"></a>Clearing Session Cache on a Page and Passing an Item <a id="sthref192" name="sthref192"></a>Value</h3> <p>This example shows how to implement an update form. It clears existing information and sets the item's value (typically a primary key).</p> <pre xml:space="preserve" class="oac_no_warn"> f?p=6000:6003:&APP_SESSION.::NO:6003:MY_ITEM:1234 </pre> <p>This example:</p> <ul> <li> <p>Runs page 6003 of application 6000 and uses the current session ID</p> </li> <li> <p>Indicates to not show debug information (<code>NO</code>)</p> </li> <li> <p>Clears all values maintained by the current session's cache for items on page 6003</p> </li> <li> <p>Sets the session state of an item called <code>MY_ITEM</code> to the value <code>1234</code></p> </li> </ul> </div> <!-- class="sect4" --> <div class="sect4"><!-- infolevel="all" infotype="General" --><a id="sthref193" name="sthref193"></a> <h3><a name="HTMDB25027" id="HTMDB25027"></a>Clearing Session Cache on a Page and Passing Values to Multiple Items</h3> <p>This example is similar to the previous example, except it passes values to multiple items.</p> <pre xml:space="preserve" class="oac_no_warn"> f?p=6000:6004:&APP_SESSION.::NO:6003:MY_ITEM1,MY_ITEM2,MY_ITEM3:1234,,5678 </pre> <p>This example:</p> <ul> <li> <p>Runs page 6004 of application 6000 and uses the current session ID</p> </li> <li> <p>Clears the current session's cache for items on page 6003</p> </li> <li> <p>Indicates debug information should be hidden (<code>NO</code>)</p> </li> <li> <p>Sets the value of <code>MY_ITEM1</code> to 1234, sets the value of <code>MY_ITEM2</code> to null (indicated by the comma used as placeholder), and sets the value of <code>MY_ITEM3</code> to 5678</p> </li> </ul> </div> <!-- class="sect4" --></div> <!-- class="sect3" --> <a id="BCEFJGCI" name="BCEFJGCI"></a> <div class="sect3"><!-- infolevel="all" infotype="General" --> <h2><a name="HTMDB25028" id="HTMDB25028"></a>Clearing Cache for an Entire <a id="sthref194" name="sthref194"></a>Application</h2> <p>You can clear an application's cache by using <code>f?p</code> syntax and creating a <code>Clear Cache</code> argument using the keyword <span class="italic">APP</span>. For example:</p> <pre xml:space="preserve" class="oac_no_warn"> f?p=App:Page:Session::NO:APP </pre> <div align="center"> <div class="inftblnote"><br /> <table class="Note oac_no_warn" summary="" cellpadding="3" cellspacing="0"> <tbody> <tr> <td align="left"> <p class="notep1">Note:</p> Resetting the cache for an entire application does not restore the application to a completely reset state. For example, if an application includes on-new instance computations or on-new instance processes, the Application Express engine runs these computations and processes when the application session is created. Then, it processes the clear cache request and displays the requested page. <p>To reset an application completely without a session ID (if no cookie is used to track the session ID), you must request it using a URL without a session ID, or by calling <code>APEX_UTIL</code>.<code>CLEAR_APP_CACHE</code> from another application. If the session ID is tracked using a cookie, you will need to logout to reset the state.</p> </td> </tr> </tbody> </table> <br /></div> <!-- class="inftblnote" --></div> </div> <!-- class="sect3" --> <a id="BCEGAFHH" name="BCEGAFHH"></a> <div class="sect3"><!-- infolevel="all" infotype="General" --> <h2><a name="HTMDB25029" id="HTMDB25029"></a>Clearing Cache for the Current User <a id="sthref195" name="sthref195"></a>Session</h2> <p>Another approach to clearing an application's cache is to create a <code>Clear Cache</code> argument using the keyword <code>SESSION</code>. For example:</p> <pre xml:space="preserve" class="oac_no_warn"> f?p=6000:6004:12507785108488427528::NO:SESSION </pre></div> <!-- class="sect3" --></div> <!-- class="sect2" --> <!-- Start Footer --> <div class="footer"> <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%"> <col width="86%" /> <col width="*" /> <tr> <td align="left"><span class="copyrightlogo">Copyright © 2003, 2009, Oracle and/or its affiliates. All rights reserved.</span><br /> <a href="dcommon/html/cpyr.htm"><span class="copyrightlogo">Legal Notices</span></a></td> <td align="center"><a href="concept_ses_set.htm"><img src="dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="concept_bind_var.htm"><img src="dcommon/gifs/rightnav.gif" alt="Next" /><br /> <span class="icon">Next</span></a></td> </tr> </table> </div> <!-- class="footer" --> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de