oracle forms : multiple forms
TRANSCRIPT
![Page 1: Oracle Forms : Multiple Forms](https://reader033.vdocuments.site/reader033/viewer/2022050613/589ca3a41a28abf4148b6503/html5/thumbnails/1.jpg)
Creating Multiple Form Applications
http://ebiztechnics.blogspot.com
![Page 2: Oracle Forms : Multiple Forms](https://reader033.vdocuments.site/reader033/viewer/2022050613/589ca3a41a28abf4148b6503/html5/thumbnails/2.jpg)
Objectives
• Describe the different ways of invoking additional forms
• Open, call, and close forms
• Navigation between forms
• Control opened forms and called forms
• Manage transaction processing for opened forms and called forms
• Choose the most appropriate method for invoking forms
• Pass form parameters
http://ebiztechnics.blogspot.com
![Page 3: Oracle Forms : Multiple Forms](https://reader033.vdocuments.site/reader033/viewer/2022050613/589ca3a41a28abf4148b6503/html5/thumbnails/3.jpg)
OPEN_FORM Built-in
A B
OPEN_FORM(’form_name’, activate_mode,
session_mode, data_mode, paramlist);
• Modeless
• Different transaction scopes
http://ebiztechnics.blogspot.com
![Page 4: Oracle Forms : Multiple Forms](https://reader033.vdocuments.site/reader033/viewer/2022050613/589ca3a41a28abf4148b6503/html5/thumbnails/4.jpg)
Characteristics of OPEN_FORM
• Restricted
• Not valid in Enter Query mode
• No savepoint issued
• Modeless with respect to other opened forms
• Session run time option: FORMS60_SESSION
http://ebiztechnics.blogspot.com
![Page 5: Oracle Forms : Multiple Forms](https://reader033.vdocuments.site/reader033/viewer/2022050613/589ca3a41a28abf4148b6503/html5/thumbnails/5.jpg)
Navigating Between Forms
Built-ins for navigation between forms:
• NEXT_FORM
• PREVIOUS_FORM
• GO_FORM
http://ebiztechnics.blogspot.com
![Page 6: Oracle Forms : Multiple Forms](https://reader033.vdocuments.site/reader033/viewer/2022050613/589ca3a41a28abf4148b6503/html5/thumbnails/6.jpg)
Navigating Between Forms
Navigation and validation aspects:
• Each open form has a current item.
• There is no validation when navigating between forms.
• No triggers fire when navigating between forms, except the When-Window-Activated/Deactivated and When-Form-Navigate triggers.
• Click the noncurrent item in the other form.
http://ebiztechnics.blogspot.com
![Page 7: Oracle Forms : Multiple Forms](https://reader033.vdocuments.site/reader033/viewer/2022050613/589ca3a41a28abf4148b6503/html5/thumbnails/7.jpg)
Open Forms with the Same Session
• Commit processing in all forms within the same session, in a certain order
• If error occurs, then focus set to initiating form
• Messages per open form within the same session
• CLEAR_FORM usually causes a ROLLBACK statement
http://ebiztechnics.blogspot.com
![Page 8: Oracle Forms : Multiple Forms](https://reader033.vdocuments.site/reader033/viewer/2022050613/589ca3a41a28abf4148b6503/html5/thumbnails/8.jpg)
Open Forms in Different Sessions
Runform Server
Connection
A
B
C
Session
http://ebiztechnics.blogspot.com
![Page 9: Oracle Forms : Multiple Forms](https://reader033.vdocuments.site/reader033/viewer/2022050613/589ca3a41a28abf4148b6503/html5/thumbnails/9.jpg)
CALL_FORM Built-in
A B
CALL_FORM(‘form_name’, display,
switch_menu, query_mode,
data_mode, paramlist);
• Modal
• Returns to calling form
http://ebiztechnics.blogspot.com
![Page 10: Oracle Forms : Multiple Forms](https://reader033.vdocuments.site/reader033/viewer/2022050613/589ca3a41a28abf4148b6503/html5/thumbnails/10.jpg)
Characteristics of CALL_FORM
• Unrestricted
• Valid in Enter Query mode
• Savepoint issued
• Modal with respect to calling form
• Does not cause navigation and validation
• Forms called from query-only form are always query-only
• Exiting a called form
http://ebiztechnics.blogspot.com
![Page 11: Oracle Forms : Multiple Forms](https://reader033.vdocuments.site/reader033/viewer/2022050613/589ca3a41a28abf4148b6503/html5/thumbnails/11.jpg)
Save Not Allowed in Post-Only Mode Form
A calling form has unapplied changes. Save not allowed.
http://ebiztechnics.blogspot.com
![Page 12: Oracle Forms : Multiple Forms](https://reader033.vdocuments.site/reader033/viewer/2022050613/589ca3a41a28abf4148b6503/html5/thumbnails/12.jpg)
Transaction Processing for Called Forms
• Characteristics of Post-Only mode:– Commit not allowed, only a post
– Full rollback not allowed, only a rollback to savepoint
• Rollback behavior of called forms• Call savepoints and post savepoints
http://ebiztechnics.blogspot.com
![Page 13: Oracle Forms : Multiple Forms](https://reader033.vdocuments.site/reader033/viewer/2022050613/589ca3a41a28abf4148b6503/html5/thumbnails/13.jpg)
Transaction Processing for Called Forms
IF <form called> THEN
POST;
ELSE
COMMIT_FORM;
END IF;
• Examples of adjusting defaulttransaction processing:
• Key-Commit on form
http://ebiztechnics.blogspot.com
![Page 14: Oracle Forms : Multiple Forms](https://reader033.vdocuments.site/reader033/viewer/2022050613/589ca3a41a28abf4148b6503/html5/thumbnails/14.jpg)
Transaction Processing for Called Forms
Key-Exit on form
Adjust labels of corresponding buttons and menu items
IF <form called> THEN
EXIT_FORM
ELSE
EXIT_FORM;
END IF;
http://ebiztechnics.blogspot.com
![Page 15: Oracle Forms : Multiple Forms](https://reader033.vdocuments.site/reader033/viewer/2022050613/589ca3a41a28abf4148b6503/html5/thumbnails/15.jpg)
NEW_FORM Built-in
A B
NEW_FORM(’form_name’, rollback_mode,
query_mode, data_mode,
paramlist);
Replaces calling form
http://ebiztechnics.blogspot.com
![Page 16: Oracle Forms : Multiple Forms](https://reader033.vdocuments.site/reader033/viewer/2022050613/589ca3a41a28abf4148b6503/html5/thumbnails/16.jpg)
Controlling Opened and Called Forms
Form A
CALL_FORM
Form B
Form C
OPEN_FORM
Form DOPEN_FORM
CALL_FORM
Form E
Form F
CALL_FORM
Form A+B+E = Call form stack
http://ebiztechnics.blogspot.com
![Page 17: Oracle Forms : Multiple Forms](https://reader033.vdocuments.site/reader033/viewer/2022050613/589ca3a41a28abf4148b6503/html5/thumbnails/17.jpg)
Different Ways of Invoking Forms
• When to use OPEN_FORM• When to open a form in a new session• When to use CALL_FORM• When to use NEW_FORM
http://ebiztechnics.blogspot.com
![Page 18: Oracle Forms : Multiple Forms](https://reader033.vdocuments.site/reader033/viewer/2022050613/589ca3a41a28abf4148b6503/html5/thumbnails/18.jpg)
Closing a Form
• CLOSE_FORM:
– form_name
– form_id
• Characteristics of CLOSE_FORM:
– Restricted
– Not valid in Enter-Query mode
– CLOSE_FORM or EXIT_FORM
– Cannot close a form that called another form
http://ebiztechnics.blogspot.com
![Page 19: Oracle Forms : Multiple Forms](https://reader033.vdocuments.site/reader033/viewer/2022050613/589ca3a41a28abf4148b6503/html5/thumbnails/19.jpg)
Using Form Parameters
• What is a form
parameter?• How to
create a
form parameter?
http://ebiztechnics.blogspot.com
![Page 20: Oracle Forms : Multiple Forms](https://reader033.vdocuments.site/reader033/viewer/2022050613/589ca3a41a28abf4148b6503/html5/thumbnails/20.jpg)
Passing Values to Form
P1
P2
P3
Runform
command line
Design-timeparameters
Form B
Parameterlist
OPEN_FORMCALL_FORMNEW_FORM
Form A
Run time
http://ebiztechnics.blogspot.com
![Page 21: Oracle Forms : Multiple Forms](https://reader033.vdocuments.site/reader033/viewer/2022050613/589ca3a41a28abf4148b6503/html5/thumbnails/21.jpg)
Using Form Parameter Values
• Passing a form parameter at run time: from command line.
• ifrun60 module=empl.fmx userid=scott/tiger@trn9 dept_id=30
• Referencing form parameters from within a module:– :PARAMETER.parameter_name– ‘PARAMETER.parameter_name’
http://ebiztechnics.blogspot.com
![Page 22: Oracle Forms : Multiple Forms](https://reader033.vdocuments.site/reader033/viewer/2022050613/589ca3a41a28abf4148b6503/html5/thumbnails/22.jpg)
Parameter Lists
OPEN_FORM( …, )
CALL_FORM( …, )
NEW_FORM( …, )
DEPT_ID
CUST
TEXT_PARAMETER
DATA_PARAMETER
‘30’
‘CUST_RG’
Parameter List
The default parameter list is DEFAULT
http://ebiztechnics.blogspot.com
![Page 23: Oracle Forms : Multiple Forms](https://reader033.vdocuments.site/reader033/viewer/2022050613/589ca3a41a28abf4148b6503/html5/thumbnails/23.jpg)
Parameter List Built-ins
DEPT_ID
CUST
TEXT_PARAMETER
DATA_PARAMETER
‘30’
‘CUST_RG’
Key Type Value
ADD_PARAMETER
GET_PARAMETER_ATTR
SET_PARAMETER_ATTR
DELETE_PARAMETER
DESTROY_PARAMETER_LIST
Name
Parameter
list ID
CREATE_PARAMETER_LIST
http://ebiztechnics.blogspot.com
![Page 24: Oracle Forms : Multiple Forms](https://reader033.vdocuments.site/reader033/viewer/2022050613/589ca3a41a28abf4148b6503/html5/thumbnails/24.jpg)
Passing Data Between Forms
P1P2P3
P1P2P3
OPEN_FORM(*)
1. If a parameter list exists, destroy it.2. Create a parameter list.3. Add a text parameter to a list with the value
of an item.4. Open a form with this parameter list.
Design-timeparameters
Form B
Run timeparameters
Form A
http://ebiztechnics.blogspot.com
![Page 25: Oracle Forms : Multiple Forms](https://reader033.vdocuments.site/reader033/viewer/2022050613/589ca3a41a28abf4148b6503/html5/thumbnails/25.jpg)
Passing Data Between Forms
• Characteristics of form parameters:– Can be used only as input parameters
– Have data type CHAR, NUMBER, or DATE
– CHAR parameter can be up to 64 K long
– Can be design-time objects
• Characteristics of global variables:– Are programmatic constructs
– Have type CHAR(255)
– Are visible to all forms in the current Runform session
http://ebiztechnics.blogspot.com
![Page 26: Oracle Forms : Multiple Forms](https://reader033.vdocuments.site/reader033/viewer/2022050613/589ca3a41a28abf4148b6503/html5/thumbnails/26.jpg)
Summary
• Open, call, and close forms:– OPEN_FORM, CALL_FORM, and CLOSE_FORM
– Multiple database sessions
• Navigate between forms: – NEXT_FORM,
PREVIOUS_FORM, and GO_FORM
• Identify restrictions on the call form stack• Passing parameters to forms.
http://ebiztechnics.blogspot.com