Oracle
Web Publishing Assistant Getting Started for Windows NT Release 1.0 A53270_01 |
|
This chapter discusses how to use the three tutorials included with Oracle Web Publishing Assistant. Specific topics discussed are:
Each tutorial in this chapter uses increasingly more complex templates to format retrieved database information. To learn how the different effects are achieved, view the template structure in an HTML editor or view the source code from within your browser.
The first tutorial uses the default generated template WEB.HTX. This template is a simple page, merging information retrieved from one table. The tutorial queries the SCOTT.EMP table (installed automatically when you install Oracle8 using the Typical Installation Option) and formats the retrieved information using the template WEB.HTX.
To create the web page:
From the taskbar, select Start > Programs > Oracle for Windows NT > Oracle Web Publishing Assistant.
Oracle Web Publishing Assistant appears. To bypass the welcome screen upon subsequent use of Oracle Web Publishing Assistant, de-select the checkbox.
The Create Web Page Wizard appears (Step 1 of 4).
Field | Description |
---|---|
User Name |
Enter the user SCOTT. |
Password |
Enter the password TIGER. |
Database |
Leave the field blank to connect to the local database. |
The next screen (Step 2 of 4) appears.
The next screen (Step 3 of 4) appears.
Select any day and any time in the future to generate the web page.
The next screen (Step 4 of 4) appears.
Select Generate Default Template File.
The Summary Screen appears, confirming that the web page creation was successful. Click Finish to dismiss the screen.
Note:
All web pages are automatically generated at this time, even if you chose a scheduling option other than Immediately. Your web page will be re-generated at the specified time. |
The second tutorial queries the SCOTT.EMP table (installed automatically when you install Oracle8 using the Typical Installation Option) and formats the retrieved information using the template EXAMPLE2.HTX.
To create the web page using the template EXAMPLE2.HTX:
From the taskbar, select Start > Programs > Oracle for Windows NT > Oracle Web Publishing Assistant.
Oracle Web Publishing Assistant appears. To bypass the welcome screen upon subsequent use of Oracle Web Publishing Assistant, de-select the checkbox.
The Oracle Web Publishing Assistant appears:
The Create Web Page Wizard appears (Step 1 of 4).
Field | Description |
---|---|
User Name |
Enter the user SCOTT. |
Password |
Enter the password TIGER. |
Database |
Leave the field blank to connect to the local database. |
The next screen (Step 2 of 4) appears.
You will now use a predefined SQL script to enter the SQL statement. The SQL script is stored in an ASCII text file.
From the taskbar, select Start > Run.
Notepad opens.
The file EXAMPLE2.SQL appears.
The next screen (Step 3 of 4) appears.
Select any day and any time in the future to generate the web page.
The next screen (Step 4 of 4) appears.
Select Use Template File. Navigate to ORANT\OWAST\SAMPLES\EXAMPLE2.HTX.
Note:
All web pages are automatically generated at this time, even if you chose a scheduling option other than Immediately. Your web page will be re-generated at the specified time. |
The Summary Screen appears, confirming that the web page creation was successful. Click Finish to dismiss the screen.
The resulting web page (.HTM) looks like this:
The third tutorial uses a template which incorporates the use of frames, enabling you to merge two separate query statements into one file. This tutorial queries the SCOTT.EMP table (installed automatically when you install Oracle8 using the Typical Installation Option) and formats the retrieved information using the template EXAMPLE3.HTX and DETAIL.HTX.
To create the web page:
From the taskbar, select Start > Programs > Oracle for Windows NT > Oracle Web Publishing Assistant.
Oracle Web Publishing Assistant appears. To bypass the welcome screen upon subsequent use of Oracle Web Publishing Assistant, de-select the checkbox.
The Oracle Web Publishing Assistant appears:
The Create Web Page Wizard appears (Step 1 of 4).
Field | Description |
---|---|
User Name |
Enter the user SCOTT. |
Password |
Enter the password TIGER. |
Database |
Leave the field blank to connect to the local database. |
The next screen (Step 2 of 4) appears.
Use the predefined SQL script to enter the SQL statement. The SQL script is stored in an ASCII text file EXAMPLE3.SQL.
From the taskbar, select Start > Run.
Notepad opens.
The file EXAMPLE3.SQL appears.
The next screen (Step 3 of 4) appears.
Select any day and any time in the future to generate the web page.
The next screen (Step 4 of 4) appears.
Select Use Template File. Navigate to ORANT\OWAST\SAMPLES\EXAMPLE3.HTX.
Note:
All web pages are automatically generated at this time, even if you chose a scheduling option other than Immediately. Your web page will be re-generated at the specified time. |
The Summary Screen appears, confirming that the web page creation was successful. Click Finish to dismiss the screen.
The resulting web page (.HTM) looks like this:
The web page you have created thus far is similar to the web page in the second tutorial, except that the employee names are hot (linked).
The next section explains how you can further develop the page by incorporating a frame which shows a set of information from a separate query on the same web page. In this example, you will create a frame which shows the details of each employee listed in the first column of the web page when the name of that employee is clicked.
Note that when you pass the mouse pointer over the employee name, an HTML file is linked to the name. The file each employee name points to is what you will be creating in the next section (EMP#.HTM). After you complete the next section, the result will be a file EXAMPLE3.HTM which incorporates MAIN.HTM and EMP#.HTM (where EMP# is the employee number).
To illustrate, the first employee listed is KING. The employee number associated with KING is 7839. In order to create the frame of information, you must know the employee number of each employee. This example will stop with employee KING, but you can create as many as you want.
To create the second part of the web page:
Use the predefined SQL script to enter the SQL statement. The SQL script is stored in an ASCII text file EXAMPLE3.SQL. For more information on how to use the script, see Step 5.
...and empno=emp#...
so that the entire statement reads:
select empno,ename,job,sal,comm,hiredate,dname from emp a, dept b where a.deptno = b.deptno and empno=emp# order by sal desc;
where emp# is the employee number.
Select Use Template File. Navigate to ORANT\OWAST\SAMPLES\DETAIL.HTX.
The Summary Screen appears, confirming that the web page creation was successful. Click Finish to dismiss the screen.
Note that only the files MAIN.HTM and EMP#.HTM appear in the file listing. The file EXAMPLE3.HTM will not appear in the file listing of Oracle Web Publishing Assistant:
When you are finished creating the frames, your resulting web page will allow a user to see the Employee Details of each of the employees by clicking on the employee name. The information contained in the frame shows the information relevant to the selected name.
|
Copyright © 1997 Oracle Corporation. All Rights Reserved. |
|