Sie sind auf Seite 1von 366

Oracle9i Forms Developer: Build Internet Applications

Instructor Guide Volume 1

40033GC20

Production 2.0

July 2002 D34891
July 2002
D34891

Author

Pam Gamer

Technical Contributors and Reviewers

Laurent Dereac

Ellen Gravina

Jonas Jacobi

Brenda Lee

Marcelo Manzano

Duncan Mills

Frank Nimphius

Daphne Nougier

Ian Purvis

Jasmin Robayo

Bryan Roberts

Raza Siddiqui

Sarah Spicer

Publisher

Sheryl Domingue

Copyright © Oracle Corporation, 2002. All rights reserved.

This documentation contains proprietary information of Oracle Corporation. It is provided under a license agreement containing restrictions on use and disclosure and is also protected by copyright law. Reverse engineering of the software is prohibited. If this documentation is delivered to a U.S. Government Agency of the Department of Defense, then it is delivered with Restricted Rights and the following legend is applicable:

Restricted Rights Legend

Use, duplication or disclosure by the Government is subject to restrictions for 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 252.227-7013, Rights in Technical Data and Computer Software (October 1988).

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 Oracle Corporation. Any other copying is a violation of copyright law and may result in civil and/or criminal penalties.

If this documentation is delivered to a U.S. Government Agency not within the Department of Defense, then it is delivered with Restricted Rights,as defined in FAR 52.227-14, Rights in Data-General, including Alternate III (June 1987).

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 SB-6, Redwood Shores, CA 94065. Oracle Corporation does not warrant that this document is error-free.

Oracle and all references to Oracle Products are trademarks or registered trademarks of Oracle Corporation.

All other products or company names are used for identification purposes only, and may be trademarks of their respective owners.

Contents

Preface

Introduction Objectives I-2

Release 9i Curriculum

Course Objectives

Course Content

I-4

I-6

I-3

1 Introduction to Oracle Forms Developer and Oracle Forms Services Objectives 1-2

Internet Computing Solutions

Oracle9i Products

1-4

1-3

Oracle 9iAS Architecture

1-5

Oracle 9iAS Components

1-6

Oracle Forms Services Overview

Forms Services Architecture

Benefits of Oracle9i Developer Suite Oracle9iDS Application Development

Oracle9iDS Business Intelligence Oracle Forms Developer Overview

Oracle9i Forms Developer: Key Features

1-12

1-7

1-8

1-9

1-10

1-11

1-13

Forms Builder Components: Object Navigator

Forms Builder Components: Layout Editor

Getting Started in the Forms Builder Interface

Forms Builder: Menu Structure

Customizing Your Forms Builder Session

Saving Preferences

1-14

1-16

1-18

1-20

1-22

1-24

Using the Online Help System Summit Office Supply Schema

Using the Online Help System Summit Office Supply Schema

1-25

1-26

Summit Application Summary 1-29 Practice 1 Overview

1-27

1-32

2 Running a Forms Developer Application Objectives 2-2

Running a Form

Running a Form: Browser

The Java Runtime Environment

2-3

2-4

2-5

Starting a Run-Time Session

2-6

The Forms Servlet

2-9

The Forms Client

2-10

The Forms Listener Servlet

2-11

iii

The Runtime Engine 2-12 Defining Forms Environment Variables for Run Time 2-13 Defining Forms Environment Variables for Design Time 2-14 Forms Files to Define Environment Variables 2-15 Environment Variables and Y2K Compliance 2-16 What You See at Run Time 2-18 Identifying the Data Elements 2-20 Navigating a Forms Developer Application 2-21 Modes of Operation: Enter-Query Mode 2-23 Modes of Operation: Normal Mode 2-24 Retrieving Data 2-25 Retrieving Restricted Data 2-26 Query/Where Dialog Box 2-28 Inserting, Updating, and Deleting 2-30 Making Changes Permanent 2-32 Displaying Errors 2-33 Summary 2-34

3 Working in the Forms Developer Environment Objectives 3-2

Forms Builder Key Features

Forms Developer Executables Forms Developer Module Types

Blocks, Items, and Canvases

Navigation in a Block

Data Blocks

3-11

3-3

3-4

3-6

3-8

3-10

Forms and Data Blocks

3-13

Form Module Hierarchy

3-15

Testing a Form: Starting Oracle Containers for J2EE (OC4J)

Testing a Form: Starting OC4J

Testing a Form: The Run Form Button

Summary 3-20 Practice 3 Overview

3-18

3-19

3-21

4 Creating a Basic Form Module Objectives 4-2 Creating a New Form Module

4-3

Form Module Properties

Creating a New Data Block

Navigating the Wizards

Launching the Data Block Wizard

4-6

4-8

4-10

4-11

iv

3-17

Data Block Wizard: Type Page 4-12 Data Block Wizard: Finish Page 4-14 Layout Wizard: Items Page 4-15 Layout Wizard: Style Page 4-16 Layout Wizard: Rows Page 4-17 Data Block Functionality 4-18 Modifying the Data Block 4-19 Modifying the Layout 4-20 Template Forms 4-22 Saving a Form Module 4-23 Compiling a Form Module 4-24 Module Types and Storage Formats 4-25 Deploying a Form Module 4-27 Text Files and Documentation 4-28 Practice 4-1 Overview 4-29 Form Block Relationships 4-30 Data Block Wizard: Master-Detail Page 4-32 Relation Object 4-34 Creating a Relation Manually 4-35 Join Condition 4-36 Deletion Properties 4-37 Modifying a Relation 4-38 Coordination Properties 4-39 Running a Master-Detail Form Module 4-40 Summary 4-41 Practice 4-2 Overview 4-43

5 Working with Data Blocks and Frames Objectives 5-2

Managing Object Properties

Displaying the Property Palette

Property Palette: Features

Property Controls Visual Attributes

How to Use Visual Attributes

Font, Pattern, and Color Pickers

Controlling Data Block Behavior and Appearance

Navigation Properties

Records Properties Database Properties

5-15

5-3

5-5

5-4

5-6

5-8

5-9

5-10

5-12

5-13

v

5-11

Scroll Bar Properties

Controlling Frame Properties

5-18

5-19

Displaying Multiple Property Palettes Setting Properties on Multiple Objects

Displaying Multiple Property Palettes Setting Properties on Multiple Objects

5-21

5-22

Copying Properties

Creating a Control Block

Deleting a Data Block Summary 5-28 Practice 5 Overview

5-24

5-26

5-27

5-29

6 Working with Text Items Objectives 6-2

Text Items

Creating a Text Item

Modifying the Appearance of a Text Item: General and Physical Properties

Modifying the Appearance of a Text Item: Records Properties

Modifying the Appearance of a Text Item: Font and Color Properties

Modifying the Appearance of a Text Item: Prompts

Associating Text with an Item Prompt

Controlling the Data of a Text Item

6-3

6-4

6-7

6-8

6-9

6-10

6-11

Controlling the Data of a Text Item: Format Controlling the Data of a Text Item: Values

Controlling the Data of a Text Item: Format Controlling the Data of a Text Item: Values

6-12

6-13

Controlling the Data of a Text Item: Copy Value from Item

Controlling the Data of a Text Item: Synchronize with Item

Controlling Navigational Behavior of Text Items

Enhancing the Relationship Between Text Item and Database

Adding Functionality to a Text Item

Adding Functionality to a Text Item: Conceal Data Property

Adding Functionality to a Text Item: Keyboard Navigable and Enabled

Adding Functionality to a Text Item: Multi-line Text Items

Displaying Helpful Messages: Help Properties Summary 6-24

Practice 6 Overview

6-15

6-16

6-17

6-18

6-19

6-20

6-22

6-23

6-26

7 Creating LOVs and Editors Objectives 7-2

What Are LOVs and Editors?

7-3

LOVs and Record Groups

7-6

vi

6-21

Creating an LOV Manually

7-8

Creating an LOV with the LOV Wizard: SQL Query Page

7-9

Creating an LOV with the LOV Wizard: Column Selection Page

7-10

Creating an LOV with the LOV Wizard: Column Properties Page

7-11

Creating an LOV with the LOV Wizard: Display Page

Creating an LOV with the LOV Wizard: Advanced Properties Page

Creating an LOV with the LOV Wizard: Assign to Item Page

LOV Properties

7-12

7-14

7-15

LOVs: Column Mapping Editors 7-19 Setting Editor Properties

LOVs: Column Mapping Editors 7-19 Setting Editor Properties

7-17

7-20

7-13

 

Associating an Editor with a Text Item

7-21

Summary 7-22 Practice 7 Overview

7-23

8

Creating Additional Input Items Objectives 8-2

 

What Are Input Items?

8-3

8-4

What Are Check Boxes?

Creating a Check Box

8-5

Converting Existing Item to Check Box

8-6

Creating a Check Box in the Layout Editor

Setting Check Box Properties

Check Box Mapping of Other Values

What Are List Items? Creating a List Item

Converting Existing Item to List Item

8-8

8-10

8-14

8-11

8-13

8-7

Creating a List Item in the Layout Editor

8-15

Setting List Item Properties

8-16

List Item Mapping of Other Values

8-17

What Are Radio Groups?

8-18

Creating a Radio Group

8-19

Converting Existing Item to Radio Group

8-20

Creating Radio Group in Layout Editor

8-21

Setting Radio Properties

8-22

Radio Group Mapping of Other Values Summary 8-24

8-23

Practice 8 Overview

8-25

vii

9 Creating Noninput Items Objectives 9-2

Noninput Items

9-3

 

Display Items

9-4

Creating a Display Item

9-5

Image Items

9-6

Image File Formats

9-8

Creating an Image Item

9-9

Setting Image-Specific Item Properties

Push Buttons

Push Button Actions

Creating a Push Button

Setting Push Button Properties

Calculated Items

Creating a Calculated Item by Setting Properties Setting Item Properties for the Calculated Item

Summary Functions

Calculated Item Based on a Formula Rules for Calculated Item Formulas

Calculated Item Based on a Summary

Rules for Summary Items

Creating a Hierarchical Tree Item

Setting Hierarchical Tree Item Properties

Bean Area Items

Creating a Bean Area Item

Setting Bean Area Item Properties

The JavaBean at Run Time Summary 9-30

Practice 9 Overview

9-32

9-10

9-12

9-13

9-14

9-15

9-16

9-19

9-20

