Introduction To Form Builder Part A Eyad Alshareef
Introduction To Form Builder Part A Eyad Alshareef 1
Forms Application with a graphical user interface that looks like a paper form § Used to insert, update, delete and view database data § Eyad Alshareef 2
Primary Form Uses Viewing/retrieving records § Inserting/updating/deleting records § Counting the number of records a query will retrieve § Eyad Alshareef 3
Data Block Forms § Form associated with a specific Oracle database table (object) § System automatically creates: § Text fields associated with table fields § Programs for inserting, modifying, deleting, and viewing data records Eyad Alshareef 4
Data Block Forms § ORACLE 10 g forms are displayed on web browser as a web page. § They are displayed in Forms Services Window. § The form specification is translated into Java Applet. § They are Dynamic Web Pages. Eyad Alshareef 5
Displaying Forms in a Web Browser n Developer 10 g displays forms as Web pages In Web browser n Form appears in Forms Services window within browser window n n Forms Services application displays menus and toolbar n Provide general functions for all form applications Eyad Alshareef 6
Architecture of the World Wide Web browsers (IE, Mozilla, Foxfire) n Web servers n Web page n Static (always displays the same information ) n Dynamic (the content varies based on user inputs or data retrieved from external resources ) n n Forms Builder form Dynamic Web page n Derives content from Oracle 10 g database n Eyad Alshareef 7
How Forms Builder Displays a Form in a Browser n Java applet n n Self-contained Java program that runs in a web browser generic java runtime environment OC 4 J Instance Translates compiled. fmx file into Java applet n Downloads Java applet to Web browser n Eyad Alshareef 8
Using a Data Block Form n Block n n Group of related form items Data block Corresponds to specific database table n Contains objects that display values from table’s data fields n Text items n Form menu n n Contains selections to manipulate form Eyad Alshareef 9
Using a form to view table record Eyad Alshareef 10
Form Modes n Normal n n You can view records and sequentially step through records Enter Query You can enter search parameters in form fields and then retrieve the associated records n To place the form in Enter Query mode, click the Enter Query button n Eyad Alshareef 11
Forms Services Window Form menu contains selections that allow you to manipulate the form n Has a toolbar with buttons to insert, view, modify, and delete records n At bottom of the window are lines that display information about form status n Eyad Alshareef 12
Forms Services Window Eyad Alshareef 13
Inserting New Records In Normal mode, click the Insert Record button to insert a new blank record n Type the data values in the form fields n Click the Save button to save the values in the database n Eyad Alshareef 14
Retrieving Records Click the Enter Query button form in Enter Query mode n Type a search condition n Click the Execute Query button retrieve selected records n n to place the to If you click , do not enter a search condition, and then click , all table records will be retrieved Eyad Alshareef 15
Form Search Types Exact search: only retrieves records that exactly match the entered search condition n Restricted search: retrieves records that fall within a range of values n Eyad Alshareef 16
Restricted Search Operators § § _: wildcard replacing a single character %: wildcard replacing multiple characters >, <: greater than, less than >=, <=: greater than or equal to, less than or equal to § <> or !=: not equal to Eyad Alshareef 17
Scrolling Through Retrieved Records To view the next record, click the Next Record button n To view the previous record, click the Previous Record button n Eyad Alshareef 18
Updating and Deleting Records n Retrieve the record to be updated or deleted To update, change the data value and click the Save button n To delete, click the Remove Record button n Eyad Alshareef 19
Closing a Form and Committing Changes n To close a form: Click Exit button n Click Action on the form menu and then click Exit n Close browser window n n If unsaved changes exist, dialog box will prompt to save changes Eyad Alshareef 20
Creating Data Block Form Eyad Alshareef 21
Start Oracle Form Builder Eyad Alshareef 22
Start OC 4 J Instance Eyad Alshareef 23
Creating a new form Create a new module n Create a data block n Create a layout n Eyad Alshareef 24
Data Block Form File Types §. fmb § Form design file, used by form programmer in Form Builder §. fmx § Form executable file, run by form users Eyad Alshareef 25
Creating a Data Block Form n When creating a form for a table, Forms Builder automatically creates: n Labels n Text entry fields n Insert, update and delete and select queries Eyad Alshareef 26
The Object Navigator Eyad Alshareef 27
The Object Navigator n Displays Forms Builder objects and underlying components n As hierarchical tree Forms Builder toolbar displays buttons n Form module n Object node n + indicates lower-level objects n - indicates node expanded fully n Eyad Alshareef 28
Form Components § Form module: form application § Form window § Title bar on top § Horizontal and vertical scrollbars § Can be resized, maximized, minimized Eyad Alshareef 29
Form Components § Canvas § Surface that displays form items § Block § Object that contains form items § Form items § § Command buttons, radio (option) buttons, text items Items in the same block can appear on different canvases Eyad Alshareef 30
Form Components Window Canvas Name Block of items Cash Check Credit Card Eyad Alshareef 31
Creating a New Data Block Form Create a new form module n Create a new data block using: n Data block wizard n Manual process n n Using Data Block Wizard: Select table name n Move editable fields from Available Columns list to Database Items list n n Use Layout Wizard to create form layout Eyad Alshareef 32
Layout Editor n Use to customize form display n Can add images and static text to enhance form appearance Eyad Alshareef 33
Layout Editor Eyad Alshareef 34
Creating a Data Block Form § Steps: 1. Create the data block using the Data Block Wizard 2. Create the form layout using the Layout Wizard Eyad Alshareef 35
Data Block Wizard § Welcome page § Type page § Select table or view on which to base the block source § Table page § Select table associated with form § Enforce Integrity Constraint Check Box § Finish page § Option to use the Layout Wizard to automate creating the layout Eyad Alshareef 36
Layout Wizard § Canvas page § Select the canvas where the block is displayed § Data Block page § Select the fields that are displayed on the layout § Items page § Specify the column labels, heights and widths § Style page § Specify to create a form- or tabular-style layout Eyad Alshareef 37
Layout Styles § Form style § One record appears on the form at a time § Tabular style § Multiple records display on the form in a table Eyad Alshareef 38
Create a new form based on MODULE 1 Go to File/New/Form – a new module is added to your object navigator window n Click on MODULE 2 and rename it into STUDENT n Eyad Alshareef 39
Create a data block based on a table n n Right click on the STUDENT module and select Data Block Wizard Click next on the Data Block Wizard welcome page Eyad Alshareef 40
Creating a data block (cont’s) Select Table/view option n Select a table by clicking on Browse button n Eyad Alshareef 41
Selecting a table (cont’d) n n When you click browse, you will be prompted to log in Login into your usual account and select table STUDENT from the displayed list Eyad Alshareef 42
Select database items n Move all the attributes into selected attributes pane using arrow buttons Eyad Alshareef 43
Name your data block Eyad Alshareef 44
Select the “… then call the Layout wizard” option Eyad Alshareef 45
Creating a layout n n Layout wizard allows you to create a form layout Click next on the welcome page and select content canvas type Eyad Alshareef 46
Select items to be displayed n Modify the labels (prompts) and widths of corresponding text boxes if necessary n Eyad Alshareef 47
Select a layout Select form layout n Name the frame n Select the number of students to be displayed n Eyad Alshareef 48
Complete and view the form n Complete and view the form design Eyad Alshareef 49
Form Builder Wizards Are Re-entrant § You can select a block or layout, then re-enter it and modify its properties using the Wizard § A Wizard is in re-entrant mode when its pages appear as tabs Eyad Alshareef 50
Creating a Form to Display Multiple Records n Tabular layout Display multiple records on same form n Select Tabular on Style page of Layout Wizard n Eyad Alshareef 51
Creating a Form to Display Multiple Records n Use tabular layout to edit multiple table records at the same time Eyad Alshareef 52
- Slides: 52