1) Types of Triggers                         
Overview of triggers
This topic provides an overview of commonly used triggers, grouped into the following functional categories:
Block-processing triggers 
When-Create-Record
When-Clear-Block
When-Database-Record
When-Remove-Record
Block processing triggers fire in response to events related to record management in a block.
When-Create-Record: Perform an action whenever Form Builder attempts to create a new record in a block.  For example, to set complex, calculated, or data-driven default values that must be specified at runtime, rather than design time.
When Clear Block: Perform an action whenever Form Builder flushes the current block; that is, removes all records from the block.
When-Database-Record: Perform an action whenever Form Builder changes a record's status to Insert or Update, thus indicating that the record should be processed by the next COMMIT_FORM operation
When-Remove-Record: Perform an action whenever a record is cleared or deleted.  For example, to adjust a running total that is being calculated for all of the records displayed in a block.
Interface event triggers
When-Button-Pressed
When-Checkbox-Changed
When-Image-Activated
When-Image-Pressed
Key- [all]
When-Radio-Changed
When-Timer-Expired
When-Window-Activated
When-Window-Closed
When-Window-Deactivated
When-Window-Resized        
Interface event triggers fire in response to events that occur in the form interface.  Some of these trigger, such as When-Button-Pressed, fire only in response to operator input or manipulation.  Others, like When-Window-Activated, can fire in response to both operator input and programmatic control.
When-Button-Pressed: Initiate an action when an operator selects a button, either with the mouse or through keyboard selection.
When-Checkbox-Changed: Initiate an action when the operator toggles the state of a check box, either with the mouse or through keyboard selection
When-Image-Activated - Initiate an action whenever the operator double-clicks an image item.
When-Image-Pressed - Initiate an action whenever an operator clicks on an image item.
Key- [all] - Replace the default function associated with a function key.  For example, you can define a Key-EXIT trigger to replace the default functionality of the [Help] key.
When-Radio-Changed - Initiate an action when an operator changes the current radio button selected in a radio group item.
When-Timer-Expired - Initiate an action when a programmatic timer expires.
When-Window-Activated - Initiate an action whenever an operator or the application activates a window.
When-Window-Closed - Initiate an action whenever an operator closes a window with the window manager's Close command.
When-Window-Deactivated - Initiate an action whenever a window is deactivated as a result of another window becoming the active window.
When-Window-Resized - Initiate an action whenever a window is resized, either by the operator or programmatically.
Master-detail triggers 
On-Check-Delete-Master
On-Clear-Details        
On-Populate-Details
Form Builder generates master/detail triggers automatically when a master/detail relation is defined between blocks. 
On-Check-Delete-Master       Fires when Form Builder attempts to delete a record in a block that is a master block in a master/detail relation.
On-Clear-Details        Fires when Form Builder needs to clear records in a block that is a detail block in a master/detail relation because those records no longer correspond to the current record in the master block.
On-Populate-Details   Fires when Form Builder needs to fetch records into a block that is the detail block in a master/detail relation so that detail records are synchronized with the current record in the master block.
Message-handling triggers  
On-Error         
On-Message
Form Builder automatically issues appropriate error and informational messages in response to runtime events.  Message handling triggers fire in response to these default messaging events.
On-Error        Replace a default error message with a custom error message, or to trap and recover from an error.
On-Message    To trap and respond to a message; for example, to replace a default message issued by Form Builder with a custom message. 
Navigational triggers
Pre-Form                     Pre-Record                  Pre-Text-Item              Post-Text- Item
Post-Record                Pre-Block                    Post-Block                  Post-Form                                                                   
Navigational triggers fire in response to navigational events.  For instance, when the operator clicks on a text item in another block, navigational events occur as Form Builder moves the input focus from the current item to the target item. 
Pre-Form       Perform an action just before Form Builder navigates to the form from "outside" the  form, such as at form startup.
Pre-Block       Perform an action before Form Builder navigates to the block level from the form level.
Pre-Record     Perform an action before Form Builder navigates to the record level from the block level.
Pre-Text-Item  Perform an action before Form Builder navigates to a text item from the record level.
Post-Text-Item Manipulate an item when Form Builder leaves a text item and navigates to the record level.
Post-Record   Manipulate a record when Form Builder leaves a record and navigates to the block level.
Post-Block      Manipulate the current record when Form Builder leaves a block and navigates to the  form level.
Post-Form      Perform an action before Form Builder navigates to "outside" the
When-New-Instance-Triggers 
Query-time triggers
When-New-Form-Instance    
When-New-Block-Instance
When-New-Record-Instance
When-New-Item-Instance
Fire at the end of a navigational sequence that places the input focus on a different item.  Specifically, these triggers fire just after Form Builder moves the input focus to a different item, when the form returns to a quiet state to wait for operator input.
Unlike the Pre- and Post- navigational triggers, the When-New-Instance triggers do not fire in response to internal navigational events that occur during default form processing.
Query-time triggers
When-New-Form-Instance    Perform an action at form start-up.  (Occurs after the Pre-Form trigger fires).
When-New-Block-Instance    Perform an action immediately after the input focus moves to an item in a block other than the block that previously had input focus.
When-New-Record-Instance Perform an action immediately after the input focus moves to an item in a different record.  If the new record is in a different block, fires after
the When-New-Block-Instance trigger, but before the When-New-Item-Instance trigger.
When-New-Item-Instance      Perform an action immediately after the input focus moves to a different item.  If the new item is in a different block, fires after the When-New-
Block-Instance trigger.
Transactional triggers           
Transactional triggers fire in response to a wide variety of events that occur as a form interacts with the data source.
Trigger           Typical Usage
On-Delete       Replace the default Form Builder processing for handling deleted records during transaction posting.
On-Insert        Replace the default Form Builder processing for handling inserted records during transaction posting.
On-Lock         Replace the default Form Builder processing for locking rows in the database.
On-Logon       Replace the default Form Builder processing for connecting to ORACLE, especially for a form that does not require a database connection or for connecting to a non-ORACLE data source.
On-Logout      Replace the default Form Builder processing for logout from ORACLE.
On-Update      Replace the default Form Builder processing for handling updated records during transaction posting.
Post-Database-Commit   Augment default Form Builder processing following a database commit.
Post-Delete      Audit transactions following the deletion of a row from the database.
Post-Forms-Commit Augment the default Form Builder commit statement prior to committing a transaction.
Post-Insert      Audit transactions following the insertion of a row in the database.
Post-Update   Audit transactions following the updating of a row in the database.
Pre-Commit   Perform an action immediately before the Post and Commit Transactions process, when Form Builder determines that there are changes in the form to post or to commit.
Pre-Delete       Manipulate a record prior to its being deleted from the database during the default Post and Commit Transactions process; for example, to prevent deletion of the record if certain conditions exist.
Pre-Insert        Manipulate a record prior to its being inserted in the database during the default Post and Commit Transactions process.
Pre-Update     Validate or modify a record prior to its being updated in the database during the default Post and Commit Transactions process.
Validation_triggers
When-Validate-Item                           When-Validate-Record
Validation triggers fire when Form Builder validates data in an item or record.  Form Builder performs validation checks during navigation that occurs in response to operator input, programmatic control, or default processing, such as a Commit operation.
Trigger                                 Typical Usage
When-Validate-Item   Augment default validation of an item.
When-Validate-Record  Augment default validation of a record.
Triggers are blocks of PL/SQL code that are written to perform tasks when a specific event occurs within an application.
Ready item for input   When-New-Item-Instance Form Level Triggers, Block level triggers, Item level triggers
2) Canvases   
1) Content2) stacked3) tabbed4) horizontal4) vertical
3) Alerts          
 An alert is a modal window that displays a message notifying the operator of some application condition.
