Oracle® HTML DB User's Guide Release 1.6 Part Number B14303-02 |
|
|
View PDF |
This section describes how to run and modify the demonstration applications that install with Oracle HTML DB. Running and analyzing how an application works is an effective way to better understand how you can use Oracle HTML DB to build your own applications.
This section contains the following topics:
Oracle HTML DB installs with a number of demonstration applications. Use these applications to learn more about the different types of functionality you can include in your applications.
To view the demonstration applications included with Oracle HTML DB:
Log in to Oracle HTML DB as described in "Logging in to Oracle HTML DB".
The Workspace home page appears.
From the Workspace Administration list, select Review Demonstration Applications.
The Demonstration Applications page appears, displaying links to the following applications:
The Status column indicates whether or not an application is currently installed.
To install a demonstration application:
Navigate to the Demonstration Applications page as described in the previous procedure.
Scroll down to the application you wish to install, click Install.
Follow the on-screen instructions.
Oracle HTML DB installs with a number of demonstration applications. Once you have installed a demonstration application you can run it from the Demonstration Application page or from the Workspace home page.
By default, installing Sample Application creates two accounts, demo
and admin
. The default password for both accounts is the name of the current workspace in lowercase letters.
The simplest way to run a demonstration application is navigate to the Demonstration Applications page.
To run a demonstration application from the Demonstration Applications page:
Log in to Oracle HTML DB as described in "Logging in to Oracle HTML DB".
The Workspace home page appears.
From the Workspace Administration list, select Review Demonstration Applications.
On the Demonstration Applications page, locate the application you wish to run.
In the Action column, click Run.
Enter the appropriate username and password and click Login
For User Name, enter either demo
or admin
For Password, enter the name of the current workspace using all lowercase letters
Once you have installed a demonstration application, you can run it from Workspace home page.
To run a demonstration application from the Workspace home page:
Log in to Oracle HTML DB as described in "Logging in to Oracle HTML DB".
The Workspace home page appears.
Locate the application you wish to run in the Applications list.
Click the Run icon to the right of the application name.
Enter the appropriate username and password and click Login
For User Name, enter one of the following:
demo
admin
For Password, enter the name of the current workspace using all lowercase letters.
Each demonstration application features a different set of functionality. This section describes the demonstration application, Sample Application.
As shown in Figure 3-1, Sample Application features an easy-to-use interface for viewing, updating, and searching order and customer information for electronic and computer products. Users can navigate between the pages using the Home, Customers, Products, Orders, and Charts tabs.
Sample Application demonstrates the following functionality:
Examples of ways to display summary information, including a dial chart and summary reports
Reports for viewing, updating, and adding customers, products, and orders
A Calendar report
SVG charts available in Oracle HTML DB including cluster bar, pie chart, and stacked bar
Printer friendly mode
The sections that follow describe specific functionality available on each page.
As shown in Figure 3-1, the Home page contains four regions:
My Quota
My Top Orders
Sample Application 1.6
Tasks list
My Quota demonstrates the use of a new SVG chart called a Dial Chart. This chart displays a value based on an underlying SQL statement. Although not demonstrated in this example, you can enable an asynchronous refresh by editing the attributes of any SVG chart.
My Top Orders is a simple report based on a SQL query. This report displays a subset of the information that appears on the Orders page. Users can link to order details by selecting the Edit icon.
Sample Application 1.6 is a simple HTML region that displays static text. You can create this type a region to display explanatory information to users.
Tasks list contains an Oracle HTML DB list with links to other pages in Sample Application. Links available on the Home page Tasks list include:
About this Application links to an informational page that describes this application.
Enter a New Order links to a wizard for creating a new order.
Add a New Customer links to a form for entering new customer information.
Add a New Product links to a form for adding a new product.
As shown in Figure 3-2, the Customers page enables users to view and edit customer information. The Customers page consists of two main regions:
Customers
Top Customers
Customers is an updatable report for tracking customer information. This region is also based on a SQL query. To search for a customer, type a customer name in the Search for field and click Go. To sort by customer name, click the column heading. A Sort icon appears to the right of the heading, Customer Name. To update existing customer information, click the Edit icon.
Top Customers ranks customers by order amount. This report is based on a SQL query which returns top customers based on their orders.
As shown in Figure 3-3, the Products page enables users to view and edit product information. The Products page consists of two main regions:
Products
Top 10 Products
Products displays an updatable report for tracking product information. This region is based on a SQL query which makes use of a custom function for displaying images stored in the database. To sort by product category, click the column heading. A Sort icon appears to the right of the heading. To edit a product description, click the Edit icon. To add a new product, click the Create Product button at the bottom of the page. Users can export the data in the Products report to a spreadsheet, by clicking Export to Spreadsheet.
Top 10 Products is also a SQL report. This report outlines the top ten products based on quantities sold.
The Orders page (see Figure 3-4) enables users to view and edit customer orders. The Orders page contains two regions:
My Orders
Order by Day
My Orders is an Easy Report which summarizes the current orders in the system. To sort a column, click the column heading. A Sort icon appears next to column heading. To edit an existing order, click the Edit icon. To add a new order, click the Enter New Order button.
Order by Day is a Calendar report. This report displays the amount of an order on its corresponding date in a calendar. Users can select a calendar entry to view order details.
The Charts page illustrates three of the several types of SVG charts available in Oracle HTML DB: cluster bar, pie chart, and stacked bar. To view a chart, select a chart type.
The Admin page only displays if you log in to Sample Application using the user name admin
. Sample Application makes use of a custom authentication scheme that stores user names and obfuscated passwords in a table. The Manage Users page enables you to manage additional users.
Note the this custom authentication scheme does not utilize any user names or passwords associated with Oracle HTML DB developers.
Clicking Print in the upper right corner of the page displays the current page in Printer Friendly mode. When in Printer Friendly mode, the HTML DB engine displays all text within HTML form fields as text.
To enable your application to display in Printer Friendly mode, you need to create and then specify a Print Mode Page Template on the Edit Application Attributes page.
Once you understand the type of functionality available in a demonstration application, the next step is to learn more about how each page is constructed. You edit an application using Application Builder. Using Application Builder you can edit existing pages in an application, add pages to an application, or create entirely new applications.
When you log in to Oracle HTML DB having developer privileges and run an application, a Developer toolbar displays at the bottom of every page. As shown in Figure 3-5, the Developer toolbar offers a quick way to edit the currently running page, create a new page, control, or component, view session state, or turn edit links on or off.
Figure 3-5 Developer Toolbar in Sample Application
The Developer toolbar consists of the following links:
Edit Application links you to the Application Builder home page. (See "Viewing a Page".)
Edit Page accesses the Page Definition for the currently running page. (See "Viewing a Page".)
New links to a wizard that enables you to create a new blank page, a component (report, chart, or form), a page control (region, button, or item), or a shared component (menu, list, or tab).
Session links you to session state information for the current page. (See "Viewing Session State".)
Debug runs the current page in debug mode. (See "Accessing Debug Mode".)
Show Edit Links toggles between Show Edit Links and Hide Edit Links. Clicking Show Edit Links displays edit links next to each object on the page that can be edited. Each edit link resembles two colons (::) and appears to the right of navigation bar items, tabs, region titles, buttons, and items. Clicking on the link displays another window in which to edit the object.
There are two common ways to edit a demonstration application:
From Demonstration Applications page, click Edit next to the desired application.
If you are running an application, click Edit Application on the Developer toolbar.
The Application Builder home page appears. As shown in Figure 3-6, the Application Builder home page displays the current application name and application ID, last update date, and parsing schema.
You can run the current application, edit application attributes, create shared components, export and import information, or create a new page by clicking the one of the following:
Run submits the pages in the current application to the HTML DB engine to render viewable HTML
Edit Attributes displays the Edit Application Attributes page
Shared Components links to a new page for building shared application components and user interface controls
The Pages list displays at the bottom of the page. To access a specific page, select the page name. To search for a specific page number, enter a page number in the Find field and click Find.
See Also:
|
The HTML DB engine renders applications in real time based on data stored in database tables. You can view the database objects for any demonstration application in SQL Workshop.
To view the database objects used for an application:
Navigate to the Workspace home page.
Click the click the SQL Workshop icon.
You view by schema and type and then by name. Under Database Browser, you can selecting existing database objects by selecting a database object type.
Under Database Browser, select Tables.
To create a search:
In Schema, select your workspace
In Type, select Table
In Search, type DEMO
Click Go
All tables having names that contain the string DEMO
appear.
To view table details, click the View icon adjacent to the appropriate table name.
The Object Detail page appears.
Optionally, select a task from Tasks list on the right side of the page.