ALERT
An alert is a modal window that displays a message notifying the operator of some application condition.
Use alerts to advise operators of unusual situations or to warn operators who are about to perform an action that might have undesirable or unexpected consequences.
There are three styles of alerts: Stop, Caution, and Note. Each style denotes a different level of message severity. Message severity is represented visually by a unique icon that displays in the alert window.
OBJECT GROUPS
An object group is a container for a group of objects. You define an object group when you want to package related objects so you can copy or subclass them in another module. Object groups provide a way to bundle objects into higher-level building blocks that can be used in other parts of an application and in subsequent development projects.
You define an object group when you want to package related objects for copying or sub classing in another module. You can use object groups to bundle numerous objects into higher-level building blocks that you can use again in another application.
Using Object Groups
· Blocks include:
Items
Item-level triggers
Block-level triggers
Relations
· Object groups cannot include other object groups
· Deleting:
An object group does not affect the objects
An object affects the object group
Copying an Object
Copying an object creates a separate, unique version of that object in the target module. Any objects owned by the copied object are also copied.
Use copying to export the definition of an object to another module.
· Changes made to a copied object in the source module do not affect the copied object in the target module.
Subclassing
Subclassing is an object-oriented term that refers to the following capabilities:
· Inheriting the characteristics of a base class (Inheritance)
· Overriding properties of the base class (Specialization)
OBJECT LIBRARY
This object provides an easy method of reusing objects and enforcing standards across the entire development organization.
You can use the Object Library to create, store, maintain, and distribute standard and reusable objects.
In addition, by using Object Libraries, you can rapidly create applications by dragging and dropping predefined objects to your form.
· Is a convenient container of objects for reuse
· Simplifies reuse in complex environments
· Supports corporate, project, and personal standards
· Simplifies the sharing of reusable components
Object libraries are convenient containers of objects for reuse. They simplify reuse in complex environments, and they support corporate, project, and personal standards.
An object library can contain simple objects, property classes, object groups, and program units, but they are protected against change in the library. Objects can be used as standards (classes) for other objects.
Object libraries simplify the sharing of reusable components. Reusing components enables you to:
· Apply standards to simple objects, such as buttons and items, for a consistent look and feel
· Reuse complex objects such as a Navigator
Benefits of the Object Library
· Simplifies the sharing and reuse of objects
· Provides control and enforcement of standards
· Eliminates the need to maintain multiple referenced forms
SMARTCLASS
A SmartClass is a special member of an Object Library. Unlike other Object Library members, it can be used to subclass existing objects in a form using the SmartClass option from the right mouse button popup menu. Object Library members which are not SmartClasses can only be used to create new objects in form modules into which they are added.
If you frequently use certain objects as standards, such as standard buttons, date items, and alerts, you can mark them as SmartClasses by selecting each object in the object library and choosing Object—>SmartClass.
You can mark many different objects that are spread across multiple object libraries as SmartClasses.
· Is an object in an object library that is frequently used as a class
· Can be applied easily and rapidly to existing objects
· Can be defined in many object libraries
You can have many SmartClasses of a given object
PL/SQL Libraries
A library is a collection of PL/SQL program units, including procedures, functions, and packages. A single library can contain many program units that can be shared among the Oracle Developer modules and applications that need to use them.
A library:
· Is produced as a separate module and stored in either a file or the database
· Provides a convenient means of storing client-side code and sharing it among applications
· Means that a single copy of program units can be used by many form,menu, report, or graphic modules
· Supports dynamic loading of program units
FUNCTION locate_emp(bind_value IN NUMBER) RETURN VARCHAR2 IS
v_ename VARCHAR2(15);
BEGIN
SELECT ename INTO v_ename FROM emp WHERE empno = bind_value;
RETURN(v_ename);
END;
Reasons to share objects and code:
· Increased productivity
· Increased modularity
· Decreased maintenance
· Maintaining standards
.PLL PL/SQL Library Module Binary
.PLD PL/SQL Library Module Text
.PLX PL/SQL Library Module Executable
.MMB Menu Module Binary
.MMT Menu Module Text
.MMX Menu Module Executable
Form Builder Built-in Package
EXEC_SQL Provides built-ins for executing dynamic SQL within PL/SQL procedures
VBX
Provides built-ins for controlling and interacting with VBX controls; this package works only in a 16-bit environment and is provided for backward compatibility
WEB
Provides built-ins for the Web environment
OLE2
Provides a PL/SQL API for creating, manipulating, and accessing attributes of OLE2 automation objects
SUBPROGRAM
A subprogram can be either a procedure or a function. Built-in subprograms are therefore called in two distinct ways:
· Built-in procedures:
Called as a complete statement in a trigger or program unit with mandatory arguments.
· Built-in functions:
Called as part of a statement, in a trigger or program unit, at a position where the function’s return value will be used. Again, the function call must include any mandatory arguments.
TRIGGER
Triggers are blocks of PL/SQL code that are written to perform tasks when a specific event occurs within an application. In effect, a Form Builder trigger is an event-handler written in PL/SQL to augment (or occasionally replace) the default processing behavior. Every trigger has a name, and contains one or more PL/SQL statements. A trigger encapsulates PL/SQL code so that it can be associated with an event and executed and maintained as a distinct object.
Trigger Scope
1.Form Level
The trigger belongs to the form and can fire due to events across the entire form.
2.Block Level
The trigger belongs to a block and can only fire when this block is the current block.
3.Item Level
The trigger belongs to an individual item and can only fore when this item is the current item.
Trigger Properties
Execution Style
Execution Hierarchy property
Specifies how the current trigger code should execute if there is a trigger with the same name defined at a higher level in the object hierarchy.
The following settings are valid for this property:
Override
Specifies that the current trigger fire instead of any trigger by the same name at any higher scope. This is known as "override parent" behavior.
Before
Specifies that the current trigger fire before firing the same trigger at the next-higher scope. This is known as "fire before parent" behavior.
After
Specifies that the current trigger fire after firing the same trigger at the next-higher scope. This is known as "fire after parent" behavior.
What are triggers used for?
· Validate data entry
· Protect the database from operator errors
· Limit operator access to specified forms
· Display related field data by performing table lookups
· Compare values between fields in the form
· Calculate field values and display the results of those calculations
· Perform complex transactions, such as verifying totals
· Display customized error and information messages to the operator
· Alter default navigation
· Display alert boxes
· Create, initialize, and increment timers
Groups of triggers
GROUP
FUNCTION
When-triggers
Execute in addition to default processing
On-triggers
Replace default processing
Pre- and Post-triggers
Add processing before or after an event
Key-trigger
Change default processing assigned to a specific key
Open Oracle Form 10g:
Navigation : Start Menu -> All Programs -> Oracle Developer Suite – 10g -> Form Developer -> Form Builder