330 likes | 531 Views
Creating a Basic Form Module. Objectives. After completing this lesson, you should be able to do the following: Create a form module Create a data block Modify a data block by using the Data Block Wizard Modify the layout by using the Layout Wizard Save, compile, and run a form module
E N D
Objectives After completing this lesson, you should be able to do the following: • Create a form module • Create a data block • Modify a data block by using the Data Block Wizard • Modify the layout by using the Layout Wizard • Save, compile, and run a form module • Identify file formats and their characteristics • Create data blocks with relationships • Run a master-detail form module
Create data blocks and items Apply standards Fine-tune layout Set object properties Add code Test form module Creating a New Form Module Create an empty module
Creating a New Form Module Choose one of several methods: • Use wizards: • Data Block Wizard • Layout Wizard • Build module manually • Use template form
Form Module Properties Name property Coordinate System property
Creating a New Data Block Use Form Builder Wizards: • Data Block Wizard: Create a data block with associated data source quickly and easily • Layout Wizard: Lay out data block contents for visual presentation • Create manually
Enter data source Launch Layout Wizard New Data Block Lay out data block contents Creating a New Data Block Reentrant mode Launch Data Block Wizard Reentrant mode
Launching the Data Block Wizard In Form Builder, do one of the following: • Select Tools—>Data Block Wizard. • Click the right mouse button. Use the Data Block Wizard option. • Select the Data Blocks node and then click the Create icon in Object Navigator. Use the Data Block Wizard option. • Use the Data Block Wizard button on the toolbar in the Layout Editor
Data Block Functionality Once you create a data block with the wizards, Form Builder automatically creates: • A form module with database functionality including query, insert, update, delete • A frame object • Items in the data block • A prompt for each item
Modifying the Layout • Reentrant Layout Wizard: • Select frame in Object Navigator. • Select Tools—>Layout Wizard. Or • Select frame in Layout Editor. • Click Layout Wizard button. • Layout Editor: • Select Tools—>Layout Editor. • Make changes manually. • Frame Property Palette: Change property values.
Saving a Form Module • Save the form module: • Select File—>Save. • Click the Save icon. • Enter a filename. • Save to one of the following: • File system • Database
Compiling a Form Module • Compile explicitly: • Select File—>Administration—>Compile File. • Launch the Form Compiler component. • Initiate from Command line interface. • Compile implicitly: • Select Tools—>Preferences. • Set the Build Before Running preference.
Running a Form Module • Forms Runtime component • Command line interface • Form Builder component • Select Program—>Run. • Click the Run icon.
Module Types Form Module .fmb .fmx .fmt Menu Module .mmb .mmx .mmt PL/SQL Library .pll .plx .pld Object Library .olb .olt
Form Block Relationships Master Master Master Detail Detail Detail Detail Detail
Relation Object • New relation object created in Object Navigator under master data block node • Default name assigned: MasterDataBlock_DetailDataBlock • Triggers and program units generated automatically
Deletion Properties = Deleted Isolated Cascading Nonisolated No Detail Rec Master-Detail Records Nonisolated Detail Rec
Coordination Properties Default Deferred with auto query Deferred without auto query
Join Condition • Creates primary-foreign key link between blocks • Define using: • Block and item names • SQL equijoin syntax
Running a Master-Detail Form Module • Automatic block linking for: • Querying • Inserting • Default deletion rules: Cannot delete master record if detail records exist
Summary • Build a new form module: • Using Form Builder wizards • Manually • Using a template form • Use the Data Block Wizard—data source. • Use the Layout Wizard—visual presentation.
Summary • Modify layout—reentrant wizards. • Save, compile, and run a form module. • Use module types and storage formats. • Create master-detail form module.
Practice 4 Overview This practice covers the following topics: • Creating new form modules • Creating data blocks by using Form Builder wizards • Modifying data block layout by using the Layout Wizard in reentrant mode • Saving and running the form modules