There are three styles of alerts: Stop, Caution, and Note.
To display an alert, your application must execute the SHOW_ALERT built-in subprogram from a trigger or user-named subprogram.  SHOW_ALERT is a function that returns a numeric constant.
Show_Alert(alert_name) Return NUMBER;
4) Libraries  
 A library is a collection of subprograms, including user-named procedures, functions, and packages.
Libraries provide a convenient means of storing client-side program units and sharing them among multiple applications.
Libraries support dynamic loading --that is, a library's program units are loaded into an application only when needed.  This can significantly reduce the runtime memory requirements of an application.
5) Object Library   
In any development environment, you will always have standards to which you want your developers to adhere as well as common objects which can be reused throughout the development effort.
The Object Library provides an easy method of reusing objects and enforcing standards across the entire development organization.
Object libraries are automatically re-opened when you startup Form Builder, making your reusable objects immediately accessible.
1)         You can associate multiple object libraries with an application.  For example, you can create an object library specifically for corporate standards, and you can create an object library to satisfy project-specific requirements.
2)                  Object libraries feature SmartClasses-- objects that you define as being the standard.  You use SmartClasses to convert objects to standard objects.
6) visual attributes  
Visual attributes are the font, color, and pattern properties that you set for form and menu objects that appear in your application's interface.  Visual attributes can include the following properties:
      1)   Font properties:  Font Name, Font Size, Font Style, Font Width, Font Weight
