Professional Documents
Culture Documents
®
Authors Copyright Oracle Corporation, 1998, 1999, 2000. All rights reserved.
Technical Contributors
Restricted Rights Legend
and Reviewers
Use, duplication or disclosure by the Government is subject to restrictions for
Jeffrey Gallus commercial computer software and shall be deemed to be Restricted Rights
software under Federal law, as set forth in subparagraph (c) (1) (ii) of DFARS
Satyajit Ranganathan 252.227-7013, Rights in Technical Data and Computer Software (October 1988).
Gerard Sugrue
This material or any portion of it may not be copied in any form or by any means
without the express prior written permission of the Worldwide Education Services
group of Oracle Corporation. Any other copying is a violation of copyright law and
may result in civil and/or criminal penalties.
Publishers
If this documentation is delivered to a U.S. Government Agency not within the
Fiona Simpson Department of Defense, then it is delivered with “Restricted Right,” as defined in
FAR 52.227-14, Rights in Data-General, including Alternate III (June 1987).
Carol Brown
Don Griffin The information in this document is subject to change without notice. If you find
any problems in the documentation, please report them in writing to Education
Products, Oracle Corporation, 500 Oracle Parkway, Box 659806, Redwood
Shores, CA 94065. Oracle Corporation does not warrant that this document is
error-free.
All other products or company names are used for identification purposes only,
and may be trademarks of their respective owners.
Contents
..........................................................................................................................................
Contents
Lesson 1: Introduction
Introduction 1-2
How to Learn About Oracle Designer 1-4
The Oracle Designer Curriculum 1-5
System Building 1-7
System Development 1-9
What are the Components for Web PL/SQL Generation? 1-10
Three-Tier Architecture 1-11
Where Does the Web PL/SQL Generator Fit In? 1-12
What About Web Forms? 1-13
Course Agenda 1-15
Applications for the Course 1-17
Practice 1—1: Browsing a Generated Application 1-18
Hints 1-20
Instructor Notes 1-21
Instructor Post Lesson Teaching Evaluation 1-29
Suggested Graphics 1-31
..........................................................................................................................................
®
iii
Contents
..........................................................................................................................................
..........................................................................................................................................
iv Oracle Designer 6i: Web PL/SQL Design and Generation
Contents
..........................................................................................................................................
..........................................................................................................................................
®
v
Contents
..........................................................................................................................................
..........................................................................................................................................
vi Oracle Designer 6i: Web PL/SQL Design and Generation
Contents
..........................................................................................................................................
..........................................................................................................................................
®
vii
Contents
..........................................................................................................................................
Appendix A: Solutions
Practice 1—1: Solutions A-2
Practice 2—1: Solutions A-3
Practice 2—2: Solutions A-4
Practice 2—3: Solutions A-5
Practice 2—4: Solutions A-6
Practice 3—1: Solutions A-7
Practice 3—2: Solutions A-8
Practice 3—3: Solutions A-9
Practice 4—1: Solutions A-10
Practice 4—2: Solutions A-12
Practice 4—3: Solutions A-14
Practice 5—1: Solutions A-16
..........................................................................................................................................
viii Oracle Designer 6i: Web PL/SQL Design and Generation
Contents
..........................................................................................................................................
..........................................................................................................................................
®
ix
Contents
..........................................................................................................................................
..........................................................................................................................................
x Oracle Designer 6i: Web PL/SQL Design and Generation
1
.................................
Introduction
Lesson 1: Introduction
.....................................................................................................................................................
Introduction
Aim of the Course
This course focuses on the essential tasks of generating a fully functional Web-based
application.
You can run the generated applications using any Oracle Web server, however because
we have built the course using WebDB, any references to a Web server are based on
this product.
1-5
You learned the basic uses of Oracle Designer in First Class. In this course you focus
on designing and generating Oracle Web PL/SQL modules.
.....................................................................................................................................................
1-2 Oracle Designer 6i: Web PL/SQL Design and Generation
Introduction
.....................................................................................................................................................
Objectives
At the end of this course, you should be able to do the following:
• Browse a generated Web PL/SQL application.
• Design and build a fully-functional Web PL/SQL application that satisfies a set of
specifications.
• Control the layout and behavior of generated applications by means of preferences
and templates.
• Identify the input sources for the Web PL/SQL Generator and explain the
generated output.
• Explain how generated PL/SQL creates HTML and JavaScript to implement
applications.
• Define client-side JavaScript and server-side PL/SQL against module event points
in the Repository.
• Create applications that are easy to navigate by linking screen and menu modules
in a network.
• Use the Web PL/SQL Security API to implement authorized or self service
security.
.....................................................................................................................................................
1-3
®
Lesson 1: Introduction
.....................................................................................................................................................
1-6
First Class
The goal of First Class is to teach you the basic use of the key components of the
Oracle Designer toolset. The course is broad in scope, but not deep. First Class stresses
the default behavior of the Oracle Designer toolset.
As its name suggests, First Class is the mandatory prerequisite for all the other courses
in the Oracle Designer curriculum.
Focus Courses
Each focus course teaches a particular area of Oracle Designer in detail.
Experience
The Oracle Designer curriculum introduces you to the most important features of
Oracle Designer and prepares you for using Oracle Designer in the workplace, but it
cannot substitute for experience using the tool on a real project.
.....................................................................................................................................................
1-4 Oracle Designer 6i: Web PL/SQL Design and Generation
The Oracle Designer Curriculum
.....................................................................................................................................................
First
Class
1-7
.....................................................................................................................................................
1-5
®
Lesson 1: Introduction
.....................................................................................................................................................
The Roadmap
The curriculum path illustrates the order in which you should take the courses. The
Oracle Designer curriculum is designed to bring you up to speed quickly and to
maximize your productivity.
About this Slide
Curriculum Path See Page 23
Oracle Designer
Server Design
Oracle Designer and Generation
New Features
Oracle
Oracle Designer
Designer R2:
Forms
Forms Design
Design
and
and Generation
Generation
Oracle Designer
Web PL/SQL Design and
Generation
Managing Development
Using Oracle Repository
1-9
Related Courses
Oracle Designer: Forms Design and Generation teaches topics related to the material
in this course.
For more information, see an Oracle University catalog or speak with your Oracle
University sales consultant.
.....................................................................................................................................................
1-6 Oracle Designer 6i: Web PL/SQL Design and Generation
System Building
.....................................................................................................................................................
System Building
Developing an entire system is a daunting task, even for experienced application
developers.
I need a recipe
…and a tool that
that tells me
automates the
process.
… what to do
…and how to do it
1-10
Your company may have decided to use Oracle Designer; that is why you attended
First Class and have now decided to attend this course.
You know that you need to perform an enormous set of tasks and that many of the
tasks are dependent on each other. You also know that there are many techniques and
methodologies that are available to support you in your project. But which ones do you
choose?
You also know that there are tools that can help you achieve your goal of designing
and building a system.
How do you make it all work???
.....................................................................................................................................................
1-7
®
Lesson 1: Introduction
.....................................................................................................................................................
...
Can you automate it?
Tools
1-11
What Do You Do? The answer to this question is “follow a method.” A method
addresses the specific tasks required and specifies the order in which they follow,
much like a recipe. As you follow the method, each task is clearly outlined and you
can have confidence that, after completing all the tasks, you will achieve the desired
result.
The Custom Development Method (CDM) is Oracle’s official method.
How Do You Do It? The answer to this question is “apply techniques.” A technique
focuses on how to do each of the tasks that the method describes. Each technique
furthers the method by producing a specific deliverable, which then provides input to
the next task.
Can You Automate It? The answer to this question is “use tools.” A tool can
automate the mundane, repetitive tasks that often lead to errors when performed
manually. Do not expect a tool to provide a magic solution; tools can only facilitate the
tasks, thereby freeing up your time for more conceptual tasks.
This course focuses on the Tools component and how Oracle Designer automates the
creation of models that specify requirements. You should remember, however, that you
need more than tools to build a system successfully; you also need a method and
techniques.
.....................................................................................................................................................
1-8 Oracle Designer 6i: Web PL/SQL Design and Generation
System Development
.....................................................................................................................................................
System Development
When you develop a system, you perform three major tasks: analysis, design, and
build. Oracle Designer tools help you to take real-world system requirements and
generate a working system that satisfies those requirements.
Business Requirements
Process Information
Analyze
Design
Browser:
http://
Build
Application
1-12
Business requirements are the input to the development process. The output is the
application, which consists of the database and the screens, reports, and menus.
The left half of the circle relates to the processes that comprise what the company
does. The right half relates to the information that is needed to support the processes.
Dividing the circle horizontally, you can see that the upper half represents the analysis
of the business requirements, both in terms of what the company does and the
information that the business needs to hold.
The lower half of the circle represents the design and build stages of the development
life cycle. The vertical jagged arrows that point to design and build represent the
transformation of definitions from analysis to design.
.....................................................................................................................................................
1-9
®
Lesson 1: Introduction
.....................................................................................................................................................
WebDB
1-13
Web Servers
There are many Web servers on the market today. Some of the common ones are
developed by Oracle, NCSA, Netscape, and Microsoft. Web servers serve requested
files to Web clients.
WebDB
Oracle Web servers differ from other Web servers in that they can retrieve information
dynamically from an Oracle database to send to a Web client, as well as serving
traditional static files.
WebDB retrieves the data from an Oracle database by executing PL/SQL procedures
in the database.
.....................................................................................................................................................
1-10 Oracle Designer 6i: Web PL/SQL Design and Generation
Three-Tier Architecture
.....................................................................................................................................................
Three-Tier Architecture
Client–Server
Oracle applications traditionally run in a client–server environment. The database
resides on one machine, the Server, and the application code resides on separate
machines, the Clients. Since the application code resides on the clients, it does not
place a load on the server.
Three-Tier Architecture
2
a 11..11..2
JJaavva
1-14
.....................................................................................................................................................
1-11
®
Lesson 1: Introduction
.....................................................................................................................................................
8
Module design
specification Web server
Requests
Dynamic HTML
pages
Web PL/SQL
Generator
Web client
1-15
.....................................................................................................................................................
1-12 Oracle Designer 6i: Web PL/SQL Design and Generation
What About Web Forms?
.....................................................................................................................................................
Oracle Developer
Application
Web Pages
with HTML Web Browser Workstation
Transaction-Based Applications
If you require a heavy throughput, transaction-based application, perhaps
Oracle Forms is a more suitable choice. For example, data capture clerks entering
large amounts of data are unlikely to use Web modules to record the details.
However, you may develop Web modules that allow users to view data that has been
entered through the primary application. Perhaps they may even want to make simple
updates to the data. For example, managers based at head office may want to view data
in a local store’s database.
Web Forms
You can deploy Oracle Forms over the Web without modifying them.
1 The Web browser downloads a Java applet from a Web server. It then disconnects
from the Web server.
2 The applet connects to a separate application server. This listener spawns a process
on the server that connects to the database and runs the forms module.
.....................................................................................................................................................
1-13
®
Lesson 1: Introduction
.....................................................................................................................................................
3 The form runs on the application server. The Java applet in the browser
communicates with the runform process on the server. The Web server is out of the
picture.
The runform process on the application server maintains a database session on the
database server. The application server connects to the database with SQL*NET.
The Forms Generator of Oracle Designer can help to develop the application.
.....................................................................................................................................................
1-14 Oracle Designer 6i: Web PL/SQL Design and Generation
Course Agenda
.....................................................................................................................................................
Course Agenda
Course Agenda
Day 1
• Introduction
• Generating Web PL/SQL Modules
• Setting up the Generation Environment
• Designing Web PL/SQL Modules
1-17
Course Agenda
Day 2
1-18
.....................................................................................................................................................
1-15
®
Lesson 1: Introduction
.....................................................................................................................................................
Course Agenda
Day 3
1-19
.....................................................................................................................................................
1-16 Oracle Designer 6i: Web PL/SQL Design and Generation
Applications for the Course
.....................................................................................................................................................
1-20
When you attended First Class, you used an abbreviated version of Hollywood that
contained three entities: Title, Supplier, and Copy. In this course you use an extended
version of Hollywood that represents a complete business model.
In this course, you build an e-commerce site for Hollywood. This site enables
Hollywood customers to:
• Change their personal and membership details.
• Browse through information about the latest titles available.
• Reserve and rent titles.
Of course, an enterprise like Hollywood has a number of other areas of activity, such
as accounting and marketing. The Head Office deals with these areas, so they are not
part of the daily operation of the e-commerce site.
.....................................................................................................................................................
1-17
®
Lesson 1: Introduction
.....................................................................................................................................................
Scenario
In this course you build an e-commerce site for Hollywood. This site enables
customers to change their personal and membership details, browse through
information about available titles and rent titles. You browse the completed application
to identify topics that you learn about in the course.
Your Assignment
You need the following information, which your instructor has assigned to you,
throughout the course:
Web server
Port <default>
Agent wg_dad
User ORA<nn>/oracle
Working Directory
where <nn> is the group number that your instructor has assigned to you.
1 Invoke the browser and enter the URL
http://<webserver>:<port>/<agent>/rental_menu$.startup
2 When prompted, enter demo/oracle for username/password.
3 Select Coming Soon!.
4 How many titles are displayed?
5 Return to the main menu.
6 Select Browse through Movie Titles.
7 Find all movies. How many times does MOVIE appear in the list of returned titles?
8 Return to the main menu.
9 Select Maintain Personal Details.
10 Log on as customer BART whose password is also BART.
Note: You may need to supply the demo/oracle Web Server username/password
again.
11 Can you see details for all customers?
12 Exit Hollywood.
.....................................................................................................................................................
1-18 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 1—1: Browsing a Generated Application
.....................................................................................................................................................
13 Enter the URL again and select Rent a title. What happens?
14 Log on using your own ORA<nn> username and password. What happens?
15 Fill in all details and log on again
16 Add a new rental. Which customer name appears for the rental?
17 Add two rental items of your choice to the new rental.
18 Return to the main menu
19 Exit Hollywood.
.....................................................................................................................................................
1-19
®
Lesson 1: Introduction
.....................................................................................................................................................
Hints
Practice 1—1
.....................................................................................................................................................
1-20 Oracle Designer 6i: Web PL/SQL Design and Generation
Instructor Notes
.....................................................................................................................................................
Instructor Notes
Applications
The following workareas exist in the TEACH account:
• HOLLYWOOD_MAIN
• WG_DEMO
• WG_FILES
• WG_OWNER_LES02_STP
• WG_OWNER_LES04_SOL
• WG_OWNER_LES05_SOL
• WG_OWNER_LES06_SOL
• WG_OWNER_LES07_SOL
• WG_OWNER_LES08_SOL
• WG_OWNER_LES09_SOL
The following workareas should be in each student account:
• ORA<nn>_stp
• ORA<nn>_LES05_STP
• ORA<nn>_LES06_STP
• ORA<nn>_LES07_STP
• ORA<nn>_LES08_STP
• ORA<nn>_LES09_STP
• ORA<nn>_LES10_STP
The following shared applications should be available to the TEACH account and
each student account:
• GLOBAL_SHARED_WORKAREA
• WG_OWNER_LES02_SOL
• WG_OWNER_LES10_SOL
.....................................................................................................................................................
1-21
®
Lesson 1: Introduction
.....................................................................................................................................................
Practices
The practices follow the Goal/Scenario/Your Assignment pattern set by First
Class. Please emphasize to students that they need to read the goal and scenario if
they are to understand what is required of them in the practice. At the end of each set
of practices for a lesson there is a single Hints section. As in First Class, the hints are
generic, that is, they describe how to carry out a particular task generically, not
specifically in this situation. There are solutions for each practice in Appendix A.
Some lessons have many practices. Some delegates will not complete every practice
for every lesson. However you may find having a large number of practices useful
for those delegates who race through the material. Where a set of practices is
dependent on the previous set, we have created a configuration and a workarea based
on the position at the end of the lesson. If students need to continue with a correct set
of data, they should use the appropriate work area. For example, if they need to start
afresh in Lesson 5, tell them to use the workarea named ORA<nn>_Les05_stp.
Try to recap after each practice: there is great value in going over the main learning-
points of a practice after a class has completed it.
Some lessons are quite long with distinct learning points in them. For this reason we
recommend that you break up the lesson with practices. We have put a practice
introduction slide at those points in the lesson where we think that practices would
usefully break up the lesson. The idea is that you then break at that point in the lesson
and let the students perform the practice. You can, of course, place practices
wherever is most suitable for your learning environment.
Pace of the Course
There should be a relatively comfortable pace for the duration of the course. You
should aim to start Lesson 4 by the end of day 1 and get through at least some of the
practices. You should finish lesson 7 by the end of day 2 leaving just three lessons to
cover on day 3. Some students will be keen to know more about Web server
configuration and terminology. Explain to these students that Oracle offer Web
Server Administration courses where they can learn more about the subject.
Schedule
Timings Topic
45 minutes Lecture
O racle D esig ner 6i:
W eb PL /S Q L D esig n an d G eneration
15 minutes Practice
60 minutes Total
1-1
.....................................................................................................................................................
1-22 Oracle Designer 6i: Web PL/SQL Design and Generation
Instructor Notes
.....................................................................................................................................................
1-5
p le
d eo ry
• R eco g nizet eth
• P lay co m p le x All the students in your class should have
• P lay osim
m p le p ie ces p iece s
C
attended First Class. You may sometimes have
students who have not attended it. Ignore the
1-6
temptation to fill in gaps for them. It is their
problem if they did not meet the prerequisites.
About this Slide
O racle D esig ner C u rricu lum
First Class is the central and prerequisite
S ystem s
M odeling
S erver D e sign
& G enera tion
course in the Designer curriculum; focus
courses can be taken separately according to
First
C lass the needs, the skills and the task they need to
W eb P L/S Q L Form D esign
perform.
D esign & & G eneratio n
G eneration
This slide specifies the focus courses that are
1-7 available. Try not to slip into sales mode when
describing the other courses: your students
may feel irritated if they feel they are the
object of a sales pitch.
About this Slide
C urricu lu m P ath
D ata M od eling
odelin g
This slide shows the recommended path
O racle D esig ner
esigner O racle
ra cle D esig ner
esigner
First C lass
R elation
and
al D atabase D esign
elatio nal
System
S ystem s M odelin
od elingg
participants should follow in the Oracle
O racle
ra cle D esig ner
.....................................................................................................................................................
1-23
®
Lesson 1: Introduction
.....................................................................................................................................................
...
system. Each part of the pie answers a major
C an you autom ate it?
Too ls
question in the development.
Mention CDM and Oracle Designer but keep
1-11 the discussion general.
A method is like a recipe.
Techniques show you how to perform part of
the recipe (like whipping cream, if you want to
continue the recipe analogy).
A tool automates the process (like an electric
mixer—you could whip cream without it, but it
makes the job easier).
After the recipe has been successfully
followed, you may decide to make changes to
suit the taste of the cook. As good application
analysts and developers, you should make the
method fit your organization’s tastes.
.....................................................................................................................................................
1-24 Oracle Designer 6i: Web PL/SQL Design and Generation
Instructor Notes
.....................................................................................................................................................
1-13
.....................................................................................................................................................
1-25
®
Lesson 1: Introduction
.....................................................................................................................................................
2
.1 ..2
a 11 . 1
JJaavv a
1-14
W eb client
Web server to produce web pages.
1-15
Class Management
Can you generate Web Forms directly from Oracle Designer? Yes! You
merely create a .fmb file using the Forms Generator. You need to recompile the .fmb
file to create the .fmx file for the required platform.
Which approach should I use? If you have an existing application that you want
to deploy on the Web, it is advantageous to use Web Forms because you just need to
recompile and deploy the forms. However, if you are starting a new application it is
worth considering using the Web PL/SQL Generator.
Another consideration when making these choices is that when you use Web
PL/SQL generated pages, the connection is released after each call. With Web
Forms, the application server has dedicated processes for each form instance. This
can be a scalability problem, since multiple users create more network traffic. It
should be confirmed whether Web Forms work through a firewall: previously they
did not.
.....................................................................................................................................................
1-26 Oracle Designer 6i: Web PL/SQL Design and Generation
Instructor Notes
.....................................................................................................................................................
• In trod u ctio n
• G en era tin g W eb P L /S Q L M o d u les
• S ettin g u p th e G en eratio n E n v iro n m ent
• D esign in g W eb P L /S Q L M o d u les
1-17
1-18
• D efin in g A p p licatio n L o g ic
• U sing th e W eb P L /S Q L S ecu rity A P I
• C o m p leting Y o ur A p p lica tion
1-19
.....................................................................................................................................................
1-27
®
Lesson 1: Introduction
.....................................................................................................................................................
Practice 1—1
P ractice
It is the responsibility of the instructor to tell
• V iew the com p leted e-co m m erce site fo r the students the value for Web server and
H o llyw o od
Working Directory to add to their table of
information required for the duration of the
course.
1-21
.....................................................................................................................................................
1-28 Oracle Designer 6i: Web PL/SQL Design and Generation
Instructor Post Lesson Teaching Evaluation
.....................................................................................................................................................
Course Name: Oracle Designer 6i: Web PL/SQL Design and Generation
Lesson number: 1
Number of teaches before filling this form: 1 - 2 - 3 to 5 - >5
Detail comments
Content type: Slide - Text - Practice - Instructor notes
Note: 1:needs animation - 2:too much animation - 3:needs more text - 4:too much text
- 5:Unclear - 6:not necessary - 7:Other
Content Page
Note Comments/Suggestions
Type Number
Photocopy this page and fax to: Oracle Designer Curriculum Development @ +(44) 118.924.5181
Additional sheets are available at the end of the instructor’s guide.
If you draw additional diagrams on the white board use the Graphic sheet in the Instructor Evaluation
section at the end of this book.
.....................................................................................................................................................
1-29
®
Lesson 1: Introduction
.....................................................................................................................................................
.....................................................................................................................................................
1-30 Oracle Designer 6i: Web PL/SQL Design and Generation
Suggested Graphics
.....................................................................................................................................................
Suggested Graphics
Instructor name: Full email:
.....................................................................................................................................................
1-31
®
Lesson 1: Introduction
.....................................................................................................................................................
fold here
.....................................................................................................................................................
1-32 Oracle Designer 6i: Web PL/SQL Design and Generation
2
.................................
Introduction
In this lesson you learn how to generate, install, and run Web PL/SQL modules.
Schedule
Overview See Page 23
Class
Management
• How do I generate and install a module?
• How do I run a module?
See Page 23
• What is generated?
2-2
.....................................................................................................................................................
2-2 Oracle Designer 6i: Web PL/SQL Design and Generation
Introduction
.....................................................................................................................................................
Objectives
At the end of this lesson you should be able to do the following:
• Generate a Web PL/SQL module
• Install and run a Web PL/SQL module
• Explain the items that are generated by the Web PL/SQL Generator
.....................................................................................................................................................
2-3
®
Lesson 2: Generating Web PL/SQL Modules
.....................................................................................................................................................
Demo
Location of
source files
See Page 23
Location of
target files
User account
Auto-install
option
Browser
URL
2-4
Source Files
You may choose to use template files in your Web PL/SQL modules. You can store
these templates in the file system or the repository. In this area of the dialog box, you
instruct the generator to read these files from the file system or a repository folder
during the generation process.
Target Files
The generator saves the generated packages in the directory named in the Destination
of Generated Files field. If you select the check box, the generator also uploads the
generated files into the repository.
.....................................................................................................................................................
2-4 Oracle Designer 6i: Web PL/SQL Design and Generation
Setting Web PL/SQL Generator Options
.....................................................................................................................................................
.....................................................................................................................................................
2-5
®
Lesson 2: Generating Web PL/SQL Modules
.....................................................................................................................................................
Generating a Module
You can invoke the Web PL/SQL Generator from the module diagram or the Design
Navigator.
Module MEM0010
Include Module Network?
Post Generation
Commit Revert Browse/Edit mode
2-5
.....................................................................................................................................................
2-6 Oracle Designer 6i: Web PL/SQL Design and Generation
The Generate Web PL/SQL Dialog
.....................................................................................................................................................
2-6
• Select the check box to generate the chosen module and all its child modules in the
same run. You can generate all the modules in your application by generating the
root or Launchpad module and selecting the Include Module Network? check
box.
• Enter the password of the application user account into the Installation user
password field, if you chose to auto-install your generated Web PL/SQL module
and you did not enter the password into the Options dialog.
• Select the appropriate postgeneration option:
– Commit updates repository objects when generation is complete.
– Revert does not update repository objects with the property settings used
during generation.
– Browse/Edit mode activates postprocessing mode, in which you can choose
how to process proposed repository changes.
• Click the Start button to start the generation.
You can follow the progress of the module generation process in the Message
Window. It displays warnings and errors from the Web PL/SQL Generator.
.....................................................................................................................................................
2-7
®
Lesson 2: Generating Web PL/SQL Modules
.....................................................................................................................................................
Class
Generator Inputs Management
See Page 24
Generator
preferences
Module
definition
Module
network
2-7
Module Definition
The module design created in the Design Editor is the chief input to the Web PL/SQL
Generator. The operations on the table usages and the detailed column usages
constrain the code that the generator creates in PL/SQL. For example, the module
component table usages define the pages generated for the module.
Module Network
If your application consists of more than one module, your description of the module
network instructs the generator how to build hypertext navigation links between the
modules.
Generator Preferences
The Web PL/SQL Generator Preferences Navigator in the Design Editor gives you
access to preferences that govern the look and feel of the generated application.
.....................................................................................................................................................
2-8 Oracle Designer 6i: Web PL/SQL Design and Generation
Outputs from the Generator
.....................................................................................................................................................
• Module startup
package
• Module component
packages
.SQL file
Browser:
http://
2-8
Module Package
The generator creates a package for the module. The name of this package is the
module implementation name with a dollar sign ($) suffix, for example, PERSONAL$.
Files
The generator creates the following files:
• A .pks file containing the package specifications
• A .pkb file containing the package bodies
• A .sql file that runs the .pks and .pkb files during automatic installation
The filenames are of the form CVW<Module_Implementation_Name>.XXX. If
you generate more than one module, the filename prefix uses the implementation
name of the root module on that run.
.....................................................................................................................................................
2-9
®
Lesson 2: Generating Web PL/SQL Modules
.....................................................................................................................................................
or
• Install manually from .SQL file
2-9
.....................................................................................................................................................
2-10 Oracle Designer 6i: Web PL/SQL Design and Generation
Running a Module
.....................................................................................................................................................
Running a Module
If the Web PL/SQL module is successfully installed, you can run it in a Web browser.
• Double-click to run
Build Action
Description Run
Install Generated packages in user
Cancel
Run generated application
View package specification
View package body
Help
.....................................................................................................................................................
2-11
®
Lesson 2: Generating Web PL/SQL Modules
.....................................................................................................................................................
Demo
See Page 25
PL/SQL entry
agent name procedure
Practice
myServer myAgent customers$ startup
http://myServer/myAgent/customers$.startup See Page 25
2-11
.....................................................................................................................................................
2-12 Oracle Designer 6i: Web PL/SQL Design and Generation
Understanding the Module Structure
.....................................................................................................................................................
Class
Modules and Web Pages Management
See Page 25
Module Design
2-13
Module Pages
The Web PL/SQL Generator creates the following pages for each module:
• Startup (or first) page
• About page
.....................................................................................................................................................
2-13
®
Lesson 2: Generating Web PL/SQL Modules
.....................................................................................................................................................
Class
Module Diagram Views Management
See Page 25
Data View Display View
About the slide
See Page 25
2-14
Data View You can use the data view mode of the Module Diagrammer to build
your Web PL/SQL modules. It displays the base table of each module component and
any associated lookup usages. You can do the following:
• Create module components
• Add one base table usage per module component and define Column usages
• Add multiple lookup table usages, and define their lookup column usages
• Add key-based links
• Add lists of values
Use the data view to set the query, insert, update, and delete operations for the module
component.
Display View The display view mode of the Module Diagrammer shows the
columns that the module displays and their associated GUI display types. You can use
display view to do the following:
• Define the order in which columns are displayed.
• Define the GUI display type for a column.
.....................................................................................................................................................
2-14 Oracle Designer 6i: Web PL/SQL Design and Generation
Making Module Components Reusable
.....................................................................................................................................................
Class
Module Component Types Management
See Page 26
Module Diagram - CUSTOMERS
MEM0010 Specific
CUS_MC Module Component
2-15
If a module component is reusable, you can use it in several modules. You can use a
specific module component only in the module in which you created it.
To make a module component reusable, right-click it and select Make Reusable.
You can include or copy a reusable module component into a module using the
Module Diagrammer.
.....................................................................................................................................................
2-15
®
Lesson 2: Generating Web PL/SQL Modules
.....................................................................................................................................................
Summary
Summary
Summary See Page 26
2-16
• You can set Web PL/SQL Generator options to control the generation process.
• You can use the Design Editor to create, generate, and install Web PL/SQL
modules.
• You can also install Web PL/SQL modules manually.
• You run Web PL/SQL modules in a Web browser.
• The generator creates several pages for each module, depending on the way that
the module uses tables and columns.
• You can use a module component in several modules by making it reusable.
.....................................................................................................................................................
2-16 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 2—1: Generating a Simple Module
.....................................................................................................................................................
Scenario
The analysts have developed module MEM0010 — Maintain Personal
Details, which allows customers to view and update their personal details. You are
to generate this module.
Your Assignment
Unless otherwise indicated, all practices for the course will be completed in the Design
Editor for the WG_HOLLYWOOD application system.
Workarea ORA<nn>_stp
Application System WG_HOLLYWOOD
Tool Design Editor
Module MEM0010 – Maintain Personal Details
where <nn> is the group number that your instructor has assigned to you.
1 In the Web PL/SQL Generator options dialog
a Ensure that you do not install the module directly after generation.
b Set the Browser generator option to use Netscape.
c Set the Web Agent URL to http://<webserver>:<port>/<agent>.
2 In the Design Editor, generate the module MEM0010 — Maintain Personal
Details.
3 When the generation process finishes, investigate the generated files:
a How many files are generated?
b What are the names of the files?
c What does each file contain?
4 Find out the names of the generated PL/SQL packages.
a What is the name of the module package?
b What are the names of the module component packages?
.....................................................................................................................................................
2-17
®
Lesson 2: Generating Web PL/SQL Modules
.....................................................................................................................................................
Scenario
You have generated module MEM0010 — Maintain Personal Details.
You must now install it manually and run it.
Your Assignment
Use the information below as your starting point:
.....................................................................................................................................................
2-18 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 2—3: Exploring the Module Structure
.....................................................................................................................................................
Scenario
Find out more information about the structure of the module MEM0010 —
Maintain Personal Details.
Your Assignment
Use the information below as your starting point:
.....................................................................................................................................................
2-19
®
Lesson 2: Generating Web PL/SQL Modules
.....................................................................................................................................................
Scenario
The personal details module component will be used in other modules. To achieve this,
you need to make it reusable.
Your Assignment
Use the information below as your starting point:
.....................................................................................................................................................
2-20 Oracle Designer 6i: Web PL/SQL Design and Generation
Hints
.....................................................................................................................................................
Hints
Practice 2—1
Practice 2—2
.....................................................................................................................................................
2-21
®
Lesson 2: Generating Web PL/SQL Modules
.....................................................................................................................................................
Practice 2—3
Practice 2—4
.....................................................................................................................................................
2-22 Oracle Designer 6i: Web PL/SQL Design and Generation
Instructor Notes
.....................................................................................................................................................
Instructor Notes
Class Management
Schedule
Timing Topic
22
40 minutes Lesson
G en erating W eb P L/S Q L M od u les
20 minutes Practice
60 minutes Total
Class Management
O verview
The lesson enables the students to generate a
•
•
H o w d o I g en erate and in stall a m o d u le?
H o w d o I run a m od ule?
basic module and understand the various pages
• W h at is gen erated ? that are generated in response to the module
table usages.
2-2
U ser account
Demo
A uto -install
optio n
Invoke your Generate Options dialog and fill
B row ser
URL in all the options. They are already set up for
2-4
the students.
Explain the difference between using ORA01
and ORA01/ORACLE in the Name field. (If
you do not give the password, you must enter it
into the Generate Web PL/SQL dialog to
enable automatic installation.)
About the Slide
G en erating M o d ules
This slide illustrates the various methods of
invoking the Generate Web PL/SQL dialog.
G enerate Too ls O ptions
G enerate M odule...
G en erate M odu le A s...
G een
nerate
era te W eb P L/S
L/SQQL
M odule M EM 00 10
Includ e M odule N etw ork?
P ost G eneration
C om m it R evert B ro w se/E dit m ode
2-5
.....................................................................................................................................................
2-23
®
Lesson 2: Generating Web PL/SQL Modules
.....................................................................................................................................................
2-6
Class Management
G en erator In p uts
We do not teach a lesson on preferences as
G enerator
such; preferences are mentioned as they are
preferen ces
or
• In stall m an u ally fro m .S Q L file
2-9
.....................................................................................................................................................
2-24 Oracle Designer 6i: Web PL/SQL Design and Generation
Instructor Notes
.....................................................................................................................................................
Class Management
R un nin g th e A p p licatio n
• D o u b le-click to ru n
B uild A ction
D esc ription R un
Install G enerated packages in user
C ancel
R un generated application
V iew package specification
V iew package b ody
H elp
http://m
m yServer/myAge
yServer myAge
myServer nt/customers$.
myAgent cu stom ers$ startup
nt customers$ star tup
W eb server m odule
Demo
im plem entation
nam e
Invoke a browser and input a URL similar to
the one in the slide.
2-11
Practice
It would be a good idea to do practices 2—1
and 2—2 at this point. The students will then
understand about generation before you
discuss the page structure.
Class Management
M od ules and W eb P ag es
It is useful to show that one module produces
M od ule D esign
all these pages.
The About Page and Startup Page are created
A bout P age Q ue ry
Form R ecord
G enerated
W eb pages
for every module, even if there are no table
S tartu p P age List V iew
Form In sert
Fo rm
usages. The rest of the pages are dependent on
the table usages.
2-13
You can show the group the User Text tabs for
the module and the module component. This
shows the pages that exist at module level and
those that exist at module component level.
Class Management
M o du le D iagram V iew s
2-14
.....................................................................................................................................................
2-25
®
Lesson 2: Generating Web PL/SQL Modules
.....................................................................................................................................................
Class Management
M od u le C om p onen t Typ es
M odule D iagram - C U S TO M E R S
You can create a reusable module component
M E M 0010
C U S _M C
S pecific from scratch in the reusable module
M odule C om ponent
Practice 2—3
This practice gives the students a preliminary look at a very simple module in the
Design Editor, so that they can see where all the generated pages come from.
Practice 2—4
This practice asks the students to make a module component reusable so that it can
be used in a later module.
.....................................................................................................................................................
2-26 Oracle Designer 6i: Web PL/SQL Design and Generation
Instructor Post Lesson Teaching Evaluation
.....................................................................................................................................................
Course Name: Oracle Designer 6i: Web PL/SQL Design and Generation
Lesson number: 2
Number of teaches before filling this form: 1 - 2 - 3 to 5 - >5
Detail comments
Content type: Slide - Text - Practice - Instructor notes
Note: 1:needs animation - 2:too much animation - 3:needs more text - 4:too much text
- 5:Unclear - 6:not necessary - 7:Other
Content Page
Note Comments/Suggestions
Type Number
Photocopy this page and fax to: Oracle Designer Curriculum Development @ +(44) 118.924.5181
Additional sheets are available at the end of the instructor’s guide.
If you draw additional diagrams on the white board use the Graphic sheet in the Instructor Evaluation
section at the end of this book.
.....................................................................................................................................................
2-27
®
Lesson 2: Generating Web PL/SQL Modules
.....................................................................................................................................................
.....................................................................................................................................................
2-28 Oracle Designer 6i: Web PL/SQL Design and Generation
Suggested Graphics
.....................................................................................................................................................
Suggested Graphics
Instructor name: Full email:
.....................................................................................................................................................
2-29
®
Lesson 2: Generating Web PL/SQL Modules
.....................................................................................................................................................
fold here
.....................................................................................................................................................
2-30 Oracle Designer 6i: Web PL/SQL Design and Generation
3
.................................
Introduction
In this lesson you learn about setting up the correct environment for generating a Web
PL/SQL module. You also learn about the output produced by the Web PL/SQL
Generator.
Class
Overview Management
See Page 19
3-2
.....................................................................................................................................................
3-2 Oracle Designer 6i: Web PL/SQL Design and Generation
Introduction
.....................................................................................................................................................
Objectives
At the end of this lesson you should be able to do the following:
• Generate the table API to support a Web module
• Distinguish Web PL/SQL Toolkit and Web PL/SQL Generator Library program
calls in generated Web PL/SQL code
• Identify table API procedures in generated Web PL/SQL code
.....................................................................................................................................................
3-3
®
Lesson 3: Setting Up the Generation Environment
.....................................................................................................................................................
Web PL/SQL
Table Generator
API Library
(WSGL)
Module Design
3-3
.....................................................................................................................................................
3-4 Oracle Designer 6i: Web PL/SQL Design and Generation
Investigating the Web PL/SQL Toolkit
.....................................................................................................................................................
3-4
.....................................................................................................................................................
3-5
®
Lesson 3: Setting Up the Generation Environment
.....................................................................................................................................................
Class
Web PL/SQL Toolkit Packages Management
See Page 20
3-5
• The HTP procedures generate HTML tags to create dynamic Web pages.
• The HTF functions pass HTML values to subprograms. You typically use them in
nested calls.
• The OWA subprograms are used by the PL/SQL cartridge.
• The OWA_UTIL subprograms perform such operations as getting the value of
CGI environment variables.
For a full list of toolkit packages see:
http://technet.oracle.com
.....................................................................................................................................................
3-6 Oracle Designer 6i: Web PL/SQL Design and Generation
Using the Web PL/SQL Generator Library
.....................................................................................................................................................
3-6
.....................................................................................................................................................
3-7
®
Lesson 3: Setting Up the Generation Environment
.....................................................................................................................................................
WSGL Packages
The WSGL consists of a number of packages which perform standard operations for
Web PL/SQL applications.
Class
Web PL/SQL Generator Management
Library Packages See Page 21
3-7
.....................................................................................................................................................
3-8 Oracle Designer 6i: Web PL/SQL Design and Generation
Understanding the Table API
.....................................................................................................................................................
Browser:
http:// Insert
Table API
Update
Packages
Delete
Lock
CUSTOMERS
Insert
CTR_ID
Update LAST_NAME
Delete ...
Lock
3-8
.....................................................................................................................................................
3-9
®
Lesson 3: Setting Up the Generation Environment
.....................................................................................................................................................
3-9
An API package for a specific table contains procedures that perform standard DML
operations on that table:
Procedure Operation
INS Inserts a new row
UPD Updates an existing row
DEL Deletes an existing row
LCK Locks an existing row
The other procedures in the table handler are used for validation and maintenance.
.....................................................................................................................................................
3-10 Oracle Designer 6i: Web PL/SQL Design and Generation
Building and Generating the Table API
.....................................................................................................................................................
Class
Generating Table API Management
See Page 22
Capture Design Of
Capture Application Logic...
3-10
You invoke the Generate Table API utility from the Design Editor. It uses the
repository definitions of the tables to generate the API. If you alter the definition of a
table after generating its API, you must regenerate the table API. You can create table
APIs for multiple tables during the same run.
.....................................................................................................................................................
3-11
®
Lesson 3: Setting Up the Generation Environment
.....................................................................................................................................................
Database
or Database
File Prefix
Enter File Prefix
Directory
and Directory Browse
Stop on error
Stop on warning
3-11
The Generate Table API utility generates the table API packages to file.
If you select the Database radio button, the packages are automatically installed in the
database. You must enter the Oracle user name, password, and connect string for the
application user account into the appropriate fields in the Generate Table API dialog.
If you do not select the Database radio button, you must install the packages manually
in the database.
The generated packages are written to the directory you specify in the lower part of the
Generate Table API dialog. You can also specify a file name prefix.
For each table selected, the Generate Table API Utility generates the following files:
• A .pks file containing the package specification.
• A .pkb file containing the package body.
• A .sql file containing the execution script for the table API package body and
package specification.
When you run the .sql file (either by selecting auto-install or by running it
manually), a log file is created in your ORACLE_HOME\bin directory, or in your
working directory, if you have defined one. You inspect the log file to see if there are
errors when you compile the table API.
.....................................................................................................................................................
3-12 Oracle Designer 6i: Web PL/SQL Design and Generation
Pre-Generation Check List
.....................................................................................................................................................
Web PL/SQL
WebServer Toolkit
Configure
Toolkit Schema WSGL
Data
design
Table
API
Table Owner
Schema
3-12
.....................................................................................................................................................
3-13
®
Lesson 3: Setting Up the Generation Environment
.....................................................................................................................................................
Summary
Generate
Browser:
http://
Table Hollywood
API
Pre-Generation Checklist
You must install the following components:
• Web PL/SQL Developer’s Toolkit
• Web PL/SQL Generator Library packages
• Data design
• Table API
Generated Output
The generated module packages contain calls to the Web PL/SQL Toolkit and WSGL
to implement your module definition as a set of HTML pages. They also contain calls
to the table API to handle DML.
.....................................................................................................................................................
3-14 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 3—1: Generating the Table API
.....................................................................................................................................................
Scenario
You have generated and installed the module definition MEM0010 – Maintain
Personal Details that allows members to view and alter their details. Your job
is to review the pre-generation steps for this module. You begin by generating the table
API to file and viewing its contents.
Your Assignment
Use the information below as your starting point:
1 Generate the table API for CUSTOMERS to a file. Enter your working directory
for the output files.
Note: You do not need to install the table API as this has been done for you. When
you generate the table API for this table, you should not generate the table API
triggers. In the CUSTOMERS table, the PHOTOGRAPH column is of type BLOB
which cannot be used in API triggers.
2 Answer the following:
a What are the names of the files?
b What is the name of the API package?
.....................................................................................................................................................
3-15
®
Lesson 3: Setting Up the Generation Environment
.....................................................................................................................................................
Scenario
When you generate a Web PL/SQL module, the generated code includes calls to the
Web PL/SQL Toolkit. You will investigate the contents of these packages.
Your Assignment
Use the information below as your starting point:
1 Open the file tk_ref.pdf, which is in the refs folder in your working directory,
and answer the following questions:
a What is the purpose of the HTP package?
b Name the procedure in the HTP package used to display text in italics.
c Name the procedure in the HTP package used to display a horizontal line.
.....................................................................................................................................................
3-16 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 3—3: Investigating the Generated Code
.....................................................................................................................................................
Scenario
All module pre-generation checks are complete. You now need to view the generated
code to identify calls to the table API, Toolkit and WSGL.
Your Assignment
Use the information below as your starting point:
.....................................................................................................................................................
3-17
®
Lesson 3: Setting Up the Generation Environment
.....................................................................................................................................................
Hints
Practice 3—1
To perform this task Follow these steps
To generate the table 1 Select Generate—>Generate Table API.
API to a file 2 Select the File radio button.
3 Enter the file prefix and directory path.
4 Select the Objects Tab and expand Relational Tables.
5 Select the table and click the single arrow button (use the
double arrow to select all tables).
6 Click the Start button.
To view generated 1 Select the List Actions iconic button from the Messages
files Window or select Messages—>Build Actions.
2 Select a file from the list and click Run to view it.
Practice 3—2
There are no hints for this practice.
Practice 3—3
There are no hints for this practice.
.....................................................................................................................................................
3-18 Oracle Designer 6i: Web PL/SQL Design and Generation
Instructor Notes
.....................................................................................................................................................
Instructor Notes
Class Management
We have called this lesson Setting Up the Generation Environment but we also look
at the code for a generated module to help the student appreciate the need for the pre-
generation steps.
Schedule
Timing Topic
33
30 minutes Lesson
S ettin g U p th e G eneratio n En viro n m en t
20 minutes Practice
50 minutes Total
Class Management
We give only an overview of the contents of
the Web PL/SQL Toolkit and the WSGL. The
students can investigate the Toolkit in more
detail in their own time.
About the Slide
Preparin g fo r G en eration
• Install an d c o nfig u re an O racle W eb S erver The initial setup should be done by an
• Install th e W eb P L /S Q L T oo lkit
• Install th e W eb P L /S Q L G en erato r L ib rary administrator and should be handled once.
F o r each m od u le:
•
•
C reate th e m o d u le d esig n
G enerate th e Tab le A P I
The developer is responsible for building the
W eb P L/S Q L
Toolkit module and generating the Table API.
W eb P L/S Q L
Table
API
G enerator
Library
(W S G L)
Class Management
M odule D esign
3-3
Don’t teach each of the topics here. You should
see this as a signpost slide for the next section
of the lesson.
For this class, the WSGL, Toolkit, and Table
API have already been built for each student.
.....................................................................................................................................................
3-19
®
Lesson 3: Setting Up the Generation Environment
.....................................................................................................................................................
3-6
.....................................................................................................................................................
3-20 Oracle Designer 6i: Web PL/SQL Design and Generation
Instructor Notes
.....................................................................................................................................................
Class Management
W eb P L /S Q L G en erato r
L ibrary P ackag es WSGL is specific to Designer. You must install
•
•
W S G L : L ayo u t o f g en erated p ag es
W S G L M : E n g lish lan gu a ge strin g s fo r b u tto ns,
it because the Web PL/SQL Generator uses
•
e rro r m essa ges, a nd cap tio n s
L an g u ag es: F ren ch , G e rm an , S p an ish an d o th ers
these packages during the generation of Web
•
•
W S G JS L : JavaS cript fu n ctio n s
W S G F L : C o lo rs
PL/SQL modules.
• W S G O C O L : O racle C o n T ext fun ctio n ality
It may be useful to point out here that the
Toolkit, WSGL, and other packages, such as
3-7
WSGJSL, must be accessible to the user at
runtime. That is, these procedures are all called
by the generated PL/SQL packages at runtime.
Demo
In Explorer, open WSGL.PKS from the working
directory. Briefly explain its contents. Don’t
spend too long on this as the students look at
these files during the practice.
About this Slide
M ain tain D ata Th ro u gh th e T ab le A P I
B row ser:
In most applications, the API removes code
h ttp :// Insert
U pdate
Table A P I
P ackage s
from the client and places it on the server, thus
D elete
Lock keeping the client “thin”.
CUSTOMERS
Ins ert
U p date
C TR _ID
LA S T_N A M E
For Web applications, the procedures can only
D e lete ...
Lo ck be on the server already. However, the table
API maintains the generic code in a single area
3-8
and the PL/SQL package for each module is
smaller.
Class Management
Tab le A P I H an d ler
Table
C U S TO M E R S P ack age C G $ C U S TO M E R S
IN S IN S E R T P rocedure
UPD U P D A TE P rocedure
DEL D E LE T E P rocedure
LC K LO C K P rocedure
3-9
.....................................................................................................................................................
3-21
®
Lesson 3: Setting Up the Generation Environment
.....................................................................................................................................................
Class Management
G en erating T ab le A P I
Mention the issue of generating Web pages for
G en erate
G e ne rate M o du le...
To ols O ptions
Demo
3-10
It is probably easier to demo this slide and the
next.
Class Management
G en erate Tab le A P I D ialo g
Target O bjects
D atabase
or D atabase
File P refix
E nter File P re fix
D irectory
and D irectory B row se
S top on error
S top on w arning
3-11
3-12
.....................................................................................................................................................
3-22 Oracle Designer 6i: Web PL/SQL Design and Generation
Instructor Notes
.....................................................................................................................................................
Class Management
Th e C o m plete P ictu re
W eb P L/S Q L
W SGL
Toolkit
G en erate
B row ser:
http ://
Ta ble H o lly
llyww ood
API
M aintains table da ta
3-13
Practice
The students do not run any applications in this practice. It shows the pre-generation
steps and how the Toolkit, WSGL, and Table API are used in generated code.
Practice 3—1
The practice only requires that the class generate the Table API to file. If the students
wish to install the API they can do so, but make sure they do not generate the Table
API with triggers. If they do, they will need to drop the triggers before they run the
application. The before_update trigger fails for a table with a LONG, LONG
RAW, or LOB column.
Practice 3—2
The students are asked to refer to TK_ref.pdf.
.....................................................................................................................................................
3-23
®
Lesson 3: Setting Up the Generation Environment
.....................................................................................................................................................
.....................................................................................................................................................
3-24 Oracle Designer 6i: Web PL/SQL Design and Generation
Instructor Post Lesson Teaching Evaluation
.....................................................................................................................................................
Course Name: Oracle Designer 6i: Web PL/SQL Design and Generation
Lesson number: 3
Number of teaches before filling this form: 1 - 2 - 3 to 5 - >5
Detail comments
Content type: Slide - Text - Practice - Instructor notes
Note: 1:needs animation - 2:too much animation - 3:needs more text - 4:too much text
- 5:Unclear - 6:not necessary - 7:Other
Content Page
Note Comments/Suggestions
Type Number
Photocopy this page and fax to: Oracle Designer Curriculum Development @ +(44) 118.924.5181
Additional sheets are available at the end of the instructor’s guide.
If you draw additional diagrams on the white board use the Graphic sheet in the Instructor Evaluation
section at the end of this book.
.....................................................................................................................................................
3-25
®
Lesson 3: Setting Up the Generation Environment
.....................................................................................................................................................
.....................................................................................................................................................
3-26 Oracle Designer 6i: Web PL/SQL Design and Generation
Suggested Graphics
.....................................................................................................................................................
Suggested Graphics
Instructor name: Full email:
.....................................................................................................................................................
3-27
®
Lesson 3: Setting Up the Generation Environment
.....................................................................................................................................................
fold here
.....................................................................................................................................................
3-28 Oracle Designer 6i: Web PL/SQL Design and Generation
4
.................................
Introduction
After you have checked that the analysis information is complete, you can use the
Application Design Transformer to generate a set of modules based on the business
function information. You covered these topics in an earlier course, so we will not go
into any detail here.
This lesson covers the ways in which you can create modules as you begin your
application design. It also highlights some of the areas you should be aware of.
4-2
.....................................................................................................................................................
4-2 Oracle Designer 6i: Web PL/SQL Design and Generation
Introduction
.....................................................................................................................................................
Objectives
At the end of this lesson, you should be able to:
• Transform functions into modules
• Create a module manually
• Create a module from a form
.....................................................................................................................................................
4-3
®
Lesson 4: Designing Web PL/SQL Modules
.....................................................................................................................................................
Matrix
Functions Diagrammer Entities
Table Definitions
Modules
4-3
.....................................................................................................................................................
4-4 Oracle Designer 6i: Web PL/SQL Design and Generation
Establishing Display Standards
.....................................................................................................................................................
Other DB + X
Copies Action Edit Block Field
+ X
Customers:
.....................................................................................................................................................
4-5
®
Lesson 4: Designing Web PL/SQL Modules
.....................................................................................................................................................
Column Properties
Default Display
Display Type Text
Alignment Left
Display Length 60
Display Height 3
Display Sequence 20
...
Help
Hint A unique co
4-5
For a full list of column display properties, invoke the property palette:
1 Invoke the Design Editor.
2 Expand the Relational Table Definitions node.
3 Expand the table.
4 Expand the Columns node.
5 Invoke the property palette.
6 For each column, set the required values under the Default Display and Help
groups of properties.
.....................................................................................................................................................
4-6 Oracle Designer 6i: Web PL/SQL Design and Generation
Creating Modules
.....................................................................................................................................................
Creating Modules
During the design phase you can use different approaches and tools to create modules.
.
Class
How to Create a Module Management
See Page 32
Application Refine
Automated Design data
Transformer usages
Link Create
Semi- Link
modules default
Automated data
to data usages
functions usages
Define Define
Manual modules usages
manually manually
4-6
Automated
The Application Design Transformer (ADT) creates a first-cut application design. It
generates a set of modules based on the business function information defined during
analysis.
Semi-Automated
The Create Default Module Data Usages utility in the Repository Object Navigator
(RON) converts business function data usages into module data usages.
Manual
You create modules manually using the Design Editor.
.....................................................................................................................................................
4-7
®
Lesson 4: Designing Web PL/SQL Modules
.....................................................................................................................................................
• Uses:
– Function Hierarchy
– Business Units
• Produces:
– Module definitions
FHD
– Module table usages
Module
4-7
.....................................................................................................................................................
4-8 Oracle Designer 6i: Web PL/SQL Design and Generation
Linking Table Usages in a Module Manually
.....................................................................................................................................................
4-8
.....................................................................................................................................................
4-9
®
Lesson 4: Designing Web PL/SQL Modules
.....................................................................................................................................................
.....................................................................................................................................................
4-10 Oracle Designer 6i: Web PL/SQL Design and Generation
Using the Default Links Utility
.....................................................................................................................................................
Lookup Links
Create Table Usages for Descriptor Columns
Use Outer Joins ITEMS
Find Treewalk Links
OK Cancel Help
4-9
.....................................................................................................................................................
4-11
®
Lesson 4: Designing Web PL/SQL Modules
.....................................................................................................................................................
Demo
Linking Module Components See Page 33
Automatically
• Lookup links
Generate Default Links
Parent Links
Find Parents
Find Second Parents
Allow Lookup Parents
Allow Keys against Master Components
Keep Existing Links
Lookup Links
Create Table Usages for Descriptor Columns
Use Outer Joins
Find Treewalk Links
OK Cancel Help
4-10
What Is a Descriptor?
A descriptor is a database column that describes a primary key column in the same
table. A descriptor helps the user to identify the foreign key value.
You should set descriptors for all tables where the primary key value alone is
insufficient to identify the required value.
.....................................................................................................................................................
4-12 Oracle Designer 6i: Web PL/SQL Design and Generation
Creating a Module Semi-Automatically
.....................................................................................................................................................
4-12
.....................................................................................................................................................
4-13
®
Lesson 4: Designing Web PL/SQL Modules
.....................................................................................................................................................
4-13
.....................................................................................................................................................
4-14 Oracle Designer 6i: Web PL/SQL Design and Generation
Creating a Module Manually
.....................................................................................................................................................
Module Properties
Unique and
mandatory
4-16
Property Description
Short Name The short name of the module, which must be unique
Name A descriptive name for the module, which can be the same as the Short
(Module Name) Name but must be unique between modules
Purpose Text to describe the purpose of the module (The dialog box provides a
period (.) for quick module creation since this is a mandatory property.)
Language The language of the module, for example, Web PL/SQL. The System
Folder contains a predefined set of languages that you can use.
The module dialogs only display tabs that are specific to the Web
PL/SQL Generator when you edit a module with the language set to Web
PL/SQL.
Type DEFAULT (screen) or MENU
The generator does not produce PL/SQL for modules with a type
of Menu. However, the generator does use menu modules to affect
the screen modules that own them. Menu modules are discussed in
more detail in a later lesson.
.....................................................................................................................................................
4-15
®
Lesson 4: Designing Web PL/SQL Modules
.....................................................................................................................................................
Certain module properties are not mandatory, however you should give meaningful
values to the module properties described below.
Property Description
Top Title This is the default title for the module startup page.
The text you enter for this property is also used for hyperlinks to
this module if you set the Menu Style preference (MODMNS) to
LONG TITLE.
Short Title The text you enter for this property is used for hyperlinks to this
module if you set the Menu Style preference (MODMNS) to
SHORT TITLE.
If you do not define a Top Title, the Short Title is used as the
default title for the module startup page.
.....................................................................................................................................................
4-16 Oracle Designer 6i: Web PL/SQL Design and Generation
Creating a Module Manually
.....................................................................................................................................................
Module Language
Type
4-17
The Layout Style controls the overall appearance, content and sequence of the
generated pages for each module component.
You set the allowable operations (insert, update, delete and query) at module
component level.
Practice
Table Usages See Page 35
4-18
.....................................................................................................................................................
4-17
®
Lesson 4: Designing Web PL/SQL Modules
.....................................................................................................................................................
Universal Generation
A powerful feature of Oracle Designer is the ability to generate a single module
definition with a number of different generators. For example, you can use the Web
PL/SQL Generator to generate a module that is defined as a Form module.
If you select Generate—>Generate Module, the dialog only lists the modules with
the appropriate language for the generator you invoked.
If you select Generate—>Generate Module As..., the dialog lists all available
generators.
4-20
If you want to generate a module to a different target language, you may want to use
the Copy With New Language utility to create a copy of it. This is because not all
parts of a module definition are used by all generators and certain parts may be used in
different ways.
Complete as much of the module definition as is generic in one module definition. You
can then copy the module as many times as necessary and complete the remaining
portion of each module appropriately for that module’s language.
.....................................................................................................................................................
4-18 Oracle Designer 6i: Web PL/SQL Design and Generation
Creating a Web Module from a Form
.....................................................................................................................................................
Customers:
Hollywood
Web PL/SQL
Form
Application
4-21
1 Use the Design Capture utility to capture the form definition into the repository.
You invoke the utility by selecting Generate—>Capture Design of—>Form...
in the Design Editor. When you capture the design of an existing form, you
capture the module design, including:
– Module definitions
– Base table usages
– Column usages
– Lookup table usages
– Item prompts
– Application logic (you would need to rework the logic to appropriate Web
events)
2 Change the Language of the module and the module component to Web PL/SQL
Hint: If you use the property dialog to change the module language, the module
component language is automatically updated at the same time.
3 Refine the module definition in the Design Editor.
4 Generate the module.
Note: You may also need to generate the Table API for the tables used by the captured
module.
.....................................................................................................................................................
4-19
®
Lesson 4: Designing Web PL/SQL Modules
.....................................................................................................................................................
Summary
Summary
4-22
Module Definitions
The Web PL/SQL Generator generates modules with a language of Web PL/SQL and a
type of Screen or Menu. Module titles are used to name the generated modules on the
Web.
Module components consist of one base table usage and its lookups. You can link
module components to create master–detail relationships. Ensure that you define your
table usage flags and column usage flags appropriately before generating the module.
.....................................................................................................................................................
4-20 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 4—1: Creating a Web Module Using the Semi-Automatic Method
.....................................................................................................................................................
Scenario
The developers have decided that customers should be able to rent videos online.
Using this module, a customer can view the videos they have rented.
Your Assignment
Use the information below as your starting point:
Property Value
.....................................................................................................................................................
4-21
®
Lesson 4: Designing Web PL/SQL Modules
.....................................................................................................................................................
.....................................................................................................................................................
4-22 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 4—2: Creating a Web Module Manually
.....................................................................................................................................................
Scenario
Customers should be able to join and to renew or update their membership details
online. The customers should therefore be able to query their existing memberships,
insert new memberships and renew or update their details. You are required to set
appropriate column display properties and set the following rules:
• For an existing membership, the customer must enter their membership id into the
query form to return their details for viewing or amendment. The membership id is
the only queryable item.
• Membership Periods should be displayed in order of Start Date.
• The descriptor columns for customers are the identifier, the first name, and the last
name.
The following diagram shows how the tables are related in the server model:
Your Assignment
Use the information below as your starting point:
1 What operations do you need for each table and its items?
.....................................................................................................................................................
4-23
®
Lesson 4: Designing Web PL/SQL Modules
.....................................................................................................................................................
Property Value
3 Create the MEM_MC module component based on the MEMBERSHIPS table (do
not include the CUSTOMERS lookup yet).
a Use the Module Component dialog to add an appropriate title, set the
operations and display the columns (all except OGN_NAME).
b Set the Membership Id as the only queryable item.
c Ensure that only customers are retrieved (not organizations).
4 Create the MPER_MC module component based on the
MEMBERSHIP_PERIODS table:
a Include all the columns.
b Set the order by sequence for the rows.
5 Run the utility to link MEMBERSHIPS and MEMBERSHIP_PERIODS and to
create the CUSTOMERS lookup. Is there anything you should do before running
the Default Links utility to create the lookup?
Hint: You do not need to run the utility twice.
6 Make the primary key lookups nondisplayed.
7 Sequence the lookup items after the foreign key bound items in both module
components.
8 Generate, install and run the module.
.....................................................................................................................................................
4-24 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 4—3: Creating a Web Module from a Captured Form
.....................................................................................................................................................
Scenario
You would like to implement a new application on the Web allowing customers to
reserve video titles. This application currently exists as an Oracle Form so to save time
you use it as a starting point.
Your Assignment
Use the information below as your starting point:
.....................................................................................................................................................
4-25
®
Lesson 4: Designing Web PL/SQL Modules
.....................................................................................................................................................
2 Capture the design of the TITLE.FMB form from your working directory using the
following information:
Property Value
Destination Module REN0020
File Name TITLE.FMB
Capture Mode Capture ONLY module design
Create on Diagram after Capture Selected
3 Leave all other inputs as the default and start the utility.
4 Examine the module definition. How many of each were created?
Windows
5 What is the purpose of an item group (have a look in the online help if you are
unsure)?
6 Delete the item groups from the module. (Forms modules use item groups
differently to Web PL/SQL modules. You look at the use of item groups in a later
lesson.)
7 Set the following properties for the captured module:
Property Value
Module Name RESERVE A TITLE
Language Web PL/SQL
Implementation Name reserve
.....................................................................................................................................................
4-26 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 4—3: Creating a Web Module from a Captured Form
.....................................................................................................................................................
8 To help the customer select the correct value, set the Show Meaning property to
Meaning only for the TTE_TYPE, GAME_CATEGORY, MEDIUM,
MOVIE_CATEGORY, AGE_RATING, MONOCHROME, and AUDIO bound
items.
9 Generate, install and run the module.
a Press the Find button. Why is there only one Title?
b Why is the Price Code displayed?
Hint: Look at the Generation Message Window.
You will modify this module further in a later lesson.
.....................................................................................................................................................
4-27
®
Lesson 4: Designing Web PL/SQL Modules
.....................................................................................................................................................
Hints
Practice 4—1
To perform this task Follow these steps
To open a diagram in 1 Select File—>Open.
the Function 2 Expand the workarea.
Hierarchy
3 Select the diagram.
Diagrammer
4 Click OK.
To create a module in 1 Start the RON.
the RON 2 Expand the required workarea.
3 Select the Modules node in the navigator.
4 Select Edit—>Create.
5 Set the required properties.
To set the language of 1 Select the property palette for the required module.
a module in the RON 2 Click the list icon of the Language property.
3 Select the current workarea from the Look In list.
4 Doubleclick SYSTEM FOLDER.
5 Select the required language from the list.
6 Click OK.
To assign a business 1 Select the module and expand it.
function usage for a 2 Expand the usages.
module 3 Select Implementing Business Functions.
4 Select Edit—>Create Reference.
5 Select one or more functions and click OK.
6 Click Save.
To create default 1 Select the module in the navigator.
module data usages 2 Select Utilities—>Designer—>Create Default Module Data
Usages.
To create links 1 Open the module diagram.
between two base 2 Click the Key Based Link button.
table usages 3 Click on one of the base table usages and drop the link onto the
second usage.
.....................................................................................................................................................
4-28 Oracle Designer 6i: Web PL/SQL Design and Generation
Hints
.....................................................................................................................................................
.....................................................................................................................................................
4-29
®
Lesson 4: Designing Web PL/SQL Modules
.....................................................................................................................................................
Practice 4—2
To perform this task Follow these steps
To display records in 1 Select the column on which you wish to order.
a specific order 2 Invoke the properties palette.
3 In the Default Ordering group, set the Order By Sequence.
4 Set the Sort Order to ascending or descending, appropriately.
To create a module 1 Expand the module in the navigator.
component 2 Select the Module Components node.
3 Select Edit—>Create.
To restrict records 1 Open the property dialog for the table usage.
selected in a module 2 Select the Where tab.
component 3 Select the required column and click Add.
4 Complete the condition.
To create parent links 1 Select the module in the navigator or a diagram.
using the Default 2 Select Utilities—>Default Links.
Links utility
3 Select the Find Parents check box.
To create lookup links 1 Select the module in the navigator or a diagram.
using descriptor 2 Select Utilities—>Default Links.
columns
3 Select the Create Table Usages for Descriptor Columns
check box.
Practice 4—3
To perform this task Follow these steps
To capture the design 1 Select Generate—>Capture Design of—>Form.
of a form 2 Specify the name of the destination module.
3 Select the form from the working directory.
4 Click Start.
To delete an item 1 Expand the module in the navigator.
group 2 Expand the Module Components node.
3 Expand the module component.
4 Expand the Item Groups node.
5 Select the required item group.
6 Select Edit—>Delete From Repository....
.....................................................................................................................................................
4-30 Oracle Designer 6i: Web PL/SQL Design and Generation
Instructor Notes
.....................................................................................................................................................
Instructor Notes
Schedule
Timing Topic
44
60 minutes Lesson
D esig ning W eb P L/S Q L M o du les
90 minutes Practice
150 minutes Total
O ther D B + X
A ctio n E dit B lock Field
C opies
+ X
C ustom ers:
.....................................................................................................................................................
4-31
®
Lesson 4: Designing Web PL/SQL Modules
.....................................................................................................................................................
D efault D isplay
properties.
D isplay Typ e Text
A lignm ent Left
D isplay Len gth 60
D isplay H eight 3
D isplay S eq uence 20
...
H elp
H int A unique co
4-5
Class Management
H o w to C reate a M od ule
Although we work through these three
A pplicatio n R efine
A utom ated D esign
Transform er
da ta
usag es methods, we also create a module from a
Link C reate
captured form. Remember to mention it here
Link
S em i-
A utom ated
m odules
to
functions
default
data
usage s
data
usages
when discussing the manual method.
D efine D efine
M anual m o dules usa ges
m a nually m an ually
4-6
M odule
4-7
• T ab le u sages m ust
exist
• F o reig n key m u st
exist
• L in k ba se tab le
u sag es
• L in k ba se u sag e to
lo o ku p usag e
4-8
.....................................................................................................................................................
4-32 Oracle Designer 6i: Web PL/SQL Design and Generation
Instructor Notes
.....................................................................................................................................................
Lookup Links
Create Table Usages for Descriptor Colum ns
Use Outer Joins ITEM S
Demo
Find Treew alk Links
Lookup Links
table would help to identify the foreign key
Create Table Usages for Descriptor Colum ns
Use Outer Joins
Find Treew alk Links
value.
3 Add these items as descriptors by selecting
OK Canc el Help
4-10
.....................................................................................................................................................
4-33
®
Lesson 4: Designing Web PL/SQL Modules
.....................................................................................................................................................
Practice
4-13
After discussing this method, it is a good idea
to consolidate the lecture by doing practice
4—1 before moving on to manual creation of
modules.
About this Slide
C reatin g N ew M o du les
U nique and
m andatory
U sed in the U R L
4-16
M odule Langua ge
Type
4-17
.....................................................................................................................................................
4-34 Oracle Designer 6i: Web PL/SQL Design and Generation
Instructor Notes
.....................................................................................................................................................
Practice
T ab le U sag es
After discussing this method, it is a good idea
• M od u le co m p o n en t tab le u sag es co ntro l:
– D is play W G _H olly _01 M odule P roperties to consolidate the lecture by doing practice
– Ins ert O perations
– U p d ate Insert?
U pdate?
Y es
Y es
4—2 before moving on to design capture.
– Q u ery
D elete? No
Q uery
Q uery? Y es
• L o o ku p tab le u sag es p ro vid e:
– D escrip to r in fo rm atio n
– A d d itio n al valid ation
4-18
4-20
C ustom ers:
H o lly w o o d
W eb P L/S Q L
Form
A p plication
• C aptu re th e Fo rm in to th e R ep o sito ry
• C h an g e th e M o d u le L an gu ag e
• R efin e th e m o d u le d efin itio n
• G enerate th e m o d u le
4-21
C rea te W eb P L /S Q L m o du les:
• A u to m a tically u sin g th e A p p licatio n D esig n
T ransfo rm er
• S em i-a u to m atically fro m b u sin ess fu n ctio n s
• M an u ally:
– D e sig n E d ito r
– C o py M o d u le u tility
– C a ptu re D esig n u tility
4-22
Practice 4—3
The captured form contains item
groups which the student is asked
to delete. Make sure all item groups
are deleted as this stops the link to
the view form displaying on the
record list.
.....................................................................................................................................................
4-35
®
Lesson 4: Designing Web PL/SQL Modules
.....................................................................................................................................................
.....................................................................................................................................................
4-36 Oracle Designer 6i: Web PL/SQL Design and Generation
Instructor Post Lesson Teaching Evaluation
.....................................................................................................................................................
Course Name: Oracle Designer 6i: Web PL/SQL Design and Generation
Lesson number: 4
Number of teaches before filling this form: 1 - 2 - 3 to 5 - >5
Detail comments
Content type: Slide - Text - Practice - Instructor notes
Note: 1:needs animation - 2:too much animation - 3:needs more text - 4:too much text
- 5:Unclear - 6:not necessary - 7:Other
Content Page
Note Comments/Suggestions
Type Number
Photocopy this page and fax to: Oracle Designer Curriculum Development @ +(44) 118.924.5181
Additional sheets are available at the end of the instructor’s guide.
If you draw additional diagrams on the white board use the Graphic sheet in the Instructor Evaluation
section at the end of this book.
.....................................................................................................................................................
4-37
®
Lesson 4: Designing Web PL/SQL Modules
.....................................................................................................................................................
.....................................................................................................................................................
4-38 Oracle Designer 6i: Web PL/SQL Design and Generation
Suggested Graphics
.....................................................................................................................................................
Suggested Graphics
Instructor name: Full email:
.....................................................................................................................................................
4-39
®
Lesson 4: Designing Web PL/SQL Modules
.....................................................................................................................................................
fold here
.....................................................................................................................................................
4-40 Oracle Designer 6i: Web PL/SQL Design and Generation
5
.................................
Introduction
In this lesson you take a closer look at the output of the Web PL/SQL Generator. The
generator creates a number of different pages, depending on the way the module uses
its base tables. You also learn how to alter the appearance of individual pages, and how
to change the way in which you navigate between the generated pages.
Class
Overview Management
See Page 30
5-2
.....................................................................................................................................................
5-2 Oracle Designer 6i: Web PL/SQL Design and Generation
Introduction
.....................................................................................................................................................
Objectives
At the end of this lesson you should be able to do the following:
• Suppress the generation of pages by changing module and module component
properties
• Modify the layout of items in a module component
• Display several generated forms on one HTML page
• Add break groups and summary items to a record list
.....................................................................................................................................................
5-3
®
Lesson 5: Changing the User Interface
.....................................................................................................................................................
Class
Module Structure Management
See Page 30
Module Design
5-3
The Web PL/SQL Generator always creates the following pages for each module:
• Startup (or first) Page
• About Page
The Web PL/SQL Generator can create the following pages for each module
component, depending on the module component table usages:
• Query Form
• Insert Form
• Record List
• View Form
.....................................................................................................................................................
5-4 Oracle Designer 6i: Web PL/SQL Design and Generation
Module Pages
.....................................................................................................................................................
Module Pages
The Startup Page
The generator creates one startup page for each generated module.
Class
Startup Page Management
See Page 30
Page footer
5-4
Preference Effect
MODALR Controls the display of the link to the about page
MODAPL Sets the wording of the link to the about page
MODFAC Controls alignment of the module content
MODFTF Sets the wording and format of the module title
MODIFZ Controls the display of the first module component on the startup page
.....................................................................................................................................................
5-5
®
Lesson 5: Changing the User Interface
.....................................................................................................................................................
Class
About Page Management
See Page 31
5-5
By default, the generator places a hyperlink to the about page on the startup page for
the module.
You can instruct the generator to suppress the about page hyperlink by setting the
MODALR — Startup Page: About Page hyperlink required
preference. The generator still produces an about page but the user cannot navigate to
it using a hyperlink (you must supply another access mechanism, such as a button).
.....................................................................................................................................................
5-6 Oracle Designer 6i: Web PL/SQL Design and Generation
Module Component Pages: Query Form
.....................................................................................................................................................
User text
Column 1:
Column 2:
Column 3:
Execute
query Column 4:
You can change the title and user text through the module component property dialog.
The items displayed on the query form are those base table or lookup table columns in
the module component that have the Query? property set to Yes.
Executing a Query
To execute a query, you enter the query criteria and click on the Find button. This
submits a new URL to the Web server, which queries the database and returns a new
page of HTML that shows the results of the query.
Navigation
You can navigate directly to the insert form from the query form by clicking on the
New button without entering a query.
.....................................................................................................................................................
5-7
®
Lesson 5: Changing the User Interface
.....................................................................................................................................................
5-7
Context Items
By default, the record list displays only the primary key column for each record, which
acts as a hyperlink to the view form. To display other, descriptive, columns, you must
set their Context? property to Yes.
Button Description
First Navigates to the first set of records
Last Navigates to the last set of records
Previous Navigates to the previous set of records
Next Navigates to the next set of records
ReQuery Executes the query that originally produced the record list
Count Executes the query that originally produced the record list and
displays the total number of records returned
.....................................................................................................................................................
5-8 Oracle Designer 6i: Web PL/SQL Design and Generation
Module Component Pages: Record List
.....................................................................................................................................................
Navigation
Viewing the Details for a Single Record Each record on the record list has a
hyperlink. When you click on the hyperlink, the browser submits a new URL to the
Web server, which queries the database for the details of the record and returns the
view form.
Entering a New Query To enter a new query, you can click on the Query button.
This submits a new URL to the Web server, which returns the query form.
Inserting a New Record To insert a new record, you must click on the New button.
This submits a new URL to the Web server, which returns the insert form.
.....................................................................................................................................................
5-9
®
Lesson 5: Changing the User Interface
.....................................................................................................................................................
Class
View Form Management
See Page 31
• One per module component
Title
Display
User text only
Column 1: XXX
Column 2: XXXXXXXXXX
Column 3: Update
XXXXX
Column 4: XXXXXXX Invoke
Delete
insert
Update record 5:
Column XX form
record
5-8
The view form shows items with the Display? property set to Yes.
If you can perform update and delete operations on the module component, you do it
through the view form.
Context Items
Items with the Context? property set to Yes appear at the top of the view form. You can
suppress the display of the context items by setting the ZONVCH – View Form:
Display Context Header preference to No Heading or Display Context Values
in Bold.
Updating a Record
If the module component’s Update? property is set to Yes, you can update columns for
which the Update? property is set to Yes. You cannot update columns with only the
Display property set.
You enter new values into the updateable items and click the Update button.
When you click the Update button, you submit a new URL to the Web server, which
tries to update the database with the new values and returns the result of the update
operation in a new HTML page. If the update succeeds, the change is committed
immediately.
.....................................................................................................................................................
5-10 Oracle Designer 6i: Web PL/SQL Design and Generation
Module Component Pages: View Form
.....................................................................................................................................................
You can retrieve the original values by pressing the Revert button. Each item with the
Update? property set has a matching hidden item. When the user presses the Revert
button, the browser applies the values in the hidden item to the displayed items. This
does not roll back an update.
Deleting a Record
If the module component’s Delete? property is set to Yes, you can delete the record by
clicking on the Delete button. You are then asked to confirm the deletion.
The way in which this confirmation is requested differs depending on whether the
browser supports JavaScript:
• If the browser supports JavaScript, you see a generated JavaScript popup. You
click the OK button to confirm the deletion or the Cancel button to cancel the
deletion.
• If the browser does not support JavaScript, you see a generated HTML delete
form. You click the Delete button to confirm the deletion or press the browser’s
Back button to cancel the deletion.
If you confirm the deletion, the browser submits a new URL to the Web server, which
deletes the record and returns a new HTML page with the result of the operation. If the
delete operation succeeds, the change is committed immediately.
Navigation
A hyperlink on the view form enables users to navigate back to the module startup
page, which contains the query form. You can also navigate to the insert form by
clicking the New button.
.....................................................................................................................................................
5-11
®
Lesson 5: Changing the User Interface
.....................................................................................................................................................
Class
Insert Form Management
See Page 32
• One per module component
Title Autogenerated
User text columns
Column 1: XXX
Column 2: XXXXXXXXXX
Column 2: XXXXXXXXXX
Column 3: XXXXX
Column 3: XXXXX
Column 5: XX
Column 4: XXXXXXX
Insert
record Column 5: XX
Insert Clear
5-9
Each item displayed on the insert form corresponds to a base table column with the
Insert? property set to Yes.
Mandatory columns must either appear on the insert form or have their values
autogenerated by the Table API.
You enter the new values into the fields and then click the Insert button. This submits
a new URL to the Web server, which inserts the new record into the database and
returns the view form for the new record—including the autogenerated columns.
.....................................................................................................................................................
5-12 Oracle Designer 6i: Web PL/SQL Design and Generation
Item Layout Styles
.....................................................................................................................................................
• 54 CARDOSO LUCIA
• Numbered • 55 BAGATINI MARILAN
• Bulleted Bulleted • 56 GREENWALD JOE
• 57 BRANDT STIG
• Table
• 58 BORK LINDA
• Custom
• Free format
54 CARDOSO LUCIA
• Preformatted 55 BAGATINI MARILAN
Table 56 GREENWALD JOE
57 BRANDT STIG
58 BORK LINDA
5-10
For example, you can change the page layout for any of the pages. This is most useful
on the record list. You change the value for the appropriate preference:
• ZONLLS – Record List: Item Layout Style
• ZONQLS – Query Form: Item Layout Style
• ZONVLS – View Form: Item Layout Style
• ZONILS – Insert Form: Item Layout Style
You can choose any of the following styles:
Style Description
Table Lays out the items in a table (You can choose to add a border to it.)
Bulleted Each database record (record list) or item value (query, insert, or view
form) appears on a new line, prefixed with a standard bullet symbol.
Numbered Each database record (on the record list) or item value (on the query, insert,
and view forms) appears on a new line, prefixed with a number.
Custom Each database record (on the record list) or item value (on the query, insert
and view forms) appears on a new line, prefixed with a custom bullet. You
define the bullet character or image in the preference MODCLH – HTML
for custom list item.
Preformatted Item details are displayed in a table format, using a fixed width font such as
Courier.
Free format No formatting takes place and you see information displayed
or Wrap consecutively, wrapping over several lines. This style is most useful for a
page that only displays one record at a time.
.....................................................................................................................................................
5-13
®
Lesson 5: Changing the User Interface
.....................................................................................................................................................
Demo
List See Page 32
List/Form
5-11
Display
The layout style determines how the module
appears in the generated application
Layout style
List/Form
Form
List
List/Form
5-12
.....................................................................................................................................................
5-14 Oracle Designer 6i: Web PL/SQL Design and Generation
Module Component Display Styles
.....................................................................................................................................................
5-13
.....................................................................................................................................................
5-15
®
Lesson 5: Changing the User Interface
.....................................................................................................................................................
Class
Display Styles—List/Form Management
See Page 33
Use Frames preferences
Title Title
Default text area
Query form
XXX: Record list View form
Insert form
XXXX: AA% • 01 AAA ZZZ XXX: 01
XX: Z% XXXX: AAA
• 02 AAB ZZY
XX: ZZZ
• 03 AAC ZYY XXXX: xxxxxxxxx
• 04 AAD ZYX
5-14
Use this style only if you can effectively display the content of each frame within the
available space. The user’s browser must support HTML frames to be able to use the
module. You can modify other aspects of the list/form presentation style by using the
Frames preferences. By default, the module uses the default frameset; a later lesson
covers customized frame sets.
.....................................................................................................................................................
5-16 Oracle Designer 6i: Web PL/SQL Design and Generation
Removing Duplicate Data from a Record List
.....................................................................................................................................................
Bookings
Title Copy Id Book Date
A Man for All Seasons 1016 12-APR-95
Nightmare on Elm Street 1021 27-APR-95
Nightmare on Elm Street 1021 02-APR-98
Nightmare on Elm Street 1022 12-AUG-94
Nightmare on Elm Street 1024 12-JUN-95
Nightmare on Elm Street 1024 10-APR-98
Superman 1017 12-APR-95
Superman 1017 20-JUN-95
Duplicated
data
5-15
Example
You want to see all the BOOKINGS for a particular TITLE but the page shows
duplicated information:
• Each TITLE has a number of COPIES.
• Each COPY can be booked on different dates.
You would like to see each title only once for each group of copies and each copy id
only once for each group of bookings.
.....................................................................................................................................................
5-17
®
Lesson 5: Changing the User Interface
.....................................................................................................................................................
Technical Note
Bookings See Page 33
Title Copy Id Book Date
A Man for All Seasons 1016 12-APR-95 Break
Nightmare on Elm Street 1021 27-APR-95 group
1021 02-APR-98
1022 12-AUG-94Bookings
1024 12-JUN-95
1024 10-APR-98
Superman 1017 12-APR-95 Title
1017 20-JUN-95
Cop Id
Booking Date
5-16
You must create a separate break group for each column on which you wish to break.
The order of the groups and of the items in the groups is significant. You should place
any remaining items in a single break group after the other break groups. The first item
in the last break group is used as the hyperlink.
Example
To ensure that TITLE appears once for each group of copies and that COPY ID
appears once for each group of bookings, you must place TITLE, CPY_ID and
BOOK_DATE into separate groups. If you only place TITLE in a group, the break
routine only occurs for that item.
.....................................................................................................................................................
5-18 Oracle Designer 6i: Web PL/SQL Design and Generation
Summarizing Data on a Record List
.....................................................................................................................................................
Bookings
Title Copy Id Book Date
A Man for All Seasons 1016 12-APR-95
Bookings No of Bookings 1
Nightmare on Elm Street 1021 27-APR-95 Module-level
1021 02-APR-98
component
No of
of Bookings
Bookings 2
Title 1022 12-AUG-94 Grand Total
Total
Cop Id
Superman 1017 12-APR-95
1017 20-JUN-95
No of Bookings 2
Grand
GrandTotal
Total 12
Booking Date
No Bookings
5-17
.....................................................................................................................................................
5-19
®
Lesson 5: Changing the User Interface
.....................................................................................................................................................
.....................................................................................................................................................
5-20 Oracle Designer 6i: Web PL/SQL Design and Generation
Summary
.....................................................................................................................................................
Summary
Summary
• Module pages:
– About
– Startup
• Module component pages:
– Query form
– Record list
– View form
– Insert form
• Display styles
• Break groups
5-18
Each module contains a Startup Page, an About Page, and a set of pages for each
module component.
Each module component consists of a set of generated pages including one or more of
the following:
• Query Form
• Record List
• View Form
• Insert Form
You can use generator Preferences to lay out the items in a module component in one
of various styles: Numbered, Bulleted, Table, Custom, Free format, or Pre-formatted.
The module component display style governs the layout of pages:
• List: each form appears on a separate page.
• List/form: the record list, view form, and insert form appear in frames on one
page.
You can modify the record list in order to group similar items and display summaries.
.....................................................................................................................................................
5-21
®
Lesson 5: Changing the User Interface
.....................................................................................................................................................
Scenario
You captured the design of module REN0020 - Reserve a Title from a form.
Currently the generated module shows only the values of the primary key and title
columns on the record list and only displays one record at a time. Users who browse
the record list need to see more descriptive information and more records at once.
Your Assignment
Use the following information as your starting point:
where <nn> is the group number that your instructor has assigned to you.
1 Change the startup page title to Reserve a Title.
2 Suppress the hyperlink to the About page.
3 Modify the TITLES module component and a preference to display 10 records at a
time.
4 Ensure that the following items appear on the record list: PRODUCT_CODE,
TITLE, GAME_CATEGORY, MOVIE_CATEGORY, PRICE.
5 Set a preference to suppress the record list if only one record is returned.
6 Generate, install, and run the module to answer the following questions.
a Execute a query to see the record list. Are there several records in the list?
b Do the correct columns appear as context information?
c Which column in the record list is formatted as a hypertext link?
d Click on the hypertext link for one of the records displayed in the record list.
What information appears at the top of the view form?
e Go back to the query form and enter GR% into the Product Code as the query
criterion. Which form displays after the query form?
.....................................................................................................................................................
5-22 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 5—2: Changing the Item Layout Style
.....................................................................................................................................................
Scenario
The record list of module REN0020 - Reserve a Title is currently in table
format but some other style may be more helpful to the users. You will test the layout
styles to see which works best.
Your Assignment
Use the following information as your starting point:
1 Alter the layout style for the record list to bulleted list. Generate, install, and run
the module.
2 Alter the layout style for the record list to numbered list. Generate, install, and run
the module.
3 Decide which is your preferred style and set the layout style appropriately.
.....................................................................................................................................................
5-23
®
Lesson 5: Changing the User Interface
.....................................................................................................................................................
Scenario
At the moment, the user has to navigate through several pages of module REN0020 -
Reserve a Title to query records and see all the information. It may be a good
idea to reduce the number of pages using the default HTML frames layout.
Your Assignment
Use the following information as your starting point:
1 Alter the display style of the module component so that the record list and view
form appear on the same page after a query.
2 Generate, install, and run the module.
3 Execute a query:
a What difference do you see?
b When do you think this layout is most suitable?
4 Set the display style to List. Generate, install and run the module.
.....................................................................................................................................................
5-24 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 5—4: Summarizing Data on a Record List
.....................................................................................................................................................
Scenario
On the record list of module REN0010 - Review/Book a Video, the same
customer appears several times. You are to reduce this duplication to make it easier for
the user to locate the required information. You also add some summary information to
the record list.
Your Assignment
Use the following information as your starting point:
1 Generate, install, and run the module and note the information that is duplicated.
2 Modify the module definition to display the data as a break report, using the
following to assist you:
a Resequence the items to display first those on which you want to break.
Display MBP_IDENTIFIER first, RENTAL_DATE second and RTL_ID third.
b Set the ordering sequence for the data so that it matches the display sequence
of the items.
c Create a break group for MBP_IDENTIFIER and a separate break group for
RENTAL_DATE:
MBP_GP MBP_IDENTIFIER
DATE_GP RENTAL_DATE
OTHER_GP All other items
dEnsure the Context? and Display? properties are set to Yes for the items in the
break groups.
e Generate, install, and run the module. What is the impact of creating break
groups?
3 Modify the module definition to include a count of the number of rentals each
customer has made:
a Create a computed unbound item, NO_OF_RENTALS. What properties
should you set? Complete the table below and use it as a guide when setting the
required properties:
.....................................................................................................................................................
5-25
®
Lesson 5: Changing the User Interface
.....................................................................................................................................................
Property Value
Prompt
Unbound Item Type
Reset Level
Reset Group
Derivation Text
.....................................................................................................................................................
5-26 Oracle Designer 6i: Web PL/SQL Design and Generation
Hints
.....................................................................................................................................................
Hints
Practice 5—1
To perform this task Follow these steps
To change the title for 1 Invoke the Edit Module dialog box.
a module 2 Click on the Titles tab.
3 Enter the title into the Startup Page Title field.
4 Click the Finish button.
To change the title for 1 Invoke the Edit Module Component dialog box.
module component 2 Enter the title into the Title field.
pages 3 Click the Finish button.
To suppress the 1 Select the module component.
About page hyperlink 2 Open the Web PL/SQL Generator Preferences Navigator.
3 Navigate to the Startup Page category.
4 Set the MODALR – Startup Page: About Page
Hyperlink preference to No.
To specify the 1 Open the Web PL/SQL Generator Preferences Navigator for
number of records the module component.
displayed on the 2 Navigate to the Record List category.
record list 3 Set the ZONLRS – Record list: Record Set Size
preference to the required number.
To add context items 1 Invoke the Edit Base Table Usage dialog box.
to the record list 2 Click on the Context tab.
3 Add columns to the Context items box.
To suppress the 1 Open the Web PL/SQL Generator Preferences Navigator for
record list when a the module component.
query returns one row 2 Navigate to the Record List category.
3 Set the ZONLSR – Record list: Skip record list
when query retrieves one record preference to Yes.
Practice 5—2
To perform this task Follow these steps
To alter record list 1 Open the Web PL/SQL Generator Preferences Navigator for
layout style the module component.
2 Navigate to the Record List category.
3 Set the ZONLLS – Record list: Item Layout Style
preference to the required value.
To ensure that you are Use the Refresh or Reload facility of your browser to load the most
running the latest recent version of the current page.
version of a Web page
.....................................................................................................................................................
5-27
®
Lesson 5: Changing the User Interface
.....................................................................................................................................................
Practice 5—3
To perform this task Follow these steps
To alter the layout 1 Select the module component.
style of a module 2 Invoke the Edit Module Component dialog.
component 3 Click on the Display tab.
4 Change the layout style.
Practice 5—4
To perform this task Follow these steps
To set the sequence of 1 In the Design Navigator, right-click one of the displayed items.
display items 2 Select Resequence Items.
3 Use the arrows to put the items in the correct order.
4 Click OK.
To set the order of the 1 Select the bound item on which you wish to sort.
data 2 Invoke the Edit Bound Item dialog.
3 In the Advanced tab, enter the value for the Order By
Sequence.
To create a break 1 In the Module Diagram, select Display View.
group 2 Select the items for a group.
3 Click the Create a new Item Group button.
4 In the Edit Item Group dialog, select Is this item a
break group?.
5 Click Finish.
To create a computed 1 In the Module Diagram, select Display View.
unbound item 2 Click the Create an Item button.
3 Drag to the correct position and drop the item.
4 Enter the name of the item.
5 Set the Item type property to Computed.
6 Click Next and create the SQL Expression to handle the
computation.
7 Click Finish.
To create a group 1 In the Module Diagram, select Display View.
summary item 2 Create a computed unbound item in the appropriate break
group.
3 In the Unbound Item Properties Palette, set the Reset Level
property to Current Group.
.....................................................................................................................................................
5-28 Oracle Designer 6i: Web PL/SQL Design and Generation
Hints
.....................................................................................................................................................
.....................................................................................................................................................
5-29
®
Lesson 5: Changing the User Interface
.....................................................................................................................................................
Instructor Notes
Schedule
55 Timing Topic
C han g ing the U ser Interface 45 minutes Lesson
45 minutes Practice
90 minutes Total
Class Management
O verview
In this lesson you revisit the module structure
•
•
W h at p ag es are ge n erated ?
H o w can I ch ang e th e layo u t o f item s?
and modify the display style of pages.
• H o w can I se e m o re than o n e fo rm o n a p ag e?
• H o w can I rem o ve d up lic ate re co rd s fro m th e Demonstrate as much of the lesson as you can.
re co rd list?
• H o w can I su m m arize th e data o n th e reco rd lis t?
5-2
Class Management
M od u le S tru cture
This is a copy of the slide from Lesson 2, just
M od ule D esign
to remind the students what happens when they
generate.
A bout P age Q ue ry G enerated
Form R ecord W eb pages
S tartu p P age List V iew
Form In sert
Fo rm
5-3
Class Management
S tartu p P ag e
If you haven’t generated the child modules, the
• O n e p e r m o d u le
Title
P age header
hyperlink appears but does not work. The
U ser text
Link to A bou t page
hyperlinks exist because of the module
M odu le com ponent page
(or lin k)
network. That is, in order to get hyperlinks to
P age fo oter
child modules you need to link all the modules
together. This topic is covered in a later lesson.
5-4
See http://invincible.uk.oracle.com/
for white papers.
.....................................................................................................................................................
5-30 Oracle Designer 6i: Web PL/SQL Design and Generation
Instructor Notes
.....................................................................................................................................................
Class Management
A bou t Pag e
Demonstrate the About Page; show them the
•
•
O n e p e r m o d u le
T ech n ic al in form atio n : Title
P age h eader
information displayed.
• U s er Technical
• A p plicatio n Inform ation
system
• M o d u le n am e
• D a tab ase version
• G e nerato r versio n P age fo oter
• P refere nce M O D A L R
5-5
Demo
Q uery Fo rm
• O n e p e r m o d u le co m po n en t E nter query
Create a plain module from scratch with a few
criteria
T itle
U ser text
columns and no lookup tables to demonstrate
C olum n 1: each of the pages. Set display, insert, update,
C olum n 2:
and delete properties for the table and columns.
C olum n 3:
E xecu te
query C olum n 4: Point out the components of the query form
Find C lear N ew
Invoke insert
form
and how to use it including the buttons.
5-6
2001
ID C ol 2
XXXX
C ol 3
XXX
C ol 4
XXX
C ol 5
XXXX
columns. This is because they are not
2002 XXXX XXX XXX necessarily descriptor columns: they are
Invoke q uery
form
First P re vious N ext R eQ uery C ount
additional columns that you have selected to
Q uery N ew Inv oke
ins ert form
R ecord lis t
navigatio n
give additional context information.
5-7
Demo
Point out that some of the buttons only appear
if relevant. That is, the Next button does not
appear unless there is another set of records.
If all the displayed items are context items,
there is no hyperlink to a view form.
Class Management
V iew F orm
• O n e p e r m o d u le co m po n en t If you display all columns as context items
Title
U ser text
D isplay
only
then the record list shows all the items and the
C olu m n 1: XXX view form is only useful for updating and
C olu m n 2: XXXXXXXXXX
C olu m n 3: XXXXX U pd ate deleting records.
C olu m n 4: XXXXXXX Invoke
D elete
insert
U pdate record
C olu m n 5: XX form
record
5-8
.....................................................................................................................................................
5-31
®
Lesson 5: Changing the User Interface
.....................................................................................................................................................
Class Management
In sert F orm
• O n e p e r m o d u le co m po n en t As you build the slide, point out that the
Title
U ser text
A utogenerated
colum ns autogenerated columns do not appear until you
C olum n 1: XXX
C olu m n 2: X X X X X X X X X X
have inserted the record.
C olum n 2: XXXXXXXXXX
C olu m n 3: X X X X X
C olum n 3: XXXXX
C olum n 5: X X
C olum n 4: XXXXXXX
Insert
record C olum n 5: XX
Inse rt C lear
5-9
5-10
Class Management
D isplay Styles
If the layout style is set to NULL, the style
List defaults to list.
• S et fo r ea ch m o d u le
com p o ne n t
• D ifferen t styles allo w ed Demo
w ith in o n e m od ule
List/Form
Form
List
List/Form
5-12
.....................................................................................................................................................
5-32 Oracle Designer 6i: Web PL/SQL Design and Generation
Instructor Notes
.....................................................................................................................................................
Class Management
D isplay Styles— List
This slide builds the way you would navigate
E ach form a ppears on a separate page
P age header P age header P age header
across the Web pages.
Title Title T itle
Q uery form R ecord lis t V iew form
XXX: • 01 AAA ZZZ XXX: 01
XXXX: AA% • 02 AAB ZZY XXXX: AAA
XX: Z% XX: ZZZ
• 03 AAC ZY Y XXXX: xxxxx xxxx
• 04 AAD ZY X
5-13
Class Management
D isp lay S tyles— L ist/F o rm
Q uery form
D efault text area page to the Record List.
XXX: R ecord lis t V iew form
Insert fo rm
XXXX: AA%
XX: Z%
• 01
• 02
AAA
AAB
ZZZ
ZZY
XXX:
XXXX:
01
AAA
A later lesson talks about modifying the
XX: ZZZ
• 03
• 04
AAC
AAD
ZY Y
ZY X
XXXX: xxxxxx xxx
frames.
P age fo oter P age foo ter
5-14
Class Management
S tand ard R ecord List
D uplicated
data
5-15
5-16
Technical Note
If some items are not in a break group, the
generator moves them into the last break group
it finds. This may result in the breaks
appearing in the wrong place.
.....................................................................................................................................................
5-33
®
Lesson 5: Changing the User Interface
.....................................................................................................................................................
T otal
C oan
S up erm p Id 1017 12-A P R -95
1017 20-JU N -95
N o of B ooking s 2
G
Grand
rand Total
Total 12
B o oking D ate
N o B ookings
5-17
Class Management
S um m ary
• M o d ule pag e s:
– A b ou t
– S tartup
• M o d ule com p o nen t p ag es:
– Q u ery fo rm
– R e cord list
– V iew form
– In sert fo rm
• D isplay style s
• B reak g ro u p s
5-18
.....................................................................................................................................................
5-34 Oracle Designer 6i: Web PL/SQL Design and Generation
Instructor Post Lesson Teaching Evaluation
.....................................................................................................................................................
Course Name: Oracle Designer 6i: Web PL/SQL Design and Generation
Lesson number: 5
Number of teaches before filling this form: 1 - 2 - 3 to 5 - >5
Detail comments
Content type: Slide - Text - Practice - Instructor notes
Note: 1:needs animation - 2:too much animation - 3:needs more text - 4:too much text
- 5:Unclear - 6:not necessary - 7:Other
Content Page
Note Comments/Suggestions
Type Number
Photocopy this page and fax to: Oracle Designer Curriculum Development @ +(44) 118.924.5181
Additional sheets are available at the end of the instructor’s guide.
If you draw additional diagrams on the white board use the Graphic sheet in the Instructor Evaluation
section at the end of this book.
.....................................................................................................................................................
5-35
®
Lesson 5: Changing the User Interface
.....................................................................................................................................................
.....................................................................................................................................................
5-36 Oracle Designer 6i: Web PL/SQL Design and Generation
Suggested Graphics
.....................................................................................................................................................
Suggested Graphics
Instructor name: Full email:
.....................................................................................................................................................
5-37
®
Lesson 5: Changing the User Interface
.....................................................................................................................................................
fold here
.....................................................................................................................................................
5-38 Oracle Designer 6i: Web PL/SQL Design and Generation
6
.................................
Implementing User
Interface Standards
Lesson 6: Implementing User Interface Standards
.....................................................................................................................................................
Introduction
You can enhance your Web PL/SQL modules by defining user text against modules
and module components. You can also standardize the look of the pages by applying
style templates and defining custom framesets.
Class
Overview Management
See Page 40
6-2
.....................................................................................................................................................
6-2 Oracle Designer 6i: Web PL/SQL Design and Generation
Introduction
.....................................................................................................................................................
Objectives
At the end of this lesson, you should be able to do the following:
• Apply user text to a module and a module component
• Format user text with HTML and calls to functions
• Format column data
• Add standard headers and footers to pages
• Create and use document templates or style sheets to control the appearance of
generated and static pages
• Create and use custom framesets to enhance module layout and functionality
.....................................................................................................................................................
6-3
®
Lesson 6: Implementing User Interface Standards
.....................................................................................................................................................
Image
Static
Text
Welcome!!
URL
URL
• Film Reviews
• Disney
Mailto
Do you have any questions? Email
Hollywood Video
6-3
You can include plain text, images, links to email addresses and Web pages as user
text. You can format user text with HTML or calls to code from the PL/SQL Toolkit,
the WSGL packages, and other packages that you create.
.....................................................................................................................................................
6-4 Oracle Designer 6i: Web PL/SQL Design and Generation
Adding User Text
.....................................................................................................................................................
The easiest way to view and edit user text is to use the property dialog boxes, which
show the user text separately for each location.
In the repository, user text is stored with tags to indicate the different locations.
In the Property palette, all the user text appears in a single field, as shown in the
following extract:
Default text
CG$VF_TP
Use this page to enter details for....
CG$QF_TP
htf.tableOpen...
CG$IF_TP
Use this page to enter details for...
.....................................................................................................................................................
6-5
®
Lesson 6: Implementing User Interface Standards
.....................................................................................................................................................
Class
Controlling the Location of User Text Management
See Page 41
Default
Area
Top of
Record List
Bottom of
Record List
6-5
You can include user text at the module level, in the default area or at the top and
bottom of the first page. The “first page” is defined as everything before the first
module component. If the first module component page (for example, the query form)
is displayed on the startup page, then the user text for the bottom of the first page is
displayed just before the module component title.
You can specify user text for each module component, at the top and bottom of each of
the module component pages.
.....................................................................................................................................................
6-6 Oracle Designer 6i: Web PL/SQL Design and Generation
Using HTML in User Text
.....................................................................................................................................................
Send email to
Holly@video.com
Visit our Web site
Hollywood Video
6-6
Web browsers use HTML instructions (tags) to paint the screen. You can format user
text by embedding HTML tags in it.
The following table lists some common HTML tags.
You can embed any of the features of HTML directly in user text.
.....................................................................................................................................................
6-7
®
Lesson 6: Implementing User Interface Standards
.....................................................................................................................................................
Class
Embedding HTML Management
You can embed <b>HTML</b> into See Page 41
your:
User Text <ul><li>Module User Text. </li>
<li>Page User Text.</li>
</ul>
MODSUB=Y MODSUB=N
(default)
You can embed <b>HTML</b> You can embed HTML into your:
Youyour:
into can embed <b>HTML</b> You can
• Module embed
User Text.HTML into
your:
into your:
<ul><li>Module User Text.</li> • Page User Text.
<ul><li>Module User Text.</li> • Module User Text.
<li>Page User Text.</li></ul>
<li>Page User Text.</li></ul> • Page User Text.
6-7
By default, the generator creates PL/SQL that prevents the browser from interpreting
the HTML; instead it displays the HTML to the screen.
If you use HTML in the user text areas, you should set the MODSUB - Substitute
HTML reserved characters text handling Generator Preference to No. This
ensures that the browser interprets the HTML and does not write it directly to the
screen.
.....................................................................................................................................................
6-8 Oracle Designer 6i: Web PL/SQL Design and Generation
Using the Toolkit in User Text
.....................................................................................................................................................
6-9
You can write calls to HTF functions in the user text area, intermingled with text and
HTML. In the generated code, all user text is enclosed in a call to HTP.P.
• HTF functions return formatted HTML to the HTP.P procedure
• HTP procedures send HTML text to the calling program
The HTP.P procedure (also defined as HTP.PRINT) takes a single text argument and
outputs it unchanged to the client. This is useful for printing text that you do not wish
to format. You can nest functions within other functions. In a function call, you can
also concatenate items.
.....................................................................................................................................................
6-9
®
Lesson 6: Implementing User Interface Standards
.....................................................................................................................................................
Class
Using Custom Functions Management
See Page 41
6-10
.....................................................................................................................................................
6-10 Oracle Designer 6i: Web PL/SQL Design and Generation
Accessing Images
.....................................................................................................................................................
Accessing Images
The Web server administrator can map virtual directories to physical directories. A
browser accesses the information on your server through the virtual directories.
Class
Virtual Directories Management
See Page 42
holly
webapp
images docs
6-11
.....................................................................................................................................................
6-11
®
Lesson 6: Implementing User Interface Standards
.....................................................................................................................................................
Formatting Columns
Employees
101, Niall John
Email
Emp Id: 101 formatting
Last Name: John
First Name: Niall
Email: njohn@hollywood.com Bold
Position: Manager formatting
Photo:
Image
formatting
6-12
If you do not take any action, the column data (for example, the name of the image
file) is displayed on the screen. You use the Formatting display property of the bound
item to instruct the generator to place appropriate format tags around the column data.
The generator converts the column formatting property into an appropriate call to the
WSGL procedures.
By default, column formatting is applied to the record list and to columns on the view
form that cannot be updated. You can suppress column formatting on the record list by
setting the ZONLHF – Record List: Apply HTML Formatting preference to No.
Displaying a URL
If you select a formatting type of URL, the generated code includes a call to
WSGL.ANCHOR2. The browser displays the caption of the column as a hyperlink. When
the user clicks on the caption, the Web browser submits the URL to the specified
server. The column should contain either a complete URL (starting with http://) or a
URL relative to the domain in which the application is running.
Displaying an Image
If you select a formatting type of IMAGE, the column data type must be VARCHAR2
and contain the filename of the image. The generated code includes a call to
WSGL.IMG. The browser automatically requests the image file from the server.
.....................................................................................................................................................
6-12 Oracle Designer 6i: Web PL/SQL Design and Generation
Formatting Column Values
.....................................................................................................................................................
6-13
You can display the record list as a series of graphic hotspots that link to view forms.
1 In the Edit Bound Items dialog for the item:
a Select IMAGE from the Formatting dropdown list.
b Set the Context? property.
2 Set the record list preferences:
• ZONLRS – Record List: Record Set Size defines the number of records
displayed at once.
• ZONLTC – Record List: Number of Records per Line defines the
number of records displayed on each line.
3 Define the default virtual directory for the image files in the IMGIFP – Default
image location preference. (This means that the column need only contain the
file name or a directory path relative to this directory.)
.....................................................................................................................................................
6-13
®
Lesson 6: Implementing User Interface Standards
.....................................................................................................................................................
MODSFA Yes
MODSFT myHTML.myFooter
MODSHA No
MODSHD HTF.BOLD(‘text’)
Set header on
Startup page only
6-14
As with user text, you can format headers and footers using HTML and calls to
PL/SQL functions (either in the HTF package or a custom package).
The header or footer must explicitly include all the features that you require. For
example, if you want to display a line underneath the header, you must include
htf.line or <hr> in the standard header text.
If you set preferences at the container level, all the pages in the application have the
same header and footer. If you set preferences at the module level, you can define
different headers and footers to clarify different areas of functionality.
.....................................................................................................................................................
6-14 Oracle Designer 6i: Web PL/SQL Design and Generation
Setting the Default Colors
.....................................................................................................................................................
FF0000 : red
Set colors as hexadecimal 0000FF : blue
value (RRGGBB) 00FF00 : green
6-15
You can control the background color, background image, text color, and hyperlink
color by setting the Document Attribute preferences.
You define colors using hexadecimal RGB values. The Designer 6i help system
contains a color chart to help you decide on colors.
You can set Document Attribute preferences at application or module level but they
are ignored if you apply a document template. If you set them at the module level, you
can differentiate specific areas of functionality. If you set them at the container level,
your Web PL/SQL application uses a common color scheme across all pages.
.....................................................................................................................................................
6-15
®
Lesson 6: Implementing User Interface Standards
.....................................................................................................................................................
Booking No:
Title: LOV
Apply template
6-16
A document template is a text file that contains HTML style information. During
generation, the Web PL/SQL Generator reads the document template file and
incorporates the HEAD section (any tags defined between the <HEAD> and
</HEAD> tags) into the generated document. The browser does not need access to the
template when the application is running.
.....................................................................................................................................................
6-16 Oracle Designer 6i: Web PL/SQL Design and Generation
Creating a Document Template
.....................................................................................................................................................
The most important tags in terms of your generated HTML pages are the following:
• <BODY> defines the style for user text.
• <H1> defines the style for page titles.
• <P> defines the style for captions on the query form, record list, view form, and
insert form.
• <TABLE> defines the style for the returned data.
Note: Some HTML elements inherit properties from their parent element. You can set
the inheritance explicitly within a style sheet. If you define the settings for the
<BODY> tag as follows:
BODY {font: Arial; size: 10pt; font-style: italic;
font-weight: bold; color:red}
then <H1> inherits the font, style, weight, and color from <BODY> unless you
explicitly define it differently.
.....................................................................................................................................................
6-17
®
Lesson 6: Implementing User Interface Standards
.....................................................................................................................................................
Class
Using a Cascading Style Sheet Management
See Page 43
Document template
<STYLE>
BODY {font:12pt Arial; background: yellow;
color: red}
H1 {font: 18pt Arial; font-weight: bold; color: blue}
6-19
A cascading style sheet is a standard Web file that defines the style of an HTML page.
Unlike the document template, it is read by the browser at runtime.
If you define the page style in a document template, you must regenerate the module if
you change the template. However, a document template may refer to a cascading
style sheet. If you change the cascading style sheet, you do not have to regenerate the
module: any changes are picked up the next time you run the module. However, the
reference to the style sheet must include the virtual directory path, as the browser must
be able to access it at runtime.
If you use a cascading style sheet, your document template merely needs to reference
the style sheet:
<link rel=stylesheet type="text/css" href="/docs/mystyles.css">
<meta http-equiv="charset" content="iso-8859-1">
For more information on cascading style sheets, see the following Web sites:
• The W3 Consortium at http://www.w3.org/Style
• The Web Design Group at http://www.htmlhelp.com/reference/css
Technical Note
Not all browsers support cascading style sheets.
.....................................................................................................................................................
6-18 Oracle Designer 6i: Web PL/SQL Design and Generation
Mapping Document Templates to Generated Pages
.....................................................................................................................................................
Insert Form
Document Templates
6-20
In the preferences, you must specify the full path and file name of the templates,
relative to your Designer 6i working directory (they are only required during
generation).
• DOCTAP – About Page Template Filename
• DOCTIF – Insert Form Template Filename
• DOCTLV – List of Values Template Filename
• DOCTMC – Module Content Template Filename
The module content template is applied to the startup page.
• DOCTQF – Query Form Template Filename
• DOCTRL – Record List Template Filename
• DOCTTF – Text Frame Template Filename
This template is applied to frames that do not contain dynamic data (for
example, the frame that contains the page header).
• DOCTVF – View Form Template Filename
If you apply a single template to every type of generated document, you create an
module that presents a consistent look and feel across all its pages. Alternatively, you
can apply different templates to individual document types.
Note: If you define Document Template preferences, any values for Document
Attributes preferences are ignored for those generated pages.
.....................................................................................................................................................
6-19
®
Lesson 6: Implementing User Interface Standards
.....................................................................................................................................................
Creating a Frameset
You can use HTML frames to divide a Web page into separate regions that display
content independently. The Web PL/SQL Generator includes a default frameset that
you can refine to suit your needs. You can also define custom framesets.
If you define the Layout Style for a module component as List/Form, the Web PL/SQL
Generator uses framesets to display more than one generated page on the same page.
Browser:
http://www....
View
UPPER form
LEFT RIGHT
Insert
Record form
LOWER
list
6-21
The Web PL/SQL Generator uses the default frameset to display the record list, view
form, and insert form on the same page. (The query form remains on a separate page.)
• The top frame displays the page header, title, default text area and return links.
• The left frame displays the record list.
• The right frame displays the view form and the insert form.
• The bottom frame displays the page footer, if there is one.
To ensure that the page presents information in the most economical way, you can
predefine the size of each frame using Frames - Default preferences.
• LFCOLS – Column Widths defines the relative widths of the central two frames.
• LFROWS – Row Heights defines the relative heights of the top frame and the
record list/view form frames.
• MODSFH – Standard Footer Frame Height defines the absolute height of the
bottom frame (if a standard page footer is defined).
• LOVFWD – LOV Frame Width defines the absolute width of the LOV frame (if the
LOV style preference is set to Frames).
.....................................................................................................................................................
6-20 Oracle Designer 6i: Web PL/SQL Design and Generation
Creating a Frameset
.....................................................................................................................................................
Class
Defining Frame Sizes Management
See Page 44
Percentage Relative Absolute
LFROWS: 25%, 75% LFROWS: *, 3* LFROWS: 100, *
Top
6-22
You define the sizes of your frames using the formats of the <FrameSET> HTML
tag:
• Percentage of the available space
• Relative quantities of the available space
• Absolute size in pixels
Example
Value of Effect
LFROWS
preference
15%,85% The top frame takes up 15% of the space above the footer frame and the
record list/view form/insert form frame takes up 85% of the space.
*, 3* The top frame takes up a quarter of the space and the record list/view form/
insert form frame takes up three-quarters of the space. The browser calculates
that the size of the first frame is one-third that of the second.
100, * The top frame is 100 pixels high and the record list/view form/insert form
frame occupies the rest of the space.
.....................................................................................................................................................
6-21
®
Lesson 6: Implementing User Interface Standards
.....................................................................................................................................................
<HTML>
<FRAMESET ROWS="30%, 50%, 20%">
First row
<FRAME NAME="UPPER"> (30%)
<FRAMESET COLS="30%, *">
<FRAME NAME="LEFT"> Second
<FRAME NAME="RIGHT"> row (50%)
</FRAMESET>
<FRAME NAME="LOWER" Third row
(20%)
SRC="c:\footer.txt">
</FRAMESET>
</HTML>
6-23
The frameset template names the frames and specifies their sizes. You use preferences
to specify that the generator uses a custom frameset and also to map the names of the
frames to the generated pages.
Class
Displaying a Frameset Management
See Page 45
UPPER
30% rows
LEFT RIGHT
50% rows 50% rows
30% cols * cols (70%)
LOWER
20% rows
6-24
.....................................................................................................................................................
6-22 Oracle Designer 6i: Web PL/SQL Design and Generation
Creating a Frameset
.....................................................................................................................................................
Naming Frames
Each frame must have a name. The names are case-sensitive. If you create a frameset
with rows called LEFT and RIGHT, the generator ignores a preference that maps a
page to a frame called Left.
Nesting Framesets
In order to divide the screen into rows and columns you must nest framesets. A nested
frameset informs the browser how to subdivide the current frame. In the code below,
the screen is divided into two rows; the second row takes up 60% of the screen and is
divided into two equal columns:
<frameset rows=”40%, 60%”>
<frame name=”upper”>
<frameset cols=”50%, 50%”>
<frame name=”left”>
<frame name=”right”>
</frameset>
</frameset>
.....................................................................................................................................................
6-23
®
Lesson 6: Implementing User Interface Standards
.....................................................................................................................................................
6-25
You set the following Frames - Custom preferences to map pages to frames:
• LFMCFM - Module Content Frame defines the frame for the module
content; if this preference is blank, the module content is placed in the first frame.
• LFDTFM - Default Text Frame defines the frame in which the default
text appears; if this preference is blank, the default text appears in the same frame
as the record list.
• LFRLFM - Record List Frame defines the frame in which the record list
appears; if this preference is blank, the record list appears in the first frame.
• LFQFFM - Query Form Frame defines the frame in which the query form
appears (when it does not appear on a separate page, that is, LFQOSP is No); if this
preference is blank, the query form appears in the same frame as the record list.
• LFVFFM - View/Insert Form Frame defines the frame in which the
view and insert forms appear; if this preference is blank, these forms appear in the
frame after the record list. If the record list appears in the last frame, all three
.....................................................................................................................................................
6-24 Oracle Designer 6i: Web PL/SQL Design and Generation
Invoking a Custom Frameset
.....................................................................................................................................................
forms share the same frame (but not at the same time).
• LFLVFM - List of Values Frame defines the frame in which lists of
values appear (that is, LOVSTL is set to FRAME); if this preference is blank, the
LOV appears in the frame after the view/insert form.
• LFHDFM - Header Frame defines the frame in which the page header
appears; if this preference is blank, the page header appears in the first frame.
• LFFTFM - Footer Frame defines the frame in which the page footer
appears; if this preference is blank, the page footer appears in the last frame.
If you map more than one generated page to the same frame, the generator creates
navigation buttons to enable you to move between them.
.....................................................................................................................................................
6-25
®
Lesson 6: Implementing User Interface Standards
.....................................................................................................................................................
Summary
Summary
6-26
User Text
The Web PL/SQL Generator makes use of user text defined against modules or
module components:
• You can embed HTML directly into your user text. However, you need to set the
MODSUB preference to enable the generator to recognize it.
• You can embed calls to functions in the HTF package within your user text.
• You can also embed calls to functions in your own custom packages, but you must
identify the packages to the generator using the PKGLST preference.
Document Attributes
You can use document attributes to vary the colors of the page background, the page
text, and standard, visited, and active hyperlinks. You can also define the background
image for the page.
Document Templates
Document templates are more flexible than document attributes. You can use them to
influence the appearance of generated and static pages.
You can define that the templates use cascading style sheets for even more flexibility.
.....................................................................................................................................................
6-26 Oracle Designer 6i: Web PL/SQL Design and Generation
Summary
.....................................................................................................................................................
Framesets
The generator generates HTML frames for module components with List/Form layout.
For the default frameset, you can define the number and relative sizes of the frames.
You can create a document template that defines a custom frameset. Preferences map
its frames to generated and static pages.
.....................................................................................................................................................
6-27
®
Lesson 6: Implementing User Interface Standards
.....................................................................................................................................................
Scenario
You have captured the design of a form and modified it slightly for use as a Web
PL/SQL module. As customers must use the module on the Web without training or
support, you should provide more descriptive information on the Web pages. You
should also include some of Hollywood’s branding information.
Your Assignment
Use the following information as your starting point:
where <nn> is the group number that your instructor has assigned to you.
1 Use the Design Editor to modify the startup page to look like the following:
Note: You will find the image files in the graphics folder on the Web server.
Its parent directory is mapped to /webapp.
.....................................................................................................................................................
6-28 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 6—1: Adding Static Text and Images
.....................................................................................................................................................
.....................................................................................................................................................
6-29
®
Lesson 6: Implementing User Interface Standards
.....................................................................................................................................................
Scenario
The company wants the Hollywood image to appear at the top of every page of every
module. They also want some standard information at the bottom of every page. You
are to implement this, using a custom function to create the footer.
Your Assignment
Use the following information as your starting point:
You are going to amend the module so that it looks like this:
.....................................................................................................................................................
6-30 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 6—2: Adding Standard Headers and Footers
.....................................................................................................................................................
.....................................................................................................................................................
6-31
®
Lesson 6: Implementing User Interface Standards
.....................................................................................................................................................
Scenario
Customers have their photographs taken when they join Hollywood. This photo should
be displayed on the customer record and should provide the hyperlink from the record
list to the view form.
The marketing department would like to encourage a club atmosphere amongst
customers. To facilitate this, email addresses should also be displayed on the record
list and they should invoke an email program when clicked.
Your Assignment
Use the information below as your starting point:
.....................................................................................................................................................
6-32 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 6—4: Using a Style Sheet
.....................................................................................................................................................
Scenario
After successfully adding the standard header and footer to all the Web pages, you
now want to standardize on the background and text colors.
Your Assignment
Use the following information as your starting point:
Filename Contents
les06.txt A link to a cascading style sheet, les06.css
.....................................................................................................................................................
6-33
®
Lesson 6: Implementing User Interface Standards
.....................................................................................................................................................
Filename Contents
les06a.css A style sheet that specifies the mauve Designer background image and
blue text
les06b.css A style sheet that specifies a textured blue background image and olive
text
7 Copy les06b.css and les06.txt into your working directory and examine
them in a text editor.
8 Rename les06b.css to les06.css.
9 In the Design Editor, set the Document Templates preferences in the GENERAL
preference set. Map all the pages to les06.txt.
10 Generate, install, and run the module. Can you see your changes?
11 In the Design Editor, set the Document Templates preferences for the MEM0010 -
Maintain Personal Details module to the default for the application.
12 Generate, install, and run the REN0020 - Reserve a Title module. Can you
see your changes?
13 Copy les06a.css to les06.css.
14 In the browser, reload the current module. Can you see your changes?
.....................................................................................................................................................
6-34 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 6—5: Creating a Custom Frameset
.....................................................................................................................................................
Scenario
Market research indicates that customers have to go through too many pages to get to
the information they want. One of your colleagues has created a style sheet that
defines a frameset. You are to experiment with this frameset.
Your Assignment
Use the following information as your starting point:
1 Using a text editor, view the contents of the frameset file, frame06.tpl,
which is in the docs folder in your working directory.
a What are the names of the frames?
b Draw a rough sketch of how you expect the screen to be divided.
.....................................................................................................................................................
6-35
®
Lesson 6: Implementing User Interface Standards
.....................................................................................................................................................
Specify that you want to use the frame06.tpl file in your working
a
directory.
b Set the query form and record list to appear on the left.
c Arrange for the insert and view forms to appear on the right.
d Map the default text, module content, and header to the top frame.
e Map the footer to the bottom frame.
5 Generate, install, and run the module to answer these questions:
a In which frame does the query form appear?
b Execute a query. In which frame does the record list appear?
c Click on any record. Where does the view form appear?
d Click the New button. Where does the insert form appear?
.....................................................................................................................................................
6-36 Oracle Designer 6i: Web PL/SQL Design and Generation
Hints
.....................................................................................................................................................
Hints
Practice 6—1
To perform this task Follow these steps
To modify user text 1 Select the module or module component.
2 Invoke the property dialog.
3 Select the User Text tab.
4 Click on the appropriate location.
5 Enter the text into the User text area.
6 Click Finish.
To set the background 1 Open the Web PL/SQL Generator Preferences Navigator.
image 2 Navigate to the Document Attributes category.
3 Set the MODBGR – Background Image File preference
to the virtual path and name of the required file.
To ensure that HTML 1 Open the Web PL/SQL Generator Preferences Navigator.
is interpreted by the 2 Navigate to the Text Handling category.
browser 3 Set the MODSUB – Substitute HTML Reserved
Characters preference to No.
Practice 6—2
To perform this task Follow these steps
To specify a standard 1 Open the Web PL/SQL Generator Preferences Navigator.
header 2 Navigate to the Headers and Footers category.
3 Set the MODSHA – Standard Header On All Pages
preference to Yes.
4 Set the MODSHD – Standard Header preference to the
required header value.
To install a custom 1 Invoke SQL*Plus as the Web PL/SQL user.
package 2 Run the SQL file that contains the package definition.
To use a custom 1 Open the Web PL/SQL Generator Preferences Navigator.
package 2 Navigate to the Text Handling category.
3 Set the PKGLST - PL/SQL Package List preference to
the name of the package.
To specify a standard 1 Open the Web PL/SQL Generator Preferences Navigator for
footer the module.
2 Navigate to the Headers and Footers category.
3 Set the MODSFA – Standard Footer On All Pages
preference to Yes.
4 Set the MODSFT – Standard Footer preference to the
required header value.
.....................................................................................................................................................
6-37
®
Lesson 6: Implementing User Interface Standards
.....................................................................................................................................................
Practice 6—3
To perform this task Follow these steps
To change the order 1 Invoke the display view of the module diagram.
of items 2 Drag the item to the required position.
To add formatting to 1 Select the displayed item.
an item 2 Invoke the Edit Item dialog.
3 Select the Display tab.
4 Set the Formatting property as required.
5 Click the Finish button.
Practice 6—4
To perform this task Follow these steps
To map a page to a 1 Open the Web PL/SQL Generator Preferences Navigator.
document template 2 Navigate to the Document Templates category.
3 Set the template filename preference for the appropriate page
to the directory (relative to the working directory) and file
name of the template.
To reset a generator 1 Open the Web PL/SQL Generator Preferences Navigator.
preference 2 Select the required preference.
3 Right-click and select Inherit from the menu.
.....................................................................................................................................................
6-38 Oracle Designer 6i: Web PL/SQL Design and Generation
Hints
.....................................................................................................................................................
Practice 6—5
To perform this task Follow these steps
To display a module 1 Navigate to the Edit Module Component dialog.
component in frames 2 Select the Display tab.
3 Set the Layout Style to List/Form.
To use a custom 1 Open the Web PL/SQL Generator Preferences Navigator.
frameset 2 Navigate to the Frames category.
3 Set LFCUST – Use Custom Frameset to Yes.
4 Navigate to the Frames - Custom category.
5 Set LFFSTP – Custom Frames: Template Filename
to the virtual path and name of the template file.
To display the query 1 Open the Web PL/SQL Generator Preferences Navigator.
form in a frame 2 Navigate to the Frames category.
3 Set LFQOSP – Place Query Form on Separate page
to No.
To map pages to 1 Open the Web PL/SQL Generator Preferences Navigator.
frames 2 Navigate to the Frames - Custom category.
3 Set the Frame preferences to the (case-sensitive) name of the
appropriate frame.
.....................................................................................................................................................
6-39
®
Lesson 6: Implementing User Interface Standards
.....................................................................................................................................................
Instructor Notes
Schedule
66 Timing Topic
Im p lem enting U ser In terface S tan d ards 60 minutes Lesson
60 minutes Practice
120 minutes Total
Class Management
O verview
This chapter is not complex. Rather, it offers
•
•
C an I a d d text to m o d u le s?
H o w d o I form at te xt?
the potential to create interesting Web pages.
• H o w d o I form at co lum ns ?
• H o w d o I ad d a sta n dard h ead er and fo o te r to m y Refer to the plain style of pages we have
a pp licatio n ?
• H o w d o I m ak e all m y p ag es lo ok th e sam e? seen so far. Discuss why you might
• H o w d o I see m o re than o ne p ag e at a tim e?
want to apply standards, to make
different pages look dissimilar, or to see
6-2
more than one page at a time.
Demo
T ypes of U ser Text
In your browser, invoke the demonstration
Im age
S tatic
Text
system. Point out the images, URL, and static
W e lcom e!!
text on the startup page.
U
URRLL
•
•
Film R eview s
D isney Do not show the source code. Leave the
M ailto
D o you have any que stions? E m a il browser open and use it to show the source
H ollyw ood V ideo
Class Management
D efin ing U ser Text
D e fine in the D e sign E ditor . . . Discuss the difference between using the
U ser Text property palettes and the property dialog to
U s er text can be display ed...
Demo
W eb P age Text
. . . generate in to a
• B u llets
• Im a ges You could add text using the property dialog
W eb P L/S Q L m odule
6-4
and then view it in the property palette.
.....................................................................................................................................................
6-40 Oracle Designer 6i: Web PL/SQL Design and Generation
Instructor Notes
.....................................................................................................................................................
Class Management
C ontrollin g th e Lo catio n o f U ser T ext
D efault
Usually you open and close the tags for each
A re a
area, such as Top of Record List,
independently. However if you open a tag in
Top of
R ecord List
one area for a page, Top of Record List, and
B ottom of
R eco rd List
close it in the other, Bottom of Record List,
then the tag applies to the whole page (but not
6-5 to the column data).
Class Management
H yp erT ext M arkup Lan g uag e
Explain briefly about HTML. There is a lot of
•
•
P roces sed b y W eb b ro w sers
T ells a brow ser h o w to p ain t th e screen
information available in books and on the Web,
• U ses tag s to d efin e:
– H e adin g s < H 1> < /H 1>
if students are interested in pursuing the
–
–
Im a g es
URLs
< IM G S R C =“im g.g if”>
subject.
S end em ail to
H olly@ v ideo.c om
V isit ou r W eb site
H ollyw o od V id eo
6-6
Class Management
E m bedd in g H TM L
You can e mbed <b >HTM L</ b> into
your :
By setting the preference, you direct the
U ser Text <ul> <li >M odule U ser Tex t. </li>
<li> Pag e User Te xt.< /li >
</ul >
generator that the HTML tags need to be
interpreted and not read as plain text.
M O D S U B =Y M O D S U B =N
(defa ult)
6-7
Class Management
U sing the T oolkit P rocedu res
You discussed the Developer’s Toolkit briefly
If y ou need he lp , con ta ct
U ser Text <I>h tf. mail to( ’c s@hol ly wood .com ’,
‘Cu st omer Ser vi ces’) </ I>
in an earlier lesson. You can go into more
detail here.
htp. p(‘ If y ou ne ed he lp , co ntac t <I>’| |
P L/S Q L
htf .m ailto (’ cs@h olly wo od.co m’ ,
‘Cu st omer Ser vi ces’) ||
Information about Web server implementations
’</I >’) ;
If y ou need he lp ,
is available on the intranet. The online
W eb P age
cont act Cus tome r Servi ce s
documentation gives a full breakdown and
6-9
description of the Toolkit packages.
Class Management
U sing C u sto m F un ction s
If you omit the package name from the list the
1. W rite a fun ctio n tha t retu rns H T M L .
2. P lace th e fu n ctio n in a p ackag e.
Generator does not use the package: the text is
3. S e t th e P K G L S T p referen ce.
4. U s e th e fu n ctio n in u ser text.
printed to the screen.
HT F.HR Th is is s ome tex t.
my _htm l.c ust (‘Th is text is a para met er
If you want to include several packages, you
to the fu nct ion. ’)
separate their names by commas.
6-10
.....................................................................................................................................................
6-41
®
Lesson 6: Implementing User Interface Standards
.....................................................................................................................................................
Class Management
V irtu al D irecto ries
Note that the mapping is a function of the Web
holly
server, not the Generator. This is included to
w ebapp
give a brief idea of how it works. If a directory
im ag es do cs is mapped, you can refer to subdirectories
V irtu al D irecto ry P h ysical D irecto ry
without mapping them specifically.
/graph ics /holly/w ebapp/im ages
If you use the physical directory, it is very
6-11
restrictive when deploying applications.
Class Management
F o rm attin g C olum n s
E m ployees
101, N iall John
E m ail
E m p Id: 101 form a tting
Last N am e: John
First N am e: N iall
E m ail: njohn@ hollyw ood.com B old
P osition: M anager form a tting
P hoto:
Im age
form a tting
6-12
Demo
G raph ical R eco rd List
Your directory includes files (CVWGRAPHIC) to
install a version of this module. When you run
it, the Customer Id may also appear on the
record list. In the version we built against, we
could not generate when the only context item
was formatted as an image.
6-13
S et header on
S tartup page on ly
6-14
Demo
D o cum ent A ttributes
R eserve a Title M O D FG C
text color
Show how to get to the color chart in the online
U se these pages to enter
M O D V LC
visite d link
booking d etails:
B O O K IN G S
MODBGC
backgroun d
help:
• A bout color
E nter qu ery criteria
for B O O K IN G S : M O D S LC
• Select one of the Generator preferences in
M O D A LC
active link
B ooking N o:
Title: LO V
standard link
the Document Attributes category.
• R eturn
6-15
• Click on Color Chart.
.....................................................................................................................................................
6-42 Oracle Designer 6i: Web PL/SQL Design and Generation
Instructor Notes
.....................................................................................................................................................
B O O K IN G S
4 GUGTXGC6
Q U E R Y FO R M
Q U E R Y KVNG
FO R M
D
Default
efault Tem
Template
p late
8 V H W K H V H S D J H V W R H Q W H U
The document template changes the fonts for
:
• A bout
E nter query criteria for
E R R N LQ J G H W D LO V
$ 1 1 - +0 ) 5
the page title and help text and adds a
B O O K IN G S:
B ook ing N o:
• A bout
E nter query criteria for background image.
T itle: B O O K IN G S :
Booking No:
T itle: LOV
You could have a separate template or
A pply tem plate
style sheet for each page, for example,
6-16
Query and Insert pages could have
different templates.
About the slide
H T M L E lem ents
R eserve A Title
The first slide is not in the student manual. It
B ody < B O D Y > U se these pages to m aintain de tails
of B O O K IN G S may help you to explain which tags affect
H eading <H 1> B O O K IN G S
E n ter query crite ria for
B O O K IN G S
which areas on the page.
P aragraph <P >
xxxx xxxx
xxxx xxxx
Table < TA B LE >
xxxx xxxx
xxxx xxxx
xxxx xxxx
6-17
C reatin g a T em plate F ile The second slide shows the format of the style
• U se text ed ito r
tag.
• S et p aram eters fo r each H T M L elem en t
<H TM L >
<H E A D >
<S TY LE >
B O D Y {font:1 2pt A rial; back ground: yello w ;
color: red}
H 1 {font: 18p t A rial; font-w e ight: bold; co lor: blue}
P {font: 10pt A rial; font-w eight: bold; colo r: red}
</S TY L E >
</H E A D >
</H TM L >
6-18
Class Management
U sing a C ascad ing S tyle Sh eet
Emphasize that style sheets are a very
D ocum ent te m plate
.....................................................................................................................................................
6-43
®
Lesson 6: Implementing User Interface Standards
.....................................................................................................................................................
Class Management
A p plying T em p lates
The template files can be anywhere on the
G enerator
enerato r P references
P rod uct
network. They do not have anything to do with
Insert Form
D o cum ent Tem p lates the Web server.
Q u ery Form D O C T IF iftem p.txt
D O C T LV lvtem p.txt
DOCTQF qftem p.txt
R ecord List
DOCTRL rltem p.txt Demo
V ie w Form DOCTVF vftem p.txt
B row ser:
This slide illustrates the default frameset. The
http://w w w ....
V iew
participants should already have seen this in
form
UPPER
Lesson 5 (when they changed the module
LE FT R IG H T
Insert
component display style to List/Form).
R ecord form
LO W E R
list
6-21
Class Management
D efin in g F ram e S izes
Top
6-22
</FR A M E S E T >
</H T M L>
Class Management
6-23
A frame can derive its content from static files
such as text files or images. Not every frame
has a generated page as its source.
For a tutorial on the use of framesets
see:
http://www.hotwired.com/
webmonkey/html/
.....................................................................................................................................................
6-44 Oracle Designer 6i: Web PL/SQL Design and Generation
Instructor Notes
.....................................................................................................................................................
Class Management
D isplaying a Fram eset
This is the result of the frameset we built in the
UPPER previous slide.
30% row s
LE F T R IG H T
50% row s 5 0% row s
30% cols * c ols (70% )
LOW ER
20% row s
6-24
Class Management
M ap pin g Pag es to Fram e L o catio ns
If LFFSTP is blank, the generator uses the
G enerator P referen
Prod uct
ces
references
default frameset.
D efault text
Tem plate
Fram es - C u stom
L FD TFM UPPER
Demo
L FFS TP fram e.h tm
R ecord list L FQ FFM
L FR LFM
LEFT
LEFT
Use the Generator Preferences palette to
V iew form L FV FFM R IG H T
show how the pages are mapped to
frames within the frameset. Emphasize
6-25
6-26
Practices
The physical client files directory is mapped to the /webapp virtual directory. It then
has subdirectories to which you refer as /webapp/docs, /webapp/graphics, etc.
Practice 6—4
If the students cannot see the changes when they reload the form after changing the
style sheet, tell them to exit the browser and reload it (to clear the cache).
.....................................................................................................................................................
6-45
®
Lesson 6: Implementing User Interface Standards
.....................................................................................................................................................
.....................................................................................................................................................
6-46 Oracle Designer 6i: Web PL/SQL Design and Generation
Instructor Post Lesson Teaching Evaluation
.....................................................................................................................................................
Course Name: Oracle Designer 6i: Web PL/SQL Design and Generation
Lesson number: 6
Number of teaches before filling this form: 1 - 2 - 3 to 5 - >5
Detail comments
Content type: Slide - Text - Practice - Instructor notes
Note: 1:needs animation - 2:too much animation - 3:needs more text - 4:too much text
- 5:Unclear - 6:not necessary - 7:Other
Content Page
Note Comments/Suggestions
Type Number
Photocopy this page and fax to: Oracle Designer Curriculum Development @ +(44) 118.924.5181
Additional sheets are available at the end of the instructor’s guide.
If you draw additional diagrams on the white board use the Graphic sheet in the Instructor Evaluation
section at the end of this book.
.....................................................................................................................................................
6-47
®
Lesson 6: Implementing User Interface Standards
.....................................................................................................................................................
.....................................................................................................................................................
6-48 Oracle Designer 6i: Web PL/SQL Design and Generation
Suggested Graphics
.....................................................................................................................................................
Suggested Graphics
Instructor name: Full email:
.....................................................................................................................................................
6-49
®
Lesson 6: Implementing User Interface Standards
.....................................................................................................................................................
fold here
.....................................................................................................................................................
6-50 Oracle Designer 6i: Web PL/SQL Design and Generation
7
.................................
Introduction
In this lesson you learn how to build master–detail modules and generate Lists of
Values. You simplify the navigation within a master–detail module and add master
context information. You also define and use Repository LOV elements and GUI
display items to ensure that users only enter valid values. LOVs, GUI display items,
and pop-up calendars also improve the look and functionality of your generated
applications.
Class
Overview Management
See Page 37
Practice
• How do I build a master–detail module? See Page 37
• How do I provide data entry help to the user?
• Can I insert and update multiple records?
• How do I control what a user enters?
• Can I use a calendar to populate a date item?
7-2
.....................................................................................................................................................
7-2 Oracle Designer 6i: Web PL/SQL Design and Generation
Introduction
.....................................................................................................................................................
Objectives
At the end of this lesson you should be able to do the following:
• Create layouts for master–detail modules
• Create Lists of Values components using the default utility
• Create and refine LOVs manually
• Work with multirow DML
• Control user input using allowable values
• Use GUI display items
• Implement a pop-up calendar
.....................................................................................................................................................
7-3
®
Lesson 7: Building More Complex Modules
.....................................................................................................................................................
Class
Master–Detail Layout Management
See Page 37
Master
• Record List:
– Master
– Detail
Detail
7-4
.....................................................................................................................................................
7-4 Oracle Designer 6i: Web PL/SQL Design and Generation
Placing the Detail Record List
.....................................................................................................................................................
Class
Detail on Separate Page Management
Page header
See Page 37
Title
Demo
View form
See Page 37
Detail hyperlink
Page footer
Page header
Title
Record list
Page footer
7-5
Master–Detail Navigation You navigate to the detail Record List by clicking on the
hyperlink at the bottom of the master View Form.
.....................................................................................................................................................
7-5
®
Lesson 7: Building More Complex Modules
.....................................................................................................................................................
Demo
Detail on Same Page See Page 38
Page header
Master Title
View form
Record list
Detail
Page footer
7-6
Number of Connections Required The detail Record List appears on the same
HTML page as the master View Form. Therefore, you require only one connection to
the Web server and one database session to obtain and display the information. This
involves less network traffic than displaying the information on separate pages.
.....................................................................................................................................................
7-6 Oracle Designer 6i: Web PL/SQL Design and Generation
Placing the Detail Record List
.....................................................................................................................................................
Class
Master–Detail Navigation Management
See Page 38
Title Links to Detail
Help Record List
7-7
.....................................................................................................................................................
7-7
®
Lesson 7: Building More Complex Modules
.....................................................................................................................................................
Work Group 20
Client Side Generators
Oracle Designer
TVP
Employees PSE
12-Mar-1990
Griffiths
Requests
Requester’s
Comment::
Start Date:
End Date: to:
Half Day:
7-8
The ability to maintain master context information means that you can:
• Access master module component item values from LOVs, user text, unbound
items in SQL expressions, SQL text (WHERE, HAVING, and CONNECT BY
clauses), user-defined application logic
• Customize dynamic return links
• Control the formatting of a component's header and footer text.
.....................................................................................................................................................
7-8 Oracle Designer 6i: Web PL/SQL Design and Generation
Providing Master Context Information
.....................................................................................................................................................
displayed, only values from the second component are available. In order to use item
values from the first and second components in a page from the third component,
MCNMDP must be set to 2.
Set the MCNAAC – Always add code preference to ensure that master context code is
always added to a module, even when the module does not use it. Set this preference if
a called module needs to display the master module’s context information.
Technical Note
Only user-defined application logic can reference master component items.
.....................................................................................................................................................
7-9
®
Lesson 7: Building More Complex Modules
.....................................................................................................................................................
Lists of Values
A list of values (LOV) makes it easier for a user to enter or query on data. Oracle
Designer 6i enables you to model LOV components and associate them with items.
The Web PL/SQL Generator can use these components to create LOV windows in
generated applications.
LOV Structures
LOV
association
LOV
inclusion
7-9
.....................................................................................................................................................
7-10 Oracle Designer 6i: Web PL/SQL Design and Generation
Lists of Values
.....................................................................................................................................................
RTL_LOV
<Unassociated>
RTL_ID
A_MC.RTL_ID RTL_DATE
7-10
The COPIES_LOV component has two inclusions, so the Web PL/SQL Generator
generates two LOVs.
One of the inclusions has been associated with items and is defined in the LOV
property of the item. The other LOV is generated but can only be invoked from
application code.
.....................................................................................................................................................
7-11
®
Lesson 7: Building More Complex Modules
.....................................................................................................................................................
Resequence...
Default List Of Values Utility
Copy Object... Context object for which Lists of Values will be created
Copy With new Language Module REN0010 (WG_HOLLYWOOD)
Force Delete...
Map Unbound Items á Use Reusable Lists of Values
To use Reusable Lists of Values from outside the container of the
context object, specify the search path in the Additional Containers
Default Links… field below.
Additional
Default Lists of Values... Containers
Browse...
Validate
á Reuse existing Lists of Values defined within the module.
á Create Reusable Lists of Values for Reusable Module Components.
Create Reusable Lists of Values for Module Components defined
within the module.
7-11
You can run the Default List of Values utility against a module, a module component,
a subcomponent, or a table usage. Select the object for which you want to create an
LOV and then select Utilities—>Default List of Values from the menu to invoke the
utility’s dialog box. The selected object is shown in the Context Object field. The
check boxes enable you to influence how the utility works.
You can select combinations of the boxes. If you select the use and reuse boxes, the
utility checks for suitable LOV components within the module and then for reusable
LOVs that have been defined but are not included in the module.
.....................................................................................................................................................
7-12 Oracle Designer 6i: Web PL/SQL Design and Generation
Adding a List of Values to a Module
.....................................................................................................................................................
A_MC
# RE_RNT_FK RTL_ID
#
* RTL_ID
LINE_NO
RTL_LOV
*
* RTL_PERIOD RTL_DATE
*
Lookup usage
LOV LOV
association component
RTL_LOV
LOV
A_MC.RTL_ID RTL_ID
inclusion
RTL_DATE
7-12
What Does the Default LOV Utility Create? It creates an associated LOV
component for each lookup table usage. The LOV component has the following
characteristics:
• It is named using the naming convention <table alias>_LOV.
• It includes all the lookup table items in the module component.
• It is associated with the first LOV item in the module component that is enterable
and displayed.
.....................................................................................................................................................
7-13
®
Lesson 7: Building More Complex Modules
.....................................................................................................................................................
RTL_LOV
<Unassociated>
RTL_ID
A_MC.RTL_ID RTL_DATE
RIM.LINE_NO
RIM.RTL_PERIOD
RIM.RTL_ID
7-13
To create an LOV component, click one of the LOV buttons in the toolbar of the
module diagram data view:
Button Description
Include Reusable This button invokes a dialog in which you can select a reusable LOV or
List of Values a specific LOV you have already defined for the module.
Create Specific This button invokes the List of Values Data Wizard to step you through
List of Values the LOV component creation, selecting the table and column usages
required.
In the dialogs, you can specify the table usage, whether the generated LOV is to be
used for query or data entry, add additional query conditions, and modify the return list
mappings. When you create a specific LOV component or include a reusable LOV
component in a module, an inclusion is automatically created. A reusable LOV
component can have inclusions across different modules.
If you create an LOV outside of any module component, it is not associated with an
item. An LOV inclusion is created with the name <Unassociated>.
To associate an LOV component with an item, select the LOV then click the item.
.....................................................................................................................................................
7-14 Oracle Designer 6i: Web PL/SQL Design and Generation
Refining a List of Values
.....................................................................................................................................................
The List of Values can be used for different operations and can be
associated with an item within a module component. These options can
be set here.
Used For
Query and Data Entry Filter Before Display?
Query
Query and Data Entry
Data Entry
RIM.LINE_NO
RIM.RTL_PERIOD
RIM.RTL_ID
Title Override
7-14
If you specify that a module component uses different LOVs for query and data entry,
the generator creates code to call the appropriate LOV. Alternatively, you can write
application logic to call a particular LOV under certain circumstances.
.....................................................................................................................................................
7-15
®
Lesson 7: Building More Complex Modules
.....................................................................................................................................................
Return List
Manual
• Map module
component item
RE.RTL_ID = LOV.ID
to LOV item
7-15
The return list defines how the items in the module component map to the LOV items.
If the LOV is attached to the foreign key item in the base table and the base table of the
LOV component is a lookup table usage of that foreign key, the generator matches the
items.
If the generator is unable to create a mapping, it issues a warning. For example, the
generator cannot create a mapping when the domain table is attached to an unbound
item.
You can create the return list manually through the Edit List of Values dialog box
association properties as illustrated above. You can select a module component item
from the drop-down list and link it directly to an LOV item.
.....................................................................................................................................................
7-16 Oracle Designer 6i: Web PL/SQL Design and Generation
Refining a List of Values
.....................................................................................................................................................
Lookup
table
usage
LOV
Specific component
association
7-16
If you add a WHERE clause to the lookup table usage of the module component, it also
restricts the records displayed in the LOV component. If you add a WHERE clause to an
LOV component base table or lookup table usage, it is incorporated into every LOV
association created from the LOV component.
.....................................................................................................................................................
7-17
®
Lesson 7: Building More Complex Modules
.....................................................................................................................................................
Example 1: The module component lookup table usage has a query WHERE clause.
The LOV component and association have no additional restrictions.
MC WHERE clause: CUS_ID IN (10,20,30)
LOV WHERE clause: <none>
Additional restriction: <none>
The module component WHERE clause applies in query mode and the LOV is
unrestricted when not in query mode.
Resultant WHERE clause on LOV (in query mode): CUS_ID IN (10,20,30)
Resultant WHERE clause on LOV (not in query mode): <none>
Example 2: The module component lookup table usage and the LOV component
each have a query WHERE clause. The LOV association has no additional restrictions.
MC WHERE clause: CUS_ID IN (10,20,30)
LOV WHERE clause: CUS_ID IN (10,30)
Additional restriction: <none>
The module component WHERE clause applies in query mode and the LOV is
unrestricted when not in query mode.
Resultant WHERE clause on LOV (in query mode): CUS_ID IN (10,30)
Resultant WHERE clause on LOV (not in query mode): <none>
Example 3: The module component lookup table usage and the LOV component
each have a query WHERE clause. The LOV association has no additional restrictions.
MC WHERE clause: CUS_ID IN (10,20,30)
LOV WHERE clause: CUS_ID IN (10,30)
Additional restriction: CUS_ID IN (30,40)
The module component WHERE clause applies in query mode and the LOV is
unrestricted when not in query mode.
Resultant WHERE clause on LOV (in query mode): CUS_ID IN (30,40)
Resultant WHERE clause on LOV (not in query mode): CUS_ID IN (30,40)
.
.....................................................................................................................................................
7-18 Oracle Designer 6i: Web PL/SQL Design and Generation
Controlling the Display of Lists of Values
.....................................................................................................................................................
Preference Set
Filter
List Of Values
List Of Values: Hyperlink htf.img(‘/images/button.gif’)
List Of Values: Caption for Close B
List Of Values: Caption for Find Bu
List Of Values: Frame Width 200
List Of Values: Style Invoke List Of Values In Own Window
List Of Values: Window Properties scrollbars=yes,resizable=yes,width=400,hei
Master Context
Option - Context
Popup Calendar
7-18
Hyperlink You can define the style of the hyperlink that invokes the LOV. You can
use the HTF functions to format text or to display an image (such as a button). When
the user presses the button code is generated to call the LOV.
LOV Button Captions You can specify the captions on the Close and Find buttons
inside the LOV window.
Style You can specify whether the LOV should appear in its own window or in a
specific frame.
Frame Width If the LOV is displayed in a frame, this preference defines the size of
the frame.
Window Properties You can control vertical and horizontal sizes of the displayed
LOV and whether it can be resized and scrolled.
.....................................................................................................................................................
7-19
®
Lesson 7: Building More Complex Modules
.....................................................................................................................................................
7-20
.....................................................................................................................................................
7-20 Oracle Designer 6i: Web PL/SQL Design and Generation
Updating and Inserting Multiple Records
.....................................................................................................................................................
ZONITC
ZONIBR
ZONIRC
ZONIIC SYSIMG
7-21
Ensure the module component allows insert. Set the following preferences to control
the layout of the Insert Form:
Preference Description
ZONIBR Specify the number of blank rows that appear in the form
ZONITC Specify the number of items that appear on each line
ZONIIC Define the prompt for the Insert button
ZONIRC Define the prompt for the Clear button
At the end of each row the generated Web page displays a check mark or blank, to
indicate whether or not that row will be inserted when you select Insert. A check mark
appears when you start to enter a row. It disappears if you select Clear for that row.
After entering new rows, you press the Insert button. You then see a page, which
contains:
• The number of rows that were successfully created
• A list of error messages for rows that were not created. The rows are also displayed
so that you can edit the data and resubmit it.
• Blank rows for more data entry
.....................................................................................................................................................
7-21
®
Lesson 7: Building More Complex Modules
.....................................................................................................................................................
Audio: 0RQR
Monochrome:
Check box
Classification: 3*
3*
Poplist
Value
7-22
You can use a GUI display type for an item that has a set of allowable values.
1 Open the property palette for the item.
2 Set the Display Type property of a bound item to radio group, check box, poplist
or text list.
3 Set the Show Meaning property to the appropriate value.
If an item is optional, the generator automatically creates an additional value,
Unknown.
.....................................................................................................................................................
7-22 Oracle Designer 6i: Web PL/SQL Design and Generation
Controlling User Input
.....................................................................................................................................................
7-23
You can display a foreign key column in a pop-up list or a text list. It is most useful
when:
• There are few referenced values
• The meaning of the referenced value is clear
• Your browser does not support JavaScript
To display your foreign key column as a GUI List of Values follow these steps:
1 Invoke the property dialog for the lookup item.
2 Select it for display.
3 Set the Query, Insert, and Update properties.
4 Set the display type to poplist or text list.
Technical Note
The GUI display type must be set on the lookup item, not on the base table foreign key
item. You do not display the foreign key item.
.....................................................................................................................................................
7-23
®
Lesson 7: Building More Complex Modules
.....................................................................................................................................................
Pop-Up Calendars
7-24
The Web PL/SQL Generator automatically creates a hyperlink to the right of date
items. When a user clicks the hyperlink, a calendar displays in a pop-up window.
When the user clicks on a date, the calendar window closes and displays the date in the
field.
Without the pop-up calendar, the user must enter the date value in a specific format
otherwise it is not accepted as a valid date. With the calendar, the date is automatically
displayed in the correct format.
The hyperlink is controlled by the CALBUT – Popup Calendar: Hyperlink
preference. The default value for this preference is htf.italic(‘CAL’). By changing
the value of this preference, you can change the format of the hyperlink for the pop-up
calendar. To remove the calendar link, set the preference to NULL.
You can also use the following preferences to change the layout of the calendar
window:
Preference Description
CALCBC – Caption Defines an alternative caption for the button which closes the
for Close button pop-up calendar without the user selecting a date.
CALWIN – Window Defines the properties of the pop-up calendar window: size,
properties whether the window is scrollable, resizable or has toolbars.
The default value is scrollbars=no, resizable=no, width=320,
height=350.
.....................................................................................................................................................
7-24 Oracle Designer 6i: Web PL/SQL Design and Generation
Summary
.....................................................................................................................................................
Summary
Summary
7-25
Master–Detail Modules
Modules with master–detail layouts can have the detail record list on the same page as
the master view form or on a separate page. You can also use a hyperlink to move from
the master record list directly to the detail.
Master Context
Master context information makes it easier for the user to understand the context of the
detail information.
Allowable Values
You can display allowable values using GUI display items:
• Radio groups
• Check boxes (do not appear on Query Form)
• Poplists and text lists.
Use a GUI display item for foreign key lookup columns when there are few, distinct
values.
.....................................................................................................................................................
7-25
®
Lesson 7: Building More Complex Modules
.....................................................................................................................................................
Scenario
You created the module REN0010 — Review/book a video by running the
ADT and then adding lookup table usages. Before you modify it into a useful set of
pages, you examine it to see what needs to be changed.
Your Assignment
Use the information below as your starting point:
where <nn> is the group number that your instructor has assigned to you.
1 Generate, install, and run REN0010.
a The first page to appear is the Rentals query form. Enter 10005 as the
Membership Identifier and execute the query.
b What would make the record list more useful to the customer?
c Is there any information here that the customer should not see?
2 Select rental 5015.
a How can you find out which items were rented?
b What changes would make this more usable for the customer?
c Prevent the customer seeing information related to specific employees.
.....................................................................................................................................................
7-26 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 7—2: Reducing Pages in a Master–Detail Module
.....................................................................................................................................................
Scenario
You created the module REN0010 — Review/book a video by running the
ADT. Now you must modify it into a set of pages that enable customers to review
easily the items that they have rented. One of the issues is that there are too many
pages for the customer to move through. You reduce those pages in the following
ways:
• Add context information to the record lists.
• Place the detail record list on the same page as the master view form.
• Enable the user to navigate directly from the master record list to the detail record
list.
Your Assignment
Use the information below as your starting point:
a Add a chained lookup table usage to the RENTALS module component so that
customers can see their names (rather than their membership number).
.....................................................................................................................................................
7-27
®
Lesson 7: Building More Complex Modules
.....................................................................................................................................................
Add context items to the RENTALS module component so that customers can
b
see their names, rental dates, and rental numbers on the record list. Ensure that
the names are in the first item group.
c Add a chained lookup table usage to the RENTAL_ITEMS module component
so that the customer can see detailed information about the title.
d Add context items to the RENTAL_ITEMS module component so that the
customer can see the line number, price, period, and title on the record list.
e Generate, install, and run module REN0010. Check that the customer cannot
see the employee information.
2 Ensure that the Rental Items information appears on the Rentals view form.
a Make all items on the RENTAL_ITEMS module component nonqueryable.
b Generate, install, and run module REN0010. Navigate to the Rentals view
form. Is the Rental Items record list visible?
c What is the advantage of having the detail record list on the same page as the
master view form?
d Under what circumstances might you opt to have the detail record list on a
separate page?
3 Enable navigation directly to the detail record list from the master record list.
a Find out which generator preference you must alter.
b Set the preference for the RENTALS module component.
c Generate, install, and run module REN0010. What difference do you notice
on the record list of the master component?
d What would you expect to see if module REN0010 had two detail module
components?
.....................................................................................................................................................
7-28 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 7—3: Adding Contextual Information
.....................................................................................................................................................
Scenario
The detail record pages of REN0010 — Review/book a video would be more
useful to the customer if they showed the information from the master record. You add
this information to the detail record list as a simple line and to the insert page in a more
complex fashion.
Your Assignment
Use the information below as your starting point:
1 Set the appropriate Master Context preference to make the information available.
2 Set the Top of Record List user text for the RENTAL_ITEMS module component.
Refer to one or more of the master context items by item name.
3 Generate, install, and run module REN0010. You should be able to see your user
text string when you navigate to the Rental Items record list.
4 Click the New button to see the Insert page. Why does the context information not
appear here?
5 Specify that master context information should be displayed by a display package.
a Set the appropriate Master Context preference to the name of the package
(WSGMC_OUTPUT2).
b Set the appropriate Master Context preference to suppress the use of the
package on the Record List.
6 Generate, install, and run module REN0010. Navigate to the Rental Items insert
page. You should see the Rentals context items at the top of the page with an arrow
showing the link to Rental Items.
.....................................................................................................................................................
7-29
®
Lesson 7: Building More Complex Modules
.....................................................................................................................................................
Scenario
Currently, if they want to create new records in the module, users must know
information such as the membership identifier. You must implement suitable Lists of
Values to make the data entry process easier.
Your Assignment
Use the information below as your starting point:
1 Run the Default Lists of Values utility for the REN0010 module.
a What LOV components are created?
b With which items are the LOV components associated?
2 Generate, install and run the module.
a Click a name in the record list to see the Rentals view form. Why can you not
see an LOV link here?
b Click the New button. Click the LOV link for the Membership number to see
the list of customers. Notice that the list shows organizations as well as
individuals.
3 Add a validation where clause to restrict the MBP_LOV to showing only
individual customers.
4 The list of titles in the CPY_LOV component could be very long. Enable the
customer to enter a condition that reduces the number of titles returned. Generate,
install, and run the module.
a Navigate to the Rental Items record list. Click the New button.
b Click the LOV link. Enter S% as the search criterion for Title.
c Click OK. Do you only see titles starting with S?
5 What problem do you see with this list of titles? Why does it occur?
6 Add a restriction to the association for the CPY_LOV component to ensure that
only available titles are returned.
7 Ensure that each title is returned only once:
a Add an SQL Aggregate unbound item called FIRST_COPY that returns the
minimum copy id.
b Remove all items from the L_CPY table usage.
.....................................................................................................................................................
7-30 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 7—4: Adding Lists of Values
.....................................................................................................................................................
Change the return list on the association to return values into the copy id, the
c
rental period, the price and the title.
8 Use the generator preferences to invoke the LOV from a button rather than a
hyperlink. (The lov.gif file in your directory contains a suitable image.)
9 Generate, install, and run the module.
.....................................................................................................................................................
7-31
®
Lesson 7: Building More Complex Modules
.....................................................................................................................................................
Scenario
A current frustration with the Web pages is that users must insert and commit each
rental item separately. The developers have decided that you should create a multiple
record insert form for rental items.
Your Assignment
Use the information below as your starting point:
.....................................................................................................................................................
7-32 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 7—6: Using Default Values and Calendars
.....................................................................................................................................................
Scenario
When an employee records a rental for a customer, the employee’s identifier is
inserted into the record. In the Web application, there is no employee involved,
however the column is mandatory and you must insert a valid value.
A calendar link is automatically generated for all date items in a Web PL/SQL module.
You investigate how the usability of the application is affected without it.
Your Assignment
Use the information below as your starting point:
.....................................................................................................................................................
7-33
®
Lesson 7: Building More Complex Modules
.....................................................................................................................................................
6 Use the generator preferences to invoke the calendar from a button rather than a
hyperlink. (The cal.gif file in your directory contains a suitable image.)
7 Generate, install and run the module. Navigate to the insert form to see your
changes.
.....................................................................................................................................................
7-34 Oracle Designer 6i: Web PL/SQL Design and Generation
Hints
.....................................................................................................................................................
Hints
Practice 7—1
There are no hints for this practice.
Practice 7—2
To perform this task Follow these steps
To add a chained 1 In the module diagram, click Create Table Usages.
lookup table usage 2 Click to the right of the initial lookup usage.
3 In the dialog, select the lookup table.
4 Select the required columns.
5 Click Finish.
To specify context 1 In the Navigator, select the items.
items 2 Invoke the Property Palette.
3 Set the Context? property to Yes.
To make items 1 In the Navigator, select the items.
nonqueryable 2 Invoke the Property Palette.
3 Set the Query? property to No.
To allow navigation 1 Open the Web PL/SQL Generator Preferences Navigator.
from a master record 2 Alter preference ZONLDL – Record List: Add
list directly to a detail hyperlinks to Record List to Yes.
record list
Practice 7—3
To perform this task Follow these steps
To make master 1 Open the Web PL/SQL Generator Preferences Navigator.
context information 2 Set the MCNMDP – Master Context: Maintain
available context to this depth preference to the appropriate
value.
To use a display 1 Open the Web PL/SQL Generator Preferences Navigator.
package to display 2 Set the MCNDPK – Master Context: Display package
master context preference to the name of the display package.
information
To specify the pages 1 Open the Web PL/SQL Generator Preferences Navigator.
on which to display 2 Set the MCNFRM – Master Context: Forms requiring
master context context preference to the appropriate value.
information
.....................................................................................................................................................
7-35
®
Lesson 7: Building More Complex Modules
.....................................................................................................................................................
Practice 7—4
To do this task Follow these steps
To run the Default 1 Select the module.
Lists of Values utility 2 Select Utilities—>Default Lists of Values from the menu.
To enable entry of a 1 Select the LOV association.
condition to an LOV 2 Invoke the Properties Palette.
3 Click the Usage tab.
4 Select Filter Before Display?.
To restrict the rows 1 Select the LOV association.
returned in an LOV 2 Invoke the Properties Palette.
3 Click the Additional Restriction tab.
4 Enter a condition.
To use a button to 1 Open the Web PL/SQL Generator Preferences Navigator.
invoke an LOV 2 Set the LOVBUT – List Of Values: Hyperlink
preference to call the HTF.IMG function with the appropriate
parameters.
Practice 7—5
To do this task Follow these steps
To specify the 1 Open the Web PL/SQL Generator Preferences Navigator.
number of blank rows 2 Set the ZONIBR preference to the appropriate number.
on the insert form
To specify the 1 Open the Web PL/SQL Generator Preferences Navigator.
number of items per 2 Set the ZONITC preference to the appropriate number.
line
Practice 7—6
To perform this task Follow these steps
To set a default value 1 Select the item in the navigator or diagram.
for an item 2 Open the property dialog.
3 On the Definition tab, enter the default value.
4 Click the Finish button.
To switch off the pop- 1 Open the Web PL/SQL Generator Preferences Navigator.
up calendar 2 Set the CALBUT – Popup Calendar: Hyperlink
preference to NULL.
To use a button to 1 Open the Web PL/SQL Generator Preferences Navigator.
invoke a calendar 2 Set the CALBUT – Popup Calendar: Hyperlink
preference to call the HTF.IMG function with the appropriate
parameters.
.....................................................................................................................................................
7-36 Oracle Designer 6i: Web PL/SQL Design and Generation
Instructor Notes
.....................................................................................................................................................
Instructor Notes
Schedule
77 Timing Topic
B u ild in g M ore C om p lex M o du les 60 minutes Lesson
60 minutes Practice
120 minutes Total
Class Management
O verview
In this lesson you discuss master–detail
•
•
H o w d o I b u ild a m aster–d etail m o d u le?
H o w d o I p ro vid e d ata en try h elp to th e u s er?
modules. The lesson starts with a practice.
• C an I in sert an d u p d ate m u ltip le reco rd s?
• H o w d o I co n tro l w h at a u ser e nters?
• C an I u se a c alen d ar to p op u la te a d ate ite m ? Practice 7—1
The students run the “raw” master–detail
module that the ADT created in lesson 4 so
7-2
that they can get a feel for the problem.
Class Management
M aster–D etail L ayou t
M aste r You could do this section on the board. Draw
• R eco rd L ist:
– M aster
the module for people and their rentals. Draw a
– D e tail
diagram to illustrate the rental details on a
• D etail R eco rd L ist:
– O n sep arate p ag e separate page and on the same page. The
– O n m aste r V iew F orm
following two slides do the same.
D etail
7-4
Class Management
D etail o n S ep arate P age
P age heade r If the detail module component can be queried,
T itle
V iew form you do not have a choice about the placement
D etail hyperlink
P age footer
of the Record List—it is on a separate page.
P age header
T itle
1 Talk about the display, windows, and so on.
R ecord list
2 Discuss the different pages.
P age footer
7-5
3 Point out the hypertext links.
Demo
Using the display view, place the two module components in separate windows.
Your Les07 work area contains a version of the module (PAGE_RL) with the
components in separate windows. Show the generated version of this module
(page$.startup).
.....................................................................................................................................................
7-37
®
Lesson 7: Building More Complex Modules
.....................................................................................................................................................
Demo
D etail on S am e Pag e
P age header
Your Les07 work area contains a version of the
M aster Title
V iew form
module (MASTER_RL.*) with the detail record
list on the master view form.
R e cord list
7-6
Class Management
M aster–D etail N avigatio n
Title Links to D etail
Draw a master with two details on the board, to
H elp R ecord List
illustrate the module structure that would
C ol 1 C ol 2 C ol 3 D E TA IL D E TA IL
7-7
Class Management
D isplayin g M aster C on text
W ork G roup 20
C lient S ide G enerators
O racle D esigner
TV P
Em p loyees PS E
12-M ar-1990
G riffith s
R equests
Requester’s
Com m ent::
Start D ate:
End D ate: to:
Half D ay:
Find C lear N ew
7-8
Class Management
L O V S tru ctu res
M odule com po nent LO V com ponent
LO V
association
LO V
inclusion
7-9
.....................................................................................................................................................
7-38 Oracle Designer 6i: Web PL/SQL Design and Generation
Instructor Notes
.....................................................................................................................................................
Class Management
LO V Inclusio ns
• A re asso ciated w ith u p to o n e bo u n d o r u n bo u nd
Unassociated inclusions are important to
•
item
M ay b e u sed for Q u ery a n d D ata E n try
ensure that an LOV is not deleted by accident:
•
•
C an h a ve an A d d itio n al R estrictio n claus e
C an h a ve a retu rn list
when you delete the last association, the LOV
<U nassociate d>
R TL_LO V is also deleted.
R TL_ID
A _M C .R TL_ID R TL_D A TE
7-10
Class Management
U sing th e D efault L O V U tility
U tilities G ene rate
G roup Item s...
R em ove From G roup...
R esequence...
D efault Lis t O f V alues U tility
C opy O bject... C on text objec t for w hich Lists o f V alues w ill b e created
C opy W ith new Language M o dule R E N 0010 (W G _H O LLY W O O D )
Force D elete...
M ap U nbound Item s á U se R e usa ble Lists of V alu es
T o u se R eus able L ists of Va lu es from o uts id e th e co ntain er of the
co ntex t o bjec t, s pe cify the se arch p ath in th e A dd itio na l C o nta iners
D efault Links… field b elow .
Ad ditiona l
D efault Lists of Values... Co ntaine rs
B ro w se...
Validate
á R eus e existin g Lists o f V alues defined w ithin th e m o du le.
7-11
Class Management
H o w D o es the U tility W o rk?
A _M C
# R E _R N T_FK R T L_ID
#
* R T L_ID R T L_LO V
*
* LIN E _N O R T L_D A TE
* R T L_P E R IO D
Look up usage
LOV LO V
a ssociation com ponent
R TL_LO V
LO V
A _M C .R TL_ID R T L_ID
inclusion
R T L_D A TE
7-12
Class Management
A ssociating an L O V w ith an Item
R TL_LO V
<U nassocia ted>
R TL_ID
A _M C .R TL _ID R TL_D A TE
R IM .L IN E_N O
R IM .R TL_P E R IO D
R IM .R TL_ID
7-13
.....................................................................................................................................................
7-39
®
Lesson 7: Building More Complex Modules
.....................................................................................................................................................
Class Management
Ed iting an L O V
E dit L ist of V alues R TL_LO V in H O LLY W O O D
Demonstrate the changes that you can make in
N am e S ize P lace m ent U sage R eturn L ist A dditional R estriction
asso ciated w ith an item w ithin a m o du le com po nent. The se o ptio ns can
the Edit LOV dialog.
be set h ere.
U sed F or
Q ue ry and D ata E ntry F ilte r B efo re D is p lay?
Q ue ry
Q ue ry and D ata E ntry
Data E ntry
R IM .LIN E _N O
R IM .RT L_P E R IO D
R IM .RT L_ID
T itle O verrid e
7-14
Class Management
M app in g the R eturn L ist
D e fau lt
• L O V attach ed to F K
• L O V base tab le = F K ta b le
R eturn L ist
M an u al
• M ap m o du le
com p o nen t item
R E .R T L _ID = L O V .ID
to L O V item
7-15
Class Management
R estrictin g th e V alues in the L O V
The following slide is not reproduced in the
L o o ku p
student notes. Instead, there is a page showing
tab le
u sag e the cumulative effect of WHERE clauses.
LOV
S p e cific co m po n en t
asso ciatio n
7-16
• L O V com p o nen t
cus_id (10,30)
• S p ec ific a ssociatio n
(30,40)
WH
WHER
ER EE (( (:
(
(:SYS
:SYS
SYSTTE
EM.M
M.MOD
M.MO
ODDE
E == ‘‘E
‘EN
ENTER
NTER
TER--QQUER
UERY’
UERY
Y’’)
)
AAND
ND ((C
CUS_
US_ID
US_I
IDD IN
I N ((10
10,2
,30)
0,3) 0)
0))
OR
OR (AND
(NOT
NOT (C
:SYS
: US_ID
SYST
TEEM.
M.MOD
INMOD(E10,3
E == ‘E
0))
‘ EN
NTER
TER-
-QQUE
UERY’
RY’))
OR (NOT
--no
--n o :res
SYSTE
rest
trric
ictio
M. MODE
tionsns = ‘ EN TER-Q UE RY’ )
)) --n o restr ic tion s
A ND CUS_
) ID IN (30 ,40 )
7-17
.....................................................................................................................................................
7-40 Oracle Designer 6i: Web PL/SQL Design and Generation
Instructor Notes
.....................................................................................................................................................
Class Management
LO V Preferen ces
Demonstrate the use of the preferences.
G enerator P refere nces: M odu le - R EN 0010 (H O L LY W O O D )
P rod uct P L/S Q L W eb G enerato r
P referen ce S et
Filter
L ist O f V alues
L ist O f V alue s: Hyperlin k h tf.im g(‘/im ages/bu tto n.g if’)
L ist O f V alue s: Caption for C lo se B
L ist O f V alue s: Caption for F ind B u
L ist O f V alue s: Fram e W id th 200
L ist O f V alue s: S tyle Invoke List O f V alues In O w n W indow
L ist O f V alue s: W in dow P rop erties scro llb ars=yes,resizab le=yes,w id th=400,hei
M aster Co ntext
O ptio n - C ontext
P o pu p C alenda r
7-18
Class Management
M ultip le R ecord D M L
Stress that the update and delete page is
separate from the insert page. As such, the
properties are dealt with separately.
7-20
Class Management
M ultip le R ow Inserts
Z O N ITC
ZO N IB R
ZO N IR C
ZO N IIC S Y S IM G
7-21
Class Management
U sing G U I D isplay Types
A ud io: 0 RQR
R adio g roup 6WHUHR
6XUURXQG
6RXQG M ea ning
M onochrom e:
C heck box
C lassification: 3*
3*
P oplist
V alue
7-22
.....................................................................................................................................................
7-41
®
Lesson 7: Building More Complex Modules
.....................................................................................................................................................
Class Management
D isplaying F oreign K eys as G U I Item s
• P o plist on lo o ku p co lum n
M anager’s N am e: (1 5 ,* + 7
9$ /(1 7,1 2
(15 ,* + 7
: ,/'(0 $ 1 1
7-23
Class Management
Po p-U p C alend ars
7-24
Class Management
S um m ary
7-25
Practices
If the students get a runtime error that refers to WSGL.LayoutData, ensure that the
NO_OF_RENTALS unbound item is in the same item group as MBP_IDENTIFIER.
Practice 7—3 The students the CG_INTO.GIF file for the arrow image used by the
display package.
Practice 7—4 If the Default Lists of Values utility cannot find a suitable bound
item, ensure that MBP_IDENTIFIER and CPY_ID are enterable and displayed.
Calls to the HTF.IMG function can specify various parameters:
htf.img (file, alignment, alt_text, image_map, html_attributes)
.....................................................................................................................................................
7-42 Oracle Designer 6i: Web PL/SQL Design and Generation
Instructor Post Lesson Teaching Evaluation
.....................................................................................................................................................
Course Name: Oracle Designer 6i: Web PL/SQL Design and Generation
Lesson number: 7
Number of teaches before filling this form: 1 - 2 - 3 to 5 - >5
Detail comments
Content type: Slide - Text - Practice - Instructor notes
Note: 1:needs animation - 2:too much animation - 3:needs more text - 4:too much text
- 5:Unclear - 6:not necessary - 7:Other
Content Page
Note Comments/Suggestions
Type Number
Photocopy this page and fax to: Oracle Designer Curriculum Development @ +(44) 118.924.5181
Additional sheets are available at the end of the instructor’s guide.
If you draw additional diagrams on the white board use the Graphic sheet in the Instructor Evaluation
section at the end of this book.
.....................................................................................................................................................
7-43
®
Lesson 7: Building More Complex Modules
.....................................................................................................................................................
.....................................................................................................................................................
7-44 Oracle Designer 6i: Web PL/SQL Design and Generation
Suggested Graphics
.....................................................................................................................................................
Suggested Graphics
Instructor name: Full email:
.....................................................................................................................................................
7-45
®
Lesson 7: Building More Complex Modules
.....................................................................................................................................................
fold here
.....................................................................................................................................................
7-46 Oracle Designer 6i: Web PL/SQL Design and Generation
8
.................................
Introduction
You can add more functionality to your modules by defining application logic, in the
form of event code segments or named routines. In this lesson, you learn about
defining application logic and how to choose whether to implement your application
logic as PL/SQL on the server or as JavaScript in the client browser.
You also learn how to define unbound items and how to use Java applets in
Web PL/SQL modules.
Schedule
Overview See Page 34
8-2
.....................................................................................................................................................
8-2 Oracle Designer 6i: Web PL/SQL Design and Generation
Introduction
.....................................................................................................................................................
Objectives
At the end of this lesson you should be able to do the following:
• Enforce business rules on the client using JavaScript.
• Enforce business rules on the server using PL/SQL.
• Populate unbound items.
• Use a Java applet in a Web PL/SQL module.
.....................................................................................................................................................
®
8-3
Lesson 8: Defining Application Logic in the Repository
.....................................................................................................................................................
Browser:
http:// Modified Event Code
WSGL Generator
Event Code
Named
Routines
8-4
Library application logic This comprises the Web PL/SQL Generator library,
which you installed in the application user account or a library account before
generating your modules. This code is not held in the repository.
Generated application logic This comprises the event code segments and named
routines created by the Web PL/SQL Generator. They are not held in the repository;
they are PL/SQL packages installed in the application user database account. If a
module is generated again, the existing code is overwritten.
User application logic This comprises event code segments and named routines
that you define in the repository. You can add application logic to modules, module
components and items using the Design Editor.
This lesson discusses user application logic.
.....................................................................................................................................................
8-4 Oracle Designer 6i: Web PL/SQL Design and Generation
Understanding Application Logic
.....................................................................................................................................................
PL/SQL or JavaScript?
About this Slide
What Languages Can I Use? See Page 35
Module
PL/SQL TITLES
8 SUPPLIERS
Module
Component
Browser:
http://
COPIES PRICE
JavaScript LEVEL
Hollywood
Item
8-5
PL/SQL runs on the server, in the database. You should use it when you need to access
data in the database or use the facilities of PL/SQL. You may not write application
logic at the item level in PL/SQL.
JavaScript runs in the client browser and gives access to a series of native routines that
provide, for example, alert messages and confirmation request dialog boxes. If the
browser running the generated Web PL/SQL application does not support JavaScript,
you cannot access these features. As it runs in the client, JavaScript gives an
immediate response. You should use it to carry out processing that should take place
before querying the database or before attempting to insert, update, or delete records.
You may not write application logic at the module level in JavaScript.
Network Considerations
If you execute application logic on the server, you increase network traffic. Because
server-side event code involves a network call, it cannot respond immediately to user
entry.
If you execute application logic in the client, you reduce network traffic but increase
the amount of processing which the client carries out. As client-side event code is
embedded in the HTML page, response is immediate.
.....................................................................................................................................................
®
8-5
Lesson 8: Defining Application Logic in the Repository
.....................................................................................................................................................
Events
Events automatically fire at a particular point during processing. You can define
PL/SQL event code to run on the server and JavaScript event code to run in the client.
Demo
What Is an Event? See Page 35
8 PL/SQL PreInsert
curr_val.return_date :=
sysdate + curr_val.rental_period;
Browser:
http:// Event Code
JavaScript OnClick
Hollywood
window.open(“http://www.oracle.com”)
8-6
Executing Events
The module executes item-level events first, then module component-level events, and
finally module-level events.
.....................................................................................................................................................
8-6 Oracle Designer 6i: Web PL/SQL Design and Generation
Events
.....................................................................................................................................................
Server-Side Events
Events are not native to the PL/SQL language but the generator creates a pseudo-event
in the package body for each module component.
About this Slide
PL/SQL Events See Page 35
8-7
Pseudo PL/SQL Events Each pseudo-event is a procedure or function stub that acts
as a placeholder. When you define a PL/SQL event in the repository, the generator
adds your event code segment to the appropriate PL/SQL pseudo event. The generator
recognizes the following server-side pseudo-events at the module component level:
.....................................................................................................................................................
®
8-7
Lesson 8: Defining Application Logic in the Repository
.....................................................................................................................................................
.....................................................................................................................................................
8-8 Oracle Designer 6i: Web PL/SQL Design and Generation
Events
.....................................................................................................................................................
Client-Side Events
Events are native to the JavaScript language. The generator adds the JavaScript event
code to a PL/SQL procedure in the module component package body, using functions
and procedures from the Toolkit and WSGL.
About this Slide
JavaScript Events See Page 35
8-8
JavaScript Events The JavaScript language defines a number of events for each
screen item. Whenever a particular event occurs in relation to a particular item, the
browser executes any JavaScript defined for that event.
.....................................................................................................................................................
®
8-9
Lesson 8: Defining Application Logic in the Repository
.....................................................................................................................................................
Within your code you can call native JavaScript functions and procedures, custom
named routines, or functions and procedures in the JavaScript library (WSGJSL).
Location of JavaScript Code The Target Location defines the procedure in which
your JavaScript event code segment appears and the page on which the event executes.
Any code added to the view form is also added to the insert form. However, you can
use a JavaScript variable (FormType) to distinguish the insert and view forms if you
require.
If you want a piece of code to execute when the value of a particular item changes, you
add the code segment to that item’s OnChange event and define the Target Location as
View/Insert Form. When the user changes the value of the item, the browser executes
the OnChange event and your application logic takes effect (along with any generated
application logic for that event).
.....................................................................................................................................................
8-10 Oracle Designer 6i: Web PL/SQL Design and Generation
Defining an Event Code Segment
.....................................................................................................................................................
8-9
1 In the Navigator, select the Application Logic node for the appropriate element
(module, module component or item).
2 Select the Events node.
3 Click Create.
4 Select the event to which you want to add code and click Next. (You only see
events that are applicable to the selected element.)
5 Enter a Name for the event code segment.
6 Use the Up and Down arrows to define the sequence of the custom code. You can
place your event code segment amongst other code segments for the same event.
7 For a client-side event, use the Target Location property to define the HTML
document in which the generator adds the event code.
You can define different actions on each generated page—query form, record list,
view form, and insert form—for any one item.
8 Click Next and then select Create the definition and open the Logic Editor.
The Logic Editor window and a construct tree for the appropriate language
(PL/SQL or JavaScript) appear.
9 Enter the code for the selected event using the Logic Editor.
.....................................................................................................................................................
®
8-11
Lesson 8: Defining Application Logic in the Repository
.....................................................................................................................................................
8-10
.....................................................................................................................................................
8-12 Oracle Designer 6i: Web PL/SQL Design and Generation
Using the Logic Editor
.....................................................................................................................................................
.....................................................................................................................................................
®
8-13
Lesson 8: Defining Application Logic in the Repository
.....................................................................................................................................................
Named Routines
A named routine is any complete procedure or function that you include in a module.
Named routines do not execute automatically; you call them from event code
segments. Typically, multiple events call the same named routine to avoid duplicating
code in each event.
About this
Looking at Named Routines Slide
See Page 36
PL/SQL PROCEDURE
check_mgr_id IS
Events
Named Routines
check_mgr_id
function check_mgr_id {
JavaScript }
8-11
.....................................................................................................................................................
8-14 Oracle Designer 6i: Web PL/SQL Design and Generation
Named Routines
.....................................................................................................................................................
No Target
8-13
1 In the Navigator, select the Application Logic node for the appropriate element
(module component or module).
2 Select the Named Routines node.
3 Click Create.
4 Enter a Name for the routine.
5 For a client-side named routine:
a Set the Language of the routine to JavaScript.
b Enter the Target Location. This information is used in the same way for both
event code and named routines.
For a server-side named routine:
a Set the Language of the routine to PL/SQL.
b Choose whether it is Public or Private.
If you make a named routine public, its declaration appears in the package
specification and its implementation in the package body. If you declare it as
private, both its declaration and its implementation appear in the package body.
Procedures and functions outside the package can call public named routines.
Only procedures and functions in the same package can call a private named
routine.
6 Click Next and then select Create the definition and open the Logic Editor.
The Logic Editor window and a construct tree for the appropriate language
(PL/SQL or JavaScript) appear.
7 Enter the code for the selected event using the Logic Editor.
.....................................................................................................................................................
®
8-15
Lesson 8: Defining Application Logic in the Repository
.....................................................................................................................................................
.....................................................................................................................................................
8-16 Oracle Designer 6i: Web PL/SQL Design and Generation
Defining Custom Items
.....................................................................................................................................................
About this
Defining Custom Items Slide
See Page 37
Rental Window
Rentals
Unbound
item
Custom...
Link to...
Hyperlink text or
image
8-14
Action Items
Action items in Web PL/SQL applications are used to:
• Navigate to a specific module or module component.
• Execute code defined for an event.
Action items can be displayed as buttons, hyperlink text or hyperlink images. They are
discussed further in the last lesson.
Unbound Items
Unbound items can be used to record the an item whose value cannot be derived from
a single column.
The Web PL/SQL Generator supports unbound items that derive their values from:
• An SQL expression
• A server-side function
• A client-side function
The Web PL/SQL Generator also supports custom unbound items, which execute user-
defined code on an event.
.....................................................................................................................................................
®
8-17
Lesson 8: Defining Application Logic in the Repository
.....................................................................................................................................................
SQL
Derivation Text round .....
calculate...
8-15
The Derivation Text property defines the calculation that provides the value. A derived
value appears in the unbound item when the module queries the database. The
unbound item appears as read-only text. If a value within the derivation expression
changes, the module can calculate the new value either on the client or the server.
Client-Side Derivation
If the Web PL/SQL Generator can translate the SQL expression to JavaScript and the
client browser supports JavaScript, you can calculate derived values within the
browser. This enables you to calculate and display dynamically the derived value
during data entry (before the record is submitted to the server). A JavaScript
OnChange event recalculates and displays the new value of the derived field
whenever a value within the derivation expression changes.
Values are derived in the browser if the following conditions hold:
• All SQL functions, keywords and operators that you use in the derivation
expression are supported by the generator.
Note: The generator cannot convert SQL date functions to JavaScript.
• All items that you reference within the SQL expression appear on the HTML
document where you require the dynamic calculation.
• The ZONVEC – Derive Expressions In Client preference is set to
Yes.
.....................................................................................................................................................
8-18 Oracle Designer 6i: Web PL/SQL Design and Generation
Deriving a Value from an SQL Expression
.....................................................................................................................................................
Server-Side Derivation
If the browser does not support JavaScript or an SQL function, keyword, or operator
that you use within the SQL Expression is not supported by the Web PL/SQL
Generator, the derivation expression calculations can only take place on the server.
This means that you only see changes to derived fields after you refresh a record.
.....................................................................................................................................................
®
8-19
Lesson 8: Defining Application Logic in the Repository
.....................................................................................................................................................
Name TOTAL_PRICE
Unbound Type Server Side Function
SQL
Derivation Text htf.hr(...
calculate...
htf.hr(cattributes=>‘WIDTH = 500’)
8-16
The Derivation Text property specifies the name of the PL/SQL function and its
parameters. The derivation calculation can only take place on the server, so you only
see changes to derived fields after you refresh a record. You can use custom PL/SQL
functions or procedures that you defined in the repository as named routines to
populate values for a server-side function unbound item. You can also use any other
PL/SQL function or procedure that the application can access.
Example The Web PL/SQL Generator can only use item groups on the record list.
However, you can use a server-side unbound item to place horizontal lines on other
pages and partition them into functional areas.
Create a server-side unbound item, LINE1, and set the Derivation Text as:
htf.hr(cattributes=>’WIDTH = 500’)
This calls the HR Toolkit function and tells it to draw a line that is 500 pixels wide.
You can use the Display Sequence property of the unbound item LINE1 to place the
horizontal line exactly where you want it. If you create several unbound items and
populate them in this way, you can divide your page into horizontal blocks.
.....................................................................................................................................................
8-20 Oracle Designer 6i: Web PL/SQL Design and Generation
Deriving a Value from a Function
.....................................................................................................................................................
Name TOTAL_PRICE
Unbound Type Client Side Function
SQL
Derivation Text calculate...
calculate...
calculate_client_price ()
8-17
The JavaScript function calculates the derived value dynamically during data entry.
You can set the OnChange events for each value within the function to recalculate the
derived item if that value changes. You can use custom JavaScript functions that you
defined in the repository as named routines to populate values for client-side function
unbound items.
.....................................................................................................................................................
®
8-21
Lesson 8: Defining Application Logic in the Repository
.....................................................................................................................................................
8-18
An applet is a Java application that runs in a Web page. There is a wide variety of
applets available, so you can often find an applet that fulfills a specific need and that
you can plug in as a reusable object.
There are two ways in which you can run Java applets in a Web PL/SQL application:
• Embed the <APPLET> tag in the user text areas of the generated pages.
• Write a custom PL/SQL function that returns the appropriate HTML for the applet.
You can call the function from
– The user text areas of the generated pages.
– The derivation text of an unbound item.
.....................................................................................................................................................
8-22 Oracle Designer 6i: Web PL/SQL Design and Generation
Embedding Java in a Web PL/SQL Application
.....................................................................................................................................................
User text
8-19
You can call an applet by embedding the HTML <APPLET> tag in any of the areas in
which you can place user help text. You can place an applet at the module level on the
startup or about pages.
You can place a module component level applet on the record list, view form, query
form or insert form. The applet can only appear where user text appears.
If you place an applet on the record list, the applet starts when you navigate to that
page. If you leave the record list page or the applet scrolls off the screen, the applet
stops. It resumes when the applet becomes visible once mo
re.
The above code tells the browser to execute an applet called myApplet.class in
an area of 500 by 100 pixels.
In the absence of other information, the browser assumes that it can find the applet in
the same directory as the current document. You can specify the location of the applet
using the CODEBASE attribute.
.....................................................................................................................................................
®
8-23
Lesson 8: Defining Application Logic in the Repository
.....................................................................................................................................................
The CODEBASE attribute can be an absolute URL or a relative one, which the
browser interprets as relative to the URL of the current document. Using an absolute
URL, the browser can load an applet from a different HTTP server.
You can pass parameters to an applet by using the <PARAM> tag. The exact
parameters that you can set depend on the applet’s code. Applets use a method called
getParameter() to read the <PARAM> tag and extract the information.
.....................................................................................................................................................
8-24 Oracle Designer 6i: Web PL/SQL Design and Generation
Embedding Java in a Web PL/SQL Application
.....................................................................................................................................................
REN070
Arguments
Module Components Server-side
function
EMP_MC
Table Usages
Unbound Items
abc SHOW_APPLET
DERIVATION TEXT:
myPackage.ShowMyApplet()
8-20
You can place a call to your custom PL/SQL function in the user text areas of any of
your generated pages. You must remember to include the name of the package which
contains your custom PL/SQL function in the PKGLST - PL/SQL Package
List preference.
In order to use an unbound item to display an applet, you must add a call to your
custom PL/SQL function in the Derivation Text of the unbound item. The advantage
of this approach is that you can place an applet anywhere on a generated page using
the Display Sequence property of the unbound item. In addition, if you want to change
the applet, you need only change the PL/SQL function. You do not have to re-generate
the module.
.....................................................................................................................................................
®
8-25
Lesson 8: Defining Application Logic in the Repository
.....................................................................................................................................................
r_string VARCHAR2(2000);
BEGIN
r_string := htf.appletopen(’myAppletText.class’,250,
60, ’CODEBASE=/java/’);
r_string := r_string || htf.param(’paraA’,the_text);
r_string := r_string || htf.appletclose;
return r_string;
END;
The example above creates the HTML to call an applet called myApplet.class
from a virtual directory /java/.
If you place the following function call in the derivation text of an unbound item:
ShowMyApplet(“this is a string”)
.....................................................................................................................................................
8-26 Oracle Designer 6i: Web PL/SQL Design and Generation
Summary
.....................................................................................................................................................
Summary
Summary
8-21
Unbound Items
• SQL expressions can be evaluated on the client if the generator supports the
conversion of SQL functions into JavaScript, otherwise they are evaluated in the
server.
• Server-side functions use PL/SQL named routines or any accessible
PL/SQL function or procedure.
• Client-side functions use JavaScript named routines.
• You can also use unbound items to display custom items.
Java Applets
You can embed Java applets in Web PL/SQL applications as user text or custom
functions.
.....................................................................................................................................................
®
8-27
Lesson 8: Defining Application Logic in the Repository
.....................................................................................................................................................
Scenario
When a customer changes their personal details, they need to have the option to cancel
their changes at the point they save them to the database. You need to create an event
to display an alert allowing the customer to cancel the changes if necessary.
Your Assignment
Use the information below as your starting point:
where <nn> is the group number that your instructor has assigned to you.
1 In the Navigator, create a client-side Validate event called Confirm_Changes
for the CUS_RMC reusable module component.
2 Use the Logic Editor to enter JavaScript code that displays an alert when the
customer clicks the Update button on the view form. Enter the code, as outlined in
the following sample, from the file les08_1.txt, in your working directory:
if (!confirm("Are you sure you want to save these changes?"))
{
alert("Update cancelled")
return false
}
else
{
alert("Processing Update...")
return true
}
.....................................................................................................................................................
8-28 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 8—1: Adding Client-Side Event Code
.....................................................................................................................................................
.....................................................................................................................................................
®
8-29
Lesson 8: Defining Application Logic in the Repository
.....................................................................................................................................................
Scenario
The return date for a rental item is derived by adding the rental period to today’s date.
You need to create an named routine to derive the return date and call the routine from
an event.
Your Assignment
Use the information below as your starting point:
1 In the Navigator, create a PL/SQL named routine called Set_Return_Date for the
RENTAL_ITEMS module component.
2 Use the Logic Editor to enter PL/SQL code that derives the return date of a rented
item:
PROCEDURE Set_Return_Date IS
BEGIN
curr_val.return_date := sysdate + curr_val.rental_period;
END;
.....................................................................................................................................................
8-30 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 8—3: Populating an Unbound Item
.....................................................................................................................................................
Scenario
Developers would like the customer name to appear as context information. You need
to create an unbound item to display the entire customer name as a single value.
Your Assignment
Use the information below as your starting point:
.....................................................................................................................................................
®
8-31
Lesson 8: Defining Application Logic in the Repository
.....................................................................................................................................................
Hints
Practice 8—1
To perform this task Follow these steps
To create a client-side 1 In the Navigator, select the object (module or reusable module
event component) to which you want to add the event.
2 Expand the Application Logic node and select Events.
3 Click Create.
4 Select the required event and click Next.
5 Click Add and enter a name for the event code segment.
6 Set the Target Location.
7 Set the Language to JavaScript.
8 Set the sequence of the event code segment.
9 Click Finish.
To add application 1 Select the event.
logic to an event 2 Select Edit—>Logic....
3 Enter the code.
4 Click the Save button.
Practice 8—2
To perform this task Follow these steps
To create a server- 1 Select the object to which you want to add the routine.
side named routine 2 Select Named Routines.
3 Click Create.
4 Enter a name for the routine.
5 Set the Language to PL/SQL and set the Scope.
6 Click Finish.
To add application 1 Select the Named Routines node.
logic to a named 2 Select Edit—>Logic....
routine 3 Enter the code.
4 Click the Save button.
To create a server- 1 In the Navigator, select the object (module or reusable module
side event component) to which you want to add the event.
2 Expand the Application Logic node and select Events.
3 Click Create.
4 Select the required event and click Next.
5 Click Add and enter a name for the event code segment.
6 Set the Language to PL/SQL and set the Scope.
7 Set the sequence of the event code segment.
8 Click Finish.
.....................................................................................................................................................
8-32 Oracle Designer 6i: Web PL/SQL Design and Generation
Hints
.....................................................................................................................................................
Practice 8—3
To perform this task Follow these steps
To create an unbound 1 In the Navigator, expand the required module component.
item 2 Select Unbound Items.
3 Click Create.
4 Specify details of the unbound item.
– Name
– Type
– Datatype
– Display properties
5 Click Finish.
.....................................................................................................................................................
®
8-33
Lesson 8: Defining Application Logic in the Repository
.....................................................................................................................................................
Instructor Notes
Schedule
88 Timing Topic
D efin ing A p plicatio n L o gic 45 minutes Lesson
in th e R epo sitory
30 minutes Practice
75 minutes Total
8-2
Class Management
W h at Is A pp lication Lo g ic?
SERVER
This slide is not in the manual.
P L /S Q L
8
C all N am ed
About this Slide
E vents
R outines
B row ser:
h ttp ://
Emphasize that both named routines and
H o lly w o o d
C LIE N T
JavaS cript
events can execute in the server and on the
client. The choice of location determines the
8-3
choice of language.
About this Slide
T ypes of A pp lication L og ic
A pplication Log ic
Generated application logic and library
application logic are not held in the repository.
Library G enerated U ser U ser The repository holds user application logic. We
B ro w se r:
are going to concentrate on the application
M odified
W SGL
h ttp://
G enerato r
E vent C od e
E vent C ode
logic that they create themselves, against
N am ed
R outines
modules, module components, and items.
8-4
.....................................................................................................................................................
8-34 Oracle Designer 6i: Web PL/SQL Design and Generation
Instructor Notes
.....................................................................................................................................................
M odule
place for it to execute. JavaScript functions
C om ponent
B row ser:
http://
Jav aS cript
C O PIE S PR IC E
LE V EL
must be part of an HTML page.
H o llyw o o d
Item
8-5
Demo
W h at Is an E vent?
Do a quick demonstration here to show how to
8 P re Insert
create an event on:
P L/S Q L
curr_val.re turn _date :=
sysdate + c urr_val.re ntal_period; • Module
B row ser:
http://
Jav aS cript O nC lick
E vent C od e
• Module component
H o llyw o o d
8-7
.....................................................................................................................................................
®
8-35
Lesson 8: Defining Application Logic in the Repository
.....................................................................................................................................................
8-9
}
….
Demonstrate the use of the Logic Editor.
8-10
JavaS cript }
8-11
Practice
After discussing events and named routines, it
is a good idea to consolidate the lecture by
doing practice 8-1 and 8-2 before moving on to
defining custom items'.
.....................................................................................................................................................
8-36 Oracle Designer 6i: Web PL/SQL Design and Generation
Instructor Notes
.....................................................................................................................................................
Link to ...
H yperlin k text or
im a ge
8-14
Demo
Demonstrate how to create an unbound item
and set the Derivation Text property.
About this Slide
Server-Side D erivation
calculate...
htf.hr(cattributes=> ‘W ID TH = 500’)
8-16
calculate...
calcu late_client_price ()
8-17
.....................................................................................................................................................
®
8-37
Lesson 8: Defining Application Logic in the Repository
.....................................................................................................................................................
8-18
U ser text • Put the HTML to call the applet in the user
Text Location
DTop
efault
of VAiew
rea*
U ser Text
<A P Package
m yP LE T C O
.SDhow
E = M yA pplet()
text.
Form * m yA pplet.c lass W ID TH =2 00
H E IG H T=10 0>
</A
<P APRPALE
MT>N A M E =P A R A M 1
V A LU E =“X X X X ”>
• Use a call to a PL/SQL function that uses
</A P P LE T>
the Developer’s Toolkit to return the
• C all a cu sto m P L /S Q L fu n ctio n
appropriate HTML.
8-19
R E N 070
A rg um ents
M odule C om ponents S erver-side
functio n
E M P _M C
Table U sages
U nbo und Item s
ab c S H O W _A P P LE T
D E R IV A TIO N TE X T :
m yP a ckage.S how M yA pple t()
8-20
8-21
.....................................................................................................................................................
8-38 Oracle Designer 6i: Web PL/SQL Design and Generation
Instructor Post Lesson Teaching Evaluation
.....................................................................................................................................................
Course Name: Oracle Designer 6i: Web PL/SQL Design and Generation
Lesson number: 8
Number of teaches before filling this form: 1 - 2 - 3 to 5 - >5
Detail comments
Content type: Slide - Text - Practice - Instructor notes
Note: 1:needs animation - 2:too much animation - 3:needs more text - 4:too much text
- 5:Unclear - 6:not necessary - 7:Other
Content Page
Note Comments/Suggestions
Type Number
Photocopy this page and fax to: Oracle Designer Curriculum Development @ +(44) 118.924.5181
Additional sheets are available at the end of the instructor’s guide.
If you draw additional diagrams on the white board use the Graphic sheet in the Instructor Evaluation
section at the end of this book.
.....................................................................................................................................................
®
8-39
Lesson 8: Defining Application Logic in the Repository
.....................................................................................................................................................
.....................................................................................................................................................
8-40 Oracle Designer 6i: Web PL/SQL Design and Generation
Suggested Graphics
.....................................................................................................................................................
Suggested Graphics
Instructor name: Full email:
.....................................................................................................................................................
®
8-41
Lesson 8: Defining Application Logic in the Repository
.....................................................................................................................................................
fold here
.....................................................................................................................................................
8-42 Oracle Designer 6i: Web PL/SQL Design and Generation
9
.................................
Introduction
The implementation of security is an important aspect of your generated application.
You can implement security in the Web server and in the generated application.
Schedule
Overview See Page 20
9-2
Objectives
At the end of this lesson, you should be able to do the following:
• Explain the various approaches to security in the server
• Implement security in Web PL/SQL applications
.....................................................................................................................................................
9-2 Oracle Designer 6i: Web PL/SQL Design and Generation
Security Issues
.....................................................................................................................................................
Security Issues
• Module arguments
• Web PL/SQL Generator:
– Prevent a call out of context
– Enforce case-insensitive URL
• Web server:
– Define valid usernames or domains
– Use DADs and PL/SQL Agents
– Set up secure directories
• Database:
– Define users, roles and profiles
9-3
There are a number of ways to handle security on the Web. Some of these exist
independently of the Web PL/SQL Generator and you have had the facility to
implement them for some while:
• Define arguments for modules
• Set Designer preferences
– Prevent pages being called out of context
– Ensure that URLs are not case-sensitive
• Use a Web server to control security
– Define users, sets of users, or groups such as IP addresses
– Protect virtual directories
– Use Database Access Descriptors and PL/SQL agents
• Control roles and privileges in the database
If you have no access to the Web server and want to protect the data displayed
on a Web page, you can protect it by controlling access to the data directly, using
roles and database privileges.
You can also implement security by using PL/SQL packages to control access before a
user invokes an application or modules within the application.
.....................................................................................................................................................
9-3
®
Lesson 9: Security and Web PL/SQL Applications
.....................................................................................................................................................
• Create an argument
• Associate with a bound item
• Set the value in the URL
9-4
An argument restricts the records queried for the first module component. When
module arguments are defined, the call to the procedure is as follows:
<module>$.startup?Z_<col1>=<val1>&Z_<col2>=<val2>...
For example, if the user enters the following URL, the only record the user can see is
that for member number 9001:
http://MyServer/wg_dad/members$.startup?Z_ID=9001
.....................................................................................................................................................
9-4 Oracle Designer 6i: Web PL/SQL Design and Generation
Restricting Data Access
.....................................................................................................................................................
Browser:
http:// webserver/agent/emp$emp_mc.queryview
emp$emp_mc.queryview?Z_DIRECT_CALL=TRUE
emp$emp_mc.queryview
access denied
9-5
Some generated procedures (such as queryview, which creates the view form) are
public because other procedures need to access them. You should never call them
directly from a URL because they must only be called in the appropriate context.
These procedures have two arguments, Z_DIRECT_CALL and Z_CHK, that are set by the
calling procedure. Whenever these procedures are called, Z_DIRECT_CALL must be set
to TRUE and Z_CHK must contain a valid checksum value.
You cannot set the value of Z_DIRECT_CALL in the URL and so it is always FALSE.
.....................................................................................................................................................
9-5
®
Lesson 9: Security and Web PL/SQL Applications
.....................................................................................................................................................
emp$emp_mc.queryview
?P_EMPNO=7844&Z_CHK=7128
?P_EMPNO=7845&Z_CHK=7128
Browser:
http://host:9999
emp$emp_mc.queryview
?P_EMPNO=7845&Z_CHK=7128
9-6
If the SECECS - Enforce URL Checksums preference is set to Yes, the procedure
checks that the value specified by Z_CHK is valid. If it is not, you are denied access to
the page.
This prevents users from querying records to which they have authorized access and
then modifying the URL to view unauthorized records.
.....................................................................................................................................................
9-6 Oracle Designer 6i: Web PL/SQL Design and Generation
Approaches to Security in the Server
.....................................................................................................................................................
Listener
• Authentication
– Basic or digest
• Restriction
– IP addresses
– Domain names
9-7
Authentication
Basic Authentication The browser prompts the user for a username and password
when the user attempts to access a protected page or application. Valid usernames and
passwords are stored in an operating system file.
Unless you are using a secure communication channel such as Secure Sockets Layer
(SSL), there is no encryption on the username and password. Anyone capable of
intercepting HTTP traffic could obtain the username and password.
Digest Authentication This approach differs from basic authentication only in that
the password is encrypted. Some older browsers do not support digest authentication
and the listener does not encrypt the user password for them.
Database Authentication In this scheme, the usernames and passwords are stored
on a database. This simplifies administration as you only maintain only one set of
usernames and passwords for both Web and database access.
Using Authentication The Web server listener can use basic or digest
authentication. An authentication server validates requests for generated Web pages
and can use any of the authentication, including database authentication.
.....................................................................................................................................................
9-7
®
Lesson 9: Security and Web PL/SQL Applications
.....................................................................................................................................................
Restriction
IP address Effect
+130.* includes all addresses that start with 130
-138.3.164.* excludes all IP addresses that start with 138.3.164
+138.3.164.108 includes the specific address 138.3.164.108
Using Restriction Both the Web server listener and the authentication server can
use either of the restriction schemes.
.....................................................................................................................................................
9-8 Oracle Designer 6i: Web PL/SQL Design and Generation
Approaches to Security in the Server
.....................................................................................................................................................
Forcing Authentication
http://webserver/agent/emp$.startup
Security invoked
Browser:
http://host:9999
Security evaded
http://webserver/agent/EMP$.startup
9-8
.....................................................................................................................................................
9-9
®
Lesson 9: Security and Web PL/SQL Applications
.....................................................................................................................................................
Authorized Security
When you implement authorized security, you define a responsibility that has access to
the module and you associate users with the responsibility.
Demo
Authorized Security See Page 22
Browser:
http://
Known user
Rent a Movie
with access
Title
Category
Logon
Enters URL
Unknown
Browser:
user http://
Invalid Logon
Error! AccessRequired
Logon denied
Username:
Password:
9-9
When a user attempts to access a module, a logon form pops up. The user enters a user
name and password and one of the following happens:
• If the entered username has access to the application, the first page is displayed.
• If the entered username does not have access to this application (but is known to
the system), then access is denied and the user can return to the logon form.
• If the entered username is unknown to the system, an error message is displayed.
.....................................................................................................................................................
9-10 Oracle Designer 6i: Web PL/SQL Design and Generation
Implementing Security Using Packages
.....................................................................................................................................................
USER PACKAGE
RESPONSIBILITY PERMISSIONS
USER RESPONSIBILITY
9-10
You must enter data into the tables to set up responsibilities, users and the relationship
between them. When the module is generated, the generator sets up the relationship
between responsibilities and packages.
You set the following preferences to implement authorized security for a specific user
module:
Preference Description
SECPKG – Security The name of the security package you are using
Package Name
SECRES – Default A list of the responsibilities that can access the module or module
Responsibilities component
SECVAL – Perform When set to Yes, a call is made before each page is displayed to
Session Validation ensure that the current user is allowed to use the module.
The supplied security package writes a cookie back to the browser, so the user only
needs to log on to the application once per session. You can write your own security
package to implement this type of security.
.....................................................................................................................................................
9-11
®
Lesson 9: Security and Web PL/SQL Applications
.....................................................................................................................................................
Self-Service Security
When you implement self-service security, any user can attempt to access the
application.
About this Slide
Self-Service Security See Page 23
Browser
http://
Date of Birth
Browser
http://
Subsequent Please sign in
accesses
User Register
Password
9-11
.....................................................................................................................................................
9-12 Oracle Designer 6i: Web PL/SQL Design and Generation
Implementing Security Using Packages
.....................................................................................................................................................
USERDATA
9-12
By default, the security package asks the user for the following details: username,
password, title, name, sex, address, email address, telephone. You can customize this
to suit your own requirements.
You set the following preferences to implement self-service security for a specific user
module:
Preference Description
SECPKG – Security The name of the security package you are using
Package Name
SECVAL – Perform If you set this to Yes, before each page is displayed a call is
Session Validation made, to ensure that the current user is allowed to use the
module.
.....................................................................................................................................................
9-13
®
Lesson 9: Security and Web PL/SQL Applications
.....................................................................................................................................................
Summary
Summary
9-13
.....................................................................................................................................................
9-14 Oracle Designer 6i: Web PL/SQL Design and Generation
Summary
.....................................................................................................................................................
.....................................................................................................................................................
9-15
®
Lesson 9: Security and Web PL/SQL Applications
.....................................................................................................................................................
Scenario
You want your customers to be able to call the REN0020 - Title module to view
either movies or computer games by using a parameterized URL. You also investigate
calling a page out of context and forcing a URL to lowercase.
Your Assignment
Use the following information as your starting point:
where <nn> is the group number that your instructor has assigned to you.
Property Value
Name Z_TTE_TYPE
Datatype VARCHAR2
2 Create an item usage for the argument. Associate the argument, Z_TTE_TYPE,
with the bound item TTE_TYPE.
3 Ensure that the SECECS - Enforce URL Checksums preference is set to
‘No’.
4 Generate and install the module.
5 Use the Build Actions window to inspect the code for the package body. Where
does the argument Z_TTE_TYPE appear?
6 Run the module by entering a URL similar to the following:
http://<webserver>/<your_agent>/reserve$.startup?Z_TTE_TYPE=MO
7 Click the Find button. What type of records appear in the record list?
8 Click the Query button. Enter COUNTDOWN into the Title field. What is the result?
.....................................................................................................................................................
9-16 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 9—1: Arguments and Web PL/SQL Modules
.....................................................................................................................................................
9 For the module, set the Security category of Generator preferences to:
Force the calculation of checksums.
a
b Force lowercase URLs.
10 Generate and install the module. Run the module by entering the following URL.
What happens?
http://<webserver>/<your_agent>/personal$cus_rmc.actionquery
11 What happens when you enter the following URL?
http://<webserver>/<your_agent>/
personal$cus_rmc.actionquery?Z_DIRECT_CALL=TRUE
12 Run the module by calling the startup procedure.
13 Navigate to the view form for customer 150. What value is displayed in the URL?
14 Edit the URL. Change the value of P_CTR_ID to 152. What happens?
.....................................................................................................................................................
9-17
®
Lesson 9: Security and Web PL/SQL Applications
.....................................................................................................................................................
Scenario
At the moment, any user who can access the MEM0010 - Maintain Personal
Details module can access the records of any customer. You want to restrict
individuals to their own records.
Your Assignment
Use the following information as your starting point:
1 Install the security package into your user from the hwd_sec.sql file in your
working directory. It is based on the supplied wsgsr.sql file but accesses user
information from the CUSTOMERS table.
2 Set the Security preferences for the module:
– SECECS – Enforce URL Checksums preference to Yes
– SECPKG – Security Package Name to HWDSEC
– SECVAL – Perform Session Validation to Y
3 Generate, install and run the module.
a The Hollywood customers have been assigned usernames and passwords that
are the same as their last names. Enter a username and password into the
security form and click the Log on button.
b What problem is there?
c Close the browser (to clear the security information stored in the cache).
4 Create an argument for the module to ensure that a user can only query the
customer record that corresponds to the entered username and password.
5 Generate, install and run the module. Check that you can only access the record for
the username you entered.
6 Close the browser and run the module again. Register as a new customer.
.....................................................................................................................................................
9-18 Oracle Designer 6i: Web PL/SQL Design and Generation
Hints
.....................................................................................................................................................
Hints
Practice 9—1
Practice 9—2
There are no hints for this practice.
.....................................................................................................................................................
9-19
®
Lesson 9: Security and Web PL/SQL Applications
.....................................................................................................................................................
Instructor Notes
Schedule
Timing Topic
99
30 minutes Lesson
S ecurity an d W eb P L /S Q L A p plication s
20 minutes Practice
50 minutes Total
9-2
• M o d ule arg um en ts
• W eb P L /S Q L G ene rato r:
– P reven t a call o u t o f co n te xt
– E n fo rce case-in sen s itive U R L
• W eb server:
– D e fin e valid u sernam es o r d o m ain s
– U s e D A D s and P L /S Q L A g ents
– S e t up secu re d irecto ries
• D atab a se:
– D e fin e u sers, roles a nd pro files
9-3
•
A pplicatio n Logic
C reate an arg um en t
The argument name MUST be the name of the
•
•
A ssoc iate w ith a b ou n d item
S et th e valu e in th e U R L
bound item prefixed by Z_. Other names are
9-4 accepted by the Design Editor but do not work.
.....................................................................................................................................................
9-20 Oracle Designer 6i: Web PL/SQL Design and Generation
There are no hints for this practice.Instructor Notes
.....................................................................................................................................................
B row ser:
This is important so do not rush through this.
http:// w e bserver/agent/em p$e m p_m c.queryv iew Take time to explain this slide.
Public procedures can be called by other
em p $ em p _m c .q u e ry
e mvpi$e
ewm?pZ_
_mDcI.q
REuCeTry
_CvAiLew
L= T R UE
generated PL/SQL procedures. The calling
access d en ied
enied procedure passes Z_DIRECT_CALL = TRUE
to the called procedure. Z_DIRECT_CALL
9-5
has a default of FALSE, so if you call it from a
URL, Z_DIRECT_CALL defaults to false and
the procedure does not execute.
You can only create arguments based on items
the module uses. So you can’t create a
parameter Z_DIRECT_CALL and add it to the
URL.
About this Slide
U sin g C h ecksum s
®
There are courses that deal with this subject:
h ttp:// W eb S erver
• Oracle Web Application Server:
L istener Administration
• A u th en ticatio n
– B asic o r d ig est • Oracle Web Application Server: Develop
• R estric tio n
– IP ad dresses
Web-Based Applications
– D o m ain n am es
9-7
.....................................................................................................................................................
9-21
®
Lesson 9: Security and Web PL/SQL Applications
.....................................................................................................................................................
B ro w ser:
h ttp ://h o st:9 99 9
S ecurity evade d
9-8
Logo n
E nters U R L
U nk now n
B ro w ser:
us er h ttp :// alid
Inv Lo go n
Error!
LoAgo
cc en
s sRe
de nie
qud ired
U sernam e:
Passw ord:
9-9
Demo
The account for your username includes an authorized security implementation. It
consists of the WSGSEC tables, the table API and two Web PL/SQL modules that
you can use to insert records:
• resp enables you to maintain a list of responsibilities
• users enables you to maintain user names, passwords and the responsibilities to
which they belong.
There is also a server model diagram, AUTH_SECURITY, which shows the
relationships between the tables.
Set the following preferences for the MEM0010 module:
• SECPKG to WSGSEC
• SECVAL to Y
• SECRES to the name of one of the responsibilities (for example, USER)
Generate, install and run the module. Enter a variety of user names to show the
difference between the situation where the user is known but belongs to a different
responsibility and the situation where the user is unknown.
.....................................................................................................................................................
9-22 Oracle Designer 6i: Web PL/SQL Design and Generation
There are no hints for this practice.Instructor Notes
.....................................................................................................................................................
• S E C V A L , S E C P K G an d S E C R E S p re feren ces
• T ab les th at s to re u sers a nd resp o ns ib ilitie s
• S ecu rity p ackag e
USER PACKAGE
R E S P O N S IB ILITY P E R M IS S IO N S
USER R E S P O N S IB ILIT
ILITYY
9-10
D ate of Birth
B row ser
http://
S ubseq uent P lease sign in
acces ses
U ser R egister
P assw ord
9-11
• S E C V A L , S E C P K G an d S E C R E S p re feren ces
• T ab le th at sto res u ser d ata
• S ecu rity p ackag e
U S E R D A TA
9-12
9-13
.....................................................................................................................................................
9-23
®
Lesson 9: Security and Web PL/SQL Applications
.....................................................................................................................................................
.....................................................................................................................................................
9-24 Oracle Designer 6i: Web PL/SQL Design and Generation
Instructor Post Lesson Teaching Evaluation
.....................................................................................................................................................
Course Name: Oracle Designer 6i: Web PL/SQL Design and Generation
Lesson number: 9
Number of teaches before filling this form: 1 - 2 - 3 to 5 - >5
Detail comments
Content type: Slide - Text - Practice - Instructor notes
Note: 1:needs animation - 2:too much animation - 3:needs more text - 4:too much text
- 5:Unclear - 6:not necessary - 7:Other
Content Page
Note Comments/Suggestions
Type Number
Photocopy this page and fax to: Oracle Designer Curriculum Development @ +(44) 118.924.5181
Additional sheets are available at the end of the instructor’s guide.
If you draw additional diagrams on the white board use the Graphic sheet in the Instructor Evaluation
section at the end of this book.
.....................................................................................................................................................
9-25
®
Lesson 9: Security and Web PL/SQL Applications
.....................................................................................................................................................
.....................................................................................................................................................
9-26 Oracle Designer 6i: Web PL/SQL Design and Generation
Suggested Graphics
.....................................................................................................................................................
Suggested Graphics
Instructor name: Full email:
.....................................................................................................................................................
9-27
®
Lesson 9: Security and Web PL/SQL Applications
.....................................................................................................................................................
fold here
.....................................................................................................................................................
9-28 Oracle Designer 6i: Web PL/SQL Design and Generation
10
.................................
Completing Your
Application
Lesson 10: Completing Your Application
.....................................................................................................................................................
Introduction
Your finished Web PL/SQL application consists of more than just a series of
free-standing modules. In order to build your completed application, you must be able
to link modules together, create menu structures, create a module hierarchy, and link to
external Web sites.
Schedule
Overview See Page 29
10-2
.....................................................................................................................................................
10-2 Oracle Designer 6i: Web PL/SQL Design and Generation
Introduction
.....................................................................................................................................................
Objectives
At the end of this lesson, you should be able to do the following:
• Create menu modules
• Control navigation using action items
• Generate a module network
.....................................................................................................................................................
10-3
®
Lesson 10: Completing Your Application
.....................................................................................................................................................
http://
10-3
Screen Modules
The Web PL/SQL Generator generates screen modules:
• It creates output files that contain PL/SQL package definitions for each screen
module.
• Functional screen modules have components. You use them to access the
application data and carry out the application’s business functions.
• Menu screen modules do not have table usages. You use them to implement menu
systems.
Menu Modules
The generator does not generate, or produce output files for, menu modules:
• Menu modules affect the layout of the screen modules that own them.
• When you build the module network, you typically use menu modules to link
between screen modules.
• The top menu module in a network appears on the startup page of the screen
module that owns it.
If you want to create a menu system that enables users to access different parts of the
application, you must use a menu screen module.
.....................................................................................................................................................
10-4 Oracle Designer 6i: Web PL/SQL Design and Generation
Creating Screen Modules with No Data Usages
.....................................................................................................................................................
Page Header
• Startup page
Title
• About page
Help
• Links to other modules
Navigation links
Page Footer
10-4
.....................................................................................................................................................
10-5
®
Lesson 10: Completing Your Application
.....................................................................................................................................................
.....................................................................................................................................................
10-6 Oracle Designer 6i: Web PL/SQL Design and Generation
Creating Menu Modules
.....................................................................................................................................................
• Titles
• Rentals
REN0020 REN0010
Titles Rentals
Short
menu title
10-5
Menu modules are useful for linking screen modules together, to form menu
hierarchies.
You cannot select a menu module to generate, nor does the generator create any output
for a menu module. Instead, menu modules affect the layout of the screen modules that
own them. When you generate a screen module which owns a menu module, the
generator does the following:
• Places the Top Title of the menu module on the startup page of the screen module.
• Creates hyperlinks to any screen modules which the menu module owns. The
hyperlinks appear on the startup page of the screen module that owns the menu
module. They appear under the title of the menu module.
If you have more than one menu module in the hierarchy below the launch page
module, the title of each menu module appears on the startup page. The generator
groups the hyperlinks to any screen modules which the menu module owns under the
menu module title.
If a menu module has a child menu module, then the Top Title of the child menu
module appears indented under the Top Title of its parent. You can use menu modules
to create a hierarchy of links to the children of a screen module.
.....................................................................................................................................................
10-7
®
Lesson 10: Completing Your Application
.....................................................................................................................................................
About this
Defining a Module Network Slide
Modules
See Page 30
Holly Screen - no data usage
Module Network
REN0001
REN0010
REN0020 Screen
Module Network
A network consists of inter-linked modules. Each module may have one or more
parent modules and one or more child modules.
From the Design Editor you can define a module network for a client application in the
following ways:
• Use the Module Network Viewer.
• Expand the node for the chosen module and then create Called Modules.
• Add called modules to a module diagram.
.....................................................................................................................................................
10-8 Oracle Designer 6i: Web PL/SQL Design and Generation
Defining a Module Network
.....................................................................................................................................................
About this
/D
REN0010
REN0020
leaf
You can use the Module Network Viewer to display the module network vertically, or
horizontally (as shown in the graphic). The horizontal view is particularly useful for
viewing menu structures. The names of menu modules are dimmed to distinguish them
from other types of modules.
You can perform the following tasks using the Module Network Viewer:
• Add modules to a module network.
• Change the structure of module networks.
• Copy menu structures.
• View module networks.
Module Connectivity
You classify a module by how many parents and children it has:
• A full module has parents and children.
• A root module has children but no parents.
• A leaf module has parents but no children.
• A solo module has no parents and no children.
.....................................................................................................................................................
10-9
®
Lesson 10: Completing Your Application
.....................................................................................................................................................
Page Header
• Links appear on the
parent startup page Title
– Direct links to Help
screen modules • Menu module title
– Links to children of • 1st Child module hyperlink
menu modules • 2nd Child module hyperlink
• 3rd Child module hyperlink
Page Footer
10-8
If a screen module has a child, the generator defines a hypertext link on the startup
page of the module. When a user clicks on this hypertext link, the browser invokes the
startup page for the child module. If you have not generated and installed the PL/SQL
for the child module, the user sees an error message.
You can tell the Web PL/SQL Generator to generate a module’s children when you
generate the parent module by selecting the Include the Module Network? check box
on the Generate Module dialog.
.....................................................................................................................................................
10-10 Oracle Designer 6i: Web PL/SQL Design and Generation
Menu Styles
.....................................................................................................................................................
Menu Styles
You can use Generator Preferences to instruct the generator to use either the Top Title
or the Short Title of a child module in the hypertext link.
• Titles
• Rentals Head Office Menu
From here you can access the
following pages:
• TITLES / RENTALS
Module [Titles][Rentals]
hyperlink
10-9
When you create a module, you use the Titles tab to define:
• Top Title (Hyperlink Text)
• Short Title (Startup Page Title)
You use a preference to choose which of these titles should appear in the hypertext
link. Set the MODMNS - Menu Style preference to:
• Long Title to use the child module’s Top Title.
• Short Title to use the child module’s Short Title.
Because you set the preference against the parent module, all the links from that
module to child modules must use either long titles and short titles.
.....................................................................................................................................................
10-11
®
Lesson 10: Completing Your Application
.....................................................................................................................................................
10-10
.....................................................................................................................................................
10-12 Oracle Designer 6i: Web PL/SQL Design and Generation
Using Action Items to Control Navigation
.....................................................................................................................................................
Prompt Help
Icon Name
Create Button?
+ No
Prompt Help
Create Button? No
10-11
.....................................................................................................................................................
10-13
®
Lesson 10: Completing Your Application
.....................................................................................................................................................
REN0010 REN0020
REN0020 REN0040
Top Level Menu
REN0030 From here you can access the
following pages:
10-12
.....................................................................................................................................................
10-14 Oracle Designer 6i: Web PL/SQL Design and Generation
Defining Links to External Web Pages
.....................................................................................................................................................
Hyperlink text
text for hyperlink
URL
http://www...
.....................................................................................................................................................
10-15
®
Lesson 10: Completing Your Application
.....................................................................................................................................................
Dream
Getaways • Further link
XXXX XXXX
10-14
When the generator comes across a URL in the module network, it does not generate
the child module. It creates a hyperlink on the generated parent module that points to
the URL which you entered for the child module.
When you follow this link you do not execute the child module. Instead, you open the
URL to which the module points.
.....................................................................................................................................................
10-16 Oracle Designer 6i: Web PL/SQL Design and Generation
Generating the Module Network
.....................................................................................................................................................
10-15
1 In the Navigator, select the launch page module to generate. Ensure that the
module you select is the top-level module.
2 Select Generate—>Generate Module....
3 Select Include the module network? to generate the module network.
4 Enter any other options that you require.
5 Click Start.
.....................................................................................................................................................
10-17
®
Lesson 10: Completing Your Application
.....................................................................................................................................................
myAgent1 myAgent2
8 8
Store Menu
REN0001
10-16
Example
In the graphic, REN0001, MEM0010 and MEM0020 are installed in the default
database while REN0010 and REN0020 are installed in another database.
.....................................................................................................................................................
10-18 Oracle Designer 6i: Web PL/SQL Design and Generation
Distributing a Web PL/SQL Application
.....................................................................................................................................................
Example
1 Using the example from the graphic, you generate and install the module network
from the top-level module (REN0001) using the default database connection.
This process generates modules MEM0010, MEM0020, and REN0001,
which contains hyperlinks to modules REN0020 and REN0010.
2 You then generate and install modules REN0020 and REN0010 into the other
application user account using a different database connection.
Store Menu
• Members
• Customers
• Memberships
• Titles / Rentals
http://myServer/myAgent2/reserve$.startup
• Titles
• Rentals
Reserve a Title
TITLES
Enter query criteria for TITLES
xxxx XXXX
xxxx XXXX
xxxx XXXX
xxxx XXXX
XXXX XXXX
10-17
You enter the top-level module by entering its URL (accessing the default database).
For example, the following URL executes the startup procedure of module REN0001:
http://myServer/myAgent1/rental_menu$.startup
The startup page of the module contains a hyperlink to the REN0020 module
(accessing another application account):
http://myServer/myAgent2/reserve$.startup
.....................................................................................................................................................
10-19
®
Lesson 10: Completing Your Application
.....................................................................................................................................................
Summary
Summary
10-18
The Web PL/SQL Generator uses screen and menu modules. However, you only ever
explicitly generate screen modules. Menu modules add a hyperlink to the layout of
their parent screen modules.
Linking Modules
Modules rarely exist in isolation. An application consists of many interlinked
modules.
The links to the children of a module appear on the startup page. You can set the
MODMNS – Menu Style preference to control which title the generator uses. If a
screen module owns a menu module, the menu module’s title creates a subheading on
the screen module.
.....................................................................................................................................................
10-20 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 10—1: Creating a Launch Page Module
.....................................................................................................................................................
Scenario
The developers have now delivered a number of completed modules for the
application system. In the real world these modules do not exist in isolation. They
must be linked together by a menu structure. Your first task is to create a launch page
or introductory module for the Hollywood Rentals e-commerce site.
Your Assignment
Use the information below as your starting point:
Workarea ORA<nn>_Les10_stp
Module REN0001 - Rental Store Menu
where <nn> is the group number that your instructor has assigned to you.
1 Using the Design Editor, create a module REN0001 – Rental Store Menu:
Property Setting
Module Type Default
Module Short Name REN0001
Module Name RENTAL STORE MENU
Language Web PL/SQL
Implementation Name rental_menu
.....................................................................................................................................................
10-21
®
Lesson 10: Completing Your Application
.....................................................................................................................................................
Scenario
You need to build the menu structure for Hollywood to allow navigation to all modules
in the application. You need to create two menu modules, MNU0010 - General,
and MNU0020 - Members. You must then link these modules to the launch page
module to create a menu structure.
Your Assignment
Use the information below as your starting point:
1 Using the Design Editor, create a menu module with the following details:
Property Setting
Module Type Menu
Module Short Name MNU0010
Module Name GENERAL
Language Web PL/SQL
Short Title (Hyperlink text) Catalog
Top Title (Startup Page title) Access our catalog
.....................................................................................................................................................
10-22 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 10—2: Using Menu Modules to Create a Menu Structure
.....................................................................................................................................................
2 Using the Design Editor, create a menu module with the following details:
Property Setting
Module Type Menu
Module Short Name MNU0020
Module Name MEMBERS
Language Web PL/SQL
Short Title (Hyperlink text) Members
Top Title (Startup Page title) Members Only
.....................................................................................................................................................
10-23
®
Lesson 10: Completing Your Application
.....................................................................................................................................................
Scenario
To help customers use the Hollywood e-commerce site you need to build an online
help system which they can access from any module in the application. You need to
build a module and add help using the user text areas. You then need to build a
standard header for all modules which includes a link to the online help.
Your Assignment
Use the information below as your starting point:
1 Using the Design Editor, create a new module with the following details:
Property Setting
Module Type Default
Module Short Name HLP0010
Module Name HELP
Language Web PL/SQL
Top Title (Startup Page title) Hollywood Rentals Help
Implementation Name holly_help
2 Write help information of your choice for the Hollywood system into the Top of
First Page user text area.
3 Generate, install and run the module.
4 Use the GENERAL preference set to place a link to the online help module from all
pages of all modules in the application (except module HLP0010 itself).
5 Generate and install the HLP0010 module again.
6 Generate, install and run REN0001.
a Do you see a link to the online help at the top of the page?
b Does the link work?
.....................................................................................................................................................
10-24 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 10—4: Creating a Module Network
.....................................................................................................................................................
Scenario
You and your colleagues have now created all the functional modules for the
application, a launch page module and two menu modules. Your task now is to link the
modules together so that users can navigate sensibly from one to another.
Your Assignment
Use the following information as your starting point:
.....................................................................................................................................................
10-25
®
Lesson 10: Completing Your Application
.....................................................................................................................................................
Scenario
The customers want to be able to navigate from the application to the home page of the
Internet Movie Database. You also want to add two options to access either movies or
games through the REN0020 - Reserve a Title module.
Your Assignment
Use the information below as your starting point:
Property Setting
Module Type Default
Module Short Name IMDB
Module Name EXTERNAL1
Language Web PL/SQL
Top Title (Startup Page title) The Internet Movie Database
URL /webapp/homepage/www_imdb_com.html
Implementation Name imdb
.....................................................................................................................................................
10-26 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 10—5: Linking to a URL
.....................................................................................................................................................
Property Setting
Module Type Default
Module Short Name REN0021
Module Name RESERVE A MOVIE
Language Web PL/SQL
Top Title (Startup Page title) Browse through Movie Titles
URL reserve$.startup?z_tte_type=MO
Implementation Name movies
Property Setting
Module Type Default
Module Short Name REN0022
Module Name RESERVE A GAME
Language Web PL/SQL
Top Title (Startup Page title) Browse through Game Titles
URL reserve$.startup?z_tte_type=GA
Implementation Name games
.....................................................................................................................................................
10-27
®
Lesson 10: Completing Your Application
.....................................................................................................................................................
Hints
Practice 10—1
There are no hints for this practice.
Practice 10—2
To perform this task Follow these steps
To create a menu 1 In the Navigator, select the Modules node.
module 2 Click Create.
3 Select Menu as the module type.
4 Click Finish.
To create a menu 1 Expand the Modules node.
structure in the 2 Expand the parent module node.
Navigator 3 Add the child modules:
a Select the Called Modules node.
b Click Create.
c Select Module from the Create Module Network dialog.
4 Click Finish to save.
To create a menu 1 Open a module diagram.
structure in the 2 Click Link Module:
Module Diagrammer a Click to the right of the module to specify that it calls a
module.
b Click to the left of the module to specify that it is called by
a module.
3 Select modules from the Create Module Network dialog.
4 Use the Properties palette to set the sequence property
appropriately.
Practice 10—3
There are no formal hints for this practice.
Practice 10—4
There are no formal hints for this practice.
Practice 10—5
There are no formal hints for this practice.
.....................................................................................................................................................
10-28 Oracle Designer 6i: Web PL/SQL Design and Generation
Instructor Notes
.....................................................................................................................................................
Instructor Notes
Schedule
Timing Topic
10
10
40 minutes Lesson
C o m p letin g Y o ur A p plication
45 minutes Practice
85 minutes Total
10-3
P age F ooter
10-4
.....................................................................................................................................................
10-29
®
Lesson 10: Completing Your Application
.....................................................................................................................................................
• T itles
• R entals
R E N 0020 R E N 0 010
Title s R entals
S hort
m enu title
10-5
R E N 00 10
• REN0001, REN0020, and REN0010 are
R E N 00 20 S creen
screen modules.
• L in k: • C reate a hierarchy
–
–
S creen to screen
S creen to m en u
• MNU0010 and MNU0020 are menu
– M en u to screen modules.
10-6
R E N 00 10
M N U 00 20
that it has been replaced by this viewing tool in
R E N 00 20
leaf
the Design Editor.
• R o o t: ch ild ren on ly
• F ull: p aren t an d ch ild ren
• L eaf: p aren t o nly Demo
• S o lo: n o paren t or ch ild ren
10-7
Demonstrate the vertical and horizontal
layouts and how you can add a module to a
network.
Demo
Lin king S creen M od u les
Demonstrate:
P age H ead er
• L in ks ap p ear o n th e
p arent startu p p ag e Title • Screen module calling a screen module
– D irect lin ks to H elp
screen m o d ules
– L in ks to ch ild ren o f
• M enu m odule title
• 1st C hild m odule hyperlink • Menu module calling a screen module
m en u m o d ules • 2nd C hild m odule hyp erlin k
• 3rd C hild m odule hyperlink Use it to show the difference.
P age Footer
10-8
.....................................................................................................................................................
10-30 Oracle Designer 6i: Web PL/SQL Design and Generation
Instructor Notes
.....................................................................................................................................................
10-9
10-10
P ro m p t H elp
The generated screen shots show the action
Icon Nam e
Create Bu tton ?
+ Y es
item displayed at the top of the page. This is
• H ype rlink N avigation A ction Item P roperties achieved by setting the action item ZONAIP -
P ro m p t H elp
Icon Nam e
Position on page preference to TOP at either
Create Bu tton ?
+ No
• Im age link N avigation A ction Item P roperties container, module or module component level.
P ro m p t H elp
Demo
Create Bu tton ? No
10 -11
R E N 0010 R E N 0 020
module. It’s the same module but it can be
R E N 0020 R E NT0op
040L evel M enu
R E N 0030 From h ere you can access the
follow in g pages:
accessed from different points.
• R ep eat call to m od ule • First m enu title
fro m a m en u o r screen •H yperlink to R EN 0010
m o d ule • H yperlink to R EN 0020
• S till on ly o n e d efin ition o f • Second m enu title
th e m o du le •H yperlink to R EN 0020
10-12
.....................................................................................................................................................
10-31
®
Lesson 10: Completing Your Application
.....................................................................................................................................................
URL
external Web page. That URL exists in the
http://w w w ...
parent module.
• C reate a p la ceho ld er m o d ule
• E n ter th e U R L o f the external W eb site
• L in k to th e m o d u le n etw o rk
• G en era te
10-13
Demo
G en erating E xternal W eb L inks
T op L evel M enu • C h ild m o du le is n o t Demonstrate how you can move from the
g en era ted
From here you can access th e
follow ing pages: • H yp erlink to extern al
s ite is inclu d ed in th e
demo application to an external Web page.
• First m enu title m en u
• H yperlink to R E N 0010
• H yperlink to R E N 0020
Dream
Getaways • Further link
X XX X XXX X
10-14
M odule R E N 0001
laun ch page
m o dule
you do not have to generate everything. You
Includ e M odule N etw ork?
Installation user passw ord only have to generate the launch page module.
S tart O p tions C an cel H elp
It uses the network information to create the
links to the child modules.
10-15
8 8
application was pulling together data from
Store M enu
R E N 0001
different functional areas.
C u sto m ers M em berships Titles R entals
M E M 0010 M E M 0020 R E N 0020 R E N 0010
10-16
XXXX XXX X
10 -17
.....................................................................................................................................................
10-32 Oracle Designer 6i: Web PL/SQL Design and Generation
Instructor Notes
.....................................................................................................................................................
10-18
Practices
Emphasize that they must change workarea as specified—they need two additional
modules which are available to them in the Lesson 10 startpoint workareas.
Practice 10—5
Note that the URL given is relative to the environment in which you are working. If
you have full Internet access, you can suggest that they enter http://www.imdb.com
to access the live page.
.....................................................................................................................................................
10-33
®
Lesson 10: Completing Your Application
.....................................................................................................................................................
.....................................................................................................................................................
10-34 Oracle Designer 6i: Web PL/SQL Design and Generation
Instructor Post Lesson Teaching Evaluation
.....................................................................................................................................................
Course Name: Oracle Designer 6i: Web PL/SQL Design and Generation
Lesson number: 10
Number of teaches before filling this form: 1 - 2 - 3 to 5 - >5
Detail comments
Content type: Slide - Text - Practice - Instructor notes
Note: 1:needs animation - 2:too much animation - 3:needs more text - 4:too much text
- 5:Unclear - 6:not necessary - 7:Other
Content Page
Note Comments/Suggestions
Type Number
Photocopy this page and fax to: Oracle Designer Curriculum Development @ +(44) 118.924.5181
Additional sheets are available at the end of the instructor’s guide.
If you draw additional diagrams on the white board use the Graphic sheet in the Instructor Evaluation
section at the end of this book.
.....................................................................................................................................................
10-35
®
Lesson 10: Completing Your Application
.....................................................................................................................................................
.....................................................................................................................................................
10-36 Oracle Designer 6i: Web PL/SQL Design and Generation
Suggested Graphics
.....................................................................................................................................................
Suggested Graphics
Instructor name: Full email:
.....................................................................................................................................................
10-37
®
Lesson 10: Completing Your Application
.....................................................................................................................................................
fold here
.....................................................................................................................................................
10-38 Oracle Designer 6i: Web PL/SQL Design and Generation
A
.................................
Solutions
Appendix A:
.....................................................................................................................................................
..........................................................................................................................................................
A-2 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 2—1: Solutions
.....................................................................................................................................................
.....................................................................................................................................................
®
A-3
Appendix A:
.....................................................................................................................................................
..........................................................................................................................................................
A-4 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 2—3: Solutions
.....................................................................................................................................................
.....................................................................................................................................................
®
A-5
Appendix A:
.....................................................................................................................................................
..........................................................................................................................................................
A-6 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 3—1: Solutions
.....................................................................................................................................................
.....................................................................................................................................................
®
A-7
Appendix A:
.....................................................................................................................................................
..........................................................................................................................................................
A-8 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 3—3: Solutions
.....................................................................................................................................................
.....................................................................................................................................................
®
A-9
Appendix A:
.....................................................................................................................................................
18 What operations have been set for the RENTALS module component? Where did
these values come from?
The RENTALS module component has the Insert, Update and Query
operations. It took this information from the entity usages.
..........................................................................................................................................................
A-10 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 4—1: Solutions
.....................................................................................................................................................
.....................................................................................................................................................
®
A-11
Appendix A:
.....................................................................................................................................................
..........................................................................................................................................................
A-12 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 4—2: Solutions
.....................................................................................................................................................
.....................................................................................................................................................
®
A-13
Appendix A:
.....................................................................................................................................................
5 What is the purpose of an item group (have a look in the online help if you are
unsure)?
An item group is a collection of items that is treated as a single layout object.
Item groups can be defined within module components and sub-components
and can also be nested within other item groups. Web PL/SQL Generator also
uses item groups to define break groups.
..........................................................................................................................................................
A-14 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 4—3: Solutions
.....................................................................................................................................................
.....................................................................................................................................................
®
A-15
Appendix A:
.....................................................................................................................................................
d Click on the hypertext link for one of the records displayed in the record list.
What information appears at the top of the view form?
The context information from the record list is shown on the view form.
..........................................................................................................................................................
A-16 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 5—1: Solutions
.....................................................................................................................................................
e Go back to the query form and enter GR% into the Product Code as the query
criterion. Which form displays after the query form?
The view form: the record list is suppressed when it contains one record.
.....................................................................................................................................................
®
A-17
Appendix A:
.....................................................................................................................................................
2 Alter the layout style for the record list to numbered list. Generate, install, and run
the module.
..........................................................................................................................................................
A-18 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 5—3: Solutions
.....................................................................................................................................................
.....................................................................................................................................................
®
A-19
Appendix A:
.....................................................................................................................................................
MBP_IDENTIFIER 10
RENTAL_DATE 20
RTL_ID 30
e Generate, install, and run the module. What is the impact of creating break
groups?
The names and dates are only shown on the first row in any group. The
rental number is now the hyperlink to the view form.
..........................................................................................................................................................
A-20 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 5—4: Solutions
.....................................................................................................................................................
3 Modify the module definition to include a count of the number of rentals each
customer has made:
a Create a computed unbound item, NO_OF_RENTALS. What properties
should you set? Complete the table below and use it as a guide when setting the
required properties:
Property Value
Prompt No of Rentals
Unbound Item Type Computed
Reset Level Current group
Reset Group
Derivation Expression COUNT(MBP_IDENTIFIER)
.....................................................................................................................................................
®
A-21
Appendix A:
.....................................................................................................................................................
..........................................................................................................................................................
A-22 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 6—1: Solutions
.....................................................................................................................................................
.....................................................................................................................................................
®
A-23
Appendix A:
.....................................................................................................................................................
..........................................................................................................................................................
A-24 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 6—3: Solutions
.....................................................................................................................................................
You should be able to click the photograph to reach the view form.
c Can you email a customer by clicking on the email address?
When you click the email address, the New Email Message window pops
up.
.....................................................................................................................................................
®
A-25
Appendix A:
.....................................................................................................................................................
d On the view form, why can you not amend the name of the photograph file?
The view form should look like this:
It does not make sense to allow customers to change the name of the file
(as it is maintained by Hollywood), so it does not have the Update property
set. Because it cannot be updated, it is again displayed as an image and the
user does not see the file name.
e On the view form, why can you amend the email address?
A customer may want to change this information, so it has the Update
property set. Because it can be updated, the column formatting is ignored
and it is not displayed as a hyperlink.
7 Display the record list rows in alphabetical order of the customer’s name.
Set the order by property for the LAST NAME and FIRST NAME bound items.
8 Display fewer rows on the record list.
For the module component, set the number of rows displayed to 3.
9 Remove the table border from the record list.
Set the ZONLBT – Record List: Add Table Border preference to No.
..........................................................................................................................................................
A-26 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 6—4: Solutions
.....................................................................................................................................................
.....................................................................................................................................................
®
A-27
Appendix A:
.....................................................................................................................................................
..........................................................................................................................................................
A-28 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 6—5: Solutions
.....................................................................................................................................................
.....................................................................................................................................................
®
A-29
Appendix A:
.....................................................................................................................................................
..........................................................................................................................................................
A-30 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 7—2: Solutions
.....................................................................................................................................................
.....................................................................................................................................................
®
A-31
Appendix A:
.....................................................................................................................................................
b Generate, install, and run module REN0010. Navigate to the Rentals view
form. Is the Rental Items record list visible?
Select one of the Rentals records. The detail Record List is now on the
same page as the master View Form.
c What is the advantage of having the detail record list on the same page as the
master view form?
The advantage of this layout is that all the information can be obtained
with one connection to the WebServer and one database session.
d Under what circumstances might you opt to have the detail record list on a
separate page?
– If you have two or more details linked to the same master component,
navigating the module may be clearer if the detail Record Lists appear
on separate pages.
– If you have multiple detail records, you may want to enter query
criteria to restrict the detail records returned.
3 Enable navigation directly to the detail record list from the master record list.
a Find out which generator preference you must alter.
The preference is ZONLDL – Record List: Add detail
hyperlinks to Record List.
..........................................................................................................................................................
A-32 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 7—2: Solutions
.....................................................................................................................................................
c Generate, install, and run module REN0010. What difference do you notice on
the record list of the master component?
A hypertext link to the detail Record List appears on each row in the
master Record List.
d What would you expect to see if module REN0010 had two detail module
components?
Two hypertext links would appear on each row of the master Record List,
each one linking to a different detail Record List.
.....................................................................................................................................................
®
A-33
Appendix A:
.....................................................................................................................................................
..........................................................................................................................................................
A-34 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 7—3: Solutions
.....................................................................................................................................................
4 Click the New button to see the Insert page. Why does the context information not
appear here?
Only the Record List user text has been set.
5 Specify that master context information should be displayed by a display package.
a Set the appropriate Master Context preference to the name of the package
(WSGMC_OUTPUT2).
Use the Generator Preferences Navigator to select the MCNDPK – Master
Context: Display package preference at module level. Set it to
WSGMC_OUTPUT2.
b Set the appropriate Master Context preference to suppress the use of the
package on the Record List.
Use the Generator Preferences Navigator to select the MCNFRM – Master
Context: Forms requiring context preference. Set it to Q.V.I.
6 Generate, install, and run module REN0010. Navigate to the Rental Items insert
page. You should see the Rentals context items at the top of the page with an arrow
showing the link to Rental Items.
.....................................................................................................................................................
®
A-35
Appendix A:
.....................................................................................................................................................
..........................................................................................................................................................
A-36 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 7—4: Solutions
.....................................................................................................................................................
.....................................................................................................................................................
®
A-37
Appendix A:
.....................................................................................................................................................
..........................................................................................................................................................
A-38 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 7—6: Solutions
.....................................................................................................................................................
.....................................................................................................................................................
®
A-39
Appendix A:
.....................................................................................................................................................
..........................................................................................................................................................
A-40 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 8—2: Solutions
.....................................................................................................................................................
.....................................................................................................................................................
®
A-41
Appendix A:
.....................................................................................................................................................
..........................................................................................................................................................
A-42 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 9—1: Solutions
.....................................................................................................................................................
.....................................................................................................................................................
®
A-43
Appendix A:
.....................................................................................................................................................
..........................................................................................................................................................
A-44 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 10—1: Solutions
.....................................................................................................................................................
.....................................................................................................................................................
®
A-45
Appendix A:
.....................................................................................................................................................
..........................................................................................................................................................
A-46 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 10—2: Solutions
.....................................................................................................................................................
5 What effect do the menu modules have on the appearance of module REN0001?
The menu modules appear in a bulleted list.
6 How would you display the short form of the menu title?
Set the module-level preference, MODMNS - Menu Style to SHORT TITLE.
.....................................................................................................................................................
®
A-47
Appendix A:
.....................................................................................................................................................
4 Use the GENERAL preference set to place a link to the online help module from all
pages of all modules in the application (except module HLP0010 itself).
For the HLP0010 module, set the MODSHD – Standard Header preference
explicitly to the current value:
htf.img(‘/webapp/graphics/hollywood.gif’)
In the GENERAL preference set, add the following code to the MODSHD –
Standard Header preference:
htf.anchor(‘http://<server>/<agent>/holly_help$.startup’,’Help’)
..........................................................................................................................................................
A-48 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 10—3: Solutions
.....................................................................................................................................................
.....................................................................................................................................................
®
A-49
Appendix A:
.....................................................................................................................................................
..........................................................................................................................................................
A-50 Oracle Designer 6i: Web PL/SQL Design and Generation
Practice 10—5: Solutions
.....................................................................................................................................................
.....................................................................................................................................................
®
A-51
Appendix A:
.....................................................................................................................................................
..........................................................................................................................................................
A-52 Oracle Designer 6i: Web PL/SQL Design and Generation
Index
..........................................................................................................................................
..........................................................................................................................................
®
Index-1
Index
..........................................................................................................................................
E associate a module
with a business function 4-13
entity definitions
copy a reusable module component
transform 4-4
2-15
Event
create a group summary item 5-19
client-side 8-9
create a launch page 10-6
Code Segment 8-6
create a placeholder module
code segment 8-11
JavaScript 8-9 for a web page 10-15
pseudo PL/SQL 8-7 create a view form
server-side 8-7 multi-row DML 7-20, 7-21
event code 8-6–8-11 create a Web Module
from a form 4-19
create computed unbound items 5-19
F create data usages 4-14
Frame size create GUI display items 7-22
defining 6-21 create lookup links
Frames 6-20 using the diagram 4-10
naming 6-23 create master-detail links
Frameset using the diagram 4-9
custom create module level summaries 5-19
using 6-22 define a named routine 8-15
default define an event code segment 8-11
preferences 6-20 generate graphic hotspots 6-13
nesting 6-23 generate the module network 10-17
function definitions include list of values
check 4-4 in a module 7-14
with no association 7-14
install a module after generation 2-10
G install a module manually 2-10
generate invoke the Logic Editor 8-12
Data Design 3-14 run the application after generation
Table API 3-14 2-11
Generation use custom PL/SQL packages 8-8
preparing 3-5 use module arguments 9-4
Generator HTF 6-9
Preferences 2-8 HTML
graphic hotspots see HyperText Markup Language
generate 6-13 HTML tags 6-7
GUI Display Items HTP 6-9
display order 7-22 hyperlink
optional items 7-22 About Page 5-6
suggestion lists 7-22 hyperlinks 10-12
hypertext link 10-10
HyperText Markup Language 6-7
H
how to
..........................................................................................................................................
Index-2 Oracle Designer 6i: Web PL/SQL Design and Generation
Index
..........................................................................................................................................
..........................................................................................................................................
®
Index-3
Index
..........................................................................................................................................
..........................................................................................................................................
Index-4 Oracle Designer 6i: Web PL/SQL Design and Generation
Index
..........................................................................................................................................
..........................................................................................................................................
®
Index-5
Index
..........................................................................................................................................
..........................................................................................................................................
Index-6 Oracle Designer 6i: Web PL/SQL Design and Generation