View
215
Download
0
Category
Preview:
Citation preview
7/30/2019 Oracle Forms2
1/29
Copyright 2004, Oracle. All rights reserved.
Running a Forms
Developer Application
7/30/2019 Oracle Forms2
2/29
2-2 Copyright 2004, Oracle. All rights reserved.
Objectives
After completing this lesson, you should be able to dothe following:
Start OC4J
Describe the run-time environment Describe the elements in a running form
Navigate a Forms application
Describe the two main modes of operation
Run a form in a Web browser Retrieve both restricted and unrestricted data
Insert, update, and delete records
Display database errors
7/30/2019 Oracle Forms2
3/29
2-3 Copyright 2004, Oracle. All rights reserved.
Testing a Form: OC4J Overview
Oracle Application Server Containers for J2EE (OC4J)is:
Preferred to run Forms applications
Included with Oracle Developer Suite to enabletesting
7/30/2019 Oracle Forms2
4/29
2-4 Copyright 2004, Oracle. All rights reserved.
Testing a Form: Starting OC4J
On NT, run batch file to startOC4J: startinst.bat.
OC4J starts in DOS window:
Minimize window Closing window aborts OC4J
Run batch file to stop OC4J: stopinst.bat.
7/30/2019 Oracle Forms2
5/29
2-5 Copyright 2004, Oracle. All rights reserved.
Running a Form
Oracle Forms Services deployment:
Browser URL
Java Applet
7/30/2019 Oracle Forms2
6/29
2-6 Copyright 2004, Oracle. All rights reserved.
Running a Form: Browser
http://summit.com:8889/forms90/f90servlet?form=customers.fmx&userid=username/password@database&buffer_records=NO&debug_messages=NO&array=YES&query_only=NO
http://summit.com:8889/forms90/f90servlet?form=customers.fmx&userid=
How do Iaccess thisapplication?
7/30/2019 Oracle Forms2
7/292-7 Copyright 2004, Oracle. All rights reserved.
The Java Runtime Environment
The Forms applet runs in a Java RuntimeEnvironment (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 downloadingJAR file caching
Applet instance cachingAutomatic Java security configuration
7/30/2019 Oracle Forms2
8/292-8 Copyright 2004, Oracle. All rights reserved.
Starting a Run-Time Session
URL http://summit.com:8889/forms90/f90
Static HTML filesOC4Jor HTTP Server
Forms Servlet
Forms Listener Servlet
Forms Runtime Engine
Web Browser1
2
3
DBPLX filesMMX files
Forms Application Executables
FMX files
Web Server
Forms Services
Client Tier Middle Tier: Application Server
7/30/2019 Oracle Forms2
9/292-9 Copyright 2004, Oracle. All rights reserved.
Static HTML filesOC4Jor HTTP Server
Forms Servlet
Forms Listener Servlet
Forms Runtime Engine
URL http://summit.com:8889/forms90/f90
Web Browser
Starting a Run-Time Session
4
5Applet started 6
DBPLX filesMMX files
Forms Application Executables
FMX files
Web Server
Forms Services
Middle Tier: Application ServerClient Tier
7/30/2019 Oracle Forms2
10/292-10 Copyright 2004, Oracle. All rights reserved.
Web Server
Static HTML filesOC4Jor HTTP Server
Forms Servlet
Forms Listener Servlet
Forms Runtime Engine
Forms Services
8
URL http://summit.com:8889/forms90/f90
Web Browser
Starting a Run-Time Session
Middle Tier: Application Server
8
7
DBPLX filesMMX files
Forms Application Executables
FMX files
Client Tier
7/30/2019 Oracle Forms2
11/292-11 Copyright 2004, Oracle. All rights reserved.
Forms ClientBase HTML filesForms ServletForms Listener ServletForms Runtime Engine
Application Server
Static HTML filesHTTP Server or OC4J
The Forms Servlet
DynamicHTML file is
created
Desktop Client
URL PARAMETERS:
?form=customers.fmx
&userid=un/pw@db&buffer_records=NO...
URL Pointing to Forms Servlet
basejini.html
formsweb.cfg
http://summit.com:8889/forms90/f90servlet?form=customers.f
Web Server
Forms Services
7/30/2019 Oracle Forms2
12/292-12 Copyright 2004, Oracle. All rights reserved.
The Forms Client
Generic Java applet
Responsibilities:
Displays the forms user interface
Processes user interaction back toForms Services
Processes incoming messagesfrom Forms Services
GenericJava applet
Forms Client
Desktop Client
7/30/2019 Oracle Forms2
13/292-13 Copyright 2004, Oracle. All rights reserved.
The Forms Listener Servlet
Java Servlet that: Creates Forms
Runtime processfor each client
Stops the Runtime process at session end
Manages network communications between clientand Forms Runtime process
Communicates through Web server process
HTTP Serveror
OC4J
Middle Tier
HTTP/HTTPS
FormsListenerServlet
FormsRuntimeProcess
7/30/2019 Oracle Forms2
14/292-14 Copyright 2004, Oracle. All rights reserved.
The Runtime Engine
The Forms Runtime Engine:
Is a process (ifweb90) that runs on the
Application Server
Manages application logic and processing Communicates with the client browser and the
database
7/30/2019 Oracle Forms2
15/292-15 Copyright 2004, Oracle. All rights reserved.
What You See at Run Time
1
3
4
5 2
7/30/2019 Oracle Forms2
16/292-17 Copyright 2004, Oracle. All rights reserved.
Identifying the Data Elements
51 2 7 864 93 10
7/30/2019 Oracle Forms2
17/292-20 Copyright 2004, Oracle. All rights reserved.
Modes of Operation: Enter-Query Mode
Allows:
Unrestricted andrestricted queries
Query/Where dialogbox
Record count by usingQuery > Count Hits
Does not allow:
Navigation out ofcurrent data block
Exiting run-timesession
Certain functions
Insert, update, delete
7/30/2019 Oracle Forms2
18/292-21 Copyright 2004, Oracle. All rights reserved.
Modes of Operation: Normal Mode
Allows:
Unrestricted queries
Insert, update, delete
Commit (Save) Navigation out of
current data block
Exiting run-timesession
Does Not Allow:
Restricted queries
Query/Where dialog
box
7/30/2019 Oracle Forms2
19/292-22 Copyright 2004, Oracle. All rights reserved.
Retrieving Data
1
34
2
A B C D12
Restricted query
A B C D
A B C D123
4
Unrestricted query
A B C D
12
34
7/30/2019 Oracle Forms2
20/292-23 Copyright 2004, Oracle. All rights reserved.
Retrieving Restricted Data
Do not use quotation marks with character anddate items.
The LIKE operator is implied with % or _.
Use hash (#) in front of SQL operators. Use Query/Where for complex query conditions.
Use default date format (DD-MON-RR) inQuery/Where.
Use quotes around literals in Query/Where.
7/30/2019 Oracle Forms2
21/292-25 Copyright 2004, Oracle. All rights reserved.
Query/Where Dialog Box
Invoke by:
Entering :variable_name
Executing query
Used to write: Complex search conditions
Queries with ORpredicates
ORDERBY clause
7/30/2019 Oracle Forms2
22/292-26 Copyright 2004, Oracle. All rights reserved.
Query/Where Dialog Box
:i
:n
:i = 104 OR :n BETWEEN F and H
7/30/2019 Oracle Forms2
23/292-27 Copyright 2004, Oracle. All rights reserved.
Inserting, Updating, and Deleting
Form module
Deletes
Updates
Inserts
Memory
7/30/2019 Oracle Forms2
24/292-29 Copyright 2004, Oracle. All rights reserved.
Making Changes Permanent
Select Action > Save tomake changespermanent.
Select Action > ClearAll to discard changes.
or
Toolbar
Menu
To commit orrollback:
Deletes
Updates
Inserts
Memory
7/30/2019 Oracle Forms2
25/29
2-30 Copyright 2004, Oracle. All rights reserved.
Displaying Errors
Use to view Oracle errors
Select Help > Display Error
Shows Database Error window:
SQL statement Error information
7/30/2019 Oracle Forms2
26/29
2-31 Copyright 2004, Oracle. All rights reserved.
Summary
In this lesson, you should have learned that:
You can use OC4J on the development machine torun a Forms application in a Web browser
At run time: The Forms Client is downloaded
The Forms Servlet creates a start HTML file
The Forms Listener Servlet starts a run-timesession and maintains communication between it
and the Forms Client The Runtime Engine carries out application logic
and maintains a database connection on behalf ofthe Forms Client
7/30/2019 Oracle Forms2
27/29
2-32 Copyright 2004, Oracle. All rights reserved.
Summary
When you run a form you see a Java appletrunning in a browser and displaying a menu, menutoolbar, console, and several kinds of dataelements.
Users navigate a Forms application using themenu, toolbar, the mouse, buttons, or functionkeys.
The two main modes of operation are Normal
mode and Enter-Query mode. Executing a query returns all records, unless the
query is restricted by search criteria.
7/30/2019 Oracle Forms2
28/29
2-33 Copyright 2004, Oracle. All rights reserved.
Summary
In normal mode you can insert, update, and deleterecords and commit changes to the database.
You display database errors from the menu(Help > Display Error)
7/30/2019 Oracle Forms2
29/29
Practice 2 Overview
This practice covers the following topics:
Starting OC4J
Running the course application:
Querying records Inserting a record
Updating a record
Deleting a record
Displaying a database error
Recommended