2)                  Color and pattern properties:  Foreground Color, Background Color, Fill Pattern, Charmode Logical Attribute, White on Black
3)                  When you work with visual attributes, consider these guidelines:
4)                        When you apply a named visual attribute to an object, only those attributes that make sense for that object take effect.
5)                        If you plan to port your application to more than one platform, you should use named visual attribute settings.
7) Property classes:
A property class is a named object that contains a list of properties and their settings. Once you create a property class you can base other objects on it.
Property class inheritance is an instance of subclassing. Conceptually, you can consider a property class as a universal subclassing parent.
8)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.
9) Frames 
A frame is a graphic object that appears on a canvas.  You use frames to arrange the items within a block.
Frames can be manipulated in the Object Navigator, Layout Editor, and Property Palette
Each frame can be associated with a block
The Layout Wizard uses frames to arrange items
10) Blocks 
There are two types of blocks, data and control.
 Data Block     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 Block            In contrast, 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.
11) windows 
 A window is a container for all visual objects that make up a Form Builder application, including canvases.  A single form can include any number of windows.  While every new form automatically includes a default window named WINDOW1, you can create additional windows as needed by inserting them under the Windows node in the Object Navigator.
12) parameters 
Text parameters we can pass single value max 255,
 Data parameters we can pass record group as a parameter type must be defined as data parameter
13)Record Groups 
A record group is an internal Form Builder data structure that has a column/row framework similar to a database table. 
Record group column names cannot exceed 30 characters.
There are static record groups, U can create a record group by supplying a SQL query.
You can create a record group by using create_group_from_query
14) LOVS
An LOV is a scrollable popup window that provides the end user with either a single or multi-column selection list.  
LOV values are derived from record groups.
The LOVs in the Form Builder interface have the same auto-reduction and searching functionality as the LOVs you create for your own applications.
There are two built-in subprograms that can be used to display an LOV:
1)         LIST_VALUES
2)         SHOW_LOV
15)Relations   
A master-detail relation is an association between two data blocks—a master block and a detail block.  The relation reflects one of the following:
·           a primary-key to foreign-key relationship between the tables on which the blocks are based
·           a REF pointer relationship between the tables on which the blocks are based.
The master-detail relation automatically does the following:
1)         ensures that the detail block displays only those records that are associated with the current (master) record in the master block
2)         coordinates querying between the two blocks
16)Editors  
There are three editors that can be used at runtime: the default editor, a system editor, or a user-named editor.
Default Editor           The default editor provides standard editing features, including search/replace and cut, copy, and paste.  The default editor is built into every form and is automatically available from every text item.
System Editor            If there is a system editor available, you can specify that Form Builder should use the current system editor, rather than the default editor.
 User-Named Editor   A user-named editor has the same text editing functionality as the default editor, but, because it is a named object, you can specify editor attributes such as window display size, position, and title.  Also, a user-named editor can be displayed programmatically with the built-in procedure SHOW_EDITOR, independent of any particular text item.
How u attach libraries  
In the Object Navigator, open the desired form, menu, or library module.
            To open a module, choose FileOpen and then specify the module type to open.
Note:  When you attach a library to a module in Form Builder, you attach the .PLL version of the library. At runtime, Form Builder looks for a .PLX file by that name in the default search paths. If no .PLX file is present, Form Builder uses the .PLL file by that name.
2)         Expand the module and then select the Attached Libraries node.  Choose NavigatorCreate to attach a library.
3)         Specify the name of the library to attach.
           
20)Menus 
The Menu Editor is a Form Builder design tool you use (along with the Object Navigator and Property Palette) to create and arrange custom form menu modules and popup menus.
Before you can use the Menu Editor to work with menu objects, you must create a new menu module (or open an existing one) in the Object Navigator.
Synchronization  Whether you work in the Menu Editor, the Object Navigator, or the Property Palette, Form Builder automatically synchronizes its design tools to simultaneously display the currently-selected object, even if Form Builder must expand nodes and menus to display the object.  So as you work with menus, the same menu object always is selected in the Menu Editor, the Object Navigator, and the Property Palette.
How u call report from a form               
Run_product,run_report_object
23)Built in <
Do_key
Is_null
Name_in
what is a restricted procedure 
if we unable to call the procedure from the trigger then it is called the restricted procedure
 
What is the difference between call_form, open_form, New_form?
New_form will open new form
Open_form many number of forms can be opened in the same application
Call_form current form will be active while another form also is opened 
Wednesday, June 25, 2008
Subscribe to:
Post Comments (Atom)
  

2 comments:
Who knows where to download XRumer 5.0 Palladium?
Help, please. All recommend this program to effectively advertise on the Internet, this is the best program!
Post a Comment