Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.
ORACLE APPS - FORMS
Agenda
Introduction to Forms Developer - Basics
Creating Simple Form Module
Creating and Managing Menu Modules
Forms B...
Introduction to Oracle Forms
Developer - Basics
Objectives
• What is Oracle Forms Builder?
• Forms in Client/Server Mode
• Forms in Web Mode
• Form Builder Key Features
•...
What is Oracle Forms Builder?
Used to develop
- Data Entry Screens
- Query Screens
Forms in Client/Server Mode
Client Database
Server
Net8
2-Tier Architecture
Client
Database
Server
Net8HTTP
Oracle 9i Application
Server
Forms in Web Mode
3-Tier Architecture
Form Builder Key Features
• Supports GUI Applications
• Rapid Application Development Tool
• Flexible source control
• Ext...
User Preferences
• Click on Tools menu
- Select Preferences
User Preferences cont..
• Click on Tools menu
- Select Preferences
User Preferences file
Windows – Cauprefs.ora
Unix – Pre...
How to Start?
• Start Form Builder
• Welcome Page Displays
• Connect to the Database by selecting
- File -> connect or use...
Summary
• Introduction to Form Builder
• Forms in Client/Server and Web
• Key Features
• User Preferences
• Starting Form ...
Creating Simple Form Module
Objectives
• Creating a Simple Form Module Using wizards
• Types of Blocks
• Control Block
• Discuss properties of Data Bl...
Crating a New Form Module
• Use one of the options to create a new form module
1. Use The Data Block Wizard
2. Build a new...
Using Wizards..
Use Form Builder Wizards:
• Data Block Wizard: Used to create a data block with a data source.
• Layout Wi...
Data Block wizard- Type of data block
Data Block wizard- Table or view name
Layout wizard- Changing Prompts
Layout wizard- Layout Style
Layout wizard-Rows Page
Data Block Functionality
Once you create a data block with the wizards,
Form Builder automatically creates:
• A form modul...
Modifying the Layout
• You can modify the layout after creating the data block by using re-
entrant wizards
– Select Tools...
Types of Blocks
Data Block Control Block
- Base Table Block - Non Base Table Block
Creating a Control Block
• Select the Data Blocks node and click the Create icon.
or
Select Navigator—>Create.
• Select th...
Data Block Properties
• General
• Navigation
• Records
• Database
• Advanced Database
• Scrollbar
• Font and Color
• Chara...
Database Properties for Data block
Use properties in the Database group to control:
• Type of block—data block or control ...
Navigation Properties
ORDERS
Order
Next Navigation
Data Block
Same
Record
Change
Record
Previous
Navigation Block
Visual Attributes
• Visual attributes are font, color and pattern properties applied for form
and menu objects.
Data blocks and Relationships
Master
Detail
Master
Detail
Detail
Detail Detail
Master
Data block wizard – Master-Detail
Relationship
Relation Object
• Relationship object is always created on the master block
• Triggers and program units are generated aut...
Creating Relation Manually
Deletion Behavior
• Non-Isolated (default setting) Prevents the deletion of a master
record when associated detail records...
Block Coordination
Immediate Deferred
With
AutoQuery
Without
AutoQuery
Text files and Documentation
• Convert a binary file to a text file OR text file to birnary.
By Selecting File-> Administr...
Summary
• Creating a simple Form module
• Types of blocks
• Master-Detail Form
• Data block relationships
• Data block Pro...
Creating and Managing Menu
Modules
Objectives
• Identify Menu components
• Create, save and attach Menu modules
• Modifying properties of Menu items
• Creati...
Menu Module Components
Main
Menu
Individual
Menu
Menu
Toolbar
Menu
Item
Default Menu
Action
Save
Clear All
Print
Print
Setup
Exit
Edit
Cut
Copy
Paste
Edit
Display
List
Block
Previous
Next
Clear
...
Menu Editor
Display
menu
Create
Down
Create
Right
Switch
Orientation
Menu tab
Expanded
menu
Collapsed
menu
Creating a Menu Module
Object
Navigator
Menu Editor
Select Tools  Menu Editor
Menu Module Properties
Main Menu
Menu Directory
Menu Filename
Startup Code
Share Library with Form
Use Security
Module Rol...
Menu Item Properties
• Enabled
• Label
• Menu Item Type
• Magic Item
• Menu Item Radio
Group
• Command Type
• Menu Item Co...
Menu Item Types
Separator
Plain
Check
Magic
Radio
Magic Items
• About
• Undo
• Clear
• Copy
• Cut
• Paste
• Help
• Quit
• Window
Menu Item Command Types
Null
Menu
PL/SQL
Plus
Form
Macro
Does not issue a command
Invokes a submenu
Executes a PL/SQL comm...
Menu Module File Types
Menu module definition:
• .mmb (Menu Module Binary)
• Stored in files or database tables
Menu modul...
Attaching Menu Module
• Open Form Module Property
Pallet.
• Modify Menu Module Property.
• Specify the name of your menu
m...
Pop-up Menus
Menu that appears on the screen at the
location it was invoked
• Enables users to
access commonly used
functi...
Using Pop-up Menus
• Pop-up menus are:
– Form module objects in the object navigator,
such as alerts or Data Blocks
– Buil...
Writing PL/SQL Code in Menu Triggers
• Similar to PL/SQL code in form triggers
• You can share code between a form
module ...
Writing PL/SQL Code in Menu Triggers
• Menu modules generated independently
• Restrictions:
– Cannot directly reference va...
Built-ins Used
• FIND_MENU_ITEM
• GET_MENU_ITEM_PROPERTY
• SET_MENU_ITEM_PROPERTY
• ITEM_ENABLED
• MENU_SHOW_KEYS
Built-ins Showing and Hiding
REPLACE_MENU
Character mode built-ins:
• HIDE_MENU
• SHOW_MENU
• MENU_REDISPLAY
Managing Menu Security
• Defining security roles
• Choosing roles for the menu module
• Assigning access to menu items
• S...
Roles
Role
Privileges
Users
Menu Module Roles
• Select Menu Module Roles Property
from the menu Module properties.
• Enter Database Role Names.
• Use ...
Menu Item Roles
• Invoke Property pallet of
a Menu item.
• Choose Menu Item roles
property.
• Select Menu Item roles.
• Pr...
Summary
• Creating Menu Modules
• Attaching Menu Modules to Forms
• Popup menu items
• Pre-Popup menu trigger.
• Built-ins...
Form Builder Messages & Alerts
Displaying Messages to Operators
Messages
Application
Working
Informative
Error
Alerts
System
Application
Errors and Built-ins
• Built-in failure does not cause an exception.
• Test built-in success with FORM_SUCCESS function.
•...
Message Severity Level
>25
20
15
10
5
0
25
All (default)
More critical
Define by:
:SYSTEM.MESSAGE_LEVEL
Fatal Error
Error Triggers
• On-Error Trigger
– Fires when system error message is issued. Built-ins to Use:
– Use ERROR_TYPE
– ERROR_...
Alerts Properties
Title
ALLERT_BUTTON1 ALLERT_BUTTON3ALLERT_BUTTON2
Alert Message Text
(Max 200 Characters)
Alert Style
Showing Alerts
DECLARE
n Number;
BEGIN
n:=SHOW_ALERT(‘Del_Alert’);
IF n = ALERT_BUTTON1 THEN
DELETE_RECORD;
END IF;
END;
O...
Displaying Errors to an Alert
Changing the Alert Button Label:
SET_ALERT_BUTTON_PROPERTY(‘Err_Alert’,
ALERT_BUTTON1,
LABEL...
Summary
• Displaying Messages in Form Builder
• Built-ins
– ERROR_CODE, ERROR_TYPE, ERROR_TEXT
– MESSAGE_CODE, MESSAGE_TYP...
Form Builder - Triggers
Form Builder Triggers
• A trigger is a PL/SQL Block which fires implicitly
whenever an Event occurs.
Events:
Item Interact...
Trigger Components- Scope
Scope
Type
CodeForm Level
Block Level
Item Level
Trigger Components - Type
Scope
Type
Code
Pre-
Post-
When
On-
Key-
Trigger Components - Code
SQL Statements
PL/SQL Statements
Built-in Sub-programs
User Defined
Sub-programs
Scope
Type
Code
Execution Hierarchy
Item
Level
Block
Level
Form
Level
On-Error
EH=After
On-Error
EH=After
On-Error
EH=Override
Event
Summary
• Trigger: Implicitly Fires
• Type: Defines the event that fires it
• Prefixes:
– Pre-
– Post
– When
– On
– Key
• ...
Oracle Objects Features In Forms
Objectives
• Identify which object types are supported
• Describe how object types are
represented within Form Builder
• C...
What is an Object Type?
interest
Close
withdraw
Check
status
Attributes
Methods
ACCOUNT
Ac_no
Ac_type
Deposit
Open_date
Overview on Objects
• Object tables
• Object columns
• Object views
• REF Columns
REF
Oracle 8i Features in Forms
Supported Oracle8i features
• Large Objects: BLOB, CLOB, NCLOB, BFILE
• User-defined objects
–...
How Form Treats Objects
Object_B
Attr_B1
Attr_B2
Attr_A3
Nested Objects
Attr_A1
Attr_A2
Object_A
Attr_A1
Object_A
Attr_A3
...
Creating Data Blocks
• Blocks based on object tables
• Blocks based on object columns
• Blocks with REF Lookups
Block Based on Object Tables
Block Based on Object Columns
Blocks with REF Lookups
Using REF Lookup Value
Select REF attribute columns: This causes the
columns to appear as data items at run-time.
Select t...
LOVs for REFs
Summary
• Identify supported Oracle8i object types
• Define data blocks based on object tables
• Define data blocks based ...
Item Interaction Triggers
Objectives
• Adding Functionality to Input and Non-input Items by adding triggers
and Built-ins.
• Displaying LOVs from Bu...
Item interaction Trigger
• Valid commands:
– SELECT statements
– PL/SQL expressions
– All built-in subprograms
– User Defi...
Examples
When-Button-Pressed
When-Checkbox-Changed
When-Radio-Changed
When-List-Changed
When-List-Activated
When-Image-Pre...
Displaying LOVs from Buttons
• Uses:
– Convenient alternative for accessing LOVs
– Can display independently of text items...
Interacting With Checkboxes
• WHEN-CHECKBOX-CHANGED trigger
IF CHECKBOX_CHECKED(‘Control.case’) THEN
SET_ITEM_PROPERTY(‘Em...
Interacting With Radio Button
• WHEN-RADIO-CHANGED trigger
IF :emp.job=‘MANAGER’ THEN
:emp.sal:=7000;
ELSIF :emp.job=‘CLER...
Interacting with List Items
ADD_LIST_ELEMENT(‘emp.job’,
4,
‘Analyst’,
‘ANALYST’);
DELETE_LIST_ELEMENT(‘emp.job’
2);
Presid...
Loading Images
Fetch on
Query
READ_IMAGE_FILE
WRITE_IMAGE_FILE
Read_Image_File Built-in
• Used to Load Images into Image Items.
READ_IMAGE_FILE(‘E_’||:emp.empno||’.bmp’,
’BMP’,
’emp.emp...
Populating Hierarchical Tree Item
• Set the Data Query Property
– SELECT 1,level,ename,null,empno
FROM emp
CONNECT BY PRIO...
Summary
• Item Interaction Triggers and Built-ins
• Interacting with Various Items
– Push Button
– Checkbox
– Radio Button...
Thank You
Bhaskara Reddy Sannapureddy
https://www.linkedin.com/in/bhaskara-reddy-sannapureddy-57052b11/
Nächste SlideShare
Wird geladen in …5
×

Oracle Apps - Forms

337 Aufrufe

Veröffentlicht am

Oracle Apps - Forms

Veröffentlicht in: Technologie
  • Als Erste(r) kommentieren

  • Gehören Sie zu den Ersten, denen das gefällt!

Oracle Apps - Forms

  1. 1. ORACLE APPS - FORMS
  2. 2. Agenda Introduction to Forms Developer - Basics Creating Simple Form Module Creating and Managing Menu Modules Forms Builder Messages & Alerts Triggers & Objects & Item Interaction Triggers
  3. 3. Introduction to Oracle Forms Developer - Basics
  4. 4. Objectives • What is Oracle Forms Builder? • Forms in Client/Server Mode • Forms in Web Mode • Form Builder Key Features • Saving User Preferences • How to Start?
  5. 5. What is Oracle Forms Builder? Used to develop - Data Entry Screens - Query Screens
  6. 6. Forms in Client/Server Mode Client Database Server Net8 2-Tier Architecture
  7. 7. Client Database Server Net8HTTP Oracle 9i Application Server Forms in Web Mode 3-Tier Architecture
  8. 8. Form Builder Key Features • Supports GUI Applications • Rapid Application Development Tool • Flexible source control • Extended scalability • Application partitioning • Object reuse • Oracle 10g/11g datatypes support • Improved Developer Productivity
  9. 9. User Preferences • Click on Tools menu - Select Preferences
  10. 10. User Preferences cont.. • Click on Tools menu - Select Preferences User Preferences file Windows – Cauprefs.ora Unix – Prefs.ora
  11. 11. How to Start? • Start Form Builder • Welcome Page Displays • Connect to the Database by selecting - File -> connect or use Ctrl+J • Provide Username, Password and Connect String and click connect.
  12. 12. Summary • Introduction to Form Builder • Forms in Client/Server and Web • Key Features • User Preferences • Starting Form Builder
  13. 13. Creating Simple Form Module
  14. 14. Objectives • Creating a Simple Form Module Using wizards • Types of Blocks • Control Block • Discuss properties of Data Block • Creating a Master-Detail Form • Relationship between data blocks
  15. 15. Crating a New Form Module • Use one of the options to create a new form module 1. Use The Data Block Wizard 2. Build a new form manually 3. Build a form Based on a Template.
  16. 16. Using Wizards.. Use Form Builder Wizards: • Data Block Wizard: Used to create a data block with a data source. • Layout Wizard: Used to display the data block items for Presentation.
  17. 17. Data Block wizard- Type of data block
  18. 18. Data Block wizard- Table or view name
  19. 19. Layout wizard- Changing Prompts
  20. 20. Layout wizard- Layout Style
  21. 21. Layout wizard-Rows Page
  22. 22. Data Block Functionality Once you create a data block with the wizards, Form Builder automatically creates: • A form module with database functionality including query, insert, update, delete • A frame object • Items in the data block • A prompt for each item
  23. 23. Modifying the Layout • You can modify the layout after creating the data block by using re- entrant wizards – Select Tools -> Data block wizard to modify the data block – Select Tools -> Layout wizard to modify the Layout of the form. – Changes can be made manually also.
  24. 24. Types of Blocks Data Block Control Block - Base Table Block - Non Base Table Block
  25. 25. Creating a Control Block • Select the Data Blocks node and click the Create icon. or Select Navigator—>Create. • Select the “Build a new data block manually” option in the New Data Block dialog box. – Invoke the property pallet for the block – Change the name of the block to CONTROL – Set the Database Data block property to No.
  26. 26. Data Block Properties • General • Navigation • Records • Database • Advanced Database • Scrollbar • Font and Color • Character Mode • International
  27. 27. Database Properties for Data block Use properties in the Database group to control: • Type of block—data block or control block • Query, insert, update, and delete operations on the data block • Data block’s data source type and Name • Query search criteria and sort order • Maximum query time • Maximum number of records fetched
  28. 28. Navigation Properties ORDERS Order Next Navigation Data Block Same Record Change Record Previous Navigation Block
  29. 29. Visual Attributes • Visual attributes are font, color and pattern properties applied for form and menu objects.
  30. 30. Data blocks and Relationships Master Detail Master Detail Detail Detail Detail Master
  31. 31. Data block wizard – Master-Detail Relationship
  32. 32. Relation Object • Relationship object is always created on the master block • Triggers and program units are generated automatically by form builder • The default name of the relation object is Masterblock_DetailBlock
  33. 33. Creating Relation Manually
  34. 34. Deletion Behavior • Non-Isolated (default setting) Prevents the deletion of a master record when associated detail records exist in the database. • Isolated Allows the master record to be deleted and does not affect associated detail records in the database. • Cascading Allows the master record to be deleted and automatically deletes any associated detail records in the detail block's base table at commit time.
  35. 35. Block Coordination Immediate Deferred With AutoQuery Without AutoQuery
  36. 36. Text files and Documentation • Convert a binary file to a text file OR text file to birnary. By Selecting File-> Administration -> Convert. • Create a text file for a form module for Documentation. By Selecting File->Administration -> Object List Report .fmb .fmt
  37. 37. Summary • Creating a simple Form module • Types of blocks • Master-Detail Form • Data block relationships • Data block Properties
  38. 38. Creating and Managing Menu Modules
  39. 39. Objectives • Identify Menu components • Create, save and attach Menu modules • Modifying properties of Menu items • Creating Popup menu and attaching • Controlling Menus Programmatically • Manage Menu Security
  40. 40. Menu Module Components Main Menu Individual Menu Menu Toolbar Menu Item
  41. 41. Default Menu Action Save Clear All Print Print Setup Exit Edit Cut Copy Paste Edit Display List Block Previous Next Clear Field Previous Next Clear Duplicate Record Previous Next Scroll Up Scroll Down Insert Remove Lock Duplicate Clear Query Enter Execute Cancel Last Criteria Count Hits Fetch Next Set Help Help Keys List Display Error Debug
  42. 42. Menu Editor Display menu Create Down Create Right Switch Orientation Menu tab Expanded menu Collapsed menu
  43. 43. Creating a Menu Module Object Navigator Menu Editor Select Tools  Menu Editor
  44. 44. Menu Module Properties Main Menu Menu Directory Menu Filename Startup Code Share Library with Form Use Security Module Roles
  45. 45. Menu Item Properties • Enabled • Label • Menu Item Type • Magic Item • Menu Item Radio Group • Command Type • Menu Item Code • Submenu Name • Icon in Menu • Icon Filename
  46. 46. Menu Item Types Separator Plain Check Magic Radio
  47. 47. Magic Items • About • Undo • Clear • Copy • Cut • Paste • Help • Quit • Window
  48. 48. Menu Item Command Types Null Menu PL/SQL Plus Form Macro Does not issue a command Invokes a submenu Executes a PL/SQL command Spawns a process to SQL*Plus Backward compatibility Backward compatibility
  49. 49. Menu Module File Types Menu module definition: • .mmb (Menu Module Binary) • Stored in files or database tables Menu module executable: • .mmx (Menu Module Executable) • Stored in files Menu module text: • .mmt (Menu Module Text) • Stored in files
  50. 50. Attaching Menu Module • Open Form Module Property Pallet. • Modify Menu Module Property. • Specify the name of your menu module.
  51. 51. Pop-up Menus Menu that appears on the screen at the location it was invoked • Enables users to access commonly used functions easily • Is accessed by pressing the right mouse button (Microsoft Windows and Motif)
  52. 52. Using Pop-up Menus • Pop-up menus are: – Form module objects in the object navigator, such as alerts or Data Blocks – Built through the Property Palette or Menu Editor – Associated with items and canvases with a pop-up menu property • Pre-Popup-Menu trigger provides dynamic control
  53. 53. Writing PL/SQL Code in Menu Triggers • Similar to PL/SQL code in form triggers • You can share code between a form module and a menu module by using the following: – Libraries – User-defined triggers – DO_KEY built-in
  54. 54. Writing PL/SQL Code in Menu Triggers • Menu modules generated independently • Restrictions: – Cannot directly reference values of form objects – Must use NAME_IN built-in function – Cannot use direct assignment for form objects – Must use COPY built-in procedure
  55. 55. Built-ins Used • FIND_MENU_ITEM • GET_MENU_ITEM_PROPERTY • SET_MENU_ITEM_PROPERTY • ITEM_ENABLED • MENU_SHOW_KEYS
  56. 56. Built-ins Showing and Hiding REPLACE_MENU Character mode built-ins: • HIDE_MENU • SHOW_MENU • MENU_REDISPLAY
  57. 57. Managing Menu Security • Defining security roles • Choosing roles for the menu module • Assigning access to menu items • Setting the Use Security property
  58. 58. Roles Role Privileges Users
  59. 59. Menu Module Roles • Select Menu Module Roles Property from the menu Module properties. • Enter Database Role Names. • Use Security Property Set to Yes.
  60. 60. Menu Item Roles • Invoke Property pallet of a Menu item. • Choose Menu Item roles property. • Select Menu Item roles. • Press OK button.
  61. 61. Summary • Creating Menu Modules • Attaching Menu Modules to Forms • Popup menu items • Pre-Popup menu trigger. • Built-ins for Managing Menu items programmatically. • Menu Module security with Roles.
  62. 62. Form Builder Messages & Alerts
  63. 63. Displaying Messages to Operators Messages Application Working Informative Error Alerts System Application
  64. 64. Errors and Built-ins • Built-in failure does not cause an exception. • Test built-in success with FORM_SUCCESS function. • What went wrong? – ERROR_CODE, ERROR_TEXT, ERROR_TYPE – MESSAGE _CODE, MESSAGE _TEXT, MESSAGE _TYPE Example: GO_BLOCK(‘EMP’); IF FORM_SUCCESS THEN EXECUTE_QUERY; END IF; FORM_FAILURE FORM_FATAL Returns TRUE OR FALSE.
  65. 65. Message Severity Level >25 20 15 10 5 0 25 All (default) More critical Define by: :SYSTEM.MESSAGE_LEVEL Fatal Error
  66. 66. Error Triggers • On-Error Trigger – Fires when system error message is issued. Built-ins to Use: – Use ERROR_TYPE – ERROR_CODE – ERROR_TEXT • On-Message Trigger – Fires when informative message is issued. Built-ins to Use: – MESSAGE_TYPE – MESSAGE_CODE – MESSAGE_TEXT
  67. 67. Alerts Properties Title ALLERT_BUTTON1 ALLERT_BUTTON3ALLERT_BUTTON2 Alert Message Text (Max 200 Characters) Alert Style
  68. 68. Showing Alerts DECLARE n Number; BEGIN n:=SHOW_ALERT(‘Del_Alert’); IF n = ALERT_BUTTON1 THEN DELETE_RECORD; END IF; END; OR IF SHOW_ALERT('DEL_ALERT‘) = ALERT_BUTTON1 THEN DELETE_RECORD; END IF; NOTE: SHOW_ALERT Function Returns Number.
  69. 69. Displaying Errors to an Alert Changing the Alert Button Label: SET_ALERT_BUTTON_PROPERTY(‘Err_Alert’, ALERT_BUTTON1, LABEL,’O.K’); SET_ALERT_PROPERTY(’Err_Alert’, ALERT_MESSAGE_TEXT, ERROR_TYPE|| ’-’||TO_CHAR(ERROR_CODE)|| ’: ’||ERROR_TEXT); n := SHOW_ALERT(’Err_Alert’);
  70. 70. Summary • Displaying Messages in Form Builder • Built-ins – ERROR_CODE, ERROR_TYPE, ERROR_TEXT – MESSAGE_CODE, MESSAGE_TYPE, MESSAGE_TEXT. • Testing Built-ins with FORM_SUCCESS • Alerts • Setting alert Properties at runtime.
  71. 71. Form Builder - Triggers
  72. 72. Form Builder Triggers • A trigger is a PL/SQL Block which fires implicitly whenever an Event occurs. Events: Item Interaction Errors/Messages Queries Validation Navigation Mouse Events others PL/SQL BLOCK
  73. 73. Trigger Components- Scope Scope Type CodeForm Level Block Level Item Level
  74. 74. Trigger Components - Type Scope Type Code Pre- Post- When On- Key-
  75. 75. Trigger Components - Code SQL Statements PL/SQL Statements Built-in Sub-programs User Defined Sub-programs Scope Type Code
  76. 76. Execution Hierarchy Item Level Block Level Form Level On-Error EH=After On-Error EH=After On-Error EH=Override Event
  77. 77. Summary • Trigger: Implicitly Fires • Type: Defines the event that fires it • Prefixes: – Pre- – Post – When – On – Key • Code: Anonymous PL/SQL Block • Scope: Form, block, or item level
  78. 78. Oracle Objects Features In Forms
  79. 79. Objectives • Identify which object types are supported • Describe how object types are represented within Form Builder • Create a block based on an object table • Create a block based on a relation table with an object or an REF column • Populate a REF column with an LOV
  80. 80. What is an Object Type? interest Close withdraw Check status Attributes Methods ACCOUNT Ac_no Ac_type Deposit Open_date
  81. 81. Overview on Objects • Object tables • Object columns • Object views • REF Columns REF
  82. 82. Oracle 8i Features in Forms Supported Oracle8i features • Large Objects: BLOB, CLOB, NCLOB, BFILE • User-defined objects – Object table – Column object – REF column Unsupported Oracle8i features • Collection types • Stored procedures that return object values
  83. 83. How Form Treats Objects Object_B Attr_B1 Attr_B2 Attr_A3 Nested Objects Attr_A1 Attr_A2 Object_A Attr_A1 Object_A Attr_A3 Attr_A2_B1 Attr_A2_B2 Items in a Form
  84. 84. Creating Data Blocks • Blocks based on object tables • Blocks based on object columns • Blocks with REF Lookups
  85. 85. Block Based on Object Tables
  86. 86. Block Based on Object Columns
  87. 87. Blocks with REF Lookups
  88. 88. Using REF Lookup Value Select REF attribute columns: This causes the columns to appear as data items at run-time. Select the REF item itself: • This causes the item to be placed on a Null canvas. • The item does not appear at run time. • The item is available for coding purposes.
  89. 89. LOVs for REFs
  90. 90. Summary • Identify supported Oracle8i object types • Define data blocks based on object tables • Define data blocks based on tables with object columns or REF columns • Populate REF columns with an LOV
  91. 91. Item Interaction Triggers
  92. 92. Objectives • Adding Functionality to Input and Non-input Items by adding triggers and Built-ins. • Displaying LOVs from Buttons • Interacting with Checkboxes • Interacting with Radio Buttons • Interacting with List items • Loading Image into Image item • Populating Hierarchical Tree Item
  93. 93. Item interaction Trigger • Valid commands: – SELECT statements – PL/SQL expressions – All built-in subprograms – User Defined Subprograms
  94. 94. Examples When-Button-Pressed When-Checkbox-Changed When-Radio-Changed When-List-Changed When-List-Activated When-Image-Pressed When-Image-Activated When-Tree-Node-Selected
  95. 95. Displaying LOVs from Buttons • Uses: – Convenient alternative for accessing LOVs – Can display independently of text items • Needs: – When-Button-Pressed trigger – LIST_VALUES or SHOW_LOV built-in DECLARE x Boolean; BEGIN x:=SHOW_LOV(‘Dept_Lov’); END;
  96. 96. Interacting With Checkboxes • WHEN-CHECKBOX-CHANGED trigger IF CHECKBOX_CHECKED(‘Control.case’) THEN SET_ITEM_PROPERTY(‘Emp.ename’,CASE_INSENSITIVE_QUERY, PROPERTY_FALSE); ELSE SET_ITEM_PROPERTY('Emp.ename',CASE_INSENSITIVE_QUERY, PROPERTY_TRUE); END IF;
  97. 97. Interacting With Radio Button • WHEN-RADIO-CHANGED trigger IF :emp.job=‘MANAGER’ THEN :emp.sal:=7000; ELSIF :emp.job=‘CLERK’ THEN :emp.sal:=5000; ELSE :emp.sal:=2000; END IF;
  98. 98. Interacting with List Items ADD_LIST_ELEMENT(‘emp.job’, 4, ‘Analyst’, ‘ANALYST’); DELETE_LIST_ELEMENT(‘emp.job’ 2); President Manager Clerk Salesman Index 1 2 3
  99. 99. Loading Images Fetch on Query READ_IMAGE_FILE WRITE_IMAGE_FILE
  100. 100. Read_Image_File Built-in • Used to Load Images into Image Items. READ_IMAGE_FILE(‘E_’||:emp.empno||’.bmp’, ’BMP’, ’emp.emp_image’);
  101. 101. Populating Hierarchical Tree Item • Set the Data Query Property – SELECT 1,level,ename,null,empno FROM emp CONNECT BY PRIOR empno=mgr START WITH JOB=‘PRESIDENT’ Note: Do not terminate query with semicolon. • Write When-New Form Instance Trigger at Form Level Ftree.Populate_Tree(‘tree_block.emp_tree’);
  102. 102. Summary • Item Interaction Triggers and Built-ins • Interacting with Various Items – Push Button – Checkbox – Radio Button – List Item – Image Item – Hierarchical Tree Item
  103. 103. Thank You Bhaskara Reddy Sannapureddy https://www.linkedin.com/in/bhaskara-reddy-sannapureddy-57052b11/

×