database forms objects(database)

32
ISOM3260 Database Design and Administration Lab 7: Oracle Forms Developer VI – userfriendly Oracle Forms objects

Upload: welcometofacebook

Post on 25-Dec-2014

54 views

Category:

Engineering


1 download

DESCRIPTION

 

TRANSCRIPT

Page 1: database forms objects(database)

ISOM3260Database Design and Administration

Lab 7: Oracle Forms Developer VI –user‐friendly Oracle Forms objects

Page 2: database forms objects(database)

Agenda

Oracle Project

Analysis, Design Implementation, Maintenance

Oracle Forms Developer SQL Tools

Oracle Reports Developer and integration

Page 3: database forms objects(database)

Agenda

• User‐friendly Oracle Forms Objects– Alerts– Radio Groups and Buttons– Checkboxes– Pull‐down List Boxes– List of Values (LOV)

Page 4: database forms objects(database)

Alerts (1)

• Commonly known as “Message boxes”• Obvious and more attractive

Page 5: database forms objects(database)

Alerts (2) – Insert a blank alert

• Highlight “Alerts” and press add

• A blank alert is created

Page 6: database forms objects(database)

Alerts (3) – Modify the Property• Right click the blank alert and choose “Property Palette”

Change the Name, Title, Alert Style,Button 1,2,3 Labels and Default Alert Button

Page 7: database forms objects(database)

Alerts (4) – Write a PL/SQL trigger

DECLAREreturn_value number;

BEGIN-- Select the Alert and put message texts into it (can be concatenated with variables)SET_ALERT_PROPERTY(‘<Alert Name>',alert_message_text, ‘<Message Text>’); -- To capture the choices that users check into a variablereturn_value := show_alert(‘<Alert Name>'); -- Condition when users press Button 1IF return_value = alert_button1 THEN

<Condition 1>--Condition when users press other buttonsELSE <Condition 2>END IF;

END;

Page 8: database forms objects(database)

Checkboxes (1)

• Protect the data integrity using a different style

• Same purpose as Radio Buttons

Page 9: database forms objects(database)

Checkbox (2)

Page 10: database forms objects(database)

Checkboxes (3)

Create checkboxes in LayoutEditor

Page 11: database forms objects(database)

Checkboxes (4) 

Change the Checkbox Name,Value when checked, Value when unchecked and Initial Value

Page 12: database forms objects(database)

Checkboxes (5)

• The checkbox values (checked and unchecked) defined in the Property can be referenced by its location (:<Datablock>.<Name>)

Page 13: database forms objects(database)

Checkboxes (6)

Datablock: INTERESTObject: COMPUTER

• Value of :INTEREST.COMPUTER– When checked  ‘Computer’– When not checked  ‘‐’

Page 14: database forms objects(database)

Radio Buttons (1)

• Prevent users from typing in values on their own– May harm data integrity

• Set up radio buttons to limit the choices of users.

Page 15: database forms objects(database)

Radio Buttons (2)

• Change the existing Text Box (Year) from Text Item into “Radio Group”

Page 16: database forms objects(database)

Radio Buttons (3)

• You can add appropriate amount of radio buttons in Object Navigator

Page 17: database forms objects(database)

Radio Buttons (4)

• Change the Label and the Radio Button Value (when it is selected)

Page 18: database forms objects(database)

Radio Buttons (5)

Datablock: STUDENT_INSERTObject: YEAR

• Value of :STUDENT_INSERT.YEAR The value of the Radio button that users click

Page 19: database forms objects(database)

Pull‐down List and LOV

• Pull‐down list– Static value, will not  change overtime

• List Of Values (LOV)– Dynamic value based on SQL statements

Page 20: database forms objects(database)

Pull‐down List and LOV

Pull‐down List           List Of Values (LOV)

Page 21: database forms objects(database)

Pull‐down List (1)

• Change the existing text box into List Item

Page 22: database forms objects(database)

Pull‐down List (2)

• Modify “Element in List”

Page 23: database forms objects(database)

Pull‐down List (3)

• Add new Pull‐down elements and the corresponding values

The representing value of the element

Page 24: database forms objects(database)

LOV (1)

• Add a blank LOV Object in Object Navigator

Page 25: database forms objects(database)

LOV (2)

• Select LOV Wizard

Page 26: database forms objects(database)

LOV (3)

• LOV as a query

•Write the SQL query

Page 27: database forms objects(database)

LOV (4)

• Write PL/SQL Trigger to call the LOV– For example: When user click a button…..

DECLARELOVReturnValue BOOLEAN;

BEGINLOVReturnValue := show_LOV(‘<LOV Name>');

END;

Page 28: database forms objects(database)

LOV (5)

• Result Preview : 

Page 29: database forms objects(database)

Summary

• Understand components to make user‐friendly canvases and improve data integrity– Alerts, Radio Buttons, Checkboxes, Pull‐down List and LOV

Page 30: database forms objects(database)

Project Work

• Apply the components into the project• ** Especially apply List of Value (LOV), it helps save programming efforts, and helps users manipulate data in database effectively **

Page 31: database forms objects(database)

Progress Demonstration 2 (8%)

• Deliverable1. Workable system with the following functions

• Search Engine  View Detail• Shopping cart

– Add products into shopping cart– View shopping cart– Modify quantity and proceed 

» Notify when the product has no inventory

• Make purchase• View order record history  View Detail• Dummy Managerial report page

Page 32: database forms objects(database)

Progress Demonstration 2 (8%)

2. Documentation • Relational Schema• Problem Log (Cancelled)