 |
|
Oracle Tips by Burleson |
Learning from the HTML DB Applications
Ok, so now the HTLM DB applications have been
loaded, but no one is quite sure what to do with them.
The best way to explain is to describe a scenario
I used while trying to learn HTML DB. Figure 16.12 shows the mouse
pointer over the Conditions link. Clicking on that link will scroll
the page to the conditions region. Well, I wanted to know how they
did that.
Step 1
When editing a region as shown in Figure 16.12,
take note of the URL in the browser. Look for the APP_ID and PAGE_ID
arguments. The URL shown below says this is application 4000, page
4651:
http://localhost:7777/pls/hdb20/f?p=4000:4651:6482256901421161860
Step 2
Navigate to the application created earlier.
Figure 16.11 shows that HTML DB application ID 4000 is the HTML DB
Application Builder application. Click on the link to edit the
application.
On the Application home page, enter the page ID
from above into the Page field and click the Go button as shown in
Figure 16.13.
Step 3
Edit the 4651 application page by clicking on the
Edit Region link as shown in Figure 16.14.
Figure 16.15 shows the regions on page 4651.
There is a region named Page Anchors. This is the region that
rendered the links at the top of Figure 16.12. It is an HTML DB
List. Click on the Page Anchors list to view the region definition.
The region definition page shows that the list has
URL targets that point to bookmarks as shown in Figure 16.16. This
shows how HTML DB is providing the navigation to a bookmark but we
still have to discover how the bookmark was defined.
Step 4
Navigate back to the page definition page for page
4651. Click on the Conditional Display
link to view the region definition. This is the second region
outlined in Figure 16.15. Figure 16.16 shows that the Title of the
Conditional Display was embedded in an anchor tag with the NAME
property set to CONDITIONS. The name property in the region title, as
shown in Figure 16.17, is the same as the URL Target set in the page
anchors list in Figure 16.16.
Therefore, clicking on the Conditions link at the
top of a regions definition page navigates to the #CONDITIONS bookmark
as indicated in the title of the Conditional Displayregion.
This exercise has shown how the HTML DB source
code can be used to learn how to perform a development task. The key
is to identify in the HTML DB development environment something you
would like to duplicate on your own application pages.
The
above book excerpt is from:
Easy HTML-DB
Oracle Application Express
Create Dynamic
Web Pages with OAE
ISBN 0-9761573-1-4
Michael Cunningham & Kent Crotty
http://www.rampant-books.com/book_2005_2_html_db.htm
 |
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. |
|