Академический Документы
Профессиональный Документы
Культура Документы
Agenda
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
11 August 2012 2
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
11 August 2012
Oracle Developer/2000
Graphics
11 August 2012
11 August 2012 5
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.
11 August 2012 6
Database
Forms Runtime
Connect Database Registry
FORMS_PATH
Forms Server
(Compiled Objects)
8
11 August 2012
File 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
11 August 2012
Menu
Canvas
Are you really sure you want to do this? Yes No
Window
enter
exit
View
11 August 2012
Control Item
BaseTable Item
10
you see;
Window Menu
Canvas/View
Items Base-block items Control-block items Database records
11 August 2012 11
Forms Components
Highest Level of Hierarchy
Forms Menu Libraries Built-in Packages Database Objects
11 August 2012
12
Forms 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.
11 August 2012
13
Forms 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.
11 August 2012
14
Forms 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, CheckBoxes, Radio Groups), but can also be collection of Display Items (readonly text), Text Items (variables), images, etc.
11 August 2012 15
Forms Components
Block Properties
11 August 2012
16
Forms 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.
11 August 2012
17
Forms Components
Item Properties
11 August 2012
18
Forms 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.
11 August 2012 19
Forms 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
11 August 2012
20
Forms 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
11 August 2012 21
Forms Components
LOVs
- Allows user to select from specific set of values. -Displays Record Group. -Use Built-in Show_Lov,List_Values functions
11 August 2012
22
Forms 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.
11 August 2012
23
Forms Components
Parameters
- Used as a Form variable. - Pass values between Forms.
11 August 2012
24
Forms Components
Program Units
- PL/SQL Procedures, Functions and Packages etc.
11 August 2012
25
Forms 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.
11 August 2012 26
Forms 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.
11 August 2012 27
Forms Concepts
Events
Processes Triggers
11 August 2012
28
Forms Concepts
Events Things that happen External Events
Internal Events Timers Processing steps for which triggers can be set Initiate Processes No Events? No Processing!
11 August 2012 29
Forms Concepts
Processes Pre-programmed default behavior What Forms DOES, for example;
Forms Concepts
Triggers
Fired when Internal/External events occur Replace, supplement or initiate default
processing Initiate External events, to make Forms behave as if user performed action
11 August 2012
31
11 August 2012
32
11 August 2012
33
11 August 2012
34
Graphical display of form canvas Draw and proportion form items Boilerplate objects
Static imported image
11 August 2012
35
Block
Group of related form items
Data block
Corresponds to specific database table Contains objects that display values from tables data
fields
Query
Message
line
11 August 2012
37
Enter Query button Type search expression Click Execute Query button To retrieve all records
Do not enter search expression
search fields
11 August 2012 38
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
11 August 2012
39
error occurs
line
Errors
generated by
Form DBMS
11 August 2012
40
Builder
for data fields in table Provides code for inserting, modifying, deleting, and viewing data records
11 August 2012
41
11 August 2012
42
Triggers
Forms
Trigger
Trigger
Database THESE
11 August 2012
43
Triggers
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
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
11 August 2012 45
Triggers
- Key-Next-Item, Key-Commit etc. Action Triggers associated with user objects - When-Button-Pressed, When-List-Changed,WhenRadio-Changed etc
Mouse
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 forms focus is positioned on given form,block or item. - e.g. When-New-Form-Instance, When-New-ItemInstance etc.
11 August 2012 47
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.
11 August 2012
48
11 August 2012
49
References
On-line help
Oracle Developer/2000 Handbook (2nd. Ed.) Robert J. Muller, Oracle Press Oracle technology network (http://TechNet.Oracle.Com)
11 August 2012
50
11 August 2012
51
11 August 2012
52