9-21

9-22

9-23

9-24

9-25

9-26

9-27

9-29

9-28

9-17

9-18

10 Creating Windows and Content Canvases Objectives 10-2

Windows and Canvases

Window, Canvas, and Viewport

The Content Canvas

Relationship Between Windows and Content Canvases

The Default Window

Displaying a Form Module in Multiple Windows

10-3

10-4

10-5

10-7

10-8

viii

10-6

Creating a New Window

10-9

Setting Window Properties

10-10

GUI Hints

10-11

Displaying a Form Module on Multiple Layouts

10-12

Creating a New Content Canvas

10-13

Setting Content Canvas Properties Summary 10-16

10-15

Practice 10 Overview

10-17

11 Working with Other Canvas Types Objectives 11-2

 

Overview of Canvas Types

11-3

The Stacked Canvas

11-4

Creating a Stacked Canvas

11-6

Setting Stacked Canvas Properties

11-8

The Toolbar Canvas

11-9

 

The MDI Toolbar

11-10

Creating a Toolbar Canvas

11-11

Setting Toolbar Properties

11-12

The Tab Canvas

11-13

Creating a Tab Canvas

11-14

 

Creating a Tab Canvas in the Object Navigator

11-15

Creating a Tab Canvas in the Layout Editor

Setting Tab Canvas, Tab Page, and Item Properties

Placing Items on a Tab Canvas Summary 11-19

11-21

Practice 11 Overview

11-16

11-18

12 Introduction to Triggers Objectives 12-2

Trigger Overview Trigger Categories

Trigger Components

12-3

12-4

12-5

Trigger Type

12-6

Trigger Code

12-8

ix

11-17

Trigger Scope

12-9

Execution Hierarchy

Summary

12-13

12-11

13 Producing Triggers Objectives 13-2 Defining Triggers in Forms Builder

Creating a Trigger

13-4

13-3

Setting Trigger Properties

13-7

PL/SQL Editor Features

13-8

The Database Trigger Editor

Writing Trigger Code

Using Variables in Triggers

Forms Builder Variables

13-10

13-13

13-11

13-14

Adding Functionality with Built-in Subprograms

13-16

Limits of Use

13-18

Using Built-in Definitions

13-19

Useful Built-Ins

13-21

Using Triggers: When-Button-Pressed Trigger Summary 13-25

13-23

Practice 13 Overview

13-27

 

14 Debugging Triggers Objectives 14-2

 

The Debugging Process

14-3

The Debug Console

14-4

The Debug Console: Stack Panel

14-5

The Debug Console: Variables Panel

14-6

 

The Debug Console: Watch Panel

14-7

The Debug Console: Form Values Panel

14-8

The Debug Console: PL/SQL Packages Panel

14-9

The Debug Console: Global/System Variables Panel

The Debug Console: Breakpoints Panel

The Debug Console

Setting Breakpoints in Client Code

14-11

14-12

14-13

x

14-10

Setting Breakpoints in Stored Code

14-14

Debugging Tips

14-15

Running a Form in Debug Mode

14-16

Stepping through Code

14-17

Debug Example

14-18

Summary 14-21 Practice 14 Overview

14-22

 

15 Adding Functionality to Items Objectives 15-2

Item Interaction Triggers

15-3

Coding Item Interaction Triggers

15-5

Interacting with Check Boxes

Changing List Items at Run Time

Displaying LOVs from Buttons

LOVs and Buttons

15-7

15-8

15-9

15-11

Populating Image Items Loading the Right Image

Populating Image Items Loading the Right Image

15-13

15-15

Populating Hierarchical Trees

15-16

Displaying Hierarchical Trees

15-18

Interacting with JavaBeans Summary 15-25

Practice 15 Overview

15-27

15-19

16 Run Time Messages and Alerts Objectives 16-2

Run-Time Messages and Alerts Overview

Detecting Run-Time Errors

Errors and Built-ins

Message Severity Levels Suppressing Messages

The FORM_TRIGGER_FAILURE Exception

Triggers for Intercepting System Messages

Handling Informative Messages

Setting Alert Properties

Planning Alerts

16-3

16-5

16-7

16-9

16-11

16-13

16-15

16-17

16-19

16-21

xi

Controlling Alerts

16-22

SHOW_ALERT Function Directing Errors to an Alert

Causes of Oracle Server Errors

Trapping Server Errors Summary 16-30 Practice 16 Overview

16-24

16-26

16-27

16-29

16-33

17 Query Triggers Objectives 17-2 Query Processing Overview 17-3 SELECT Statements Issued During Query Processing 17-5 WHERE Clause 17-7 ONETIME_WHERE Property 17-8 ORDER BY Clause 17-9 Writing Query Triggers: Pre-Query Trigger 17-10 Writing Query Triggers: Post-Query Trigger 17-11 Writing Query Triggers: Using SELECT Statements in Triggers 17-12 Query Array Processing 17-13 Coding Triggers for Enter-Query Mode 17-15 Overriding Default Query Processing 17-19 Obtaining Query Information at Run Time 17-22 Summary 17-25 Practice 17 Overview 17-27

18 Validation Objectives 18-2 The Validation Process

18-3

Controlling Validation Using Properties: Validation Unit

Controlling Validation Using Triggers

Example: Validating User Input

Using Client-Side Validation Tracking Validation Status

Controlling When Validation Occurs with Built-Ins

Summary 18-19 Practice 18 Overview

18-5

18-9

18-11

18-13

18-15

18-17

18-21

xii

19 Navigation Objectives 19-2 Navigation Overview

19-3

Understanding Internal Navigation

Controlling Navigation Using Object Properties

Mouse Navigate Property

Writing Navigation Triggers

Navigation Triggers

19-5

19-9

19-10

19-11

19-7

When-New-<object>-Instance Triggers

19-12

SET_<object>_PROPERTY Examples

19-13

The Pre- and Post-Triggers Post-Block Trigger Example

19-17

The Navigation Trap

19-14

19-16

Using Navigation Built-Ins in Triggers

19-18

Using Navigation Built-Ins in Triggers Summary 19-20

19-19

Practice 19 Overview

19-22

20 Transaction Processing Transaction Processing Overview The Commit Sequence of Events

20 Transaction Processing Transaction Processing Overview The Commit Sequence of Events

20-3

20-6

Characteristics of Commit Triggers Common Uses for Commit Triggers

Characteristics of Commit Triggers Common Uses for Commit Triggers

20-8

20-10

Life of an Update

20-12

Delete Validation

20-14

Assigning Sequence Numbers

Keeping an Audit Trail

Testing the Results of Trigger DML

DML Statements Issued During Commit Processing

Overriding Default Transaction Processing

Running against Data Sources Other than Oracle

Getting and Setting the Commit Status

Array DML

Effect of Array DML on Transactional Triggers

Implementing Array DML Summary 20-34

Practice 20 Overview

20-38

20-16

20-18

20-19

20-21

20-23

20-25

20-27

20-31

20-32

20-33

xiii

21 Writing Flexible Code Objectives 21-2 What Is Flexible Code? 21-3 Using System Variables for Current Context 21-4 System Status Variables 21-6 GET_<object>_PROPERTY Built-Ins 21-7 SET_object_PROPERTY Built-Ins 21-9 Object IDs 21-11 FIND_ Built-Ins 21-12 Using Object IDs 21-13

Increasing the Scope of Object IDs

Referencing Objects Indirectly 21-17

Summary 21-20 Practice 21 Overview 21-22

21-15

22 Sharing Objects and Code Objectives 22-2 Benefits of Reusing Objects and Code

22-3

What Are Property Classes?

Creating a Property Class

Inheriting from a Property Class

What Are Object Groups?

Creating and Using Object Groups

Copying and Subclassing Objects and Code Subclassing 22-14

What Are Object Libraries?

Benefits of the Object Library Working with Object Libraries

What Is a SmartClass?

Working with SmartClasses

Reusing PL/SQL

What Are PL/SQL Libraries?

Writing Code for Libraries

Creating Library Program Units

Attach Library Dialog Box

Calls and Searches Summary 22-30 Practice 22 Overview

22-5

22-6

22-10

22-8

22-11

22-16

22-18

22-19

22-21

22-24

22-25

22-26

22-27

22-20

22-22

22-28

22-32

22-13

23 Introducing Multiple Form Applications Objectives 23-2

Multiple Form Applications Overview

23-3

Multiple Form Session

23-4

Benefits of Multiple Form Applications

23-5

Starting Another Form Module

23-6

Defining Multiple Form Functionality

23-8

Sharing Data Among Modules Linking by Global Variables

Global Variables: Opening Another Form

Global Variables: Restricted Query at Startup

Assigning Global Variables in the Opened Form

Linking by Parameter Lists

23-12

23-10

23-11

23-13

23-14

23-15

Linking by Global Record Groups

Linking by Shared PL/SQL Variables

23-18

23-19

Conditional Opening

23-21

Closing the Session

23-22

Closing a Form with EXIT_FORM

23-23

Other Useful Triggers

23-24

Summary 23-26 Practice 23 Overview

23-28

A Practice Solutions

B Table Descriptions

C Introduction to Query Builder

D Locking in Forms

E Oracle9i Object Features

F Using the Layout Editor

xv

Preface

Profile

Before you begin this course

Before you begin this course, you should be able to:

• Create SQL statements.

• Create PL/SQL constructs, including conditional statements, loops, procedures and functions.

• Create PL/SQL stored (server) procedures, functions, and packages.

• Use a graphical user interface (GUI).

• Use a Web browser.

Prerequisites

Either

• Introduction to Oracle9i: SQL (ILT)

• or the following CBT Library:

– Oracle SQL: Basic SELECT statements

– Oracle SQL: Data Retrieval Techniques

– Oracle SQL: DML and DDL

• or Introduction to Oracle9i for Experienced SQL Users (ILT)

• Introduction to Oracle9i: SQL Basics (ILT)

And either

• Oracle9i: Program with PL/SQL (ILT)

• or the following CBT Library:

– PL/SQL: Basics

– PL/SQL: Procedures, Functions, and Packages

– PL/SQL: Database Programming

• Or both:

– Oracle9i: PL/SQL Fundamentals (ILT)

– Oracle9i: Develop PL/SQL Program Units (ILT)

Suggested prerequisites

• Oracle9i: Advanced SQL (ILT) (if you attended Introduction to Oracle9i: SQL Basics (ILT))

