eyad alshareef 1 introduction to form builder part a

52
Eyad Alshareef 1 Introduction To Introduction To Form Builder Form Builder Part A Part A

Upload: coral-atkins

Post on 21-Dec-2015

233 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Eyad Alshareef 1 Introduction To Form Builder Part A

Eyad Alshareef 1

Introduction To Introduction To Form Builder Form Builder

Part APart A

Page 2: Eyad Alshareef 1 Introduction To Form Builder Part A

2Eyad Alshareef

FormsForms

Application with a graphical user Application with a graphical user interface that looks like a paper forminterface that looks like a paper form

Used to insert, update, delete and Used to insert, update, delete and view database dataview database data

Page 3: Eyad Alshareef 1 Introduction To Form Builder Part A

3Eyad Alshareef

Primary Form UsesPrimary Form Uses

Viewing/retrieving recordsViewing/retrieving records Inserting/updating/deleting Inserting/updating/deleting

recordsrecords Counting the number of records a Counting the number of records a

query will retrievequery will retrieve

Page 4: Eyad Alshareef 1 Introduction To Form Builder Part A

4Eyad Alshareef

Data Block FormsData Block Forms

Form associated with a specific Form associated with a specific Oracle database table (object)Oracle database table (object)

System automatically creates: System automatically creates: Text fields associated with table Text fields associated with table

fieldsfields Programs for inserting, modifying, Programs for inserting, modifying,

deleting, and viewing data recordsdeleting, and viewing data records

Page 5: Eyad Alshareef 1 Introduction To Form Builder Part A

5Eyad Alshareef

Data Block FormsData Block Forms

ORACLE 10g forms are displayed ORACLE 10g forms are displayed on web browser as a on web browser as a web pageweb page. .

They are displayed in Forms They are displayed in Forms Services Window.Services Window.

The form specification is The form specification is translated into translated into Java AppletJava Applet..

They are Dynamic Web Pages.They are Dynamic Web Pages.

Page 6: Eyad Alshareef 1 Introduction To Form Builder Part A

6Eyad Alshareef

Displaying Forms in a Displaying Forms in a Web BrowserWeb Browser

Developer10Developer10g g displays forms as Web displays forms as Web pages pages In Web browserIn Web browser Form appears in Forms Services Form appears in Forms Services

window within browser windowwindow within browser window Forms Services application displays Forms Services application displays

menus and toolbarmenus and toolbar Provide general functions for all form Provide general functions for all form

applicationsapplications

Page 7: Eyad Alshareef 1 Introduction To Form Builder Part A

7Eyad Alshareef

Architecture of the Architecture of the World Wide WebWorld Wide Web

Web browsers (IE, Mozilla, Foxfire)Web browsers (IE, Mozilla, Foxfire) Web serversWeb servers Web pageWeb page

Static (always displays the same information Static (always displays the same information ))

Dynamic (the content varies based on user Dynamic (the content varies based on user inputs or data retrieved from external inputs or data retrieved from external resources )resources )

Forms Builder form Forms Builder form Dynamic Web page Dynamic Web page Derives content from Oracle 10Derives content from Oracle 10g g databasedatabase

Page 8: Eyad Alshareef 1 Introduction To Form Builder Part A

8Eyad Alshareef

How Forms Builder How Forms Builder Displays a Form in a Displays a Form in a

BrowserBrowser Java appletJava applet

Self-contained Java program that runs Self-contained Java program that runs in a web browser generic java runtime in a web browser generic java runtime environment environment

OC4J InstanceOC4J Instance Translates compiled .fmx file into Java Translates compiled .fmx file into Java

applet applet Downloads Java applet to Web browserDownloads Java applet to Web browser

Page 9: Eyad Alshareef 1 Introduction To Form Builder Part A

9Eyad Alshareef

Using a Data Block FormUsing a Data Block Form

Block Block Group of related form itemsGroup of related form items

Data block Data block Corresponds to specific database tableCorresponds to specific database table Contains objects that display values from Contains objects that display values from

table’s data fieldstable’s data fields Text itemsText items Form menu Form menu

Contains selections to manipulate formContains selections to manipulate form

Page 10: Eyad Alshareef 1 Introduction To Form Builder Part A

Eyad Alshareef 10

Using a form to Using a form to view table record view table record

Page 11: Eyad Alshareef 1 Introduction To Form Builder Part A

11Eyad Alshareef

Form ModesForm Modes

NormalNormal You can view records and sequentially You can view records and sequentially

step through recordsstep through records Enter QueryEnter Query

You can enter search parameters in You can enter search parameters in form fields and then retrieve the form fields and then retrieve the associated recordsassociated records

