Date post: | 27-Oct-2014 |
Category: |
Documents |
Upload: | manoj-baghel |
View: | 545 times |
Download: | 94 times |
April 7, 2023 1
Training Training on on
Oracle Forms Oracle Forms
By :-
Manoj Baghel
(Assistant Consultant)
TCS,New Delhi
April 7, 2023 2
AgendaAgenda What Is Oracle Form Builder? Forms Concepts - What is a Form? The Forms Application Display Forms Builder forms in a Web browser Use a data block form to view, insert, update, and
delete database data Create a data block form that displays a single
record at a time Use the Object Navigator to change form object
names
April 7, 2023 3
Agenda (continued)Agenda (continued)
Use the Data Block and Layout Wizards to modify form properties
Create a tabular-style data block form that displays multiple records
References
April 7, 2023 4
What Is Oracle Form Builder?What Is Oracle Form Builder?
Component of Oracle Developer/2000– Forms– Reports– Graphics
Application builderEvent-driven applications
April 7, 2023 5
Forms - The Basic IdeaForms - The Basic Idea
A powerful ‘Graphical User Interface’. Are used to create applications to enter, access, change, or
delete data from an Oracle database in an online, form-based environment.
Forms provides many objects for developing an effective application module.
Coupled with the concept of user extensibility, Forms can be used to serve virtually every online need in an Oracle database environment.
April 7, 2023 6
Components of Form BuilderComponents of Form Builder
Forms Builder
- Used to create a form.Forms Compiler
- Required to compile the file created in Forms Builder.Forms Runtime
- Used to run the compiled code created by Forms Compiler.
April 7, 2023 7
Forms Concepts - The Big Forms Concepts - The Big Picture Picture
Triggersand/or
default processes
User actions Internal events
DatabaseApplication
State
April 7, 2023 8
Client
What Is Forms Looking ForWhat Is Forms Looking For
FormsRuntime
FormsServer
(Compiled Objects)
Database
RegistryFORMS_PATH
Connect
April 7, 2023 9
File TypesFile Types Forms Modules
– .FMB; Forms Source
– .FMX; Forms Executable
Menu Modules– .MMB; Menu Source
– .MMX; Menu Executable
Libraries– .PLL; PL/SQL Source and Executables
– .PLX; PL/SQL Executable Only.– .PLD; Documentation file
April 7, 2023 10
The Forms Application The Forms Application What You SeeWhat You See
exitenter
File Edit View Query Block Record Insert Help Whatever
Are you really sure you want to do this?
Canvas
ViewControl Item
Base-TableItem
Menu
WindowYes No
April 7, 2023 11
The Forms ApplicationThe Forms Application
What you see;– Window– Menu– Canvas/View– Items
Base-block items Control-block items
– Database records
April 7, 2023 12
Forms ComponentsForms Components
Highest Level of Hierarchy
- Forms- Menu- Libraries- Built-in Packages- Database Objects
April 7, 2023 13
Forms ComponentsForms Components
Windows
- Displays canvases.- Form can have multiple windows.- Modal; user must respond and dismiss window before doing anything in another window.- Modeless; user can move to another window.
April 7, 2023 14
Forms ComponentsForms Components
Canvas-Views
- Visual element of Forms. This is how you display all those Items.- Canvas; Background on which text and items are placed.- View; Visible portion of canvas.- Form can have multiple canvases.- Canvases can be stacked, scrolled.
April 7, 2023 15
Forms ComponentsForms Components
Blocks
- Base-Table Block corresponds to Database Table; set of items representing database table columns. An ‘instance’ of a Base-Table Block corresponds to a Database Record.- Control Block is usually a collection of control items (e.g. Buttons, Check-Boxes, Radio Groups), but can also be collection of Display Items (read-only text), Text Items (‘variables’), images, etc.
April 7, 2023 16
Forms ComponentsForms Components
Block Properties
April 7, 2023 17
Forms ComponentsForms Components
Items
- Base-Table Items are text items that correspond to Database Columns. Forms creates them automatically.- Control Items can be Buttons, Check-Boxes, Radio Groups, Display Items (read-only text), Text Items (‘variables’), images, etc.
April 7, 2023 18
Forms ComponentsForms Components
Item Properties
April 7, 2023 19
Forms ComponentsForms Components
Visual Attributes- Collection of display properties.- Refer to Named Visual Attribute in Items to standardise appearance. Change in NVA will affect all Items referring to it.
Property Classes- Collection of ANY properties.- When items refer to Property Class, only properties that make sense for that item will be used.
April 7, 2023 20
Forms ComponentsForms Components
Triggers
- At Form, Block or Item level- Lower level triggers fire before higher level triggers- If same trigger-type occurs at different levels, only lowest will fire
April 7, 2023 21
Forms ComponentForms Component
Alerts
- Modal Window that displays a message- Modal; User must respond- One, two or three buttons- Three types;
- Stop (stop sign)- Caution (exclamation)- Note
- Use SHOW_ALERT built-in function
April 7, 2023 22
Forms ComponentsForms Components
LOVs
- Allows user to select from specific set of values.-Displays Record Group.-Use Built-in Show_Lov,List_Values functions
April 7, 2023 23
Forms ComponentsForms Components
Editors
- Editor; simple text-editor dialog box for entering lines of text into Text Item.- Can create editors with different appearances for different text fields.
April 7, 2023 24
Forms ComponentsForms Components
Parameters
- Used as a Form variable. - Pass values between Forms.
April 7, 2023 25
Forms ComponentsForms Components
Program Units
- PL/SQL Procedures, Functions and Packages etc.
April 7, 2023 26
Forms ComponentsForms Components
Attached Libraries, Libraries & Built-in Packages
- PL/SQL procedures and functions.- Attached Library; Reference collected routines.- Library; Maintain and reference collected routines.- Built-in Packages; Oracle supplied procedure and functions.
April 7, 2023 27
Forms ComponentsForms Components
Object Groups
- Package reusable objects for later copying or reference.- E.g. Your Form includes an alarm clock to wake the user after ten minutes inactivity. This includes Triggers, Procedures, a Window, some graphics, etc. You can package these objects together to conveniently include this functionality in other forms.
April 7, 2023 28
Forms ConceptsForms Concepts
EventsProcessesTriggers
April 7, 2023 29
Forms ConceptsForms ConceptsEvents
– Things that happen– External Events
User Interaction; Mouse, Keyboard, Menu
– Internal Events Timers Processing steps for which triggers can be set
– Initiate Processes No Events? No Processing!
April 7, 2023 30
Forms ConceptsForms ConceptsProcesses
– Pre-programmed default behavior– What Forms DOES, for example;
Navigation Transaction Processing Validation Query Processing Master-Detail coordination
– Series of Internal Events
April 7, 2023 31
Forms ConceptsForms ConceptsTriggers
– Fired when Internal/External events occur– Replace, supplement or initiate default
processing– Initiate “External” events, to make Forms
behave as if user performed action E.g. Simulate User key-press
April 7, 2023 32
The Forms ApplicationThe Forms Application
Form Builder builds Forms, Menus and Libraries
Application consists of at least one Form
Can also include one or more Menu and Library modules
Oracle provides default Menu
April 7, 2023 33
Data Block Wizard Table PageData Block Wizard Table Page
April 7, 2023 34
Layout Editor WindowLayout Editor Window
April 7, 2023 35
The Layout EditorThe Layout Editor
Graphical display of form canvasDraw and proportion form itemsBoilerplate objects
– Static imported image
April 7, 2023 36
Using a Data Block FormUsing a Data Block Form
Block – Group of related form items
Data block – Corresponds to specific database table– Contains objects that display values from table’s data
fields Text items Form menu
– Contains selections to manipulate form
April 7, 2023 37
Using a Data Block Form Using a Data Block Form (continued)(continued)
Modes:– Normal– Enter query– Query
Message line
April 7, 2023 38
Using a Form to View Table Using a Form to View Table RecordsRecords
Click Enter Query buttonType search expressionClick Execute Query buttonTo retrieve all records
– Do not enter search expression Inexact search
– Use comparison and wildcard operators in search fields
April 7, 2023 39
Using a Form to Insert, Update, Using a Form to Insert, Update, and Delete Recordsand Delete Records
Insert – Enter data in blank form– Click Save button
Update– Modify existing record using form– Click Save button
Delete– Click Remove Record button– Click Save button
April 7, 2023 40
Viewing and Interpreting Form Viewing and Interpreting Form ErrorsErrors
When error occurs– Error code and message displayed in message
line
Errors generated by– Form– DBMS
April 7, 2023 41
Creating a Data Block FormCreating a Data Block Form
Forms Builder – Automatically generates text items and labels
for data fields in table – Provides code for inserting, modifying,
deleting, and viewing data records
April 7, 2023 42
Multiple Record FormMultiple Record Form
April 7, 2023 43
TriggersTriggersForms Trigger
– Fires in response to Forms Events
Database Trigger– Fires in response to Database Events
THESE ARE COMPLETELY INDEPENDENT OF EACH OTHER!!!
April 7, 2023 44
TriggersTriggers
Can be coded at Form, Block, and/or Item Level
Some Triggers apply to multiple levels of hierarchy, others are specific– When creating new trigger, List of Values
presents list of appropriate triggersEach Trigger-type executes only onceLowest level Triggers fired first
April 7, 2023 45
Types of Form TriggersTypes of Form Triggers
Interface Triggers
- Triggers associated with user interface objects.
Navigational Triggers
- Fire in response to navigational events
Smart Triggers
- Triggers classified on the basis of the object
April 7, 2023 46
Types of Interface TriggersTypes of Interface Triggers
Key Triggers - Key-Next-Item, Key-Commit etc.
Action Triggers associated with user objects - When-Button-Pressed, When-List-Changed,When-
Radio-Changed etc
Mouse Triggers - When-Mouse-Click, When-Mouse-Leave,When-
Mouse-Enter etc
April 7, 2023 47
Types of Navigational TriggersTypes of Navigational Triggers
Pre- and Post- triggers - Fire when cursor navigates internally through different levels of
the object hierarchy. - e.g. Pre-Text-Item, Post-Text-Item etc When-New-Instance triggers - Fires after the form’s focus is positioned on given form,block or
item. - e.g. When-New-Form-Instance, When-New-Item-
Instance etc.
April 7, 2023 48
Master-Detail Delete PropertiesMaster-Detail Delete Properties Non-Isolated
- A master record cannot be deleted if associated detail
records exist in the database. Isolated
- A master record can be deleted, but the associated
details records are not affected. Cascading
- Master record can be deleted, and any associated detail records are automatically deleted from the database.
April 7, 2023 49
How Forms Builder Displays a How Forms Builder Displays a Form in a BrowserForm in a Browser
Java appletOC4J Instance
– Translates compiled .fmx file into Java applet – Downloads Java applet to Web browser
April 7, 2023 50
ReferencesReferencesOn-line helpOracle Developer/2000 Handbook (2nd. Ed.)
– Robert J. Muller, Oracle PressOracle technology network
(http://TechNet.Oracle.Com)
April 7, 2023 51
April 7, 2023 52