OBJECTS OF FORMS
Blocks
Block is logical owner of items. It provides a mechanism for grouping related items into a functional unit for storing, displaying and manipulating records.
Items
These are interface objects that present data values to the user or enable the user to interact with the form.
Canvas
A canvas is the background object upon which interface items appear.
Frames
Frames are used to arrange items with in a block.
Windows
Windows contains for all visual objects that make up a form builder application.
PL/SQL Code Block
It is used for event driven code. That code automatically executes when a specific event occurs.
SET_FORM_PROPERTY
Sets a property of the given form.
Syntax:
SET_FORM_PROPERTY( formmodule_id, property, value);
SET_FORM_PROPERTY( formmodule_name, property, value);
BLOCKS
Block is logical owner of items. It provides a mechanism for grouping related items into a functional unit for storing, displaying and manipulating records.
Types of Blocks
Data Blocks
Data blocks are associated with data (table columns) within a database. By default, the association between a data block and the database allows operators to automatically query, update, insert, and delete rows within a database. Data blocks can be based on database tables, views, procedures, or transactional triggers.
Control Blocks
A control block is not associated with the database, and the items in a control block do not relate to table columns within a database. All blocks are either single-record or multi-record blocks:
A single-record block displays one record at a time.
A multi-record block displays more than one record at a time.
In addition, a data block can also be a master or detail block:
Master block displays a master record associated with detail records displayed in a detail block.
A detail block displays detail records associated with a master record displayed in master block.
MASTER-DETAIL RELATIONSHIP
A master-detail relationship is an association between two data blocks that reflects a primary foreign key relationship between the database tables on which the two data blocks are based.
The master data block is based on the table with the primary key, and the detail data block is based on the table with the foreign key. A master-detail relationship equates to the one-to-many relationship in the entity relationship diagram. A Detail Block Can Be a Master. You can create block relationships in which the detail of one master-detail link is the master for another link.
What Is a Relation?
A relation is a Form Builder object that handles the relationship between two associated blocks.
You can create a relation either:
Implicitly with a master-detail form module
Explicitly in the Object Navigator
Implicit Relations
When you create a master-detail form module, a relation is automatically created. This relation
is named masterblock_detailblock, for example, S_ORD_S_ITEM.
Explicit Relations
If a relation is not established when default blocks are created, you can create your own by setting the properties in the New Relation dialog box. Like implicitly created relations, PL/SQL program units and triggers are created automatically when you explicitly create a relation.
Master Deletes
You can prevent, propagate, or isolate deletion of a record in a master block when corresponding records exist in the detail block by setting the Master Deletes property. For example, you can delete all corresponding line items when an order is deleted.
Property Use
Non-Isolated | Prevents the deletion of the master record when the detail records exist |
Cascading | Deletes the detail records when a master record is deleted |
Isolated | Deletes only the master record
|
What Happens When You Modify a Relation?
Changing the Master Deletes property from the default of Non-Isolated to Cascading replaces the On-Check-Delete-Master trigger with the Pre- Delete trigger.
Changing the Master Deletes property from the default of Non-Isolated to Isolated results in the removal of the On-Check-Delete-Master trigger
MASTER DELETES PROPERTY | RESULTING TRIGGERS |
Non-Isolated (the default) | On-Check-Delete-Master On-Clear-Details On-Populate-Details |
Cascading | On-Clear-Details On-Populate-Details Pre-Delete |
Isolated | On-Clear-Details On-Populate-Details |
Coordination
You can control how the detail records are displayed when a master block is queried by setting the coordination property. For example, you can defer querying the line items for an order until the operator navigates to the item block.
Default [Immediate]
The default setting. When a coordination-causing event occurs, the detail records are fetched immediately. (Deferred False, Auto-Query False)
Deferred with Auto Query
Oracle Forms defers fetching the associated detail records until the operator navigates to the detail data block.
Deferred Without Auto Query
When coordination-causing event occurs, Oracle Forms does not automatically fetch the detail records. To fetch the detail records, the operator must navigate to the detail data block and explicitly execute a query.
Prevent Masterless Operation
Ensures that the detail data block cannot be queried or used to insert records when a master record is not currently displayed.
Join Condition
Use to:
Create links between blocks using SQL
Alter links between blocks using SQL Define using:
Usual SQL equi-join condition syntax
Block names instead of the base table names
Item names that exist in the form module instead of base table column names
Master-detail triggers
On-Check-Delete-Master, On-Populate-Details, On-Clear-Details
No comments:
Post a Comment