To place the form in Enter Query mode, To place the form in Enter Query mode, click the Enter Query button click the Enter Query button

Page 12: Eyad Alshareef 1 Introduction To Form Builder Part A

12Eyad Alshareef

Forms Services WindowForms Services Window Form menu contains selections that Form menu contains selections that

allow you to manipulate the formallow you to manipulate the form Has a toolbar with buttons to insert, Has a toolbar with buttons to insert,

view, modify, and delete recordsview, modify, and delete records At bottom of the window are lines At bottom of the window are lines

that display information about form that display information about form statusstatus

Page 13: Eyad Alshareef 1 Introduction To Form Builder Part A

13Eyad Alshareef

Forms Services WindowForms Services Window

Page 14: Eyad Alshareef 1 Introduction To Form Builder Part A

14Eyad Alshareef

Inserting New RecordsInserting New Records

In Normal mode, click the Insert In Normal mode, click the Insert Record button to insert a new Record button to insert a new blank recordblank record

Type the data values in the form Type the data values in the form fieldsfields

Click the Save button to save the Click the Save button to save the values in the databasevalues in the database

Page 15: Eyad Alshareef 1 Introduction To Form Builder Part A

15Eyad Alshareef

Retrieving RecordsRetrieving Records

Click the Enter Query buttonClick the Enter Query button to to place the form in Enter Query modeplace the form in Enter Query mode

Type a search conditionType a search condition Click the Execute Query button Click the Execute Query button

to retrieve selected records to retrieve selected records If you click , do not enter a search If you click , do not enter a search

condition, and then click , all table condition, and then click , all table records will be retrieved records will be retrieved

Page 16: Eyad Alshareef 1 Introduction To Form Builder Part A

16Eyad Alshareef

Form Search TypesForm Search Types

Exact search: only retrieves records Exact search: only retrieves records that exactly match the entered that exactly match the entered search conditionsearch condition

Restricted search: retrieves records Restricted search: retrieves records that fall within a range of valuesthat fall within a range of values

Page 17: Eyad Alshareef 1 Introduction To Form Builder Part A

17Eyad Alshareef

Restricted Search Restricted Search OperatorsOperators

_: wildcard replacing a single _: wildcard replacing a single charactercharacter

%: wildcard replacing multiple %: wildcard replacing multiple characterscharacters

>, <: greater than, less than>, <: greater than, less than >=, <=: greater than or equal to, >=, <=: greater than or equal to,

less than or equal toless than or equal to <> or !=: not equal to <> or !=: not equal to

Page 18: Eyad Alshareef 1 Introduction To Form Builder Part A

18Eyad Alshareef

Scrolling Through Scrolling Through Retrieved RecordsRetrieved Records

To view the next record, click the To view the next record, click the Next Record buttonNext Record button

To view the previous record, click To view the previous record, click the Previous Record buttonthe Previous Record button

Page 19: Eyad Alshareef 1 Introduction To Form Builder Part A

19Eyad Alshareef

Updating and Deleting Updating and Deleting RecordsRecords

Retrieve the record to be Retrieve the record to be updated or deletedupdated or deleted To update, change the data value To update, change the data value

and click the Save buttonand click the Save button To delete, click the Remove Record To delete, click the Remove Record

buttonbutton

Page 20: Eyad Alshareef 1 Introduction To Form Builder Part A

20Eyad Alshareef

Closing a Form and Closing a Form and Committing ChangesCommitting Changes

To close a form:To close a form: Click Exit buttonClick Exit button Click Action on the form menu and then Click Action on the form menu and then

click Exitclick Exit Close browser windowClose browser window

If unsaved changes exist, dialog box If unsaved changes exist, dialog box will prompt to save changeswill prompt to save changes

Page 21: Eyad Alshareef 1 Introduction To Form Builder Part A

Eyad Alshareef 21

Creating Data Creating Data Block FormBlock Form

Page 22: Eyad Alshareef 1 Introduction To Form Builder Part A

22Eyad Alshareef

Start Oracle Form Start Oracle Form BuilderBuilder

Page 23: Eyad Alshareef 1 Introduction To Form Builder Part A

23Eyad Alshareef

Start OC4J InstanceStart OC4J Instance

Page 24: Eyad Alshareef 1 Introduction To Form Builder Part A

24Eyad Alshareef

Creating a new formCreating a new form

Create a new moduleCreate a new module Create a data blockCreate a data block Create a layoutCreate a layout

Page 25: Eyad Alshareef 1 Introduction To Form Builder Part A

25Eyad Alshareef

