3. Application Development in Forms
Two Parts in Forms Development
• Forms painting
– Designing the layout of the forms
• Coding
– Coding in Triggers and Lovs
3
4. Major Components of a form
• Canvas
• Windows
• Blocks
• Items
• PL/SQL blocks
4
5. Canvas
• It’s the background on which you place the
interface objects.
• Items in a block can be placed on different
canvas views and can be displayed in different
windows.
• Different Types of canvas are tab canvas stack
canvas and content canvas
5
6. Windows
• A form can include any number of windows.
• A new form will by default have one window
named window1.
• A window must be attached to a canvas.
6
7. Block
• They are logical containers and have no
physical representation in the form
• They are very similar to the tables in the
database .
• Each block may or may not be connected to
the database table .
• There are 2 types of blocks Control and
Database block
7
8. Block – Cont..
• Block connected to database(Table) is called a
database block.User can query , update ,
insert and delete data in the base table
because of this direct relationship.
• Two blocks can be connected using Master-
Detail relation ship.
8
9. Items - Basic building blocks of a form
• Types
– Text Item: A single- or multi-line text box that
supports a variety of data types, format masks,
and editing capabilities.
– Display Item: A read-only text box whose value
must be fetched or assigned programmatically.
Operators cannot navigate to a display item or
edit the text it contains.
9
10. Cont..
– List Item: A List of choices displayed as either a
drop-down List, a List box, or a combo box.
– Push Button: A rectangle with a text label or an
icon graphic inside.
– Radio Group: A group of radio buttons, one of
which is always selected.
– Check Box: A text label with a graphic state
indicator that displays the current value as either
checked or unchecked. Clicking on a check box
toggles it to the opposite state.
10
11. Items – Cont..
• Bean Areas
• Chart Items
• Image Items
• Hierarchical Tree Item
• User Area
11
12. Triggers
• All the coding for a form is done in a trigger
• Triggers are defined/attached at three levels-Form level,
Block level,Item level.
• Trigger contains one or more PL/SQL statements.
• There are triggers defined for all events and actions which
can take place in a form
• Trigger names correspond to runtime events.
• A trigger must be attached to a specific object in the form,
either an item, a block, or the form itself.
12
13. Triggers Contd..
• Trigger types
-- When Triggers
-- Pre Triggers
-- Post Triggers
-- On Triggers
-- Key Triggers
13
14. Triggering Sequence
When a form is Opened
• Pre-Form
• Pre-Block
• Pre-Record
• Pre-Text-Item
• When-New-Form-Instance
• When-New-Block-Instance
• When-New-Record-Instance
• When-New-Item-Instance
14
15. Contd..
When Form is closed
• Post-Text-Item
• Post-Record
• Post-Block
• Post-Form
15
16. Program Units
• Procedure
• Function
• Package Spec
• Package Body
16
17. Libraries
• Procedures and functions used across the
forms
• It is a type of module (.PLL)
• Attaching libraries
• Can be accessed from forms, menus, libraries
17
19. Tools in Forms Designer
• Object Navigator : The Object navigator displays each object you have
created and allows you to navigate through the hierarchy
• Properties Palette: This allows you to examine and set the properties
of each of the objects defined by the user.
• Layout Editor: The sizing , positioning , alignment of the user created
objects are done through this screen
• PL/SQL editor: Used for writing PL/SQL code
• Menu editor : Tool to create menus
19
20. Steps in creating a form
• Name the form
• Connect to the database
• Create blocks (Can use Data Block Wizard)
• Create the layout( Can use Layout Wizard)
• Set the properties
• Add code in triggers
• Test
20
21. Forms registration
• TEMPLATE.fmb should be used for building all
forms
• Register the Form
• Register the Function
• Attach the function to a menu
• FTP the form to the UNIX box
• Compile the form using f60gen command to
generate executable (fmx)
21
28. FTP and Compiling the form
FTP the form to the custom_top/forms using any FTP
Tool.
Go to UNIX and set environment by typing . qoedv2 at the
prompt .
Go to AU_TOP/forms/US
Compile the form using the command
f60gen $CUSTOM_TOP/forms/US/form_name.fmb
username/password
28
29. Other components in Forms
Object Libraries
• Create, store, maintain, and distribute standard and reusable objects.
• Rapidly create applications by dragging and dropping predefined
objects to your form.
PL/SQL Libraries
• These are special type of module in oracle form that serve the purpose
of central repository for all the program units of the applications.
• Once these PLLs are created they can be accessed from any form or
menu module.
29
30. Contd..
Menus
• This is a form builder design tool which is used to create
custom form menus and popup menus
Built in packages
• Forms Developer and Reports Developer provide several
built-in packages that contain many PL/SQL constructs
which can be referenced while building applications
30
31. Common Issues
• TNS names not found
• Cannot attach PL/SQL Library
• Errors while compiling the form in UNIX
31