PrefaceI IntroductionObjectives I-2Course Objectives I-3Course Content I-51 Introduction to Oracle Forms Developer and Oracle Forms ServicesObjectives 1-2Internet Computing Solutions 1-3Plugging into the Grid 1-4Oracle Enterprise Grid Computing 1-5Oracle 10g Products and Forms Development 1-7Oracle Application Server 10g Architecture 1-8Oracle Application Server 10g Components 1-9Oracle Forms Services Overview 1-10Forms Services Architecture 1-11Benefits and Components of Oracle Developer Suite 10g 1-12Oracle Developer Suite 10g Application Development 1-13Oracle Developer Suite 10g Business Intelligence 1-14Oracle Forms Developer Overview 1-15Oracle Forms Developer: Key Features 1-16Summit Office Supply Schema 1-17Summit Application 1-18Summary 1-202 Running a Forms Developer ApplicationObjectives 2-2Testing a Form: OC4J Overview 2-3Testing a Form: Starting OC4J 2-4Running a Form 2-5Running a Form: Browser 2-6The Java Runtime Environment 2-7Starting a Run-Time Session 2-8The Forms Servlet 2-11The Forms Client 2-12The Forms Listener Servlet 2-13The Runtime Engine 2-14What You See at Run Time 2-15Identifying the Data Elements 2-17Navigating a Forms Developer Application 2-18Modes of Operation: Enter-Query Mode 2-20Modes of Operation: Normal Mode 2-21Retrieving Data 2-22Retrieving Restricted Data 2-23Query/Where Dialog Box 2-25Inserting, Updating, and Deleting 2-27Contentsiii
Making Changes Permanent 2-29Displaying Errors 2-30Summary 2-31Practice 2 Overview 2-343 Working in the Forms Developer EnvironmentObjectives 3-2Forms Builder Key Features 3-3Forms Builder Components: Object Navigator 3-4Forms Builder Components: Property Palette 3-5Forms Builder Components: Layout Editor 3-6Forms Builder Components: PL/SQL Editor 3-7Getting Started in the Forms Builder Interface 3-8Forms Builder: Menu Structure 3-10Blocks, Items, and Canvases 3-12Navigation in a Block 3-14Data Blocks 3-15Forms and Data Blocks 3-17Form Module Hierarchy 3-19Customizing Your Forms Builder Session 3-21Saving Preferences 3-23Using the Online Help System 3-24Forms Developer Executables 3-25Forms Developer Module Types 3-27Defining Forms Environment Variables for Run Time 3-29Defining Forms Environment Variables for Design Time 3-30Environment Variables and Y2K Compliance 3-32Forms Files to Define Run-Time Environment Variables 3-34Testing a Form: The Run Form Button 3-35Summary 3-37Practice 3 Overview 3-394 Creating a Basic Form ModuleObjectives 4-2Creating a New Form Module 4-3Form Module Properties 4-6Creating a New Data Block 4-8Navigating the Wizards 4-10Launching the Data Block Wizard 4-11Data Block Wizard: Type Page 4-12Data Block Wizard: Table Page 4-13iv
Data Block Wizard: Finish Page 4-14Layout Wizard: Items Page 4-15Layout Wizard: Style Page 4-16Layout Wizard: Rows Page 4-17Data Block Functionality 4-18Template Forms 4-19Saving a Form Module 4-20Compiling a Form Module 4-21Module Types and Storage Formats 4-22Deploying a Form Module 4-24Text Files and Documentation 4-25Summary 4-26Practice 4 Overview 4-275 Creating a Master-Detail FormObjectives 5-2Form Block Relationships 5-3Data Block Wizard: Master-Detail Page 5-5Relation Object 5-7Creating a Relation Manually 5-8Join Condition 5-9Deletion Properties 5-10Modifying a Relation 5-11Coordination Properties 5-12Running a Master-Detail Form Module 5-13Modifying the Structure of a Data Block 5-14Modifying the Layout of a Data Block 5-15Summary 5-17Practice 5 Overview 5-186 Working with Data Blocks and FramesObjectives 6-2Managing Object Properties 6-3Displaying the Property Palette 6-4Property Palette: Features 6-5Property Controls 6-6Visual Attributes 6-8How to Use Visual Attributes 6-9Font, Pattern, and Color Pickers 6-10Controlling Data Block Behavior and Appearance 6-11Navigation Properties 6-12v
Records Properties 6-13Database Properties 6-15Scroll Bar Properties 6-18Controlling Frame Properties 6-19Displaying Multiple Property Palettes 6-21Setting Properties on Multiple Objects 6-22Copying Properties 6-24Creating a Control Block 6-26Deleting a Data Block 6-27Summary 6-28Practice 6 Overview 6-297 Working with Text ItemsObjectives 7-2Text Item Overview 7-3Creating a Text Item 7-4Modifying the Appearance of a Text Item: General and Physical Properties 7-6Modifying the Appearance of a Text Item: Records Properties 7-7Modifying the Appearance of a Text Item: Font and Color Properties 7-8Modifying the Appearance of a Text Item: Prompts 7-9Associating Text with an Item Prompt 7-10Controlling the Data of a Text Item 7-11Controlling the Data of a Text Item: Format 7-12Controlling the Data of a Text Item: Values 7-13Controlling the Data of a Text Item: Copy Value from Item 7-15Controlling the Data of a Text Item: Synchronize with Item 7-16Altering Navigational Behavior of Text Items 7-17Enhancing the Relationship Between Text Item and Database 7-18Adding Functionality to a Text Item 7-19Adding Functionality to a Text Item: Conceal Data Property 7-20Adding Functionality to a Text Item: Keyboard Navigable and Enabled 7-21Adding Functionality to a Text Item: Multi-line Text Items 7-22Displaying Helpful Messages: Help Properties 7-23Summary 7-24Practice 7 Overview 7-268 Creating LOVs and EditorsObjectives 8-2Overview of LOVs and Editors 8-3LOVs and Record Groups 8-6Creating an LOV Manually 8-8vi
Creating an LOV with the LOV Wizard: SQL Query Page 8-9Creating an LOV with the LOV Wizard: Column Selection Page 8-10Creating an LOV with the LOV Wizard: Column Properties Page 8-11Creating an LOV with the LOV Wizard: Display Page 8-12Creating an LOV with the LOV Wizard: Advanced Properties Page 8-13Creating an LOV with the LOV Wizard: Assign to Item Page 8-14LOV Properties 8-15Setting LOV Properties 8-16LOVs: Column Mapping 8-17Defining an Editor 8-19Setting Editor Properties 8-20Associating an Editor with a Text Item 8-21Summary 8-22Practice 8 Overview 8-239 Creating Additional Input ItemsObjectives 9-2Input Items Overview 9-3Check Boxes Overview 9-4Creating a Check Box 9-5Converting an Existing Item into a Check Box 9-6Creating a Check Box in the Layout Editor 9-7Setting Check Box Properties 9-8Check Box Mapping of Other Values 9-10List Items Overview 9-11Creating a List Item 9-13Converting an Existing Item into a List Item 9-14Creating a List Item in the Layout Editor 9-15Setting List Item Properties 9-16List Item Mapping of Other Values 9-17Radio Groups Overview 9-18Creating a Radio Group 9-19Converting Existing Item to Radio Group 9-20Creating Radio Group in Layout Editor 9-21Setting Radio Properties 9-22Radio Group Mapping of Other Values 9-23Summary 9-24Practice 9 Overview 9-2510 Creating Noninput ItemsObjectives 10-2Noninput Items Overview 10-3vii
Display Items 10-4Creating a Display Item 10-5Image Items 10-6Image File Formats 10-8Creating an Image Item 10-9Setting Image-Specific Item Properties 10-10Push Buttons 10-12Push Button Actions 10-13Creating a Push Button 10-14Setting Push Button Properties 10-15Calculated Items 10-16Creating a Calculated Item by Setting Properties 10-17Setting Item Properties for the Calculated Item 10-18Summary Functions 10-19Calculated Item Based on a Formula 10-20Rules for Calculated Item Formulas 10-21Calculated Item Based on a Summary 10-22Rules for Summary Items 10-23Creating a Hierarchical Tree Item 10-24Setting Hierarchical Tree Item Properties 10-25Bean Area Items 10-26Creating a Bean Area Item 10-27Setting Bean Area Item Properties 10-28The JavaBean at Run Time 10-29Summary 10-30Practice 10 Overview 10-3211 Creating Windows and Content CanvasesObjectives 11-2Windows and Canvases 11-3Window, Canvas, and Viewport 11-4The Content Canvas 11-5Relationship Between Windows and Content Canvases 11-6The Default Window 11-7Displaying a Form Module in Multiple Windows 11-8Creating a New Window 11-9Setting Window Properties 11-10GUI Hints 11-11Displaying a Form Module on Multiple Layouts 11-12Creating a New Content Canvas 11-13Setting Content Canvas Properties 11-15viii
Summary 11-16Practice 11 Overview 11-1712 Working with Other Canvas TypesObjectives 12-2Overview of Canvas Types 12-3The Stacked Canvas 12-4Creating a Stacked Canvas 12-6Setting Stacked Canvas Properties 12-8The Toolbar Canvas 12-9The MDI Toolbar 12-10Creating a Toolbar Canvas 12-11Setting Toolbar Properties 12-12The Tab Canvas 12-13Creating a Tab Canvas 12-14Creating a Tab Canvas in the Object Navigator 12-15Creating a Tab Canvas in the Layout Editor 12-16Setting Tab Canvas, Tab Page, and Item Properties 12-17Placing Items on a Tab Canvas 12-18Summary 12-19Practice 12 Overview 12-2113 Introduction to TriggersObjectives 13-2Trigger Overview 13-3Grouping Triggers into Categories 13-4Defining Trigger Components 13-6Trigger Type 13-7Trigger Code 13-9Trigger Scope 13-10Specifying Execution Hierarchy 13-12Summary 13-1414 Producing TriggersObjectives 14-2Creating Triggers in Forms Builder 14-3Creating a Trigger 14-4Setting Trigger Properties 14-7PL/SQL Editor Features 14-8The Database Trigger Editor 14-10Writing Trigger Code 14-11ix
Using Variables in Triggers 14-13Forms Builder Variables 14-14Adding Functionality with Built-In Subprograms 14-16Limits of Use 14-18Using Built-In Definitions 14-19Useful Built-Ins 14-21Using Triggers: When-Button-Pressed Trigger 14-23Using Triggers: When-Window-Closed Trigger 14-24Summary 14-25Practice 14 Overview 14-2715 Debugging TriggersObjectives 15-2The Debugging Process 15-3The Debug Console 15-4The Debug Console: Stack Panel 15-5The Debug Console: Variables Panel 15-6The Debug Console: Watch Panel 15-7The Debug Console: Form Values Panel 15-8The Debug Console: PL/SQL Packages Panel 15-9The Debug Console: Global/System Variables Panel 15-10The Debug Console: Breakpoints Panel 15-11The Debug Console 15-12Setting Breakpoints in Client Code 15-13Setting Breakpoints in Stored Code 15-14Debugging Tips 15-15Running a Form in Debug Mode 15-16Stepping Through Code 15-17Debug Example 15-18Summary 15-20Practice 15 Overview 15-2116 Adding Functionality to ItemsObjectives 16-2Item Interaction Triggers 16-3Coding Item Interaction Triggers 16-5Interacting with Check Boxes 16-7Changing List Items at Run Time 16-8Displaying LOVs from Buttons 16-9LOVs and Buttons 16-11Populating Image Items 16-13x
Loading the Right Image 16-15Populating Hierarchical Trees 16-16Displaying Hierarchical Trees 16-18Interacting with JavaBeans 16-19Summary 16-25Practice 16 Overview 16-2717 Run Time Messages and AlertsObjectives 17-2Run-Time Messages and Alerts Overview 17-3Detecting Run-Time Errors 17-5Errors and Built-Ins 17-7Message Severity Levels 17-9Suppressing Messages 17-11The FORM_TRIGGER_FAILURE Exception 17-13Triggers for Intercepting System Messages 17-15Handling Informative Messages 17-17Setting Alert Properties 17-19Planning Alerts 17-21Controlling Alerts 17-22SHOW_ALERT Function 17-24Directing Errors to an Alert 17-26Causes of Oracle Server Errors 17-27Trapping Server Errors 17-29Summary 17-30Practice 17 Overview 17-3318 Query TriggersObjectives 18-2Query Processing Overview 18-3SELECT Statements Issued During Query Processing 18-5WHERE Clause 18-7ONETIME_WHERE Property 18-8ORDER BY Clause 18-9Writing Query Triggers: Pre-Query Trigger 18-10Writing Query Triggers: Post-Query Trigger 18-11Writing Query Triggers: Using SELECT Statements in Triggers 18-12Query Array Processing 18-13Coding Triggers for Enter-Query Mode 18-15Overriding Default Query Processing 18-19Obtaining Query Information at Run Time 18-22xi
Summary 18-25Practice 18 Overview 18-2719 ValidationObjectives 19-2The Validation Process 19-3Controlling Validation Using Properties: Validation Unit 19-5Controlling Validation Using Properties: Validate from List 19-7Controlling Validation Using Triggers 19-9Example: Validating User Input 19-11Using Client-Side Validation 19-13Tracking Validation Status 19-16Controlling When Validation Occurs with Built-Ins 19-18Summary 19-20Practice 19 Overview 19-2220 NavigationObjectives 20-2Navigation Overview 20-3Understanding Internal Navigation 20-5Using Object Properties to Control Navigation 20-7Mouse Navigate Property 20-9Writing Navigation Triggers 20-10Navigation Triggers 20-11When-New-<object>-Instance Triggers 20-12SET_<object>_PROPERTY Examples 20-13The Pre- and Post-Triggers 20-15Post-Block Trigger Example 20-17The Navigation Trap 20-18Using Navigation Built-Ins in Triggers 20-19Summary 20-21Practice 20 Overview 20-2321 Transaction ProcessingObjectives 21-2Transaction Processing Overview 21-3The Commit Sequence of Events 21-6Characteristics of Commit Triggers 21-8Common Uses for Commit Triggers 21-10Life of an Update 21-12Delete Validation 21-14xii
Assigning Sequence Numbers 21-16Keeping an Audit Trail 21-18Testing the Results of Trigger DML 21-19DML Statements Issued During Commit Processing 21-21Overriding Default Transaction Processing 21-23Running Against Data Sources Other than Oracle 21-25Getting and Setting the Commit Status 21-27Array DML 21-31Effect of Array DML on Transactional Triggers 21-32Implementing Array DML 21-33Summary 21-34Practice 21 Overview 21-3822 Writing Flexible CodeObjectives 22-2What Is Flexible Code? 22-3Using System Variables for Current Context 22-4System Status Variables 22-6GET_<object>_PROPERTY Built-Ins 22-7SET_<object>_PROPERTY Built-Ins 22-9Referencing Objects by Internal ID 22-11FIND_ Built-Ins 22-12Using Object IDs 22-13Increasing the Scope of Object IDs 22-15Referencing Objects Indirectly 22-17Summary 22-20Practice 22 Overview 22-2223 Sharing Objects and CodeObjectives 23-2Benefits of Reusing Objects and Code 23-3What Are Property Classes? 23-5Creating a Property Class 23-6Inheriting from a Property Class 23-8What Are Object Groups? 23-10Creating and Using Object Groups 23-11Copying and Subclassing Objects and Code 23-13Subclassing 23-14What Are Object Libraries? 23-16Benefits of the Object Library 23-18Working with Object Libraries 23-19xiii
What Is a SmartClass? 23-20Working with SmartClasses 23-21Reusing PL/SQL 23-22What Are PL/SQL Libraries? 23-24Writing Code for Libraries 23-25Creating Library Program Units 23-26Attach Library Dialog Box 23-27Calls and Searches 23-28Summary 23-30Practice 23 Overview 23-3224 Using WebUtil to Interact with the ClientObjectives 24-2WebUtil Overview 24-3Benefits of the WebUtil Utility 24-4Integrating WebUtil into a Form 24-11When to Use WebUtil Functionality 24-13Interacting with the Client 24-14Example: Opening a File Dialog on the Client 24-15Example: Reading an Image File into Forms from the Client 24-16Example: Writing Text Files on the Client 24-17Example: Executing Operating System Commands on the Client 24-18Example: Performing OLE Automation on the Client 24-19Example: Obtaining Environment Information about the Client 24-22Summary 24-23Practice 24 Overview 24-2425 Introducing Multiple Form ApplicationsObjectives 25-2Multiple Form Applications Overview 25-3Multiple Form Session 25-4Benefits of Multiple Form Applications 25-5Starting Another Form Module 25-6Defining Multiple Form Functionality 25-8Conditional Opening 25-10Closing the Session 25-11Closing a Form with EXIT_FORM 25-12Other Useful Triggers 25-13Sharing Data Among Modules 25-15Linking by Global Variables 25-16Global Variables: Opening Another Form 25-17Global Variables: Restricted Query at Startup 25-18xiv
Assigning Global Variables in the Opened Form 25-19Linking by Parameter Lists 25-20Linking by Global Record Groups 25-23Linking by Shared PL/SQL Variables 25-24Summary 25-26Practice 25 Overview 25-28Appendix A: Practice SolutionsAppendix B: Table DescriptionsAppendix C: Introduction to Query BuilderAppendix D: Locking in FormsAppendix E: Oracle Object FeaturesAppendix F: Using the Layout Editorxv
Oracle Forms Developer 10g: Build Internet Applications Preface - 2
Oracle Forms Developer 10g: Build Internet Applications Preface - 3ProfileBefore you begin this courseBefore 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.PrerequisitesEither• Oracle Database 10g: SQL Fundamentals I• or the following CBT Library:– Oracle SQL: Basic SELECT statements– Oracle SQL: Data Retrieval Techniques– Oracle SQL: DML and DDL• or Introduction to Oracle Database 10g for Experienced SQL Users (InClass)• or Oracle Database 10g: Introduction to SQL (InClass)And either• Oracle Database 10g: Program with PL/SQL (InClass)• or the following CBT Library:– PL/SQL: Basics– PL/SQL: Procedures, Functions, and Packages– PL/SQL: Database Programming• Or both:– Oracle Database 10g: PL/SQL Fundamentals (InClass)– Oracle Database 10g: Develop PL/SQL Program Units (InClass)Suggested prerequisites• Oracle Database 10g: SQL Fundamentals II (InClass) (if you attended the Oracle Database 10g:SQL Fundamentals I (InClass))• Oracle Database 10g: Advanced PL/SQL (InClass)• Oracle Forms Developer 10g: Move to the Web (eStudy)How this course is organizedOracle Forms Developer 10g: Build Internet Applications is an instructor-led course featuring lectureand hands-on exercises. Online demonstrations and written practice sessions reinforce the concepts andskills introduced.
Oracle Forms Developer 10g: Build Internet Applications Preface - 4Related PublicationsOracle publicationsTitle Part NumberOracle Forms Developer, Release 6i:Getting Started (Windows 95/NT) A73154-01Oracle Forms Developer and Reports Developer, Release 6i:Guidelines for Building Applications A73073-02Oracle Application Server Forms Services Deployment Guide B10470-0110g (9.0.4)Additional publicationsRelease notes: <ORACLE_HOMEdocwelcomerelease_noteschap_forms.htm
Oracle Forms Developer 10g: Build Internet Applications Preface - 5Typographic ConventionsTypographic conventions in textConvention Element ExampleBold italic Glossary term (if there isa glossary)The algorithm inserts the new key.Caps andlowercaseButtons,check boxes,triggers,windowsClick the Executable button.Select the Can’t Delete Card check box.Assign a When-Validate-Item trigger to theORDERS block.Open the Master Schedule window.Courier new,case sensitive(default islowercase)Code output,directory names,filenames,passwords,pathnames,URLs,user input,usernamesCode 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_docsprojectsURL: Go to http://www.oracle.comUser input: Enter 300Username: Log on as scottInitial cap Graphics labels(unless the term is aproper noun)Customer address (but Oracle Payables)Italic Emphasized words andphrases,titles of books andcourses,variablesDo not save changes to the database.For further information, see Oracle7 Server SQLLanguage Reference Manual.Enter email@example.com, whereuser_id is the name of the user.QuotationmarksInterface elements withlong names that haveonly initial caps;lesson and chapter titlesin cross-referencesSelect “Include a reusable module component”and click Finish.This subject is covered in Unit II, Lesson 3,“Working with Objects.”Uppercase SQL column names,commands, functions,schemas, table namesUse the SELECT command to view informationstored in the LAST_NAMEcolumn of the EMP table.
Oracle Forms Developer 10g: Build Internet Applications Preface - 6Typographic Conventions (continued)Typographic conventions in text (continued)Typographic conventions in codeConvention Element ExampleRight 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]Convention Element ExampleCaps andlowercaseOracle FormstriggersWhen-Validate-ItemLowercase Column names,table namesSELECT last_nameFROM s_emp;Passwords DROP USER scottIDENTIFIED BY tiger;PL/SQL objects OG_ACTIVATE_LAYER(OG_GET_LAYER (‘prod_pie_layer’))Lowercase italic Syntax variables CREATE ROLE roleUppercase SQL commandsand functionsSELECT useridFROM emp;
Oracle Forms Developer 10g: Build Internet Applications 1-6Oracle Enterprise Grid Computing (continued)• Oracle Application Server 10g provides:Application Server Clusters that can pool and virtualize run-time services; all servicescan be distributed across multiple machines in a grid, and new application serverinstances can be automatically added and started to deliver capacity on demandInteraction with Oracle RAC to improve application reliabilityIdentity management features that provide centralized user administration, which iseven more important in a grid environmentEase of application deployment: Enterprise applications do not need to be redesigned,because when they are deployed on the Oracle Application Server 10g in a grid, theapplications benefit immediately from the transparent workload distribution, loadbalancing, and scheduling necessary to coordinate work across multiple servers.JDeveloper 10g, available in Oracle Developer Suite 10g, enables applications toexpose their behavior to other applications and to management tools throughstandardized interfaces, so that they can communicate with other applications andheterogeneous resources across a grid.• Oracle Enterprise Manager 10g Grid Control is the complete, integrated, centralmanagement console and underlying framework that automates administrative tasks acrosssets of systems in a grid environment. It enables:Grouping of multiple hardware nodes, databases, application servers, and othertargets into single logical entitiesSoftware provisioning that automates installation, configuration, and cloning ofOracle Application Server 10g and Oracle Database 10g across multiple nodes,making it it possible to add capacity as needed or to easily patch and upgrade existingsystemsEase of application deployment: Applications can be deployed once to a singleapplication server instance, registered with the central repository, then automaticallydeployed to all relevant nodes on the grid, with nodes being synchronized as changesare made.Application Service Level Monitoring by viewing the availability and performance ofthe grid infrastructure as a unified whole so that performance or availability issuescan be traced throughout the entire application, and the root cause can be determinedby drilling down into the infrastructureNote: For additional information about Oracle’s enterprise grid computing solution, see the GridTechnology Center on OTN: http://otn.oracle.com/tech/grid/index.html.
Oracle Forms Developer 10g: Build Internet Applications 1-19The Summit Office Supply Application (continued)• Orders form: Opened from the Customers form, the Orders form displays orders for acustomer 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 orderedproducts. The form consists of three blocks:Orders block: The Orders block is a single record master block for the form The basetable 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 whoseitems are on the same canvas as those in the Orders block. The base table of theOrder_Items block is Order_Items, but the block displays information from othertables, such as the product description.Inventories block: The Inventories block is a multirecord block showing warehousestock for a product. Its items are on a separate canvas, which is assigned to its ownwindow. This block is linked to the current product in the Order_Items block, but thetwo blocks can operate independently.Instructor NoteExplain to students that the concepts of blocks, windows, canvases, and so on are presented inlater lessons. The descriptions above are just to give an overview of the application. Studentsmay want to refer back to this overview later when the concepts are presented.
Oracle Forms Developer 10g: Build Internet Applications 2-16What You See at Run-Time (continued)What is the Console?The console is the generic name for the standard features that provide information at runtime. The console is displayed at the bottom of the window and consists of:• The message line that displays both Forms and application-specific messages.• The status line that displays a variety of indicators to reflect the current state of theform module.Instructor NoteDemonstrationStart an OC4J instance. In Forms Builder, open the form module Customers and run itwith the Run Form button. Point out the Browser window, Java applet, Default menu,Menu toolbar, and Console components. Describe the elements of the URL in thebrowser.Select Help > Keys from the menu. Execute an unrestricted query. Execute a restrictedquery to retrieve information about the customer with the ID of 212.Leaving this browser session open, start another browser session; copy the URL from thefirst session into the second. Add the following to the end of URL:&lookAndFeel=generic (the default Look and Feel is “oracle”). Point out thedifferent appearance of the user interface, especially the rounded appearance of thebuttons and the new look of the Menu toolbar.Terminate these run-time sessions by exiting the forms, and then closing the browserwindows. Be sure to advise students to always exit the form to terminate the applet beforeclosing the browser window.Indicator DescriptionRecord: n/m The nth record retrieved and displayed so far, out of m number oftotal records that can be retrieved by the query.Until the last record is fetched, m displays as “?”; after that, itdisplays the number corresponding to the last record.Enter-Query The current block is in Enter Query mode and no records have beenretrievedList of Values A list of values (LOV) is associated with the current item.
Oracle Forms Developer 10g: Build Internet Applications 2-19Navigating a Forms Application (continued)The Menu Toolbar (continued)• Insert new records or delete existing records.• Invoke Help to see properties of an item.The MouseYou can use the mouse to navigate and to perform many user operations in a bitmappedenvironment without needing to learn the function keys. Use the mouse to perform thefollowing actions:• Move the cursor.• Select from a menu.• Select from an LOV.• Select or clear a check box.• Select a button, including a radio button.• Switch to an open window.• Respond to an alert.• Scroll records or lines by using a data block or item scroll bar.• Manipulate a custom item.ButtonsWeb applications often use buttons as a means of navigation. You can click buttons withthe mouse. Use buttons to perform the following tasks:• Move input focus.• Display a list of values.• Invoke an editor.• Invoke another window.• Commit data.• Issue a query.• Perform calculations.• Exit the form.Function KeysIn addition to navigating with the mouse, you can move from item to item in sequencewith function keys. Use function keys to perform the following tasks:• Navigate between data blocks, records, and items.• Execute queries.• Insert new records or delete existing ones.• Invoke Help.To view a list of keys and the functions they perform, select Help > Keys, or press[Ctrl]+K.Instructor NoteDemonstration: From Forms Builder, run the ORDERS form. Point out the main dataelements. Show the different means of navigation.
Oracle Forms Developer 10g: Build Internet Applications 2-24Performing a Restricted Query (continued)How to Perform a Restricted QueryYou can perform a restricted query with the following steps:1. Perform one of the following:Select Query > Enter.Click the Enter Query button.Press the appropriate function key.2. Enter-Query displays on the status line.3. Enter search criteria into appropriate items.4. Perform one of the following:Select Query > Execute.Click the Execute Query button.Press the appropriate function key.Note: Forms Builder constructs a select statement by using the AND operator for allspecified conditions.Instructor NoteThe default date format is dependent on the language/territory. In Oracle8i Release 2(8.1.6), the default date formats were modified, replacing ’YY’ with ’RR’ and ’YYYY’with ’RRRR’. For example, if NLS_LANG is set to Finland, then the default dateformat will be DD.MM.RRRR.
Oracle Forms Developer 10g: Build Internet Applications 2-28Inserting, Updating, and Deleting Records (continued)How to Update a RecordTo update a record, perform the following steps:1. Select Query > Enter.2. Enter the search criteria to retrieve the appropriate record.3. Select Query > Execute to retrieve all records that satisfy your specific searchcriteria.4. Scroll through the records, stopping at the record to be updated.5. Update the record.How to Delete a RecordTo delete a record, perform the following steps:1. Select Query > Enter.2. Enter the search criteria to retrieve the appropriate record.3. Select Query > Execute to retrieve all records that satisfy your specific searchcriteria.4. Scroll through the records, stopping at the record to be deleted. Delete the record bytaking one of the following actions:Select Record > Remove to clear the record and mark it for deletion.Click Remove Record (red X) to clear the record and mark it for deletion.Press the appropriate function keys.
Oracle Forms Developer 10g: Build Internet Applications 2-35Practice 21. Start an instance of OC4J.2. Invoke Internet Explorer and enter the following URL:http://<machine>:<port>/forms90/f90servlet?form=customers.fmxYour instructor will tell you the machine name and port number to use.3. Select Help > Keys from the menu.4. Click OK to close the Keys window. Browse through the records that were returnedby the unrestricted query that executed automatically when the form started.5. Execute a restricted query to retrieve information about the customer with the ID of212.6. Execute a restricted query to retrieve the customer whose first name is “Meenakshi”.7. Try each of these restricted queries:a. Retrieve all cities starting with San.b. Retrieve all customers based in the USA with a low credit limit.8. Display the customer details for Harrison Sutherland and click Orders to invoke theOrders form module.9. Click Image Off and notice that the image item is no longer displayed. Click ImageOn and notice that the image item is displayed.10. Query only those orders that were submitted online.11. Move to the fourth record (Product ID 2322) in the Item block of Order 2355 andclick Stock.The Inventory block is displayed in a separate window with stock information forthat item.12. Close the Stock Levels window. For the customer Harrison Sutherland, insert a newrecord in the ORDER block, as detailed below.Notice that some items are already populated with default values. Enter thefollowing:13. Insert a new record in the ITEM block with the following values:Item ValueOnline UncheckedStatus New Credit Order (poplist)Sales Rep ID 151 (Enter the ID, or click the Listbutton and select David Bernstein)Item ValueProduct ID 2289 (Enter the ID, or click the Listbutton and select KB 101/ES.Quantity 2
Oracle Forms Developer 10g: Build Internet Applications 2-36Practice 2 (continued)14. Save the new records.15. Update the order that you have just placed and save the change.Note: You may receive a message indicating that there are no changes to save. Thismessage is generated by the Customers form, because both forms are saved at thesame time. Changes to the Orders form should be saved successfully, so you canacknowledge the message and then ignore it.16. Attempt to delete the order that you have just placed. What happens?17. Delete the line item for your order and save the change.18. Now attempt to delete your order and save the change.19. Exit the run-time session and close the browser window.