• Oracle9i: Advanced PL/SQL (ILT)

How this course is organized

Oracle9i Forms Developer: Build Internet Applications is an instructor-led course featuring lecture and hands-on exercises. Online demonstrations and written practice sessions reinforce the concepts and skills introduced.

Related Publications

Oracle publications

Title

Part Number

Oracle Forms Developer, Release 6i:

Getting Started (Windows 95/NT)

A73154-01

Oracle Forms Developer and Reports Developer, Release 6i:

Guidelines for Building Applications

A73073-02

Oracle9iAS Forms Services Deployment Guide, Release 9.0.2

A92175-01

Additional publications

Release notes:

<ORACLE_HOME>\doc\ids902welcome\relnotes\forms_developer\forms_relnotes.pdf

and toc.html

Typographic Conventions

Typographic conventions in text

Convention

Element

Example

Bold italic

Glossary term (if there is a glossary)

The algorithm inserts the new key.

Caps and

Buttons,

Click the Executable button. Select the Can’t Delete Card check box. Assign a When-Validate-Item trigger to the ORDERS block. Open the Master Schedule window.

lowercase

check boxes,

triggers,

windows

Courier new,

Code output,

Code output: debug.set (‘I”, 300); Directory: bin (DOS), $FMHOME (UNIX) Filename: Locate the init.ora file. Password: User tiger as your password. Pathname: Open c:\my_docs\projects URL: Go to http://www.oracle.com User input: Enter 300 Username: Log on as scott

case sensitive

directory names,

(default is

filenames,

lowercase)

passwords,

pathnames,

URLs,

user input,

usernames

Initial cap

Graphics labels (unless the term is a proper noun)

Customer address (but Oracle Payables)

Italic

Emphasized words and phrases, titles of books and courses, variables

Do not save changes to the database.

For further information, see Oracle7 Server SQL Language Reference Manual.

Enter user_id@us.oracle.com, where user_id is the name of the user.

Quotation

Interface elements with long names that have only initial caps; lesson and chapter titles in cross-references

Select “Include a reusable module component” and click Finish.

marks

This subject is covered in Unit II, Lesson 3, “Working with Objects.”

Uppercase

SQL column names, commands, functions, schemas, table names

Use the SELECT command to view information stored in the LAST_NAME column of the EMP table.

Typographic Conventions (continued)

Typographic conventions in text (continued)

Convention

Element

Example

Right arrow

Menu paths

Select File > Save.

Brackets

Key names

Press [Enter].

Commas

Key sequences

Press and release keys one at a time:

[Alternate], [F], [D]

Plus signs

Key combinations

Press and hold these keys simultaneously:

[Ctrl]+[Alt]+[Del]

Typographic conventions in code

Convention

Element

Example

Caps and

Oracle Forms

When-Validate-Item

lowercase

triggers

Lowercase

Column names,

SELECT last_name FROM s_emp;

table names

Passwords

DROP USER scott IDENTIFIED BY tiger;

PL/SQL objects

OG_ACTIVATE_LAYER (OG_GET_LAYER (‘prod_pie_layer’))

Lowercase italic

Syntax variables

CREATE ROLE role

Uppercase

SQL commands

SELECT userid FROM emp;

and functions

Instructor

Preface

Instructor Preface

General course information for instructors:

Demonstrations: All demonstration forms are contained in the DEMO directory. Practice Sessions: Students should save their work in the LAB directory.

Note: Students might want to view the form output that they are asked to produce in each question. Solution files of all forms are available in the SOLN directory. These files are named ORDWKXX.FMB and CUSTWKXX.FMB, where XX is the lesson number the solution file is for. The solution file for Lesson 1 is called summitwk1.fmb.

General setup information for instructors:

Introduction: The Oracle Internet platform is a complete and integrated e-business solution consisting of:

• Oracle9i database to manage all your content

• Oracle9i Internet Developer Suite (9iDS) to build all of your applications

• Oracle9i Application Server (9iAS) to run all your applications

The Oracle Internet platform provides integrated development, deployment, and management tools that simplify creating and deploying applications that you need to run your business on the Internet. Oracle9i Forms Developer, a component of 9iDS, and Oracle Forms Services, a component of 9iAS, are key elements in the Oracle Internet platform.

Recommended Setup: The recommended setup for this course uses OC4J (Oracle9i Containers for J2EE) to test Forms modules from within Forms Builder. This setup enables students to develop and test their Forms applications with only 9iDS installed on each student machine. No middle-tier server is required for this course. However, in a production environment, the deployment would be on three separate tiers:

• The client tier contains the Web browser where the application is displayed and used.

• The middle tier is the application server where application logic and server software reside.

• The database tier is the database server where enterprise data is stored.

With this architecture, application logic resides in a single tier and can be maintained easily at one location. The architectural design of the middle tier is optimized for server functions, including access to a database. Note: Alternative setups are possible. For more information, refer to Oracle9iAS Forms Services Deployment Guide Release 9.0.2 for Windows and UNIX.

Oracle9i Forms Developer: Build Internet Applications

Instructor Preface-2

Instructor Note

Forms Services

Oracle Forms Services, a component of 9iAS, deploys Forms applications with database access to Java clients in a Web environment. The components of Oracle Forms Services and their basic responsibilities are:

• Forms Listener Servlet: Initiates the run-time process on behalf of the Forms Client and maintains communication between the client and the runtime process

• Forms Runtime Engine: Handles the user’s context, executing business logic and conducting necessary transactions with the Oracle9i database.

• Forms Servlet: Dynamically creates an HTML page to be sent back to the user’s browser.

• Forms Client (Java Client): With Internet applications, the user interface layer is

loaded incrementally on the client in the form of a generic Java applet. This applet is also known as the Java Client or Forms Client. The Java Client has three primary functions:

- To render the Forms Services application display for the user

- To process user interaction back to Forms Services efficiently

- To process incoming messages from Forms Services and translate them into interface objects for the end user efficiently

Web Listener In order to run Forms applications, a Web listener is required on the middle tier. The Web listener services requests from the client to run a Forms application. Oracle9i Application Server uses Oracle HTTP Server (OHS), powered by Apache Web server technology, to provide Web listening services. For Forms, OHS routes requests through mod_oc4j to the OC4J component of 9iAS. This course uses the OC4J that comes with Oracle9iDS for testing purposes, so no middle-tier server is needed. However, in a production environment the middle tier is required.

Java Runtime Environment To run a Java applet, you must install a Java Runtime Environment (JRE) on the client. The JRE may be a part of any Java-enabled Web browser, such as Netscape Navigator or Microsoft Internet Explorer, or it may be installed separately, such as an AppletViewer in a JavaSoft Java Development Kit (JDK). Oracle also offers a special client software product, Oracle JInitiator. JInitiator is an optimized plug-in to a Web browser to run a Forms Services application. JInitiator is implemented in the setup for this course.

Oracle9i Forms Developer: Build Internet Applications

Instructor Preface-3

Instructor Note

Steps to Deploy Forms Applications In the classroom setup for this course, applications are tested using OC4J that comes with Oracle9iDS, so that middle-tier deployment is not necessary. However, you will need to explain to students how applications are deployed to the middle tier in a production environment. The steps to deploy applications to the middle tier are:

1. Configure the HTTP Server and OC4J on the middle tier. This is done for you in the installation of Oracle9i Application Server.

2. Configure the Forms Services environment variables. This is done for you in the installation of 9iAS. You may need to set the FORMS90_PATH variable on the middle tier to the directory that will contain the executable Forms applications (the FMX files).

3. Verify that the Oracle HTTP Server is running: Open Internet Explorer and enter the URL for the middle-tier application server. It should return a page to your browser.

4. Verify that Forms Services is running: In Internet Explorer, enter the URL for the Forms Servlet as follows:

http://<middle-tier application server>:

<OC4J Port>/forms90/f90servlet

For example:

http://pgamer-wah.us.oracle.com:

8888/forms90/f90servlet

A window should display in your browser stating that Forms Services has been installed successfully.

5. Generate the executable (FMX) for the middle tier platform. If deploying on a platform that is different from your development platform, FTP the FMB file to the middle tier and generate it there. If it is the same platform, you can just FTP the

FMX.

6. Run the form by entering its URL in your browser:

http://<middle-tier application server>:

<OHS Port>/forms90/f90servlet?form=<formname.fmx>

For example:

http://pgamer-wah.us.oracle.com:

80/forms90/f90servlet?form=text.fmx

Oracle9i Forms Developer: Build Internet Applications

Instructor Preface-4

Introduction Copyright © Oracle Corporation, 2002. All rights reserved.

Introduction

Introduction Copyright © Oracle Corporation, 2002. All rights reserved.

Copyright © Oracle Corporation, 2002. All rights reserved.

Schedule:

Timing

Topic

15

minutes

Lecture

15

minutes

Total

Objectives

After completing this lesson, you should be able to do the following:

Identify the course objectives

Identify the course content and structure

objectives • Identify the course content and structure Copyright © Oracle Corporation, 2002. All rights reserved.

Copyright © Oracle Corporation, 2002. All rights reserved.

Introduction

Overview

This lesson introduces you to the Oracle9i Forms Developer: Build Internet Applications course:

• The objectives that the course intends to meet

• The topics that it covers

• How the topics are structured over the duration of the course

Oracle9i Forms Developer: Build Internet Applications

I-2

Release 9i Curriculum

Release 9 i Curriculum Copyright © Oracle Corporation, 2002. All rights reserved.
Release 9 i Curriculum Copyright © Oracle Corporation, 2002. All rights reserved.

Copyright © Oracle Corporation, 2002. All rights reserved.

Forms 9i Curriculum In addition to this Build Internet Applications course, advanced topics will be addressed through Web-based titles on Oracle Learning Network (OLN). The OLN titles appear in the curriculum map above. The New Features inClass course will be offered for experienced Forms developers migrating to 9i.

Oracle9i Forms Developer: Build Internet Applications

I-3

Course Objectives

After completing this course, you should be able to do the following:

Create form modules including components for database interaction and GUI controls.

Display form modules in multiple windows and a variety of layout styles.

Test form modules in a Web browser.

Debug form modules in a three-tier environment.

browser. • Debug form modules in a three-tier environment. Copyright © Oracle Corporation, 2002. All rights

Copyright © Oracle Corporation, 2002. All rights reserved.

