 |
|
Oracle Tips by Burleson |
Creating
a Reset button for the Report
This section will not just be used to create a
button. A process will also be created to reset the various page
items. The detailed explanation on processes is contained in the
chapter on Page Processing.
The tasks in this section require two steps
Create the Reset button
Create a Reset Report Search process
To create the reset button, follow the abbreviated
steps below:
1.
On the Page Definition page click on the icon
in the Buttons section.
2.
On the Button Region page click Next.
3.
Button Position: Create a button in a region position and click
Next.
4.
On the Button Attributes page:
§
Button Name: RESET
§
Label: Reset
§
Default for the rest and click Next.
5.
Image Attributes page: Click Next.
6.
On the Create Button page:
§
Position: Region Template Position #CLOSE#
The [Close] link
below the Position select list can be used to help make this faster.
§
Default the rest and click Next.
7.
On the Branching page:
§
Branch to Page: &APP_PAGE_ID. Be sure to remember the
ending period.
§
Click Create Button.
At this point, the program returns to the Page
Definition page, and it is time to create the processes.
Creating the Reset
Report Search Process
It is common to provide users of a web site with a
button to reset the page, especially when it includes filtering page
items. The process created here will be set to process only in the
condition where the Reset button was pressed. The reset button will
submit the page and set the REQUEST = ‘RESET’. This will be explained
better in the following pages.
1.
On the Page Definition screen, click on the icon
in the Processes section under the Page Processes region.
2.
On the Process Type page: Choose the Session State option and
click Next.
Session State was explained in a previous
chapter and will not be covered again here. However, this type of
process does warrant further explanation. In order to change session
state while processing a page, a Session State process is created.
The type of Session State process picked should be one that will deal
with the level of session state that is needed, such as application
level, page level, page item level, etc. If one session state process
will not handle everything that is needed, it may be necessary to use
several session state processes on the same page to handle it all.
3.
On the next Process Type page choose the Clear Cache for items
(ITEM,ITEM,ITEM) option and click Next.
This is the option to select to clear the
session state for multiple page items on the current application page.
4.
On the Process Attributes page:
§
Name: Reset Report Search
§
Leave the others defaulted and click Next.
5.
On the Process page:
§
Enter items delimited by ",": P11_REPORT_SEARCH,P11_ROWS
This will cause
the session state for the two items listed to be cleared when the
page is submitted. In the case of the P11_ROWS page item, it will be
cleared and then set to its default value.
§
Click Next.
6.
On the Messages page:
§
Success message: It is not necessary to be notified when
this process is successful, so leave this blank.
§
Failure Message: Unable to clear cache.
§
Click Next.
7.
On the Process Conditions page:
§
When Button Pressed: RESET
§
This is telling the HTML DB engine to only allow
processing of this process when the RESET button is pressed.
§
Click Create Process.
 |
For more details and scripts, see my new book "
Oracle
Tuning: The Definitive Reference", over 900 pages
of BC's favorite tuning tips & scripts.
You can buy it direct from the publisher for 30%-off and get
instant access to the code depot. |
|