Data Block Form File Data Block Form File TypesTypes

.fmb.fmb Form design file, used by form Form design file, used by form

programmer in Form Builderprogrammer in Form Builder .fmx .fmx

Form executable file, run by form Form executable file, run by form usersusers

Page 26: Eyad Alshareef 1 Introduction To Form Builder Part A

26Eyad Alshareef

Creating a Data Block Creating a Data Block FormForm

When creating a form for a When creating a form for a table, Forms Builder table, Forms Builder automatically creates:automatically creates:LabelsLabelsText entry fieldsText entry fields Insert, update and delete and Insert, update and delete and

select queriesselect queries

Page 27: Eyad Alshareef 1 Introduction To Form Builder Part A

27Eyad Alshareef

The Object NavigatorThe Object Navigator

Page 28: Eyad Alshareef 1 Introduction To Form Builder Part A

28Eyad Alshareef

The Object NavigatorThe Object Navigator

Displays Forms Builder objects and Displays Forms Builder objects and underlying components underlying components As hierarchical treeAs hierarchical tree

Forms Builder toolbar displays Forms Builder toolbar displays buttonsbuttons

Form moduleForm module Object nodeObject node

+ indicates lower-level objects+ indicates lower-level objects - indicates node expanded fully- indicates node expanded fully

Page 29: Eyad Alshareef 1 Introduction To Form Builder Part A

29Eyad Alshareef

Form ComponentsForm Components

Form module: form Form module: form applicationapplication

Form windowForm window Title bar on topTitle bar on top Horizontal and vertical Horizontal and vertical

scrollbarsscrollbars Can be resized, maximized, Can be resized, maximized,

minimizedminimized

Page 30: Eyad Alshareef 1 Introduction To Form Builder Part A

30Eyad Alshareef

Form ComponentsForm Components CanvasCanvas

Surface that Surface that displaysdisplays form items form items BlockBlock

Object that Object that containscontains form items form items Form items Form items

Command buttons, radio (option) buttons, Command buttons, radio (option) buttons, text itemstext items

Items in the same block can appear on Items in the same block can appear on different canvasesdifferent canvases

Page 31: Eyad Alshareef 1 Introduction To Form Builder Part A

31Eyad Alshareef

Form ComponentsForm Components

Name

Cash

Check

Credit Card

Window

Canvas

Block of items

Page 32: Eyad Alshareef 1 Introduction To Form Builder Part A

32Eyad Alshareef

Creating a New Data Creating a New Data Block FormBlock Form

Create a new form moduleCreate a new form module Create a new data block using:Create a new data block using:

Data block wizardData block wizard Manual processManual process

Using Data Block Wizard:Using Data Block Wizard: Select table nameSelect table name Move editable fields from Available Columns Move editable fields from Available Columns

list to Database Items listlist to Database Items list Use Layout Wizard to create form layoutUse Layout Wizard to create form layout

Page 33: Eyad Alshareef 1 Introduction To Form Builder Part A

33Eyad Alshareef

Layout EditorLayout Editor

Use to customize form Use to customize form displaydisplay

Can add images and static Can add images and static text to enhance form text to enhance form appearanceappearance

Page 34: Eyad Alshareef 1 Introduction To Form Builder Part A

34Eyad Alshareef

Layout EditorLayout Editor

Page 35: Eyad Alshareef 1 Introduction To Form Builder Part A

35Eyad Alshareef

Creating a Data Block Creating a Data Block FormForm

Steps:Steps:1. Create the data block using the 1. Create the data block using the

Data Block WizardData Block Wizard

2. Create the form layout using the 2. Create the form layout using the Layout WizardLayout Wizard

Page 36: Eyad Alshareef 1 Introduction To Form Builder Part A

36Eyad Alshareef

Data Block WizardData Block Wizard

Welcome pageWelcome page Type pageType page

Select table or view on which to base the Select table or view on which to base the block sourceblock source

Table pageTable page Select table associated with formSelect table associated with form Enforce Integrity Constraint Check BoxEnforce Integrity Constraint Check Box

Finish pageFinish page Option to use the Layout Wizard to Option to use the Layout Wizard to

automate creating the layoutautomate creating the layout

Page 37: Eyad Alshareef 1 Introduction To Form Builder Part A

37Eyad Alshareef

Layout WizardLayout Wizard

Canvas pageCanvas page Select the canvas where the block is displayedSelect the canvas where the block is displayed

Data Block pageData Block page Select the fields that are displayed on the layoutSelect the fields that are displayed on the layout

Items pageItems page Specify the column labels, heights and widthsSpecify the column labels, heights and widths