Course Objectives Course Description In this course, you will learn to build, test, and deploy interactive Internet applications. Working in a graphical user interface (GUI) environment, you will learn how to create and customize forms with user input items such as check boxes, list items, and radio groups. You will also learn how to modify data access by creating event-related triggers, and you will display Forms elements and data in multiple canvases and windows.

Oracle9i Forms Developer: Build Internet Applications

I-4

Course Objectives

Implement triggers to:

Enhance functionality

Communicate with users

Supplement validation

Control navigation

Modify default transaction processing

Control user interaction

Reuse objects and code

Link one form module to another

Reuse objects and code • Link one form module to another Copyright © Oracle Corporation, 2002.

Copyright © Oracle Corporation, 2002. All rights reserved.

Oracle9i Forms Developer: Build Internet Applications

I-5

Course Content

Day 1

Lesson 1: Introduction to Oracle Forms Developer and Oracle Forms Services

Lesson 2: Running a Forms Builder Application

Lesson 3: Working in the Forms Developer Environment

Lesson 4: Creating a Basic Form Module

Lesson 5: Working with Data Blocks and Frames

Form Module • Lesson 5: Working with Data Blocks and Frames Copyright © Oracle Corporation, 2002.

Copyright © Oracle Corporation, 2002. All rights reserved.

Course Content The lesson titles show the topics that is covered in this course, and the usual sequence of lessons. However, the daily schedule is an estimate, and may vary for each class.

Oracle9i Forms Developer: Build Internet Applications

I-6

Course Content

Day 2

Lesson 6: Working with Text Items

Lesson 7: Creating LOVs and Editors

Lesson 8: Creating Additional Input Items

Lesson 9: Creating Noninput Items

Additional Input Items • Lesson 9: Creating Noninput Items Copyright © Oracle Corporation, 2002. All rights

Copyright © Oracle Corporation, 2002. All rights reserved.

Oracle9i Forms Developer: Build Internet Applications

I-7

Course Content

Day 3

Lesson 10: Creating Windows and Content Canvases

Lesson 11: Working with Other Canvas Types

Lesson 12: Introduction to Triggers

Lesson 13: Producing Triggers

Lesson 14: Debugging Triggers

13: Producing Triggers • Lesson 14: Debugging Triggers Copyright © Oracle Corporation, 2002. All rights reserved.

Copyright © Oracle Corporation, 2002. All rights reserved.

Oracle9i Forms Developer: Build Internet Applications

I-8

Course Content

Day 4

Lesson 15: Adding Functionality to Items

Lesson 16: Run-time Messages and Alerts

Lesson 17: Query Triggers

Lesson 18: Validation

Lesson 19: Navigation

Triggers • Lesson 18: Validation • Lesson 19: Navigation Copyright © Oracle Corporation, 2002. All rights

Copyright © Oracle Corporation, 2002. All rights reserved.

Oracle9i Forms Developer: Build Internet Applications

I-9

Course Content

Day 5

Lesson 20: Transaction Processing

Lesson 21: Writing Flexible Code

Lesson 22: Sharing Objects and Code

Lesson 23: Introducing Multiple Form Applications

Code • Lesson 23: Introducing Multiple Form Applications Copyright © Oracle Corporation, 2002. All rights reserved.

Copyright © Oracle Corporation, 2002. All rights reserved.

Oracle9i Forms Developer: Build Internet Applications

I-10

Introduction to Oracle Forms Developer and Oracle Forms Services Copyright © Oracle Corporation, 2002. All

Introduction to Oracle Forms Developer and Oracle Forms Services

to Oracle Forms Developer and Oracle Forms Services Copyright © Oracle Corporation, 2002. All rights reserved.

Copyright © Oracle Corporation, 2002. All rights reserved.

Schedule:

Timing

Topic

45

minutes

Lecture

25

minutes

Practice

70

minutes

Total

Objectives

After completing this lesson, you should be able to do the following:

Describe the components of Oracle9i Developer Suite and the Oracle9i Application Server

Describe the features and benefits of Oracle Forms Services and Oracle Forms Developer

Describe the architecture of Oracle Forms Services

Describe Forms Builder components

Navigate the Forms Builder interface

Customize the Forms Builder session

Use the online help facilities

Describe the course application

online help facilities • Describe the course application Copyright © Oracle Corporation, 2002. All rights reserved.

Copyright © Oracle Corporation, 2002. All rights reserved.

Introduction Overview This course teaches you how to build effective and professional form applications using Oracle Forms Developer. This lesson identifies the key features of Oracle Forms Developer, Oracle Forms Services, and the course application model and contents. There are many terms used in this course that may be unfamiliar to you. For a glossary containing definitions of many of these terms, see http://www.oracle.com/glossary.

Oracle9i Forms Developer: Build Internet Applications

1-2

Internet Computing Solutions Application Type and Audience Product Oracle Approach Products Enterprise
Internet Computing Solutions
Application Type
and Audience
Product
Oracle
Approach
Products
Enterprise applications,
Business developers
Repository-based
modeling & generation,
Declarative
Oracle Designer,
Oracle Forms Developer,
& Oracle Forms Services
Java components,
Component developers
Two-way coding,
Java and JavaBeans
Oracle JDeveloper
Oracle9i Application Server
Self-service applications &
content management,
Web site developers
Browser-based,
Dynamic HTML
Oracle Portal
Oracle Database Server
Reporting and
analytical applications,
MIS & business users
Dynamic Web
reporting, Drill,
Analyzing, Forecasting
Oracle Reports Developer,
Oracle Reports Services,
Oracle Discoverer, &
Oracle Express
Reports Services, Oracle Discoverer, & Oracle Express Copyright © Oracle Corporation, 2002. All rights reserved.

Copyright © Oracle Corporation, 2002. All rights reserved.

Internet Computing Solutions

Oracle offers a range of tools and deployment options for Internet computing. Different types of developers and applications require different toolsets.

• Enterprise application developers need a declarative model-based approach. Oracle Designer and Oracle Forms Developer provide this solution. This course focuses on how you can use Oracle Forms Developer to rapidly build scalable, high-performance applications for the Internet and then deploy the applications with Oracle Forms Services.

• Component developers need different tools and methods. For these developers, Java is the language of choice. Oracle’s solution is JDeveloper.

• For Web site developers and content publishers who want to build self-service dynamic Hypertext Markup Language (HTML) applications for Web sites, Oracle Portal provides an easy-to-use development environment that resides entirely inside an Oracle9i database. Portal provides a browser-based environment from development through deployment of an application.

• For Management Information System (MIS) developers and end users, there is the Oracle Business Intelligence toolset. Oracle Reports Developer, Oracle Reports Services, Oracle Discoverer, and Oracle Express provide the whole range for reporting, analysis, and trending facilities.

Oracle9i Forms Developer: Build Internet Applications

1-3

Oracle9i Products

Oracle9 i Products Forms Services Forms Developer Copyright © Oracle Corporation, 2002. All rights reserved.
Oracle9 i Products Forms Services Forms Developer Copyright © Oracle Corporation, 2002. All rights reserved.
Oracle9 i Products Forms Services Forms Developer Copyright © Oracle Corporation, 2002. All rights reserved.

Forms Services

Oracle9 i Products Forms Services Forms Developer Copyright © Oracle Corporation, 2002. All rights reserved.
Oracle9 i Products Forms Services Forms Developer Copyright © Oracle Corporation, 2002. All rights reserved.
Oracle9 i Products Forms Services Forms Developer Copyright © Oracle Corporation, 2002. All rights reserved.

Forms Developer

Oracle9 i Products Forms Services Forms Developer Copyright © Oracle Corporation, 2002. All rights reserved.
Oracle9 i Products Forms Services Forms Developer Copyright © Oracle Corporation, 2002. All rights reserved.

Copyright © Oracle Corporation, 2002. All rights reserved.

Oracle9i Products Oracle9i Database: Manages all of your information, such as Word documents, Excel spreadsheets, XML, and images. Oracle9iDS tools can automatically reuse the database structure and its integrity constraints, which reduces the amount of manual coding. Oracle9i Application Server (Oracle9iAS): Runs all of your applications, including Java, wireless, portals, and business intelligence. Using Oracle9iAS, you can deploy and manage in a single application server all applications developed with Oracle9iDS. The Oracle9i Application Server contains Oracle9i Forms Services that you use to deploy your Forms applications. Oracle9i Developer Suite (Oracle9iDS): Leverages the infrastructure offered by Oracle9i Application Server (Oracle9iAS) and Oracle9i Database, enabling developers to quickly and easily build scalable, secure, and reliable e-business applications. The suite provides a complete and highly productive development environment for building applications. Oracle9i Forms Developer that you use to build Forms applications is part of Oracle9i Developer Suite.

Oracle9i Forms Developer: Build Internet Applications

1-4

Oracle 9iAS Architecture

Oracle 9 i AS Architecture Copyright © Oracle Corporation, 2002. All rights reserved.
Oracle 9 i AS Architecture Copyright © Oracle Corporation, 2002. All rights reserved.

Copyright © Oracle Corporation, 2002. All rights reserved.

Oracle9i Application Server Architecture Oracle9iAS has a layered architecture that consists of the following services:

Communication Services - Communication management for a variety of protocols

Application Runtime Services - A J2EE Container that provides a common runtime environment for Applications developed as JSPs, Servlets,EJBs, and Web Services

System Services - A common set of runtime services that are necessary for J2EE Applications and Web Services, such as request dispatch and scheduling, resource management, resource pooling,clustering, fault monitoring, transaction management, and messaging

Management Services - A common set of systems management services to monitor the status, performance and faults of the system; to monitor resource consumption and usage; to manage a single instance or cluster of instances; to centrally administer security for users and applications; and to provide a comprehensive directory service framework to manage users

Connectivity Services - Provide connectivity to a variety of systems

Solutions - A comprehensive set of solutions all built on the infrastructure described above including Enterprise Portals, Enterprise Integration, Business Intelligence, Wireless, and ISV Solutions

Oracle9i Forms Developer: Build Internet Applications

1-5

Oracle 9iAS Components

Oracle9iAS Forms Services
Oracle9iAS Forms Services
Oracle 9 i AS Components Oracle9iAS Forms Services Copyright © Oracle Corporation, 2002. All rights reserved.

Copyright © Oracle Corporation, 2002. All rights reserved.

