Disclaimer

The views and opinions expressed in this blog are my own and do not necessarily reflect those of my employer. The views and opinions expressed by visitors to this blog are theirs and do not necessarily reflect my own

Thursday, July 12, 2007

Oracle 11g is here

Yesterday saw the launch of Oracle 11g. Eager to get my hands on a copy I popped over to OTN but was disappointed to find that its not yet available for download. However there are a stack of white papers looking at the new features. You can access them here: http://www.oracle.com/technology/products/database/oracle11g/index.html Hopefully it will be made available soon. I'm keen to try out the native binary XML support as well as further improved flash back features.

Friday, July 06, 2007

Clear Page Cache When Using Tabs & Sub-tabs

Update - 14th Nov 2007 : I have posted a cleaner solution to this at http://kristianjones.blogspot.com/2007/11/clear-page-cache-when-using-tabs-sub.html Most pages you create in Apex have a number of modes that govern when processes, items and regions are displayed, executed or evaluated. Typically this involves setting a hidden page item and testing your condition against that item in the “Conditional Display” pane within the developer mode. When developing applications with tabs (and sub tabs) you’ll discover that you cant process the request value for your tab as Apex manages the branch conditions for you. An example scenario may be where you want to clear the page cache only on new requests. One method to get round the problem is to create a hidden item on page 0 and called “P0_PAGE_NEW” Navigate to Applications -> Shared Components -> Application Processes and hit “create” in the application builder. Create a process which runs “On Submit: After Page Submission – Before Computations and Validations”. In Process Source Type the following
IF (:REQUEST = 'T_YOUR_TAB_NAME’) THEN
:P0_PAGE_NEW := 'Y';
END IF;
Now you can create a “On Load – Before Header” session state page process to clear the session that is conditional on :P0_PAGE_NEW being set to ‘Y’. Once you’ve cleared the page cache, just set :P0_PAGE_NEW to ‘N’ in a “On Load – Before Header” pl/sql page process which runs unconditionally with the following source:
begin
:P0_PAGE_NEW := 'N';
end ;
The cache should now be cleared with every new page visit. Now imagine, you have one or more tabs which point to the same page. Ideally you would like to have each tab a cause a different action or set of items to be displayed (hypothetically). To do this you can just add to the application process you have created but instead you would set you page mode type item on the page. From there it is a simple matter of conditioning your processes, items and regions to executed or be displayed against that page mode item