database forms objects(database)

Post on 25-Dec-2014

55 Views

Category:

Engineering

1 Downloads

Preview:

Click to see full reader

DESCRIPTION

 

TRANSCRIPT

ISOM3260Database Design and Administration

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

Agenda

Oracle Project

Analysis, Design Implementation, Maintenance

Oracle Forms Developer SQL Tools

Oracle Reports Developer and integration

Agenda

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

Alerts (1)

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

Alerts (2) – Insert a blank alert

• Highlight “Alerts” and press add

• A blank alert is created

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

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;

Checkboxes (1)

• Protect the data integrity using a different style

• Same purpose as Radio Buttons

Checkbox (2)

Checkboxes (3)

Create checkboxes in LayoutEditor

Checkboxes (4) 

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

Checkboxes (5)

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

Checkboxes (6)

Datablock: INTERESTObject: COMPUTER

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

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.

Radio Buttons (2)

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

Radio Buttons (3)

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

Radio Buttons (4)

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

Radio Buttons (5)

Datablock: STUDENT_INSERTObject: YEAR

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

Pull‐down List and LOV

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

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

Pull‐down List and LOV

Pull‐down List           List Of Values (LOV)

Pull‐down List (1)

• Change the existing text box into List Item

Pull‐down List (2)

• Modify “Element in List”

Pull‐down List (3)

• Add new Pull‐down elements and the corresponding values

The representing value of the element

LOV (1)

• Add a blank LOV Object in Object Navigator

LOV (2)

• Select LOV Wizard

LOV (3)

• LOV as a query

•Write the SQL query

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;

LOV (5)

• Result Preview : 

Summary

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

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 **

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

Progress Demonstration 2 (8%)

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

top related