Oracle9i Application Server Components With the components of Oracle 9iAS, you can:

Extract and analyze business intelligence: Clickstream, Personalization, Reports Services, Discoverer

Integrate your business: InterConnect, Workflow, Unified Messaging, Internet File System

Create personalized portals: Oracle 9iAS Portal

Deploy dynamic Web applications: XDK, Web Services, Forms Services, OC4J, HTTP Server

Manage and secure your Web infrastructure: Enterprise Manager, Security, Internet Directory.

Instructor Note The overviews of iAS and iDS should not be presented in detail, but merely to show where Forms Services and Forms Developer fit into the product set. For further information on Oracle9iAS architecture and components, see:

Oracle9i Application Server Product White Paper, January 2002. Oracle9i Application Server Release 2 Data Sheet, December 2001.

Oracle9i Forms Developer: Build Internet Applications

1-6

Oracle Forms Services Overview

Oracle Forms Services Overview Oracle9iAS Forms Services A component of Oracle9 i Application Server that deploys
Oracle Forms Services Overview Oracle9iAS Forms Services A component of Oracle9 i Application Server that deploys
Oracle9iAS Forms Services
Oracle9iAS Forms Services

A component of Oracle9i Application Server that deploys Forms applications to Java clients in a Web environment.

to Java clients in a Web e n v i r o n m e n

Copyright © Oracle Corporation, 2002. All rights reserved.

What Is Oracle Forms Services? Oracle Forms Services is a component of Oracle9i Application Server for delivering Oracle Forms Developer applications to the Internet. Oracle Forms Services automatically provides the infrastructure that is needed to successfully deliver applications on the Internet through built-in services and optimizations. Oracle Forms Services uses a three-tier architecture to deploy database applications:

• The client tier contains the Web browser, where the application is displayed and used.

• The middle tier is the application server, where the application logic and server software reside.

• The database tier is the database server, where enterprise data is stored.

Oracle9i Forms Developer: Build Internet Applications

1-7

Forms Services Architecture

Middle Tier:

Client Tier
Client Tier

Application Server

Database Tier

Forms Listener Servlet

Forms Servlet

Incrementally

downloaded

Forms Runtime User interface layer

Application

logic layer

Data manager/ PL/SQL engine

Application logic layer Data manager/ PL/SQL engine File containing application code JRE Java applet Net

File containing application code

logic layer Data manager/ PL/SQL engine File containing application code JRE Java applet Net Services DB

JRE

logic layer Data manager/ PL/SQL engine File containing application code JRE Java applet Net Services DB

Java applet

Net Services DB
Net
Services
DB
application code JRE Java applet Net Services DB Copyright © Oracle Corporation, 2002. All rights reserved.

Copyright © Oracle Corporation, 2002. All rights reserved.

Forms Services Architecture Forms Services consists of four major components: the Java client (Forms Client), the Forms Listener Servlet, the Forms Servlet, and the Forms Runtime Engine. You learn about these components in Lesson 2, Running a Forms Developer Application. When a user runs a forms session over the Web, a thin, Java-based Forms applet is dynamically downloaded from the application server and automatically cached on the Java client machine. The same Java applet code can be used for any form, regardless of size and complexity. Although Forms Services uses a Java applet for displaying the form on the client browser, the developer does not need to know Java in order to develop and deploy a Forms application.

Instructor Note See Oracle9iAS Forms Services: Technical Overview for additional information on Forms Services.

Oracle9i Forms Developer: Build Internet Applications

1-8

Benefits of Oracle9i Developer Suite

Application Development •OWB •JDeveloper •Discoverer •Forms •Reports •Designer •SCM Business
Application Development
•OWB
•JDeveloper
•Discoverer
•Forms
•Reports
•Designer
•SCM
Business Intelligence
•Reports •Designer •SCM Business Intelligence Copyright © Oracle Corporation, 2002. All rights reserved.

Copyright © Oracle Corporation, 2002. All rights reserved.

Benefits of Oracle9i Developer Suite The Oracle9i Developer Suite:

• Combines the power of Oracle Application Development tools and Oracle Business Intelligence tools.

• Provides a standards-based, Java and XML Integrated Development Environment and supports the full application development life-cycle.

• Provides flexible and scalable solutions for Data Warehousing and Business Intelligence.

• Optimized for the Oracle9i Database and Oracle9i Application Server

Instructor Note For further information on Oracle9iDS features and components, see:

Oracle9i Developer Suite Product White Paper, December 2001.

Oracle9i Forms Developer: Build Internet Applications

1-9

Oracle9iDS Application Development

Oracle9 i DS Application Development Copyright © Oracle Corporation, 2002. All rights reserved.
Oracle9 i DS Application Development Copyright © Oracle Corporation, 2002. All rights reserved.

Copyright © Oracle Corporation, 2002. All rights reserved.

Application Development Features of Oracle9i Developer Suite Oracle9iDS provides the following features for application development:

Modeling Oracle9i Designer provides visual modeling, reverse engineering, and code generation tools. Oracle9iDS also supports UML (Unified Modeling Language) by utilizing visual tools for Activity and Class modeling within the JDeveloper component.

Rapid Application Development (RAD) RAD capabilities in Oracle9iDS feature integrated builders, re-entrant wizards, live previewers, and property inspectors. The JDeveloper component provides additional productivity through Business Components for Java (BC4J), a built-in J2EE framework.

J2EE and Web Services Oracle9iDS supports the latest J2EE 1.2 APIs, including Enterprise JavaBeans (EJB), Java Server Pages (JSP), and Servlets. Web services support SOAP (Simple Object Access Protocol), WSDL (Web Service Definition Language), and UDDI (Universal Description, Discovery, and Integration).

Team Support Oracle9i Software Configuration Management provides versioning, dependency management, and impact analysis for all objects and file types.

Oracle9i Forms Developer: Build Internet Applications

1-10

Oracle9iDS Business Intelligence

Oracle9 i DS Business Intelligence Copyright © Oracle Corporation, 2002. All rights reserved.
Oracle9 i DS Business Intelligence Copyright © Oracle Corporation, 2002. All rights reserved.

Copyright © Oracle Corporation, 2002. All rights reserved.

Business Intelligence Features of Oracle9i Developer Suite Oracle9iDS provides the following Business Intelligence features:

Extract, transformation, and load (ETL) Oracle9i Warehouse Builder provides a graphical interface for mapping and transformation. It also provides an extensible framework for integrating a diverse set of data sources and integration with Business Intelligence Tools.

End user query and analysis With Oracle9i Discoverer Administrator, you can create and maintain a business- oriented view of the data that supports the Discoverer client tools: Discoverer Plus and Discoverer Viewer (in Oracle9iAS), and Discoverer Desktop (in Oracle9iDS).

Enterprise Reporting Oracle9i Reports Developer enables the developer to access any data, to publish it in any format, and to send it anywhere. Supported formats include HTML with CSS, PDF, RTF, Postscript, and XML.

Oracle9i Forms Developer: Build Internet Applications

1-11

Oracle Forms Developer Overview

Oracle Forms Developer:

Oracle Forms Developer Overview Oracle Forms Developer: • Is a productive development environment for Internet business

Is a productive development environment for Internet business applications

Provides for:

for Internet business applications • Provides for: – Data entry – Queries Copyright © Oracle

Data entry

Queries

applications • Provides for: – Data entry – Queries Copyright © Oracle Corporation, 2002. All rights
applications • Provides for: – Data entry – Queries Copyright © Oracle Corporation, 2002. All rights

Copyright © Oracle Corporation, 2002. All rights reserved.

What Is Oracle Forms Developer? Oracle Forms Developer, a component of the Oracle Internet Developer Suite, is a productive development environment for building enterprise-class, scalable database applications for the Internet. Oracle Forms Developer provides a set of tools that enable business developers to easily and quickly construct sophisticated database forms and business logic with a minimum of effort. Oracle Forms Developer uses powerful declarative capabilities to rapidly create applications from database definitions that leverage the tight integration with Oracle9i. The toolset leverages Java technology, promotes reuse, and is designed to allow developers to declaratively build rich user interfaces. Developer productivity is further increased through a single integrated development environment that enables distributed debugging across all tiers, utilizing the same PL/SQL language for both server and client. Oracle Forms Developer’s tight integration with Oracle Designer enables you to use a productive model-driven development approach. Oracle Forms Developer applications can be automatically generated from business requirements designed in the Oracle Designer modeling environment. These models are stored in the Oracle Repository. Code-level changes made within the Oracle Forms Developer environment can be automatically reverse engineered back into the models, preserving the integrity between the models and the application.

Oracle9i Forms Developer: Build Internet Applications

1-12

Oracle9i Forms Developer: Key Features

Tools for rapid application development

Application partitioning

Flexible source control

Extended scalability

Object reuse

source control • Extended scalability • Object reuse Copyright © Oracle Corporation, 2002. All rights reserved.

Copyright © Oracle Corporation, 2002. All rights reserved.

Oracle9i Forms Developer: Key Features Tools for Rapid Application Development: You can create and modify applications with little or no code. Productivity is enhanced with wizard-based rapid application development and built-in commands that perform common functions. Application Partitioning: You can place individual PL/SQL program units on the database server or in the application, whichever is most suitable. You can drag-and-drop objects between modules and the database server. Flexible Source Control: Oracle9i Software Configuration Manager (SCM) is integrated directly in Forms Developer to provide source control options, such as checkin and checkout capability, versioning, diff and merge utilities, and impact analysis. Extended Scalability: The multi-tiered architecture enables you to scale applications from a single user to tens of thousands of users, with no changes to the application. You can use server functionality, such as array DML, database cursors, or bind variables, to improve scalability. Object Reuse: Oracle Forms Developer offers an inheritance model that facilitates the inheritance of attributes and code from one object to another and from one application to another, through subclassing and object libraries.

Oracle9i Forms Developer: Build Internet Applications

1-13

Forms Builder Components:

Object Navigator

• Client-side and server-side objects displayed hierarchically • Toolbar to create, delete or unload, expand
• Client-side and
server-side
objects
displayed
hierarchically
• Toolbar
to create,
delete or
unload, expand
or contract

Icons to

represent

objects

Fast

Search

feature

• Icons to represent objects • Fast Search feature Copyright © Oracle Corporation, 2002. All rights

Copyright © Oracle Corporation, 2002. All rights reserved.

