Oracle® HTML DB
User’s Guide
Release 1.5
Part No. B10992-01
December 2003
Oracle HTML DB User’s Guide, Release 1.5
Part No. B10992-01
Copyright © 2003 Oracle Corporation. All rights reserved.
Primary Author: Terri Winters
Contributor: Christina Cho, Michael Hichwa, Joel Kallman, Sergio Leunissen, Raj Mattamal, Tyler
Muth, Marc Sewtz, Scott Spadafore, and Jason Straub
The Programs (which include both the software and documentation) contain proprietary information of
Oracle Corporation; they are provided under a license agreement containing restrictions on use and
disclosure and are also protected by copyright, patent and other intellectual and industrial property
laws. Reverse engineering, disassembly or decompilation of the Programs, except to the extent required
to obtain interoperability with other independently created software or as specified by law, is prohibited.
The information contained in this document is subject to change without notice. If you find any problems
in the documentation, please report them to us in writing. Oracle Corporation does not warrant that this
document is error-free. Except as may be expressly permitted in your license agreement for these
Programs, no part of these Programs may be reproduced or transmitted in any form or by any means,
electronic or mechanical, for any purpose, without the express written permission of Oracle Corporation.
If the Programs are delivered to the U.S. Government or anyone licensing or using the programs on
behalf of the U.S. Government, the following notice is applicable:
Restricted Rights Notice Programs delivered subject to the DOD FAR Supplement are "commercial
computer software" and use, duplication, and disclosure of the Programs, including documentation,
shall be subject to the licensing restrictions set forth in the applicable Oracle license agreement.
Otherwise, Programs delivered subject to the Federal Acquisition Regulations are "restricted computer
software" and use, duplication, and disclosure of the Programs shall be subject to the restrictions in FAR
52.227-19, Commercial Computer Software - Restricted Rights (June, 1987). Oracle Corporation, 500
Oracle Parkway, Redwood City, CA 94065.
The Programs are not intended for use in any nuclear, aviation, mass transit, medical, or other inherently
iv
About Oracle HTML DB User Interface......................................................................................... 2-4
About Using the Tasks List ......................................................................................................... 2-5
Other Sources of Information...................................................................................................... 2-5
Creating an Application Using the Create Application Wizard ................................................ 2-6
Running Your Application .......................................................................................................... 2-8
3 Running a Demonstration Application
Viewing and Installing a Demonstration Application................................................................ 3-1
Running a Demonstration Application.......................................................................................... 3-2
Running an Application from Demonstration Applications.................................................. 3-2
Running an Application from Application Builder................................................................. 3-3
Understanding Sample Application ............................................................................................... 3-4
About the Home Page.................................................................................................................. 3-5
About the Orders Page................................................................................................................. 3-5
About the Products Page ............................................................................................................. 3-6
About the Customers Page.......................................................................................................... 3-6
Viewing Pages in Printer Friendly Mode.................................................................................. 3-6
Modifying a Demonstration Application ...................................................................................... 3-6
About the Developer Toolbar ..................................................................................................... 3-7
Editing a Demonstration Application........................................................................................ 3-7
Viewing Underlying Database Objects.......................................................................................... 3-9
Part II Using Oracle HTML DB
4 Managing Data with Data Workshop
About Data Workshop ....................................................................................................................... 4-1
Importing Data .................................................................................................................................... 4-2
Importing a Text File .................................................................................................................... 4-2
Importing an XML Document .................................................................................................... 4-3
Importing Spreadsheet Data ....................................................................................................... 4-3
Exporting Data..................................................................................................................................... 4-3
Exporting to a Text File................................................................................................................ 4-4
Managing Tables......................................................................................................................... 5-15
Managing User Interface Defaults ................................................................................................ 5-15
Managing Tables Using UI Defaults........................................................................................ 5-16
Applying UI Defaults to a Table or View ............................................................................... 5-17
Exporting UI Defaults................................................................................................................ 5-18
Browsing the Data Dictionary........................................................................................................ 5-18
vi
6 Application Builder Concepts
About Page Rendering and Page Processing................................................................................. 6-1
What is a Page? ............................................................................................................................. 6-2
How Application Builder Uses Templates................................................................................ 6-5
Page Templates ...................................................................................................................... 6-5
Region Templates .................................................................................................................. 6-6
List Templates ........................................................................................................................ 6-6
Report Templates................................................................................................................... 6-6
Label Templates..................................................................................................................... 6-6
Menu Templates .................................................................................................................... 6-6
Popup List of Values Templates.......................................................................................... 6-6
How Page Processing and Page Rendering Work......................................................................... 6-6
Understanding Shared Components ......................................................................................... 6-7
About Standard Tabs and Parent Tabs............................................................................... 6-7
About Navigation Bars ......................................................................................................... 6-8
About List of Values.............................................................................................................. 6-8
About Menus.......................................................................................................................... 6-8
About Lists.............................................................................................................................. 6-8
About Templates ................................................................................................................... 6-9
Understanding Conditional Rendering and Processing ........................................................ 6-9
Current Page In Expression 1 ............................................................................................ 6-10
Exists...................................................................................................................................... 6-10
PLSQL Expression............................................................................................................... 6-10
APP_IMAGES ...................................................................................................................... 6-26
BROWSER_LANGUAGE................................................................................................... 6-27
PRINTER_FRIENDLY ........................................................................................................ 6-27
HOME_LINK ....................................................................................................................... 6-28
PROXY SERVER .................................................................................................................. 6-28
REQUEST ............................................................................................................................. 6-28
SYSDATE_YYYYMMDD ................................................................................................... 6-30
DEBUG.................................................................................................................................. 6-30
APP_ID ................................................................................................................................. 6-31
APP_PAGE_ID .................................................................................................................... 6-31
APP SCHEMA OWNER .................................................................................................... 6-32
SQLERRM............................................................................................................................. 6-32
AUTHENTICATED_URL_PREFIX .................................................................................. 6-32
LOGOUT_URL .................................................................................................................... 6-33
PUBLIC_URL_PREFIX ....................................................................................................... 6-33
CURRENT_PARENT_TAB_TEXT.................................................................................... 6-34
APP_ALIAS.......................................................................................................................... 6-34
APP_UNIQUE_PAGE_ID.................................................................................................. 6-35
viii
7 Using Application Builder
Understanding the Definition of a Page ........................................................................................ 7-2
Accessing Application Builder ................................................................................................... 7-2
About the Available Applications List............................................................................... 7-2
About the Edit Page List....................................................................................................... 7-3
About the Application Navigation Pane............................................................................ 7-4
Viewing a Page Definition........................................................................................................... 7-5
Using the Page Navigation Pane......................................................................................... 7-7
Viewing Page Reports.................................................................................................................. 7-7
About All Conditions............................................................................................................ 7-8
About Event View ................................................................................................................. 7-8
Editing Application Attributes ...................................................................................................... 7-29
About Application Definition................................................................................................... 7-30
About Authorization.................................................................................................................. 7-32
About Session Management ..................................................................................................... 7-33
About User Interface Templates............................................................................................... 7-34
About Template Defaults .......................................................................................................... 7-35
About Globalization................................................................................................................... 7-35
About Application Availability................................................................................................ 7-36
About Global Notifications ....................................................................................................... 7-36
About Virtual Private Database (VPD) ................................................................................... 7-36
About Static Substitution Strings ............................................................................................. 7-36
About Build Options.................................................................................................................. 7-37
About Application Comments.................................................................................................. 7-37
Viewing Page Attributes ................................................................................................................. 7-37
Editing a Page Definition................................................................................................................ 7-38
Managing Page Rendering Components ................................................................................ 7-39
About Page ........................................................................................................................... 7-39
About Regions ..................................................................................................................... 7-39
About Buttons...................................................................................................................... 7-42
About Items.......................................................................................................................... 7-43
About Page Computations................................................................................................. 7-49
About Page Processes ......................................................................................................... 7-50
About Page Processing Components....................................................................................... 7-50
About Validations ............................................................................................................... 7-51
About Branching ................................................................................................................. 7-51
Editing Page Attributes ............................................................................................................. 7-52
About Primary Page Attributes......................................................................................... 7-53
About HTML Header ......................................................................................................... 7-54
About Page Header, Footer and Text Attributes............................................................ 7-54
About On Load JavaScript ................................................................................................. 7-55
Building a Form Using a Region .............................................................................................. 8-16
Building a Report Using a Region............................................................................................ 8-17
About Regions Based on an URL ............................................................................................. 8-17
About Regions Based on PL/SQL Dynamic Content............................................................ 8-18
Creating Buttons ............................................................................................................................... 8-19
xi
Using the Create Button Wizard .............................................................................................. 8-19
Creating an HTML Button ................................................................................................. 8-20
Creating Lists of Values................................................................................................................... 8-20
Creating LOVs............................................................................................................................. 8-21
Referencing Session State within a LOV.......................................................................... 8-21
Inline Static LOV.................................................................................................................. 8-21
Popup LOV........................................................................................................................... 8-22
Creating Forms .................................................................................................................................. 8-22
Using a Wizard to Build a Form............................................................................................... 8-23
Creating a Form Manually ........................................................................................................ 8-23
Processing a Form....................................................................................................................... 8-24
Creating an Automatic Row Processing Process............................................................ 8-24
Creating a Process Containing One or More Insert Statements ................................... 8-25
Using a PL/SQL API to Process Form Values ................................................................ 8-26
Populating Forms ................................................................................................................ 8-26
Validating User Input in Forms................................................................................................ 8-27
Creating Reports ............................................................................................................................... 8-28
Using a Wizard to Create a Report .......................................................................................... 8-28
Managing Report Attributes..................................................................................................... 8-29
Accessing Report Attributes .............................................................................................. 8-30
Enabling Column Sorting................................................................................................... 8-31
Exporting a Report .............................................................................................................. 8-31
Creating a Column link ...................................................................................................... 8-32
Defining Updatable Columns............................................................................................ 8-33
Removing Components to Isolate a Problem................................................................................ 9-5
10 Managing an Application
Accessing Application Builder Utilities....................................................................................... 10-1
Viewing Application Summary and Utilization Reports ..................................................... 10-2
Exporting and Importing Applications ........................................................................................ 10-2
How Exporting an Application Works.................................................................................... 10-3
About Managing Database Objects.......................................................................................... 10-3
Exporting an Application and Related Files........................................................................... 10-4
Exporting Related Application Files................................................................................. 10-5
Importing Exported Application Files..................................................................................... 10-6
Installing Files from the View Export Repository.................................................................. 10-6
Uploading CSS, Images, and Static Files ..................................................................................... 10-8
Understanding Security................................................................................................................... 10-8
Using the Security Navigation Pane ........................................................................................ 10-9
Establishing User Identity Through Authentication................................................................. 10-9
xiii
Understanding How Authentication Works .......................................................................... 10-9
Creating an Authentication Scheme ...................................................................................... 10-10
Using the Authentication Scheme Repository ..................................................................... 10-11
Viewing the Current Authentication Scheme for an Application..................................... 10-12
About Preconfigured Authentication Schemes.................................................................... 10-12
About DAD Credentials Verification ............................................................................. 10-13
About HTML DB Account Credentials.......................................................................... 10-14
About LDAP Credentials Verification ........................................................................... 10-14
About Single Sign-On Server Verification..................................................................... 10-14
About Creating an Authentication Scheme from Scratch .................................................. 10-15
About Session Management Security............................................................................. 10-15
Building a Login Page....................................................................................................... 10-16
About Deep Linking ......................................................................................................... 10-16
Providing Security Through Authorization .............................................................................. 10-17
Creating a Collection........................................................................................................... 12-3
Truncating a Collection ...................................................................................................... 12-4
Deleting a Collection........................................................................................................... 12-4
Adding Members to a Collection ...................................................................................... 12-4
Updating Collection Members .......................................................................................... 12-6
Deleting a Collection Member ........................................................................................... 12-6
Determining Collection Status........................................................................................... 12-7
Merging Collections ............................................................................................................ 12-8
Managing Collections ......................................................................................................... 12-9
Clearing Collection Session State .................................................................................... 12-10
Running Background PL/SQL...................................................................................................... 12-10
Understanding the HTMLDB_PLSQL_JOB Package .......................................................... 12-11
About System Status Updates................................................................................................. 12-13
Using a Process to Implement Background PL/SQL.......................................................... 12-13
Implementing Web Services......................................................................................................... 12-15
Creating a Web Service............................................................................................................ 12-15
Invoking a Web Service as a Process ..................................................................................... 12-17
Managing User Preferences .......................................................................................................... 12-18
Viewing User Preferences........................................................................................................ 12-18
Setting User Preferences .......................................................................................................... 12-18
Setting User Preferences Using a Page Process............................................................. 12-19
Setting the Source of an Item Based on a User Preference .......................................... 12-19
Setting User Preferences Programatically...................................................................... 12-20
Resetting User Preferences Manually.................................................................................... 12-20
Resetting Preferences Using a Page Process ......................................................................... 12-21
xv
13 Oracle HTML DB APIs
HTMLDB_UTIL ................................................................................................................................ 13-1
CLEAR_APP_CACHE Procedure............................................................................................ 13-2
CLEAR_USER_CACHE Procedure ......................................................................................... 13-3
POPUP_FROM_QUERY Function......................................................................................... 13-34
xvi
POPUPKEY_FROM_LOV Function....................................................................................... 13-36
POPUPKEY_FROM_QUERY Function ................................................................................. 13-37
HTMLDB_APPLICATION............................................................................................................ 13-40
Referencing Arrays................................................................................................................... 13-40
Referencing Values Within an On Submit Process.............................................................. 13-41
Converting an Array to a Single Value.................................................................................. 13-41
HTMLDB_CUSTOM_AUTH ....................................................................................................... 13-42
APPLICATION_PAGE_ITEM_EXISTS Function ................................................................ 13-42
CURRENT_PAGE_IS_PUBLIC Function.............................................................................. 13-43
DEFINE_USER_SESSION Procedure .................................................................................... 13-43
GET_NEXT_SESSION_ID Function....................................................................................... 13-43
GET_SECURITY_GROUP_ID Function ................................................................................ 13-43
GET_SESSION_ID Function.................................................................................................... 13-44
GET_USER Function ................................................................................................................ 13-44
SESSION_ID_EXISTS Function .............................................................................................. 13-44
SET_USER Procedure............................................................................................................... 13-44
SET_SESSION_ID Procedure .................................................................................................. 13-45
SET_SESSION_ID_TO_NEXT_VALUE Procedure.............................................................. 13-45
Part III Administration
14 Administering Workspaces
About the Oracle HTML DB Administrator................................................................................ 14-1
Viewing Workspace Reports .......................................................................................................... 14-2
Creating a Workspace....................................................................................................................... 14-3
Specifying a Provisioning Mode............................................................................................... 14-3
Managing a Service and Change Request............................................................................... 14-4
Viewing a Pending Service or Change Request.............................................................. 14-4
Approving a Service or Change Request ......................................................................... 14-5
Creating a Workspace Without a Request .............................................................................. 14-6
Mapping Primary and Target Application IDs...................................................................... 16-6
Seeding and Exporting Text to a Translation File.................................................................. 16-7
Seeding Translatable Text .................................................................................................. 16-7
Exporting Text to a Translation File ................................................................................. 16-8
Translating the XLIFF File......................................................................................................... 16-9
Uploading and Publishing a Translated XLIFF Document................................................ 16-10
Translating Messages Used in PL/SQL Procedures ................................................................. 16-12
Defining Translatable Messages............................................................................................. 16-12
HTMLDB_LANG.MESSAGE API.......................................................................................... 16-12
xviii
Translating Data that Supports List of Values........................................................................... 16-14
Defining a Dynamic Translation ............................................................................................ 16-14
HTMLDB_LANG.LANG API................................................................................................. 16-15
About Oracle HTML DB Globalization Codes......................................................................... 16-16
A Available Conditions
Conditions Available in Oracle HTML DB ................................................................................... A-1
Index
xix
Send Us Your Comments
Oracle HTML DB User's Guide, Release 1.5
Part No. B10992-01
Oracle Corporation welcomes your comments and suggestions on the quality and usefulness of this
publication. Your input is an important part of the information used for revision.
■
Did you find any errors?
■
Is the information clearly presented?
■
Do you need more information? If so, where?
■
Intended Audience
■
Organization
■
Related Documentation
■
Conventions
■
Documentation Accessibility
Intended Audience
Oracle HTML DB User's Guide is intended for application developers who are
building database-centric Web applications using Oracle HTML DB. The guide
describes how to use the Oracle HTML DB development environment to build,
debug, manage, and deploy applications. To use this guide, you need to have a
general understanding of relational database concepts as well as an understanding
of the operating system environment under which you are running Oracle HTML
DB.
Organization
This document contains:
xxii
Part I, "Getting Started with Oracle HTML DB"
Part I provides an introduction to Oracle HTML DB by introducing you to basic
Oracle HTML DB concepts.
Chapter 1, "What is Oracle HTML DB?"
This chapter offers a general description of Oracle HTML DB and the components
you can use it to develop database-centric Web applications.
Chapter 2, "Quick Start"
This chapter offers a quick introduction to using Oracle HTML DB.
Chapter 3, "Running a Demonstration Application"
This chapter describes how to run a demonstration application and defines
This chapter provides information about advanced programming techniques
including establishing database links, using collections, running background SQL,
utilizing Web Services and managing user preferences.
Chapter 13, "Oracle HTML DB APIs"
This chapter describes available Oracle HTML DB APIs.
Part III, "Administration"
Part III describes the tasks associated with administering Oracle HTML DB,
including creating and managing workspaces, translating an application, and
managing activities, log files, and sessions.
Chapter 14, "Administering Workspaces"
This chapter describes tasks an Oracle HTML DB administrator performs when
administering workspaces.
Chapter 15, "Managing Services"
This chapter provides information about additional administrator activities
available in Oracle HTML DB, including sending e-mail, monitoring user activity,
managing log files, and managing sessions.
xxiv
Chapter 16, "Managing Globalization"
This chapter describes how to translate an application created in Oracle HTML DB.
Appendix A, "Available Conditions"
Provides a listing of conditions available in Oracle HTML DB.
Related Documentation
For more information, see these Oracle resources:
■
Oracle Database Concepts
■
Oracle Database Application Developer's Guide - Fundamentals
■
Oracle Database Administrator's Guide
■
Oracle Database Concepts
Ensure that the recovery catalog and target
database do not reside on the same disk.
UPPERCASE
monospace
(fixed-width)
font
Uppercase monospace typeface indicates
elements supplied by the system. Such
elements include parameters, privileges,
datatypes, RMAN keywords, SQL
keywords, SQL*Plus or utility commands,
packages and methods, as well as
system-supplied column names, database
objects and structures, usernames, and
roles.
You can specify this clause only for a NUMBER
column.
You can back up the database by using the
BACKUP command.
Query the TABLE_NAME column in the USER_
TABLES data dictionary view.
Use the DBMS_STATS.GENERATE_STATS
procedure.
lowercase
monospace
(fixed-width)
font
Lowercase monospace typeface indicates
executables, filenames, directory names,
You can specify the
parallel_clause
.
Run U
old_release
.SQL where
old_
release
refers to the release you installed
prior to upgrading.