Running a Forms Developer Application

Copyright © 2004, Oracle. All rights reserved.

Objectives

After completing this lesson, you should be able to do the 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

2-2

Copyright © 2004, Oracle. All rights reserved.

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 enable testing 2-3 Copyright © 2004. .

. Oracle. OC4J starts in DOS window: – Minimize window – Closing window aborts OC4J • Run batch file to stop OC4J: stopinst.Testing a Form: Starting OC4J • • On NT.bat. run batch file to start OC4J: startinst. All rights reserved.bat. 2-4 Copyright © 2004.

Running a Form Oracle Forms Services deployment: Browser URL Java Applet 2-5 Copyright © 2004. Oracle. All rights reserved. .

fmx&userid=username/password@database &buffer_records=NO&debug_messages=NO&array=YES &query_only=NO 2-6 Copyright © 2004.com:8889/forms90/f90servlet ?form=customers. . All rights reserved.fmx&userid= http://summit.com:8889/forms90/f90servlet?form=customers. Oracle.Running a Form: Browser How do I access this application? http://summit.

Oracle. All rights reserved. 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 2-7 Copyright © 2004.The Java Runtime Environment • • The Forms applet runs in a Java Runtime Environment (JRE) on the client machine. .

Starting a Run-Time Session Client Tier 1 Web Browser 2 Middle Tier: Application Server Web Server Static HTML files OC4J or HTTP Server Forms Services 3 Forms Servlet Forms Listener Servlet Forms Runtime Engine Forms Application Executables FMX files MMX files PLX files DB URL http://summit. All rights reserved. . Oracle.com:8889/forms90/f90 2-8 Copyright © 2004.

Oracle.com:8889/forms90/f90 Middle Tier: Application Server Web Server Static HTML files OC4J or HTTP Server Forms Services Forms Servlet 4 Applet started 5 Forms Listener Servlet Forms Runtime Engine 6 Forms Application Executables FMX files MMX files PLX files DB 2-9 Copyright © 2004.Starting a Run-Time Session Client Tier Web Browser URL http://summit. All rights reserved. .

All rights reserved. . Oracle.Starting a Run-Time Session Client Tier Web Browser URL http://summit.com:8889/forms90/f90 Middle Tier: Application Server 7 Web Server Static HTML files OC4J or HTTP Server Forms Services Forms Servlet Forms Listener Servlet Forms Runtime Engine 8 8 Forms Application Executables FMX files MMX files PLX files DB 2-10 Copyright © 2004.

All rights reserved.The Forms Servlet URL Pointing to Forms Servlet http://summit.fmx &userid=un/pw@db &buffer_records=NO ..com:8889/forms90/f90servlet?form=customers.html URL PARAMETERS: ?form=customers. Static HTML files HTTP Server or OC4J Forms Services Forms Client Base HTML files Forms Servlet Forms Listener Servlet Forms Runtime Engine Dynamic HTML file is created 2-11 Copyright © 2004.cfg basejini..f Desktop Client Application Server Web Server formsweb. Oracle. .

Oracle. . All rights reserved.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 Forms Client Generic Java applet 2-12 Copyright © 2004.

The Forms Listener Servlet HTTP Server or OC4J Forms Listener Servlet HTTP/ HTTPS Java Servlet that: Forms • Creates Forms Runtime Runtime process Process for each client Middle Tier • Stops the Runtime process at session end • Manages network communications between client and Forms Runtime process • Communicates through Web server process 2-13 Copyright © 2004. All rights reserved. . Oracle.

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 2-14 Copyright © 2004. Oracle. All rights reserved. .

All rights reserved. Oracle. .What You See at Run Time 3 1 4 5 2 2-15 Copyright © 2004.

. Oracle.Identifying the Data Elements 1 2 3 4 5 6 7 8 9 10 2-17 Copyright © 2004. All rights reserved.

update. . Oracle. delete 2-20 Copyright © 2004.Modes of Operation: Enter-Query Mode Allows: • Unrestricted and restricted queries • Query/Where dialog box • Record count by using Query > Count Hits Does not allow: • Navigation out of current data block • Exiting run-time session • Certain functions • Insert. All rights reserved.

Modes of Operation: Normal Mode Allows: • Unrestricted queries • Insert. All rights reserved. . delete • Commit (Save) • Navigation out of current data block • Exiting run-time session Does Not Allow: • Restricted queries • Query/Where dialog box 2-21 Copyright © 2004. update. Oracle.

Oracle. .Retrieving Data Unrestricted query A B 1 2 3 4 C D Restricted query A B 1 2 C D A B C D 1 2 3 4 A B C D 1 2 3 4 2-22 Copyright © 2004. All rights reserved.

Use default date format (DD-MON-RR) in Query/Where. All rights reserved. Use hash (#) in front of SQL operators. The LIKE operator is implied with % or _.Retrieving Restricted Data • • • • • • Do not use quotation marks with character and date items. . Oracle. Use Query/Where for complex query conditions. 2-23 Copyright © 2004. Use quotes around literals in Query/Where.

Oracle. All rights reserved. .Query/Where Dialog Box • Invoke by: – Entering :variable_name – Executing query • Used to write: – Complex search conditions – Queries with OR predicates – ORDER BY clause 2-25 Copyright © 2004.

. Oracle.Query/Where Dialog Box :i :n :i = 104 OR :n BETWEEN ‘F’ and ‘H’ 2-26 Copyright © 2004. All rights reserved.

and Deleting Memory Deletes Updates Inserts Form module 2-27 Copyright © 2004. Oracle.Inserting. All rights reserved. Updating. .

. Select Action > Clear All to discard changes. Deletes To commit or rollback: Menu Updates Inserts or Toolbar 2-29 Copyright © 2004. Oracle. All rights reserved.Making Changes Permanent Memory • • Select Action > Save to make changes permanent.

All rights reserved. Oracle. .Displaying Errors • • • Use to view Oracle errors Select Help > Display Error Shows Database Error window: – SQL statement – Error information 2-30 Copyright © 2004.

. Oracle. you should have learned that: • You can use OC4J on the development machine to run 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-time session and maintains communication between it and the Forms Client – The Runtime Engine carries out application logic and maintains a database connection on behalf of the Forms Client 2-31 Copyright © 2004.Summary In this lesson. All rights reserved.

Oracle. All rights reserved. . buttons. unless the query is restricted by search criteria. Users navigate a Forms application using the menu. menu toolbar. and several kinds of data elements. 2-32 Copyright © 2004. The two main modes of operation are Normal mode and Enter-Query mode. console. Executing a query returns all records. or function keys. toolbar.Summary • • • • When you run a form you see a Java applet running in a browser and displaying a menu. the mouse.

All rights reserved. update. . Oracle. You display database errors from the menu (Help > Display Error) 2-33 Copyright © 2004. and delete records and commit changes to the database.Summary • • In normal mode you can insert.

All rights reserved. Oracle. .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 2-34 Copyright © 2004.

Sign up to vote on this title
UsefulNot useful

Master Your Semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master Your Semester with a Special Offer from Scribd & The New York Times

Cancel anytime.