Forms Builder Components: Object Navigator The interface components of the Forms Builder tool help to provide the flexibility and productivity of the Oracle Forms Developer development environment.

The Object Navigator is a hierarchical browsing and editing interface. You can use the Object Navigator to locate and manipulate application objects quickly and easily. Features include:

• A hierarchy represented by indentation and expandable nodes. (Top-level nodes show module types, database objects, and built-in packages. All other nodes and the objects they contain are indented to indicate that they belong to these higher level nodes.)

• Find field and icons, enabling forward and backward searches for any level of node or for an individual item in a node.

• Icons in the vertical toolbar replicating common Edit and View menu functions.

• An icon next to each object to indicate the object type.

Instructor Note Mention these briefly. You can start Forms Builder to demonstrate each component as you discuss it. Demonstration: Open an existing form, and briefly explain the features of the Object Navigator. Leave the form open.

Oracle9i Forms Developer: Build Internet Applications

1-14

Forms Builder Components:

Property Palette

Copy and paste properties

Fast search feature

• Copy and paste properties • Fast search feature Copyright © Oracle Corporation, 2002. All rights
• Copy and paste properties • Fast search feature Copyright © Oracle Corporation, 2002. All rights

Copyright © Oracle Corporation, 2002. All rights reserved.

Forms Builder Components: Property Palette

All objects in a module, including the module itself, have properties that you can see and modify in the Property Palette. Features include:

• Copy and reuse properties from another object

• Find field and icons, similar to Object Navigator

Instructor Note Demonstration: Open the Property Palette for one of the objects in the form and point out its features. Click on a different object to show that the Property Palette changes to the properties of the new object.

Oracle9i Forms Developer: Build Internet Applications

1-15

Forms Builder Components:

Layout Editor

Toolbar

Tool

palette

Forms Builder Components: Layout Editor Toolbar Tool palette Copyright © Oracle Corporation, 2002. All rights reserved.
Forms Builder Components: Layout Editor Toolbar Tool palette Copyright © Oracle Corporation, 2002. All rights reserved.

Copyright © Oracle Corporation, 2002. All rights reserved.

Forms Builder Components: Layout Editor The Layout Editor (or Layout Model) is a graphical design facility for creating and arranging interface items and graphical objects in your application. You can use the Tool palette and the Toolbar available in the Layout Editor to design the style, color, size, and arrangement of visual objects in the application. The layout can include graphical objects and images.

Instructor Note It is important for the students to gain exposure to the Object Navigator and the Layout Editor in Forms Builder. They will need this knowledge to complete the practice exercise at the end of this lesson. Demonstration

• Go to the Layout Editor. Point out the major tools in the Toolbar. Demonstrate some of the major tools in the Tool Palette.

• Draw a rectangle and an ellipse, and also show how to draw a square and a circle by holding down the [Shift] key when using the rectangle and ellipse tools.

• Demonstrate selecting multiple objects and show how to group various objects.

• Demonstrate resizing, moving, aligning, coloring, and deleting objects.

• Demonstrate using the Text tool and changing the font style and size.

• Demonstrate how to pin a tool by double-clicking a tool.

Oracle9i Forms Developer: Build Internet Applications

1-16

Forms Builder Components:

PL/SQL Editor

With the PL/SQL Editor you can:

Use PL/SQL in Forms.

Enter and compile code.

can: • Use PL/SQL in Forms. • Enter and compile code. Copyright © Oracle Corporation, 2002.
can: • Use PL/SQL in Forms. • Enter and compile code. Copyright © Oracle Corporation, 2002.

Copyright © Oracle Corporation, 2002. All rights reserved.

Forms Builder Components: PL/SQL Editor The PL/SQL Editor enables you to incorporate PL/SQL code objects into your form. Code objects in Forms Developer include event triggers, subprograms (functions and procedures), menu item commands, menu startup code, and packages. You enter and compile code in the PL/SQL Editor. You will learn more about the PL/SQL Editor in later lessons when you use it to code triggers in Forms Builder.

Oracle9i Forms Developer: Build Internet Applications

1-17

Getting Started in the Forms Builder Interface

• • – Menu: – Toolbar:
Menu:
Toolbar:

Start Forms Builder

Connect to the database:

Select File > Connect OR

Click Connect

to the database: Select File > Connect OR Click Connect Copyright © Oracle Corporation, 2002. All

Copyright © Oracle Corporation, 2002. All rights reserved.

Getting Started in the Forms Builder Interface Starting Forms Builder To start Forms Builder, invoke it from the Oracle 9i Forms group. When you invoke Forms Builder, you first see a Welcome dialog box. If you click Cancel to dismiss the dialog box, you see the Object Navigator and an empty new module.

If you build applications that access database objects, you need to connect to a database account from the Forms Builder. Connect to a database if you need to:

• Compile code that contains SQL

• Access database objects in the Object Navigator

• Create Oracle Forms Developer objects that are based on database objects

Oracle9i Forms Developer: Build Internet Applications

1-18

Getting Started in the Forms Builder Interface (continued) How to Connect to Oracle

1. Select File > Connect from the menu, or click the Connect icon in the toolbar.

2. Enter the database user and password in the Connect dialog box. If not connecting to the default database, also provide the necessary connect string or database alias. Note: Oracle Forms Developer automatically displays the Connect dialog box if you try to perform a task that requires connection.

Instructor Note

• Invoke Forms Builder.

• Open an existing form. Use one of the forms from the existing prebuilt application.

We use an existing form in this lesson to familiarize students with the Oracle Forms Developer interface. Later we create new forms by using the wizards. Forms Builder will probably prompt you to connect to the database when it tries to run the form. Also show students the File > Connect menu option.

Forms Builder: Menu Structure

Forms Builder: Menu Structure Copyright © Oracle Corporation, 2002. All rights reserved.
Forms Builder: Menu Structure Copyright © Oracle Corporation, 2002. All rights reserved.

Copyright © Oracle Corporation, 2002. All rights reserved.

Navigating the Forms Builder Main Menu Introduction The Forms Builder main menu contains options to enable you to create, modify, and manage your form modules. Common Menu Features The following table describes some common features in GUI menus:

Feature

Description

Underline

Shortcut key: [Alt] + letter

Ellipsis (…)

Additional input, usually by using a dialog box

Menu option has a submenu

Menu option has a submenu

Windows menu

List of open windows; select any window to make it active

Help

List of help facilities: Online Help, Forms on OTN, About box

Oracle9i Forms Developer: Build Internet Applications

1-20

Navigating the Forms Builder Main Menu (continued) Native GUI Interface The menu shown in the slide depicts the Windows NT environment. However, menus appear with the same look and feel of your native GUI interface. For example, in Motif, the Windows Print Dialog options appear as submenus of the Font menu. Forms Builder Main Menu

Menu Item

Description

File

Common file utilities, such as open, save, connect, administration

Edit

Cut, copy, paste, create, preferences, and so on

View

Switch view in current window; options vary depending on context

Layout

Common commands for use in Layout Editor

Program

Includes compilation and commands related to code

Debug

Invokes debugger functionality

Tools

Access to wizards and other Forms Builder components

Instructor Note Show the Main menu options, and how they differ in context. For example, show how different Layout menu options are enabled in the Layout Editor when objects are selected, and how these menu options are not enabled in the Object Navigator. Do not describe Help in detail; there are more details for these options later in this lesson.

Oracle9i Forms Developer: Build Internet Applications

1-21

Customizing Your Forms Builder Session

Customizing Your Forms Builder Session Copyright © Oracle Corporation, 2002. All rights reserved.
Customizing Your Forms Builder Session Copyright © Oracle Corporation, 2002. All rights reserved.

Copyright © Oracle Corporation, 2002. All rights reserved.

Customizing Your Forms Builder Session What Are Oracle Forms Developer Preferences? You can use preferences to customize some aspects of your Forms Builder session. Forms Builder Preferences There are four tabs in the Preferences dialog box. To see a description of each preference, click Help in the Preferences dialog or press the Help key ([F1] for Windows NT/95).

In addition to session preferences, you can also set run-time settings that apply to running your form from within the builder. To modify preferences, perform the following steps:

• Select Edit > Preferences.

• Specify any options that you require.

• Click OK to save changes, or Cancel to cancel changes.

Oracle9i Forms Developer: Build Internet Applications

1-22

Customizing Your Forms Builder Session (continued) You can specify several related preferences on each of the Preference tabs. The table below describes one preference on each of the tabs:

Tab

Preference Name

Description

General

Build Before Running

Determines whether Forms Builder automatically compiles the active module when you run a form. This option enables you to avoid issuing separate Compile and Run commands each time you modify and run a form.

Subclass

Subclassing Path

Options for keeping or removing the subclassing path

Wizards

Welcome Dialog

Check box to suppress or display the first Welcome dialog box. There are several similar check boxes.

Runtime

Array Processing

Determines whether Forms Builder processes groups of records at a time, reducing network traffic and increasing performance.

Oracle9i Forms Developer: Build Internet Applications

1-23

Saving Preferences

Existing Preferences File Modified preferences Motif:
Existing
Preferences File
Modified
preferences
Motif:
Existing Preferences File Modified preferences Motif: Updated, merged Preferences File prefs.ora Windows:

Updated, merged Preferences File

prefs.ora

Windows:

cauprefs.ora

merged Preferences File prefs.ora Windows: cauprefs.ora Copyright © Oracle Corporation, 2002. All rights reserved.

Copyright © Oracle Corporation, 2002. All rights reserved.

Saving Preferences When you click OK in the Preferences dialog box, Oracle Forms Developer updates your current session with the changes. When you exit the builder (File > Exit), Oracle Forms Developer writes the changes to a preference file for future sessions. The name of the preference file varies on different platforms. Oracle Forms Developer and Oracle Reports Developer share the same preference file. If the preference file already exists, Oracle Forms Developer merges its changes with the existing file. This does not affect preferences for Reports. Each option in the preference file is prefixed by the tool name to which it belongs. Example:

Reports.Object_Access = File Forms.build_before_run = on Forms.welcome_dialog = on

Oracle Forms Developer reads the preference file whenever you invoke Forms Builder. Oracle Reports Developer reads the preference file whenever you invoke Report Builder. Note: The preferences file is an editable text file. If possible, however, you should alter the options in the Preferences dialog box.

Oracle9i Forms Developer: Build Internet Applications

1-24

Using the Online Help System