Style pageStyle page Specify to create a form- or tabular-style layoutSpecify to create a form- or tabular-style layout

Page 38: Eyad Alshareef 1 Introduction To Form Builder Part A

38Eyad Alshareef

Layout StylesLayout Styles

Form styleForm style One record appears on the form at One record appears on the form at

a timea time Tabular styleTabular style

Multiple records display on the Multiple records display on the form in a tableform in a table

Page 39: Eyad Alshareef 1 Introduction To Form Builder Part A

39Eyad Alshareef

Create a new form based on Create a new form based on MODULE1MODULE1

Go to File/New/Form – a new module Go to File/New/Form – a new module is added to your object navigator is added to your object navigator windowwindow

Click on MODULE2 and rename it Click on MODULE2 and rename it into STUDENTinto STUDENT

Page 40: Eyad Alshareef 1 Introduction To Form Builder Part A

40Eyad Alshareef

Create a data block based on Create a data block based on a tablea table

Right click on the STUDENT module and Right click on the STUDENT module and select Data Block Wizardselect Data Block Wizard

Click next on the Data Block Wizard Click next on the Data Block Wizard welcome pagewelcome page

Page 41: Eyad Alshareef 1 Introduction To Form Builder Part A

41Eyad Alshareef

Creating a data block Creating a data block (cont’s)(cont’s) Select Table/view optionSelect Table/view option

Select a table by clicking on Browse Select a table by clicking on Browse buttonbutton

Page 42: Eyad Alshareef 1 Introduction To Form Builder Part A

42Eyad Alshareef

Selecting a table (cont’d)Selecting a table (cont’d) When you click browse, you will be When you click browse, you will be

prompted to log inprompted to log in Login into your usual account and select Login into your usual account and select

table STUDENT from the displayed listtable STUDENT from the displayed list

Page 43: Eyad Alshareef 1 Introduction To Form Builder Part A

43Eyad Alshareef

Select database itemsSelect database items Move all the attributes into selected Move all the attributes into selected

attributes pane using arrow buttonsattributes pane using arrow buttons

Page 44: Eyad Alshareef 1 Introduction To Form Builder Part A

44Eyad Alshareef

Name your data blockName your data block

Page 45: Eyad Alshareef 1 Introduction To Form Builder Part A

45Eyad Alshareef

Select the “… then call the Select the “… then call the Layout wizard” optionLayout wizard” option

Page 46: Eyad Alshareef 1 Introduction To Form Builder Part A

46Eyad Alshareef

Creating a layoutCreating a layout Layout wizard allows you to create a form Layout wizard allows you to create a form

layoutlayout Click next on the welcome page and select Click next on the welcome page and select

content canvas typecontent canvas type

Page 47: Eyad Alshareef 1 Introduction To Form Builder Part A

47Eyad Alshareef

Select items to be Select items to be displayeddisplayed

Select items to be displayed Select items to be displayed Modify the labels (prompts) and Modify the labels (prompts) and

widths of corresponding text boxes if widths of corresponding text boxes if necessarynecessary

Page 48: Eyad Alshareef 1 Introduction To Form Builder Part A

48Eyad Alshareef

Select a layoutSelect a layout

Select form layoutSelect form layout Name the frameName the frame Select the number of students to be Select the number of students to be

displayeddisplayed

Page 49: Eyad Alshareef 1 Introduction To Form Builder Part A

49Eyad Alshareef

Complete and view the Complete and view the formform

Complete and view the form designComplete and view the form design

Page 50: Eyad Alshareef 1 Introduction To Form Builder Part A

50Eyad Alshareef

Form Builder Wizards Form Builder Wizards Are Re-entrantAre Re-entrant

You can select a block or layout, then re-You can select a block or layout, then re-enter it and modify its properties using the enter it and modify its properties using the Wizard Wizard

A Wizard is in re-entrant mode when its A Wizard is in re-entrant mode when its pages appear as tabspages appear as tabs

Page 51: Eyad Alshareef 1 Introduction To Form Builder Part A

51Eyad Alshareef

Creating a Form to Creating a Form to Display Multiple RecordsDisplay Multiple Records

Tabular layoutTabular layout Display multiple records on same formDisplay multiple records on same form Select Tabular on Style page of Layout Select Tabular on Style page of Layout

WizardWizard

Page 52: Eyad Alshareef 1 Introduction To Form Builder Part A

52Eyad Alshareef

Creating a Form to Creating a Form to Display Multiple RecordsDisplay Multiple Records

Use tabular layout to edit multiple table records at the same timeUse tabular layout to edit multiple table records at the same time