Using the Online Help System Copyright © Oracle Corporation, 2002. All rights reserved.
Using the Online Help System Copyright © Oracle Corporation, 2002. All rights reserved.

Copyright © Oracle Corporation, 2002. All rights reserved.

Invoking Online Help Facilities Oracle Forms Developer Help Options The table below describes the Help menu options in Forms Builder:

Help Menu Option

Description

Online Help

Comprehensive online help window with 3 tabs. The Contents tab provides access to a variety of manuals and references. There are also Index and Search tabs. The Help key ([F1] for Windows NT/95) displays context- sensitive online help at any place in the Builder.

Forms on OTN

The latest product information on the Oracle Technology Network

About Form Builder

This is a separate window that shows product components and their version numbers. When you are connected to a database server, it also displays similar information for server-side product components.

You can also invoke context-sensitive online help from Forms Builder by pressing [Help] ([F1] on Windows).

Oracle9i Forms Developer: Build Internet Applications

1-25

Summit Office Supply Schema

Order Entry

Application

Summit Office Supply Schema Order Entry Application Copyright © Oracle Corporation, 2002. All rights reserved.
Summit Office Supply Schema Order Entry Application Copyright © Oracle Corporation, 2002. All rights reserved.

Copyright © Oracle Corporation, 2002. All rights reserved.

Introducing the Course Application The Summit Office Supply Schema The simplified table diagram shows the tables that are used throughout the course to build the Forms application. These same tables are used in other Oracle courses as well. Summit Office Supply is a company that sells office products to customers. Summit has a number of employees in several departments. Some employees are sales representatives who have a relationship with specific customers. Customers place orders. Each order consists of one or more line items. Each line item represents a product. Many products have an associated image, in the form of an image file. The company products are stored in a number of warehouses. The contents of the warehouses are managed in the inventory.

Oracle9i Forms Developer: Build Internet Applications

1-26

Summit Application

CV_Customer Canvas CUSTOMERS CUSTOMERS Block Table CV_Order Canvas ORDERS ORDERS Block Table ORDER_ITEMS
CV_Customer Canvas
CUSTOMERS
CUSTOMERS Block
Table
CV_Order Canvas
ORDERS
ORDERS Block
Table
ORDER_ITEMS
ORDER_ITEMS Block
Table
CV_Inventory Canvas
INVENTORIES Block
INVENTORIES
Table

Customers

Form

Orders

Form

Block INVENTORIES Table Customers Form Orders Form Copyright © Oracle Corporation, 2002. All rights reserved.

Copyright © Oracle Corporation, 2002. All rights reserved.

The Summit Office Supply Application The following example of a Forms Builder application will familiarize you with the main run-time facilities of the product. You will also build your own version of this application during the workshops in the course. The Summit company produces a range of office supplies, which they sell to businesses and individuals (their customers). The Summit application is an order-entry system that maintains customer details, their orders, and the available stock (inventory). The application consists of two main forms:

• Customers form: The Customers facilitates queries on existing customers and the insertion, update, or deletion of customer records. When a customer is selected, the user can open the Orders form to enter or view orders for that customer. The form consists of a single block, the Customers block, a single record block, whose base table is Customers.

• Orders form: Opened from the Customers form, the Orders form displays orders for a customer and the line items that belong to each order. Orders may also be created, modified, or deleted in this form. You can also display the stock available on the ordered products. The form consists of three blocks:

Oracle9i Forms Developer: Build Internet Applications

1-27

The Summit Office Supply Application (continued)

- Orders block: The Orders block is a single record master block for the form The base table is Orders, but the block also displays associated information from other tables, such as the name of the customer.

- Order_Items block: The Order_Items block is the related detail block for an order, showing its line items and the products ordered. This is a multirecord block whose items are on the same canvas as those in the Orders block. The base table of the Order_Items block is Order_Items, but the block displays information from other tables, such as the product description.

- Inventories block: The Inventories block is a multirecord block showing warehouse stock for a product. Its items are on a separate canvas, which is assigned to its own window. This block is linked to the current product in the Order_Items block, but the two blocks can operate independently.

Instructor Note Explain to students that the concepts of blocks, windows, canvases, and so on are presented in later lessons. The descriptions above are just to give an overview of the application. Students may want to refer back to this overview later when the concepts are presented.

Summary

In this lesson, you should have learned that:

Oracle9i Developer Suite includes components for application development and business intelligence

Oracle9i Application Server provides services for building and deploying Web applications

Benefits of Oracle Forms Developer include:

Rapid Application Development

Application Partitioning

Flexible Source Control

Extended Scalability

Object Reuse

Source Control – Extended Scalability – Object Reuse Copyright © Oracle Corporation, 2002. All rights reserved.

Copyright © Oracle Corporation, 2002. All rights reserved.

Summary Oracle9i Developer Suite includes components for application development (JDeveloper, Designer, Software Configuration Manager, and Forms Developer) and for Business Intelligence (Warehouse Builder, Discoverer, and Reports).

Oracle9i Application Server provides a variety of services for building and deploying Web applications, including the Oracle9i HTTP Server (OHS), Oracle9i Containers for J2EE (OC4J), Reports Services, and Forms Services. Benefits of Oracle Forms Developer include:

Rapid Application Development: Create and modify applications with little or no code

Application Partitioning: Drag-and-drop objects between modules and the database server

Flexible Source Control: Integration with Software Configuration Manager (SCM)

• Extended Scalability: Use of server functionality like array DML, database cursors, or bind variables

Object Reuse: Subclassing, object libraries

Oracle9i Forms Developer: Build Internet Applications

1-29

Summary

Benefits of Oracle Forms Services include:

Optimized Web deployment of Forms applications

Rich Java UI without Java coding

Generic Java applet to deploy any Forms application

Oracle Forms Services consists of the Forms client, the Forms Servlet, the Forms Listener Servlet, and the Forms Runtime Engine

Forms Builder includes the following components:

Object Navigator

Property Palette

Layout Editor

PL/SQL Editor

– Property Palette – Layout Editor – PL/SQL Editor Copyright © Oracle Corporation, 2002. All rights

Copyright © Oracle Corporation, 2002. All rights reserved.

Oracle9i Forms Developer: Build Internet Applications

1-30

Summary

You can use the Forms Builder menu or associated toolbar icons to navigate around the Forms Builder interface

The Help menu enables you to use the online help facilities to look up topics, or you can invoke context-sensitive help

The Edit > Preferences dialog enables you to customize the Forms Builder session

The course application is a customer and order entry application for Summit Office Supply

customer and order entry application for Summit Office Supply Copyright © Oracle Corporation, 2002. All rights

Copyright © Oracle Corporation, 2002. All rights reserved.

Oracle9i Forms Developer: Build Internet Applications

1-31

Practice 1 Overview

This practice covers the following topics:

Becoming familiar with the Object Navigator and Layout Editor

Modifying file access preferences

and Layout Editor • Modifying file access preferences Copyright © Oracle Corporation, 2002. All rights reserved.

Copyright © Oracle Corporation, 2002. All rights reserved.

Practice 1 Overview

This practice familiarizes you with Oracle Forms Developer by asking you a number of questions that you answer by navigating around the Forms Builder interface.

• Becoming familiar with the Layout Editor and Object Navigator in Forms Builder

• Modifying file access preferences

Note

For solutions to this practice, see Practice 1 in Appendix A, “Practice Solutions.”

Instructor Note This practice is intended to make students familiar and at ease with the interface. For additional help with the Layout Editor, refer them to Appendix F, Using the Layout Editor.

Oracle9i Forms Developer: Build Internet Applications

1-32

Practice 1

1. Invoke Forms Builder. If the Welcome page is displayed, select “Open an existing

form”. If the Welcome page is not displayed, select File > Open.

2. Open the Orders.fmb form module from the Open Dialog window.

3. Set your preferences so that Welcome dialogs display when you first open Forms Builder and when you use any of the wizards.

4. Close the Orders form.

5. Open the Summit.fmb form module.

6. Expand the Data Blocks node.

7. Expand the Database Objects node. If you cannot expand the node, connect to the database and try again. What do you see below this node?

8. Collapse the Data Blocks node.

9. Change the layout of the Summit.fmb form module to match the following screenshot. At the end, save your changes, and exit Forms Builder.

At the end, save your changes, and exit Forms Builder. a. Invoke the Layout Editor. b.

a. Invoke the Layout Editor.

b. Move the three summit shapes to the top-right corner of the layout. Align the objects along the bottom edge.

c. Select the summit shape in the middle and place it behind the other two shapes.

d. Draw a box with no fill around the summit shapes.

Practice 1 (continued)

e. Add the text Summit Office Supply in the box. If necessary, enlarge the box.

f. Move the Manager_Id and Location_Id items to match the screenshot.

g. Move the First_Name item up to align it at the same level as the Last_Name item.

h. Resize the scroll bar to make it the same height as the three records in the Employees block.

i. Save the form module, and exit Forms Builder.

Running a Forms Developer Application Copyright © Oracle Corporation, 2002. All rights reserved.

Running a Forms Developer Application

Running a Forms Developer Application Copyright © Oracle Corporation, 2002. All rights reserved.

Copyright © Oracle Corporation, 2002. All rights reserved.

Schedule:

Timing

Topic

60

minutes

Lecture

25

minutes

Practice

85

minutes

Total

Objectives

After completing this lesson, you should be able to do the following:

Describe the run-time environment

Navigate a Forms application

Retrieve both restricted and unrestricted data

Describe the two modes of operation

Insert, update, and delete records

Display database errors

update, and delete records • Display database errors Copyright © Oracle Corporation, 2002. All rights reserved.

Copyright © Oracle Corporation, 2002. All rights reserved.

Introduction Overview In this lesson, you will run an existing application on the Web in order to familiarize yourself with the run-time interface of the Oracle Forms Developer. You must understand the environment of the form operator before designing and building your own applications.

Oracle9i Forms Developer: Build Internet Applications

2-2

Running a Form

Oracle Forms Services deployment:

Running a Form Oracle Forms Services deployment: Browser URL Java Applet Copyright © Oracle Corporation, 2002.
Running a Form Oracle Forms Services deployment: Browser URL Java Applet Copyright © Oracle Corporation, 2002.
Running a Form Oracle Forms Services deployment: Browser URL Java Applet Copyright © Oracle Corporation, 2002.

Browser URL

Running a Form Oracle Forms Services deployment: Browser URL Java Applet Copyright © Oracle Corporation, 2002.

Java Applet

Form Oracle Forms Services deployment: Browser URL Java Applet Copyright © Oracle Corporation, 2002. All rights

Copyright © Oracle Corporation, 2002. All rights reserved.

Running a Form Deploying form applications to the Web is implemented by the three-tier architecture of Oracle9i Application Server. Application logic and the Forms Services Runtime Engine reside on the middle-tier application server. All trigger processing occurs on database and application servers, while user interface processing occurs on the Forms client. End users can run Forms Developer applications in a Web browser. Users request an application in their Web browsers by entering a URL that points to the application. Forms Services then generates an HTML file that downloads a Java applet to the client machine. This small applet is capable of displaying the user interface of any form, while the application logic is executed on the middle tier.

Oracle9i Forms Developer: Build Internet Applications

2-3

Running a Form: Browser

How do I access this application? How do I access this new application?
How do I
access this
application?
How do I access
this new
application?

http://summit.com:8888/forms90/f90servlet

?form=customers.fmx&userid=username/password@database

&buffer_records=NO&debug_messages=NO&array=YES

&query_only=NO

&query_only=NO Copyright © Oracle Corporation, 2002. All rights reserved.

Copyright © Oracle Corporation, 2002. All rights reserved.

Running a Form The URL to invoke an application must have the following format:

http://host[:port]/forms servlet or html file[parameters] (optional portions of URL enclosed in brackets) Summit’s URL consists of the following components:

Protocol

http

Domain

summit.com

Port for HTTP Server or OC4J

Xxxx

default for HTTP Server

8888

default for OC4J

Forms Servlet Alias or static html file

/forms90/f90servlet

Parameters: this section begins with “?”; parameters separated by “&” (can be specified in the URL or taken from the Forms configuration file)

form=customers.fmx

userid=username/password@database

buffer_records=NO

debug_messages=NO

Instructor Note Mention to students that it is common to provide an HTML front end to allow the user to choose the application to start, then construct the URL based on the user’s choice.

Oracle9i Forms Developer: Build Internet Applications

2-4

The Java Runtime Environment

The Forms applet runs in a Java Runtime Environment (JRE) on the client machine.

Types of JREs:

Java-enabled browser (native)

JInitiator (Oracle-supplied plug-in to Web browser) that provides:

Incremental Java archive (JAR) file downloading JAR file caching Applet instance caching Automatic Java security configuration

Applet instance caching Automatic Java security configuration Copyright © Oracle Corporation, 2002. All rights reserved.

Copyright © Oracle Corporation, 2002. All rights reserved.

The Java Runtime Environment The Web browser can run a Java applet because it provides a Java Runtime Environment (JRE). However, not all Web browsers are able to natively run the Forms client. On Windows platforms, Oracle provides a plug-in called JInitiator that provides an alternate JRE capable of running the Forms applet. JInitiator provides several benefits:

• It is able to incrementally download the Java ARchive files (JAR files) needed for the Forms client, providing faster application startup.

• It caches the JAR files locally, so that they do not need to be downloaded again.

• It improves application performance within a browser session by applet instance caching. When a user navigates from the current page in the browser, the running Forms application is cached. When the user comes back to the page containing the applet, the applet that was running is automatically fully restored, including all of the data entered in the application.

• It is automatically configured to run the Forms application in trusted mode. This enables the application to have access to resources that the Java sandbox model normally prohibits it from using, such as print services.

Oracle9i Forms Developer: Build Internet Applications

2-5

Starting a Run-Time Session

Client Tier

Middle Tier: Application Server

Web Browser 1 Web Server Static HTML files 2 OC4J URL http://summit.com:8888/forms90/f90 or HTTP Server
Web Browser
1
Web Server
Static HTML files
2
OC4J
URL http://summit.com:8888/forms90/f90
or HTTP Server
Forms Services
3
Forms Servlet
Forms Listener Servlet
Forms Runtime Engine

Forms Application Executables

FMX files

MMX files

PLX files

DB
DB
Application Executables FMX files MMX files PLX files DB Copyright © Oracle Corporation, 2002. All rights

Copyright © Oracle Corporation, 2002. All rights reserved.

Starting a Run-Time Session

Starting a Run-time session involves the following steps:

1. The user accesses the URL that indicates that a Forms application should be run.

2. The Oracle HTTP Server or OC4J receives an HTTP request from the browser client and contacts the Forms Servlet.

3. The Forms Servlet dynamically creates an HTML page containing all the information to start the Forms session.

Oracle9i Forms Developer: Build Internet Applications

2-6

Starting a Run-Time Session

Client Tier

Middle Tier: Application Server

Web Browser Web Server Static HTML files OC4J URL http://summit.com:8888/forms90/f90 or HTTP Server 4 Forms
Web Browser
Web Server
Static HTML files
OC4J
URL http://summit.com:8888/forms90/f90
or HTTP Server
4
Forms Services
Forms Servlet
Applet
6
Forms Listener Servlet
started
5
Forms Runtime Engine

Forms Application Executables

FMX files

MMX files

PLX files

DB
DB
Application Executables FMX files MMX files PLX files DB Copyright © Oracle Corporation, 2002. All rights

Copyright © Oracle Corporation, 2002. All rights reserved.

Starting a Run-Time Session (continued)

4. The Oracle HTTP Server or OC4J downloads a generic applet to the client after checking that it has not already been downloaded. The client caches the applet so that it can run future Forms applications without downloading it again.

5. The client applet contacts the Forms Listener Servlet to start the session. The Forms Listener Servlet starts an instance of the Forms Runtime Engine on the Forms Server (middle tier). If included in the HTML file, Forms Runtime command-line parameters (such as form name, user ID and password, database SID, and so on) and any user-defined Forms Builder parameters are passed to the process by the Forms Listener Servlet.

6. The Forms Listener Servlet establishes a connection with the Runtime Engine, which connects to the database if needed and loads application executable files.

Oracle9i Forms Developer: Build Internet Applications

2-7

Starting a Run-Time Session

Client Tier

Middle Tier: Application Server

Web Browser Web Server Static HTML files OC4J URL http://summit.com:8888/forms90/f90 7 or HTTP Server Forms
Web Browser
Web Server
Static HTML files
OC4J
URL http://summit.com:8888/forms90/f90
7
or HTTP Server
Forms Services
Forms Servlet
8
Forms Listener Servlet
8
Forms Runtime Engine

Forms Application Executables

FMX files

MMX files

PLX files

DB
DB
Application Executables FMX files MMX files PLX files DB Copyright © Oracle Corporation, 2002. All rights

Copyright © Oracle Corporation, 2002. All rights reserved.

Starting a Run-Time Session (continued)

7. The Forms applet displays the user interface of the application in the main window

of the user’s Web browser.

8. The Forms Listener Servlet, working through OC4J or the HTTP Server, manages communication between the Forms applet and the Runtime Engine.

Technical Note More information about the Oracle Forms Listener Servlet is available in the Oracle white paper: Oracle9i Application Server Forms Services Forms6i Patch 8: Oracle Forms Listener Servlet for Deployment of Forms on the Internet.

Instructor Note Explain the process of using FTP to move a form from NT to the middle-tier server, compiling the form, and then running it from a browser. As you present the next few slides, explain to the students that the Forms Services run on the middle tier, and that this is where the run time environment variables are set.

Oracle9i Forms Developer: Build Internet Applications

2-8

The Forms Servlet

The Forms Servlet URL Pointing to Forms Servlet http://summit.com/forms90/f90servlet?form=customers.f Application Server
The Forms Servlet URL Pointing to Forms Servlet http://summit.com/forms90/f90servlet?form=customers.f Application Server

URL Pointing to Forms Servlet

http://summit.com/forms90/f90servlet?form=customers.f Application Server Web Server formsweb.cfg Static HTML files
http://summit.com/forms90/f90servlet?form=customers.f
Application Server
Web Server
formsweb.cfg
Static HTML files
HTTP Server or OC4J
Forms Services
Dynamic
HTML file
Forms Client
Base HTML files
Forms Servlet
Forms Listener Servlet
Forms Runtime Engine
is created

Desktop Client

basejini.html URL PARAMETERS: ?form=customers.fmx &userid=un/pw@db &buffer_records=NO
basejini.html
URL PARAMETERS:
?form=customers.fmx
&userid=un/pw@db
&buffer_records=NO
&userid=un/pw@db &buffer_records=NO Copyright © Oracle Corporation, 2002. All rights reserved.

Copyright © Oracle Corporation, 2002. All rights reserved.

The Forms Servlet?

The Forms Servlet is a Java servlet that creates a dynamic HTML file by merging information from the following sources:

• The Forms Web configuration file

• The Forms base HTML file

• The application’s URL parameters

Oracle9i Forms Developer: Build Internet Applications

2-9

The Forms Client

Generic Java applet

Responsibilities:

Displays the form’s user interface

Processes user interaction back to Forms Services

Processes incoming messages from Forms Services

Desktop Client

incoming messages from Forms Services Desktop Client Forms Client Generic Java applet Copyright © Oracle

Forms Client

Generic

Java applet

Services Desktop Client Forms Client Generic Java applet Copyright © Oracle Corporation, 2002. All rights reserved.

Copyright © Oracle Corporation, 2002. All rights reserved.

The Forms Client? The Forms Client is a generic Java applet. Forms Services dynamically downloads this applet and automatically caches it on the client machine. The Forms Client consists of a set of Java classes. At startup, only those Java classes that are necessary to initialize the application are downloaded. Additional class files are downloaded dynamically, as needed, to support additional user interface activity. You do not have to deploy a separate Java applet for each application. The same generic applet is used to run any Forms Services application, regardless of its size and complexity. Responsibilities of the Forms Client The Forms Client represents the user interface layer and has three primary functions:

• To render the Forms Services application display for the user

• To efficiently process user interaction back to Forms Services

• To process incoming messages from Forms Services and translate them into interface objects for the end user efficiently

Oracle9i Forms Developer: Build Internet Applications

2-10

The Forms Listener Servlet

HTTP Server Forms HTTP/ or Listener HTTPS OC4J Servlet Java Servlet that: • Creates Forms
HTTP Server
Forms
HTTP/
or
Listener
HTTPS
OC4J
Servlet
Java Servlet that:
• Creates Forms
Runtime
Middle Tier