209
Date : Presenter : The only thing more powerful than a great idea, is a great idea powerfully executed. - William Blake © Copyright 2003 Wipro Technologies

Training - Forms 6i

Embed Size (px)

DESCRIPTION

forms 6i

Citation preview

  • The only thing more powerful than a great idea, is a great idea powerfully executed. - William BlakeDate : Presenter : Copyright 2003 Wipro Technologies

  • Oracle Forms 6i

  • After you complete this lesson, you should be able to Describe the following :

    Oracle Developer : Features and Benefits Project Builder Form Builder Graphics Builder Report Builder Procedure Builder Query Builder Schema Builder Translation BuilderObjectives

  • Oracle Developer offers the following features and benefits:

    Productivity enhancements Web deployment of applications Scalability Openness Developer Features & Benefits

  • ProductivityOracle Developer employs : Rapid application design (RAD) techniques. Object orientation.Built-in computer-based training. A unified client-server architecture.

  • Web DeploymentOracle Developer takes advantage of the ease and accessibility of the Web.

  • ScalabilityOracle Developer's flexible multi-tier architecture supports :

    Oracle7 and Oracle8 application servers or Third-party application servers

  • OpennessOracle Developer offers integration with : Oracle databases.Rdb, SQL Server, Informix, Sybase, and DB/2.

    Database access is provided through:ODBC database drivers.Oracle Gateways.

  • Project BuilderIt helps you to :Organize and maintain the many different files that make up an application.

  • Form Builder It is a development tool for :Building applications that accesses information stored in a database. They can also call reports and graphics.

  • Graphics BuilderIt enables you to :Produce interactive graphical displays .

  • Report BuilderIt enables you to :Develop production-quality reports in a Client/Server and Web environment.

    To deploying reports on the Web use :Reports Server Reports Web CGI or Reports Cartridge.

  • Procedure BuilderIt is a unified environment for : Developing and maintaining C/S application code.

  • Query BuilderDisplays :Your tables graphically. Providing visual assistance as you use the point-and-click interface to create a single query.

  • Schema BuilderSchema Builder is a graphical tool that enables you to :Create,Copy,Modify,Remove database objects and their relationships.

  • Oracle Translation BuilderOracle Translation Builder supports and manages translations of text extracted from both :

    Oracle resource files, such as Oracle Developer applications, Non-Oracle resource files, such as Microsoft Windows (.rc) and HTML files.

  • RecapOracle Developer: Features and BenefitsProject BuilderForm Builder and Graphics BuilderReport BuilderProcedure BuilderQuery BuilderSchema BuilderTranslation Builder

  • Review Questions

  • Understanding the People Your success is directly related to how well you understand your users-the tasks they perform.

  • Creating your standards

  • Oracle Developer standards mechanismsObject Library (Form Builder) :Object Group (Form Builder) Visual attributes (Form Builder)Template (Form Builder, Report Builder)

  • RecapCreating an Effective FormGuidelines for building formsDesigning messages

  • Review Questions

  • Oracle Form Module 2

  • The Form Module

  • Programming Objects

  • Building a Simple FormConnecting to ORACLE Database

  • Creating Data Blocks

  • Data and Control BlockControl BlockData Block

  • Compile and Run Form

  • Querying a FormTableRecords BufferedBlock DisplayWork FileSELECT statementRecords Fetched

  • Retrieving DataUnrestricted QueryRestricted QueryDatabase

    Sheet1

    ABCD

    1

    2

    3

    4

    Sheet2

    Sheet3

    Sheet1

    ABCD

    1

    2

    3

    4

    Sheet2

    Sheet3

    Sheet1

    ABCD

    1

    2

    3

    4

    Sheet2

    Sheet3

    Sheet1

    ABCD

    1

    2

    3

    4

    Sheet2

    Sheet3

  • RecapThe Form Module ObjectsThe Programming Objects

  • Review Questions

  • Master / Detail Relationships3

  • Master / Detail RelationshipsA master-detail relationship is an association between two base table blocks: A master block A detail block.

    It reflects a primary key to foreign key relationship between the tables on which the blocks are based.

  • The relation ObjectYou define a master-detail relationship between blocks by :Create the relation in the New Block window at the same time you create the detail block for that relation. Creating and Setting the properties of a relation object.

  • Setting properties that effect co-ordinationMaster Deletes

    Coordination

    Prevent Master-less Operation

  • PropertiesMaster Deletes Properties: Non-Isolated Isolated Cascading

    Coordination Properties: Immediate Deferred with Auto-Query Deferred with No Auto-query

  • RecapThe Relation ObjectCreating a Master / Detail RelationCreating A Relation in the New Block windowCreating a Relation in the Object NavigatorSetting Properties that Affect CoordinationPreventing Masterless Operations in the Detail Block

  • Review Questions

  • Hands-On-Exercise 1, 2

  • The Layout Editor and The Property Window4

  • The Layout EditorIt is a graphical design facility for creating and arranging :Interface items Boilerplate text Graphics in a form.

    You work on a single canvas-view. Canvas-views are displayed in windows at runtime.

  • Form Builder Layout EditorToolBarToolPaletteRuler

  • Selecting Objects in the Layout EditorYou select objects in the Layout Editor when you want to :Resize, cut, copy, or move them, Format them by setting font, color, and pattern visual attributes

  • Notes

  • Notes

  • Notes

  • The Property WindowFind fieldProperty ValueProperty Name

  • Notes

  • RecapThe layout editorCreating ItemsThe property window

  • Review Questions

  • Defining Block Items 5

  • Defining ButtonsButtons are interface items that operators select to execute commands or initiate actions.

  • Defining Check Boxes A check box is a two-state control that indicates whether a certain condition or value ison or off, true or false.

  • Check BoxThe display state of a check box is always either checked or unchecked.

  • Defining Display Items Display items only store and display fetched or assigned values. Display items are generally used as boilerplate or as conditional text.

  • Defining List Items A list item is a list of text elements that can be displayed as either a poplist, text list, or combo box.

    A list item displays a fixed number of elements.

    Each element in a list is a text string up to 30 characters long.

  • Defining Radio Groups A radio group is an interface control that displays a fixed number of options that are mutually exclusive.

    Each option is represented by an individual radio button.

  • Creating a Radio GroupWhen you create a radio group, you associate a specific data value with each radio button in the group.

    When an operator selects a radio button, the value of the radio group changes to the value that you associated with the selected button.

  • Defining Text Items A text item is an interface control. It displays operator-enterable text in a field in either single or multi-line display. You can format numbers and dates in single-line text items with format masks.

  • RecapDefining ButtonsDefining Check BoxesDefining Display ItemsDefining List ItemsDefining Radio GroupsDefining Text Items

  • Review Questions

  • Review Questions

  • Hands-On-Exercise 3, 4, 5

  • Using PL/SQL in Forms6

  • PL/SQL in Oracle FormsIn the Oracle Forms Designer, you write PL/SQL code when you do the following:

    Create triggers and PL/SQL-type menu items. Write user-named subprogram and PL/SQL package Define menu startup code.

  • Calling Built-in Subprograms Built-in subprograms are packaged procedures and functions that are always available within Oracle Forms.

    Examples :

    Go_Item('customer.cust_id'); item_required :=Get_Item_Property('customer.custid',REQUIRED) :control.item_A := Message_Text;

  • Referencing Oracle Forms Objects in PL/SQL Statements Example :To reference the value stored in an item ::block_name.item_name

    To Reference Objects by Internal ID : DECLARE id_varWINDOW; BEGIN id_var := Find_Window('my_window'); END;

  • Referencing Items IndirectlyYou can reference items indirectly with the NAME_IN and COPY built-in subprograms.

    IF :emp.ename = 'smith'

    IF NAME_IN('emp.ename') = 'smith'

    date_var :=TO_DATE(Name_In('order.date_item'));

    num_var := TO_NUMBER(Name_In('order.number_item'));

  • Referencing Items Indirectly ...The COPY procedure assigns an indicated value to an indicated variable or item. :emp.ename := 'smith';-- direct referencecopy('smith','emp.ename');-- indirect reference

    Referencing items indirectly allows you to write more generic, reusable code.

  • VariablesLocal VariablesGlobal VariablesSystem Variables

  • Global VariablesGlobal variables are not formally declared the way PL/SQL local variables are.

    Initialize a global variable the first time you assign a value to it. GLOBAL.my_var:= TO_CHAR(:order.total * .85);

    To destroy a global variable and release its memory, use the ERASE built-in procedure:Erase('GLOBAL.my_var');

  • System Variables Oracle Forms provides built-in system variables that keep track of runtime status conditions during an Oracle Forms Runform session. You can read the values of these variables in any form trigger or user-named subprogram.

    Some examples of System Variables:

    FORM_STATUSBLOCK_STATUSRECORD_STATUSCURRENT_FORMCURRENT_BLOCKCURRENT_ITEMCURRENT_DATETIME

  • FORM_STATUS System VariableTo refer system variable

    :SYSTEM.form_status

    The valid statuses are:

    NewQueryChanged

  • BLOCK_STATUS System VariableTo refer system variable

    :SYSTEM.block_status

    The valid statuses are:

    NewQueryChanged

  • RECORD_STATUS System VariableTo refer system variable

    :SYSTEM.record_status

    The valid statuses are:

    NewInsertQueryChanged

  • RecapPL/SQL in Oracle FormsCalling Built-in SubprogramsReferencing Oracle Forms Objects in PL/SQL StatementsReferencing Items IndirectlyVariablesSystem VariablesGlobal Variables

  • Review Questions

  • Review Questions

  • Writing Program Units7

  • User-named SubprogramsIt is a named PL/SQL function or procedure written in a form, menu, or library module.

    It can be reused without having to enter it in multiple triggers.

  • Creating PackagesPackage organize your procedures and functions to form a suitcase of PL/SQL objects.

    Packages can contain variables that are persistent for a user's entire session.

  • RecapUser-named SubprogramsCreating a User-named SubprogramCalling User-Named SubprogramsCreating Packages

  • Triggers8

  • TriggersD2K applications are event driven

    A trigger is a block of PL/SQL code you write to customize your application.

    You use triggers to respond to runtime events with appropriate processing.

  • Triggers ...Triggers can be attached to any object in the form: an itema blockthe form itself.

    The object to which a trigger is attached defines the scope of the trigger

  • Types of eventsOracle Forms recognizes a predefined set of runtime events, each of which has a corresponding built-in trigger.

  • Using Triggers in FormsThrough triggers, you can control the following types of tasks:

    Validate data entry.Limit operator access to specified forms.Display related field data by performing table look-ups.

  • Trigger CategoriesBlock processing GUI events Master-Detail Message handling Navigational Query time Transactional Validation

  • About Built-in SubprogramsYour trigger code can include calls to Oracle Forms built-in subprograms (called built-ins) as well as custom PL/SQL code.

    Examples :PREVIOUS_ITEMGO_BLOCKEXECUTE_QUERYCOMMIT

  • Notes

  • Notes

  • User-Named TriggersA user-named trigger is one that has a unique, user-supplied name.

    To call a user-named trigger, use the EXECUTE_TRIGGER built-in procedure.

    execute_trigger('user_trigger');

  • Block Processing TriggersWhen-Create-Record When-Clear-Block When-Database-RecordWhen-Remove-Record

  • Interface Event TriggersWhen-Button-Pressed When-CheckBox-Changed When-Image-Activated When-Image-Pressed Key- [all] When-Radio-Changed When-Timer-Expired When-Window-Activated When-Window-Closed When-Window-Deactivated When-Window-Resized

  • Master/Detail TriggersOn-Check-Delete-Master On-Clear-Details On-Populate-Details

  • Message Handling TriggersOn-Error On-Message

  • Navigational TriggersNavigational triggers fire in response to navigational events.

    Navigational triggers can be sub-divided into two categories:

    Pre- and Post- triggers, When-New-Instance triggers.

  • Pre- and Post- TriggersThese triggers fire as Oracle Forms navigates internally through different levels of the object hierarchy.

    Pre-Form Pre-Block Pre-Record Pre-Text-Item Post-Text-Item Post-Record Post-Block Post-Form

  • When-New-Instance TriggersWhen-New-Instance triggers fire at the end of a navigational sequence that places the input focus in a different item.

    When-New-Form-Instance When-New-Block-Instance When-New-Record-Instance When-New-Item-Instance

  • Query-Time TriggersPre-Query Post-Query

  • Transactional TriggersOn-Delete On-Insert On-Lock On-Logon On-Logout On-Update Post-Delete Post-Forms-Commit Post-Insert Post-Update Post-Database-Commit Pre-Commit Pre-Delete Pre-Insert Pre-Update

  • Validation TriggersValidation triggers fire when Oracle Forms validates data in an item or record.

    When-Validate-Item When-Validate-Record

  • RecapTypes of eventsUsing Triggers in FormsTrigger Categories Based on Trigger FunctionsBuilt-In SubprogramsUser-Named Triggers

  • Review Questions

  • Review Questions

  • Hands-On-Exercise 6, 7

  • Hands-On-Exercise 8, 9

  • Hands-On-Exercise 10, 11

  • Hands-On-Exercise 12

  • Alerts and Editors9

  • AlertsAn alert is a modal window that displays a message notifying the operator of some application condition.

    There are three styles of alerts: StopCautionNote.

  • Displaying an AlertTo display an alert, your application must execute the SHOW_ALERT built-in subprogram from a trigger or user-named subprogram.

    SHOW_ALERT is a function that returns a numeric constant. Show_Alert(alert_name)Return NUMBER;

  • Changing the Alert message at Run time Alert message could be changed at run time. You can change the alert message programmatically with the SET_ALERT_PROPERTY built-in subprogram.

    Example

    Set_Alert_Property(alert_name,ALERT_MESSAGE_TEXT,Your Message);

  • Notes

  • Notes

  • EditorsThere are three editors that can be used at runtime :

    the default editor a system editora user-named editor.

  • Default and System EditorsDefault editor is built into every form and is automatically available from every text item.

    You can specify that Oracle Forms should use the current system editor.

  • User-Named EditorA user-named editor has the same text editing functionality as the default editor

    A user-named editor can be displayed programmatically with the built-in procedure SHOW_EDITOR.

  • Displaying Editors at RuntimeYou can use the following built-in subprograms to display an editor dynamically:

    EDIT_TEXTITEM

    SHOW_EDITOR

  • Displaying Editors The EDIT_TEXTITEM procedure invokes the editor associated with the current text item in the form.

    The SHOW_EDITOR procedure displays a user-named editor at the specified display coordinates.

  • RecapAlertsCreating and Displaying an AlertChanging the Alert Message at RuntimeEditorsUsing the Default Editor, User-Named Editor, System EditorDisplaying Editors at RuntimeUsing EDIT_TEXTITEM and SHOW_EDITOR

  • Review Questions

  • Review Questions

  • Hands-On-Exercise 13

  • LOVs10

  • LOV (List Of Values)An LOV is a scrollable popup window that provides the operator with either a single or multi-column selection list.

  • LOV Values and Record GroupsLOV values are derived from record group.

    A record group has a column/row framework that is similar to a database table. The LOV is the interface object that allows operators to view, scroll, and select records in the underlying record group.

  • LOV Return Items While creating an LOV specify which record group columns should be included in the LOV.

    You can designate a return item for any column that you include in the LOV.

  • LOV PropertiesFilter before display Column DisplayAutomatic SelectAutomatic skipAutomatic DisplayReturn ValueWidth(x,y)height

    Sheet1

    Sheet2

    Sheet3

  • Notes

  • LOVs and Record GroupsText ItemText ItemLOVLOVRecord Group based on Static dataDatabaseQuery-based Record Group

    Sheet1

    Sheet2

    Sheet3

    Sheet1

    Sheet2

    Sheet3

  • Designating LOV Return ValuesYou can specify a return item for any column listed in the Column Name list.

    The return item can be an item in the current form, a global variable, or a form parameter.

  • Using LOV Values to Validate Text ItemsWhen you attach an LOV to a text item, you can set the optional LOV for Validation property .

  • Notes

  • Attaching an LOV at RuntimeYou can attach an LOV to a text item programmatically with the SET_ITEM_PROPERTY built-in subprogram.

    The following example attaches the LOV called lov2 to the text item called emp.empno:

    Set_Item_Property('emp.empno',LOV_NAME,'lov2');

  • Displaying an LOV ProgrammaticallyThere are two built-in subprograms that can be used to display an LOV:

    LIST_VALUES SHOW_LOV

  • SHOW_LOVExample to call the SHOW_LOV function :

    When-Button-Pressed Trigger: DECLARE dummy BOOLEAN;BEGINdummy := show_LOV('my_lov',15,10);END;

  • Reusing an LOV Text ItemText ItemText ItemLOV Supporting Data Record GroupSelect some of the field values

  • Setting LOV Properties at RuntimeYou can use the following built-in subprograms to get and set LOV properties at runtime:GET_LOV_PROPERTY SET_LOV_PROPERTY

    The procedure SET_LOV_PROPERTY can be used to set the following LOV properties: GROUP_NAME Size X Position, Y Position

  • RecapLOV Values and Record GroupsSpecifying the Data to be Displayed in an LOVDisplaying an LOVDisplaying an LOV ProgrammaticallyReusing an LOVSetting LOV Properties at Runtime

  • Review Questions

  • Hands-On-Exercise 14

  • Canvas-Views and Windows11

  • Canvas-ViewsCanvas-views are the background objects on which you place the interface items and boilerplate objects

  • Canvas ViewThe canvas-view is displayed in the window

    Types of canvas-views :ContentStackedHorizontal / Vertical Toolbar

  • Canvas-Views ...Content : Every window has at least one canvas-view, and usually just one.

    Stacked : A canvas-view you display on top of another canvas-view

    Toolbar : Displays horizontal and vertical bars at the top of or to the side of a window, respectively.

  • WindowsA form can include any number of windows.

    For each window you create, you must create at least one content canvas-view.

  • Document and Dialog WindowsDocument windows are always displayed within the MDI application window frame.

    Dialog windows are free-floating.

    The operator can move them outside the application window if they are defined as Movable.

  • Modal and Modeless WindowsA window can be either modeless or modal. More than one modeless window can be displayed at the same time Modal windows are used as dialogs, and have restricted functionality compared to modeless windows.

  • Creating ToolbarsYou can create toolbars for any window in a form.

    Toolbars can be displayed Horizontally across the top of a windowVertically on the left side of a window.

  • Notes

  • Notes

  • Notes

  • RecapCanvas-Views

    WindowsMDI (Multiple Document Interface)Document and Dialog WindowsModal and Modeless Windows

    Creating Toolbars

  • Review Questions

  • Review Questions

  • Hands-On-Exercise 15, 16

  • Visual Attributes, Property Classes and Object Groups12

  • Visual Attribute PropertiesVisual attributes are the font colorpattern

    properties that you set for form and menu objects that appear in your application's interface.

  • Visual Attribute Properties ...Visual Attribute Name property :

    Default Visual AttributesCustom Visual AttributesNamed Visual Attributes

  • Attaching an VISUAL ATTRIBUTE at Runtime You can attach an Visual Attribute to a text item programmatically with the SET_ITEM_PROPERTY built-in subprogram.

    The following example attaches the VISUAL ATTRIBUTE called VA1 to0 the text item called emp.empno:

    Set_Item_Property('emp.empno',VISUAL_ATTRIBUTE,VA1');

  • Notes

  • Working with Property Classes Property class inheritance allows you to quickly define objects that conform to interface and functionality standards.

    Property classes also allow you to make global changes to applications quickly.

  • Notes

  • Notes

  • Notes

  • Reusing Objects and CodeReusing objects helps you to maintain consistency in your applications, Also allows you to build on work that you or other developers have done previously.

  • Referencing Objects in Other Modules Referencing allows you to create objects that inherit their functionality and appearance from other objects.

    A reference object automatically inherits any changes that have been made to the source object.

  • Notes

  • Notes

  • Notes

  • RecapVisual Attribute PropertiesSetting Visual Attributes in the Properties windowCreating a Named Visual AttributeWorking with Property ClassesCreating Property ClassesBase an object on a property classReusing Objects and CodeCreating a Reference ObjectCreate an Object Group

  • Review Questions

  • Hands-On-Exercise 17, 18

  • Form Parameters13

  • Form ParametersParameters provide a mechanism for :DefiningSetting the values of inputs that are required by a form at startup.

  • Form ParameterYou can pass parameter values to a form when an application executes the CALL_FORM, NEW_FORM, OPEN_FORM, or RUN_PRODUCT built-in subprograms.

  • Referencing Parameters In PL/SQL, you can reference and set the values of form parameters using bind variable syntax.

    Preface the parameter name with the reserved word PARAMETER :

    :PARAMETER.parameter_name := 'TOKYO'; Or :block.item := :PARAMETER.parameter_name;

  • Creating a Parameter ListYou can use the following built-in subprograms to create and manipulate a parameter list:

    ADD_PARAMETER CREATE_PARAMETER_LIST DELETE_PARAMETER DESTROY_PARAMETER_LIST GET_PARAMETER_ATTR GET_PARAMETER_LIST SET_PARAMETER_ATTR

  • RecapCreating a ParameterReferencing ParametersIndirectly Referencing ParametersCreating and Passing Parameter Lists

  • Review Questions

  • Menus14

  • MenusEvery form runs with one of the following:

    The Default menu that is built in to every form A custom menu that you define as a separate module and then attach to the form for runtime execution No menu at all

  • The Default MenuThe Default menu is part of the form module.

    Custom menu modules, however, are separate from form modules.

    When you deliver a single-form application that uses a custom menu, you'll provide two executable files:

    an .FMX form modulean .MMX menu module

  • Menu ObjectsThe Oracle Forms menu hierarchy contains three object categories:

    Menu modulesMenus (including main menus, individual menus, and submenus) Menu items

  • Assigning Commands to Menu Items Every menu item must have a valid Command Type property: NullMenuPL/SQL PlusCurrent Forms Macro

  • Notes

  • Writing User-Named SubprogramsYou can create user-named subprograms in a menu module by writing them in the PL/SQL Editor. A user-named subprogram can be called from any menu item in the same module that is defined as a PL/SQL command type.

  • Notes

  • Notes

  • RecapMenusMenu ObjectsBuilding a Custom MenuAssigning Commands to Menu ItemsAttaching a Menu Module to a FormWriting Startup CodeRuntime Control

  • Review Questions

  • PL/SQL Libraries15

  • PL/SQL LibraryA library is a collection of subprograms, including user-named procedures, functions, and packages.

    Once you create a library, you can attach it to any other form, menu, or library module.

    The same library can be attached to multiple forms and menus.

  • Calling Library Program Units

  • Notes

  • RecapPL/SQL LibrariesPL/SQL Library File FormatsCalling Library Program UnitsWriting Library Program UnitsSteps for Creating and Attaching a LibraryCreating a LibraryAttaching a Library to Another ModuleEditing a Library

  • Review Questions

  • Working with Images16

  • ImagesYou can incorporate two types of images into an Oracle Forms application: Boilerplate Images Image Items

    At runtime, Navigating and selecting image items is possibleCannot navigate to or modify boilerplate images.

  • Using Boilerplate ImagesBoilerplate images are static images

    You import from the file system or database

    They can be used as graphical elements in your form, such as company logos and maps.

  • Image ItemsImage items are special types of interface controls that store and display either vector or bitmap images.

    Like other items that store values, image items can be either base table items control items.

  • Notes

  • Recap ImagesUsing Boilerplate ImagesTo Import a Boilerplate ImageDefining Image ItemsPopulating Image ItemsManipulating Images at Runtime

  • Hands-On-Exercise 19

  • Thank YouThank You

    ObjectivesAfter you complete this lesson, you should be able to perform the following tasks :Describe the following :Oracle Developer: Features and BenefitsProject BuilderForm BuilderGraphics BuilderReport BuilderProcedure BuilderQuery BuilderSchema BuilderTranslation Builder

    Oracle Developer is a multi-tier Web and client/server development tool for building scalable applications that run on all major platforms. It incorporates an integrated set of builders for creating forms, reports, charts, queries, and procedures. The declarative capabilities of these components enable you to create applications from database definitions without the need to write any code. Oracle Developer offers the following features and benefits: Productivity enhancements Web deployment of applications Scalability Openness

    ProductivityOracle Developer employs rapid application design (RAD) techniques, object orientation, built-in computer-based training, and a unified client-server architecture to enhance productivity. Creating applications is simplified via re-entrant wizards and through inheritance of reusable components. Oracle Developer applications can also be created directly from models created using Oracle Designer (CASE). Oracle Developer offers an environment for development teams of all sizes. The new, integrated Project Builder manages all application components and external components (such as multimedia content), and enables the components to be opened with the appropriate tool. Project Builder increases productivity by facilitating deployment of completed applications. You can use Project Builder to package applications into a .tar or .zip file and create your own installation scripts for use with the Oracle Installer. Configuration management, including check-in, check-out, version labeling, auto-recompilation, and difference reporting are all provided through interfaces to popular source- and version-control packages.

    Web DeploymentOracle Developer enables developers to deploy new and existing applications on the World Wide Web, either on an internal company intranet or on the Internet. Oracle Developer takes advantage of the ease and accessibility of the Web, elevating it from a static information-publishing mechanism to an environment capable of supporting complex, dynamic applications. Form Builder applications and Graphics Builder displays generated for the Web have the same rich interactive GUI environment as those generated for client/server, coupled with the scalability expected of mission-critical, transaction-intensive applications. Reports generated for the Web provide the degree of presentation quality and precision that is critical for publishing enterprise-wide information.

    ScalabilityScalability is inherent in the multi-tiered architecture of the product. It is explicit in the support for server functionality, such as array DML, database cursors, bind variables, savepoints, and result sets, and it is definitive in the drag-and-drop client/server object partitioning which dramatically reduces network traffic between client and server. Oracle Developer's flexible multi-tier architecture supports Oracle7 and Oracle8 application servers or third-party application servers such as TP monitors, ensuring scalability from the desktop to the enterprise.

    OpennessStandards-based interaction between Oracle Developer and other applications and tools is enabled through Java Beans, ActiveX controls, OLE (Object Linking and Embedding), and DDE (Dynamic Data Exchange). Support for a variety of multimedia formats is complemented by an open architecture, giving developers the flexibility to extend Oracle Developer applications and integrate other components into them. Oracle Developer offers integration with Oracle databases as well as transparent access to all major databases including Rdb, SQL Server, Informix, Sybase, and DB/2. Database access is provided through ODBC database drivers as well as through the Oracle Gateways. A number of interfaces to third-party products are available from members of the Open Tools Initiative. These interfaces include configuration management tools, CASE and modeling tools, workflow engines, transaction processing (TP) monitors, and many others.

    About Project BuilderProject Builder helps you organize and maintain the many different files that make up an application. Within a single project, you can track everything from application documentation created using your favorite word processor, to forms, reports, and the charts they contain, as well as user exits and the routines they call. Project Builder is able to provide a single point of contact for you by integrating all the tools, files, and tasks that make up a development project.

    Major conceptsA project is a collection of pointers to the files you consider part of your application. Within projects, you can define the editors, compilers, and other tools you use to work with project files. Project files can be shared and ported across platforms. Subprojects are projects that are contained within other project files, rather than being stored in their own files. Subprojects are useful when you want to further group all items relating to a specific part of an application. You can, for example, create a subproject containing the charts, menus, libraries, and documents that comprise a large form. About Form BuilderForm Builder is a development tool for building applications that provide users access to information stored in a database. Form Builder modules can run standalone, and they can also call reports and have graphics embedded in them.

    Major conceptsWhen you create a Form Builder application, you work with three types of modules: forms, menus, and libraries. A form module is a collection of objects and data that users interact with in order to modify database tables. They make up the main body of a Form Builder application, and they contain any of the user interface items as well as the data source definitions and behavior. A menu module is comprised of menus and menu code. Users choose menu items to execute application functions. A library module is a collection of client-side code that can be shared across modules and applications. About Graphics BuilderGraphics Builder enables you to produce interactive graphical displays that represent and interact with data visually. A display is a combination of data and behavior, encapsulated in a self-contained graphical application. This enables you to reuse your displays and embed them in a form or a report.

    Major conceptsAn application created in Graphics Builder is called a display. A display contains all components used in the application, including data source definitions, visual elements, and behavior. Each display contains a layout, on which the display's graphical objects are drawn. The layout consists of one or more layers containing individual visual elements of the display. At runtime, you can hide, show, and rearrange layers to present different graphical views to the user. All other components of the application, such as data queries and PL/SQL constructs, are also part of the display. About Report BuilderReport Builder enables you to develop production-quality reports in a client/server or Web environment. You can deploy reports on the Web using the Reports Server and Reports Web CGI or Reports Cartridge. Reports can be run standalone, or you can run them from forms or Graphics Builder displays.

    Major conceptsA report is a collection of objects defining its data, layout, and runtime interface. To quickly create new reports, you use the Report Wizard. The wizard guides you through the process of choosing a report type, defining a data model, and laying out the data. You can reenter the Report Wizard after the initial creation of a report, so you may re-invoke it on an existing report, make changes, and re-default the report, even if the report was not originally created with the Report Wizard.

    About Procedure BuilderProcedure Builder is a unified environment for developing and maintaining client/server application code.

    Major conceptsProcedure Builder provides a graphical user interface for creating, editing, and compiling both client- and server-side PL/SQL, including program units, libraries, and database triggers. The Object Navigator provides a hierarchical display of these objects and enables you to launch any Procedure Builder editors or dialogs. You can drag and drop objects in the Object Navigator to change the relationships between them, and you can partition your applications by dragging and dropping procedural logic between client and server. Because Procedure Builder is embedded in Form Builder, Report Builder, and Graphics Builder, you can also drag and drop PL/SQL in the same way in those Builders.

    About Query BuilderQuery Builder provides an intuitive means to access information from your organization's databases for analysis and reporting. Query Builder displays your tables graphically, providing visual assistance as you use the point-and-click interface to create a single query.

    Major conceptsEach table in a query appears as a box in the Query window. The columns that make up a table are listed in the Query window under the table name. The Query window is divided into two panels, the Conditions panel and the Datasource panel. In the Datasource panel you specify which tables to include in your query and which columns to query from those tables. Query Builder understands the relationships between tables and displays those relationships graphically, using a relationship line. You can place conditions involving comparisons, character matches, or nulls, as well as using multiple conditions in a query. About Schema BuilderSchema Builder is a graphical tool that enables you to create, copy, modify, and remove database objects and their relationships.

    Major conceptsA schema is a collection of logical database objects, such as tables, views, indexes, and relationships, defined according to your needs. Schema Builder provides a way for you to view any combination of objects in your database, so you only need to see the objects you currently want to work with. Typically, the database objects you include in Schema Builder are those on which you expect to perform operations such as copying, modifying, and deleting. Because the schema is a logical construct designed for convenience, you won't create or save the schema itself. Instead, you use Schema Builder to set up a series of SQL operations within your schema. A commit executes those operations in the database.

    About Translation BuilderOracle Translation Builder supports and manages translations of text extracted from both Oracle resource files, such as Oracle Developer applications, and non-Oracle resource files, such as Microsoft Windows (.rc) and HTML files.

    Major conceptsTranslation Builder organizes projects and glossaries, manages base and translation modules in multiple versions, and enables reuse of earlier translations. When you need to perform a translation, Translation Builder extracts the strings to be translated from resource files and imports them to the translation repository. The Project Navigator manages the overall process and ensures integrity of the data. From the Project Navigator, you can launch the Editor, which you use to translate the given set of strings and add the translations into the repository. Once translation is complete, the strings are extracted from the repository and exported to the resource files. If the resource type supports multiple languages, the translations are added back to the original resource. Otherwise, a copy of the resource is created with the base strings replaced by the translations.

    Review Questions :1. Identify the major features of D2K from the list given below.(a) Graphical depiction of business processes(b) Ease of Web deployment(c) Centralized control over user access levels(d) Productivity(e) Openness(f) Wide acceptance by international standards committees(g) Usability(h) Radio Buttons(i) Scalability(j) Visualization2. What is the purpose of the translation builder ?(a) Automatically translates your application into other languages(b) Simplifies conversion of data from one database format to another.(c) Ensures the forms and reports are easy to understand.(d) Stores earlier translations performed manually and applies them to subsequent translations3. What D2K program keeps track of information about a projects files and database connections?(a) Schema Builder(b) Enterprise manager(c) Translation Builder(d) Project Builder(e) Designer/20004. Which of the following are among D2Ks management components?(a) Form Builder(b) Procedure Builder(c) Project Builder(d) Query Builder(e) Report Builder(f) Schema Builder(g) Translation Builder5. Which of the following are among D2Ks front-end development components?(a) Form Builder(b) Procedure Builder(c) Project Builder(d) Report Builder(e) Schema BuilderEven more important than understanding the process for developing an effective GUI is understanding the people who will use it.

    In fact, your success is directly related to how well you understand your users-the tasks they perform, the order in which they perform them, their surroundings, and their expectations.

    If you're like many application developers, this idea may require a profound shift of focus.

    Applications typically evolve from the inside out: from the datasource itself, to the code, and finally to the GUI.

    If you are committed to developing an effective GUI, you must reverse this process: first, interview your users; next, design a user interface that supports their specific tasks; and finally, create the underlying code base that makes it all work.

    Creating your standardsA set of consistent development standards is crucial to the success of any development effort. By developing and enforcing standards pertaining to layout, use, and behavior of various GUI elements, you can ensure that even disparate parts of the application have a common look and feel. Oracle Developer offers several mechanisms to assist you in developing a consistent set of standards.

    Object Library (Form Builder) :An object library is a set of objects and standards that you create and make available to your entire development team. Through the use of subclassing, each developer can ensure that changes made to the objects in the object library are propagated throughout all applications that use them. Object libraries are the preferred mechanism for standardizing your Form Builder applications. Form Builder provides two object libraries which you can customize to meet your own site requirements: Standard Object Library, which contains suggested standards optimized for the Windows 95 environment. Oracle Applications Object Library, which contains standards for cross-platform applications: Windows 95, Solaris, Macintosh, and character mode. Object Group (Form Builder) An object group is a container for a group of objects. You define an object group when you want to package related objects so you can copy or subclass them in another module. For example, suppose you build an appointment scheduler using several types of objects, including a window and canvas, blocks, items that display dates and appointments, and triggers that contain the logic for scheduling and other functionality. By packaging these objects into an object group, you can copy all of them to other forms in one simple operation.

    Visual attributes (Form Builder)Visual attributes are the font, color, and pattern properties you set for form and menu objects that appear in your application's GUI. Visual attributes can include the following properties: Font properties: Font Name, Font Size, Font Style, Font Width, Font Weight Color and pattern properties: Foreground Color, Background Color, Fill Pattern, Charmode Logical Attribute, White on Black

    Template (Form Builder, Report Builder)In Form Builder, you can create templates to provide other team members with a default starting point for new forms. Templates typically include generic objects, such as graphics (like corporate logos), toolbars, program units, standard window layouts, toolbars, and menus, and other common objects.

    Review Questions1. An _____________________________________ is a set of objects and standards that you create and make available to your entire development team. .2. You define an _____________________________________ when you want to package related objects so you can copy or subclass them in another module. 3. _____________________________________ are the font, color, and pattern properties you set for form and menu objects that appear in your application's GUI. 4. _____________________________________ is a collection of user-named procedures, functions, and packages that can be called from other modules in the application. 5. A _____________________________________ is the container for all visual objects that make up a Form Builder application. 6. _____________________________________ forces the user to work within a single window, then either accept or cancel the changes they have made.

    ObjectivesAfter you complete this lesson, you should be able to perform the following tasks :

    Describe the form module objectsItemsBlocksCanvasProgramming ObjectsItems:Item is the primary building unit of the formItems are the interface objects that present data values to the user and allow them to interact with the applicationItems are logically grouped into Blocks, and visibly arranged on a CanvasItem-values can be referenced by .

    Blocks:Block is an intermediate building unit of the formBlock is a collection of items (or a collection records, each of which has the same structure of items)Block is also a separate object with its own set of propertiesA block can be either Base Table Block or Control BlockBase Table Block: Corresponds to a table or view in the database and manages some number of records corresponding to rows in the table or viewControl Block: Does not correspond to a table or view; usually control blocks represent a collection of single-valued items, effectively having only a single record

    Canvases:Canvas is the background on which you place boiler-plate text and itemsEach item refers to exactly one canvas in its property sheetYou can divide a blocks items between different canvasesA form module can have several canvasesThe Canvas is displayed in a window, a rectangular area of the application display surrounded by a frame maintained by the GUI platformBy default, all canvases in a form appear in the same window, but you can assign separate windows for each canvas so that several canvases can be viewed at onceThe types of canvases are: content, stacked, vertical toolbar, horizontal toolbar

    Programming Objects:These objects apply equally to form and menu modules, and some of them (Attached libraries and Program units) apply to library modules as well

    Connecting to ORACLETo connect to ORACLE database from the Forms Designer:Select File | Connect When the connect dialog appears, enter a valid user name, password and database stringChoose Connect

    Creating a Base Table Block in the FormSelect the Blocks node in the Object Navigator and click on the Create icon on the Object Navigator Tool Palette or Choose Tools | New Block.The New Blocks Options dialog appears .Enter emp in the Base Table text box. Move to the Block Name text box, and enter empblkSelect Items folder. Click on Select Columns button to select the columns you want to appear on the form. By default, all the columns are selected (a + sign indicates the column selected). To deselect a column, set the Include option OffOracle Forms puts the default values into Label, Width, Type (you can enter your own values, too). Select the Layout folder.Specify the Style as either Tabular or Form, Orientation as either Vertical or Horizontal, the number of Records in the block.Click the OK button.The Object Navigator screen appears with the empblk block within it. Expand the empblk to see the items belonging to the block.Creating a Control BlockSelect Tools | New Block. Or, in the Object Navigator, position the cursor on or within the Blocks node and choose Navigator | Create.The New Block window appears. Leave the Base Table option set to .In the Block Name field, enter a name for the block. Choose OK to create the control block.A new control block does not yet contain any items. You can create items in an existing block in the Object Navigator or in the Layout Editor.

    Saving a FormChoose File | Save orClick on the Save icon in the Tool Palette.

    You can save a form either in a file or in the database. By default the form is saved in a file. You can save to the database by setting option in Options dialog box. To do so, choose Tool | Options menu item. In the Module Access section, select either Database or File/Database. File/Database lets you decide when you first save an item where to save it. Once the option set, you can proceed to save the form as mentioned before.

    Compiling and Running a FormTo generate a Form, choose File | Administration | Generate.Run the generated Form by either choosing File | Run or clicking on the Run button from the Tool Palette.

    Querying a FormWhen you Run a Form, you get the Forms RunTime window, where you can perform a queryTo retrieve all the records (Unrestricted or Global Query), chooseQuery | ExecuteTo retrieve records selectively (Restricted Query):Choose Query | EnterEnter values in the appropriate fields, based on which the records are to be retrieved.Choose Query | ExecuteOracle Forms builds a select statement by logically ANDing all the given conditionsRestricted Query:Quotes not necessary with character and date itemsLike operator implied with % or _Use Query Where for complex query conditionsUse default date format (DD-MON-YY) in Query WhereUse quotes in Query Where Query Where Dialog used to writeComplex search conditionsQueries with OR predicatesORDER BY clausesInvoked by Entering variable-name and Executing query

    Review QuestionsFill in the Blanks

    1. The _________________ item can be used only to show information that must be fetched or assigned programmatically.2. Forms Builder provides the user with the __________________________ to write appropriate code blocks.3. The __________________________ at the bottom of the screen displays Oracle messages to the user.4. Oracle forms builder allows three types of compilation. These are ____________________________________, ____________________________________ and ____________________________________.5. Data blocks can be created from _______________________________ or __________________.6. The two types of layouts allowed in forms are _______________________ and ____________________.7. ____________________ trigger fires when the row focus changes from one record to the other.8. Context sensitive help can be displayed on the status bar by using ________________ and ___________________________.9. The hint displayed under the item when the mouse cursor moves from one item to the other is called ________________________ help.10. If the not null constraint is defined, the ________________________ property is set to true.11. ______________________ property is used to set the default value for a text item.12. __________________________ is used to stop the default operation of the form cursor moving to the next item in case if the items validation has failed.13. Window properties can be set at runtime by using _____________________ function.14. The runforms window in which a user defined forms window is displayed can be referenced by using __________________________ constant.15. The window can be opened in maximized mode by setting______________________ property of the window.16. The values returned by system.form_status system variable are ___________________________ and __________________________.17. The default value of the menu module property is set to _________________.18. Oracle forms allow identification of error type, error number or error message by using __________________________________, ________________________, ___________________________19. MDI stands for ___________________________________________________.ObjectivesAfter you complete this lesson, you should be able to perform the following tasks :

    Describe Master / Detail RelationshipsCreate the Relation ObjectCreate a Master / Detail RelationCreate A Relation in the New Block windowCreate a Relation in the Object NavigatorSet Properties that Affect CoordinationPrevent Masterless Operations in the Detail Block

    Master / Detail RelationshipsA master-detail relationship is an association between two base table blocks: a master block and a detail block. The relationship between the blocks reflects a primary key to foreign key relationship between the tables on which the blocks are based.

    The master-detail relationship automatically does the following: ensures that the detail block displays only those records that are associated with the current (master) record in the master block coordinates querying between the two blocks

    The master block is related to the detail block through the join condition.The join condition establishes the primary key item(s) in the master block and the foreign key item(s) in the detail block: e.g.. deptblk.deptno = empblk.deptnoThe relation ObjectYou can define a master-detail relationship at any time during the form development process. You define a master-detail relationship between blocks by creating and setting the properties of a relation object. A relation is a logical object that specifies the relationship between one master block and one corresponding detail block. In the Object Navigator, the relation object appears under the block that is the master block in the relation. When you create a relation, Oracle Forms generates the triggers and PL/SQL procedures required to enforce coordination between the master and detail blocks. The actual code that Oracle Forms generates depends on how the properties of the relation are set. .Creating Master/Detail RelationThere are two ways to create a relation in Oracle Forms:Create the relation in the New Block window at the same time you create the detail block for that relation. In the Object Navigator, insert a relation object under the relations node for the appropriate master block.Once you create a relation between two blocks, you can change its properties at any time. When you change the Master Deletes or Coordination properties of an existing relation, Oracle Forms adds, removes, or edits triggers as requiredWhen you create a relation, you need to decide how Oracle Forms should manage coordination between the master and detail blocks. Specifically, you need to answer the following questions: Should operators be able to delete a master record if there are associated detail records present? If operators can delete a master record, should Oracle Forms delete the associated detail records also? If an operator makes a new record in the master block the current record, should Oracle Forms fetch the associated detail records immediately, or wait until the operator navigates to the detail block?

    The properties that affect the functionality of a relation include Master Deletes: The Master Deletes property allows you to specify how the deletion of a record in the master block should affect records in the detail block. It can be set to Non-Isolated, Isolated, or Cascading.Coordination: The Coordination properties Deferred and Auto-Query determine when the population phase of block coordination should occur. Coordination of the detail block with its master can be Immediate, Deferred with Auto-query, or Deferred with No Auto-query.Prevent Masterless Operation

    Master Deletes Properties:Non-Isolated: The default setting. Prevents the deletion of a master record if associated detail records exist in the database. Isolated: Allows the master record to be deleted and does not affect the associated detail records in the database. Cascading: Allows the master record to be deleted and automatically deletes any associated detail records from the base table at commit time. When relations are nested to several levels, only records in the immediate detail block are deleted.

    Coordination Properties:Immediate: (Deferred False, Auto-Query False) The default setting. When a coordination-causing event occurs, the detail records are fetched immediately. Deferred with Auto-Query:(Deferred True, Auto-Query True)When a coordination-causing event occurs, Oracle Forms defers fetching the associated detail records until the operator navigates to the detail block. Deferred with No Auto-query: (Deferred True, Auto-Query False) When a coordination-causing event occurs, Oracle Forms does not automatically fetch the detail records. To fetch the detail records, the operator must navigate to the detail block and explicitly execute a query.

    Review QuestionsTrue or FalseThe master detail relationship can be set only if foreign key / primary key is defined at the table levelIf ON DELETE CASCADE is specified at the time of defining a foreign key, the delete record behavior property must not be set to cascading.The updateable property cannot be set for the objects if the Canvas property is set to null.Database item property must be set to no if the item is not connected to a base table column.prompt adjustment edge property is used to determine the position of the label relative to the associated item.

    Fill in the blanks

    1. A master detail relation defined in the form creates _______________ object.2. A pre-delete trigger is created if the master deletes property is set to _____________.3. Oracle forms determines the SQL statement to be generated when a commit is fired based on the 4. _____________ variable.4. On-check-delete-master is created if the master deletes property is set to _______________.5. The triggers that will fires when al the records are newly inserted and a commit is fired are _______________________, ____________________, _______________________.6. The form behavior when deleting a master record can be determined by _________- property. This property can take three values. These are : ___________________, ______________________________, ___________________7. The properties that determine data coordination in view mode between the master and the detail block are : __________________, _________________________, _______________.8. In the object navigator, the relation object appears in the relations node under the block defined as a _______________________ block.9. The properties of the relation object master block and join condition are taken from the foreign key constraint at the table level if the _________________________ check box is on.10. Whenever a new record is added to the detail block, the value of the join column in the detail block is set to the value of the join column in the master block by using ___________________ property.11. ________________ property is used to determine the type of item.12. SYSTEM.FORM_STATUS can take the following values :_____________________, _________________________, _______________________________.13. SYSTEM.RECORD_STATUS can take the following values : _______________________, _____________________________, __________________________.Hands-on-exercise 1: master-detail blockIn this practice session, you will create two new form modules. You will create a single block form that displays a single record. You will also create a form that displays master-detail information.

    Create a new form module called customers. Create a new data block in this form using the form builder wizards and base it on the customer table. Using the layout editor, reposition the items to your choice.

    Create a master detail form module called orders. Create a master block based on the orders table and a detail block based on the item table. Create a third data block that is not related to any other block in the form module. Base this block on the inventory table. Use the form builder wizards to create all three data blocks.

    Invoke the layout wizard in re-entrant mode, and change the layout of the item and inventory data blocks.

    Save and run the new form module.

    Hands-on-session 2: control blocksIn this practice session, you will create control blocks and modify several data blocks properties as well as frame properties.Create a control block in the customers form..Using the property palette, change properties in the customer data block to change its runtime appearance and behavior. Change the related frame properties to change the runtime appearance and to keep any layout changes you make manually in the layout editor. Save and run the form after the changes are applied.

    Create a control block in the orders form.

    Create a visual attribute in the orders form and use it to highlight the current record in the item and inventory data blocks at runtime. Use the multiple selection features on both data blocks when setting the appropriate property in the property palette.

    Change properties in the item and inventory data blocks to change their runtime appearance and behavior. Change the frame properties of all the data blocks in the orders form, to change their runtime appearance and to keep any layout changes you make manually in the layout editor. Save and run the form after the changes are applied.

    ObjectivesAfter you complete this lesson, you should be able to perform the following tasks :Describe the Layout EditorInvoke the Layout EditorSelect Objects in the Layout EditorMove Objects in the Layout EditorResize Objects in the Layout EditorMake Objects the Same SizeAlign Objects in the Layout EditorCenter an object on the canvas:Group Objects in the Layout EditorWork with Overlapping Objects in the Layout EditorReorder overlapping boilerplate objects:Create ItemsCreate an item in the Layout EditorCreate an Item in the Object NavigatorAdd Boilerplate Text and Graphics to a Form

    In the Navigator, double-click the object icon for the canvas-view you want to edit. ORIn the Navigator, choose Layout Editor from the popup menu. (On MS Windows, press the right mouse button to display the popup menu.) ORChoose Tools | Layout Editor, then indicate the canvas-view you want to work onIf there is more than one canvas defined in the form, Oracle Forms displays a list of values (LOV) from which you can select the canvas-view you want to edit. If there is only one canvas-view in the form, Oracle Forms displays it in the Layout Editor automatically. If there are no canvas-views in the form, Oracle Forms creates a default canvas-view.

    In The Layout EditorRulers: The horizontal and vertical rulers at the top and left side of the workspace provide a reference for sizing and arranging objects in the Layout Editor. Layout Editor ruler units can be set to character cells, inches, centimeters, or points. To display the Ruler Settings dialog, choose View->Settings->Ruler Settings. Grid: There is a grid defined within the workspace that helps you position objects. The grid is rendered in the current ruler units. Ruler Guides: Ruler guides are horizontal and vertical dotted lines that can be used as references when aligning objects on a canvas. To create a ruler guide, position the pointer on either ruler, then click and drag into the workspace. Ruler guides are not displayed at runtime. To move a ruler guide, drag it to a different location. To delete a ruler guide, drag it out of the workspace. To temporarily hide ruler guides without deleting them, deselect the Ruler Guides option in the Arrange menu.

    There are several ways to select objects :To select an object: Click on the Select tool in the Layout Editor tool palette. Position the pointer on the object and click. When you select an object, Oracle Forms displays black rectangles at the corners of the object's bounding box, called selection handles. When you select a group, Oracle Forms displays the group's selection handles.To select objects in a region: Click on the Select tool in the Layout Editor tool palette. Click and drag until the selection rectangle encloses the objects you want to select. Only objects whose bounding boxes are completely within the selection rectangle are selected. To add an object to the current selection: When one or more objects are selected, use the Select tool to Shift-click another object. (Hold down the Shift key while clicking the object.) Repeat this procedure to add as many objects as desired to the current selection. To select all objects in the workspace: Select Edit->Select All, or press [Select All]. To deselect an object: Click anywhere outside the object's bounding box. To deselect an object in a multiple selection, Shift-click on the object to deselect only that object.

    Moving Objects in the Layout EditorTo move an object, position the Select tool over it, then click and drag the object to the desired location. To move more than one object at a time, select the objects, then click and drag any selected object to move all of the objects in the selection. Resizing Objects in the Layout EditorSelect the object you want to resize.Resize the object by dragging one of its selection handles. To constrain a resize operation, hold down the Shift key while resizing the selected object. For example, Shift-dragging constrains a rectangle to a square, and an ellipse to a circle. ORSelect Arrange->Size Objects to invoke the Size Objects dialog, then set Width and/or Height to Custom, and enter the desired setting. Once you have specified the size of an object, you can apply the same dimensions to other selected objects with the Arrange -> Repeat Sizing command.To Make Objects the Same SizeSelect the objects you want to make the same size. Select Arrange->Size Objects to open the Size Objects dialog. Specify whether you want the selected objects to be the same height and/or width as the smallest selected object, the largest selected object, or an average of all selected objects. If you want to enter a specific width or height value, choose Custom. Choose OK to accept the size parameters and dismiss the dialog. Aligning Objects in the Layout EditorYou can align selected objects horizontally or vertically. For example, you can align several buttons to place them an equal distance from the edge of the canvas.To align objects:Select the objects you wish to align. Select Arrange->Align Objects to display the Alignment Settings dialog. Specify how you want the selected objects to be aligned. A single object can be aligned to the grid. Multiple selected objects can be aligned to the grid or to each other. You can specify horizontal and/or vertical alignment options. Choose OK to accept the settings and dismiss the dialog.Once you define alignment settings in the Alignment Settings dialog, you can apply these settings to any selection of two or more objects. To do so, first select the objects you want to align, then select Arrange->Repeat Alignment. To center an object on the canvas: When the View->Show Canvas menu option is On, the canvas itself is a selectable object.You can center objects in the middle of a canvas by doing the following:Select the object or objects you want to center, then Shift-click to select the canvas. Invoke the Alignment Settings dialog and set both Horizontal and Vertical alignment to Center.

    Grouping Objects in the Layout EditorYou can select multiple objects and create a group. The group can then be manipulated as a single object. For example, you might want to group several objects together and then move the group as a unit, without changing the relative positions of the objects in the group.To group objects: Select two or more objects. Select Arrange->Group. To separate a group, first select it, then choose Arrange->Ungroup.You can select and manipulate a group or the individual objects in a group. For example, to move a group, position the Select tool on any object in the group, then click and drag. To resize a group, use the Select tool to drag one of the group's selection handles. Working with Overlapping Objects in the Layout EditorObjects can be placed on a canvas so that their bounding rectangles overlap. An object in front of another object may partially or completely obscure the object it overlaps. Oracle Forms manages the stacking order of items and boilerplate objects differently: When an item and a boilerplate object overlap, the item is placed in front of the boilerplate object, regardless of their creation order. When two boilerplate objects overlap, the object that was created most recently is placed in front of the other object. To reorder overlapping boilerplate objects:Select the object you want to reorder.Select the appropriate command from the Arrange menu:Bring to Front moves the selected object in front of all other boilerplate objects. Send to Back moves the selected object behind all other boilerplate objects.Move Forward moves the selected object forward one layer in relation to other boilerplate objects on the canvas. Move Backward moves the selected object back one layer in relation to other boilerplate objects on the canvas.

    Creating ItemsOnce you have created a base table or control block, you can create items in that block at any time. You can create items in the Object Navigator by inserting them under the desired block, or in the Layout Editor by drawing them on the desired canvas-view. Creating Items in Base Table Blocks: When you create an item in a base table block, Oracle Forms assumes the item is a base table item, and sets its Base Table property to True. Base table items are automatically included in any SELECT, UPDATE, and INSERT statements issued to the database.If the item you are creating is a control item in a base table block, you must explicitly set its Base Table property to False.Creating Items in Control Blocks: When you create an item in a control block, that item is always a control item, regardless of how the item's Base Table property is set. (Because a control block is not associated with a database table, none of the items in a control block can be base table items.)Creating an item in the Layout Editor Invoke the Layout Editor for the canvas-view on which you want to place the item. Set Layout Editor block context to specify the block in which you want to create the item. In the Layout Editor tool palette, click on the icon for the type of item you want to create. Click once to create an item having a default width and height. Or, click and drag until the item's bounding box is the desired size. Creating an Item in the Object NavigatorIn the Object Navigator, position the cursor on or within the Items node under the block in which you want to create the item. Choose Navigator->Create. A new item with a default name is inserted under the Items heading. In the Properties window, set the new item's Type property to specify the type of item you want. The default item type is text item. You can change the default by setting the Type property to the item type desired (check box, radio group, list item, and so on). Set the item's properties as desired. Adding Boilerplate Text and Graphics to a FormYou can use the boilerplate tools on the Layout Editor's tool palette to create boilerplate text and graphics objects in the Layout Editor.Unlike other form objects, boilerplate objects do not have properties that you can set in the Properties window.Boilerplate objects must be created and formatted in the Layout Editor, and are associated with the canvas-view on which you place them.Deleting a canvas-view deletes all of its boilerplate.

    The Properties WindowTo display the Properties window, select Tools->Properties. When you need to compare the properties of two objects, you can invoke additional Properties windows as needed. When you select an object in an editor or in the Object Navigator, the Properties window is updated to show the properties of that object.By default, the list of properties in the palette is synchronized whenever you select a different object. (You can turn synchronization On or Off for a specific palette by clicking the Synchronize button on its toolbar.) Invoking a Properties windowSelect Tools->PropertiesORDouble-click the object icon for any object except code objects and canvas-views. If a Properties window is already displayed, double-clicking raises it in front of other windows.To invoke a second Properties window, Shift+double-click the object icon.ORDouble-click an item in the Layout Editor.Features of Property windowThe Name field displays the name of the object currently selected in the Navigator or an editor. A text field is displayed when the current property can be set by entering a text value. For properties that require longer text values, there is an iconic button next to the text field that invokes a modal editor. A poplist is displayed for properties that are either True/False, or that have a fixed set of valid values. You can cycle through the values by double-clicking repeatedly. A More... button is displayed when the current property requires more complex values. Selecting the button invokes a dialog where you enter the required information. The property list: It is a 2-column list of property names and property values. When no objects are selected, no properties are displayed in the list. Properties are grouped under functional headings, such as Display properties and Navigation properties. You can select properties in the list by clicking and by navigating with the Up/Down arrow keys. You can set properties in the property list pane by selecting the property and then typing or double-clicking as required.

    The Layout EditorSelecting Objects in the Layout EditorMoving Objects in the Layout EditorResizing Objects in the Layout EditorTo Make Objects the Same SizeAligning Objects in the Layout EditorTo center an object on the canvas:Grouping Objects in the Layout EditorWorking with Overlapping Objects in the Layout EditorTo reorder overlapping boilerplate objects:Creating ItemsCreating an item in the Layout EditorCreating an Item in the Object NavigatorAdding Boilerplate Text and Graphics to a FormThe Properties WindowInvoking a Properties windowFeatures of Property window

    Review Questions :

    1. You open a single property sheet to display properties for your department data block and department canvas simultaneously. Which property palette display mode is likely to show more properties?(a) Intersection (b) Union

    2. Which data block property would you consider changing if your records include LONG items that are not likely to be edited?(a) Query Allowed(b) Updated Allowed(c) Updated Changed Columns Only

    3. What does freezing the property palette do?(a) Enables you to change a property in multiple objects at one time.(b) Forces the palette to continue displaying properties for the currently selected object(s), regardless of what object(s) you select from that point on.(c) Opens a second palette for comparing multiple objects properties(d) When multiple objects are selected, shows only those properties that all selected objects share in common4. What is the best way to ensure that an item cannot accept query criteria?(a) Set the items Query Allowed property to No.(b) Set the items Disable Query property to Yes(c) Set the items Queryable property to No(d) Set the items Query Length property to 05. Which text item data properties can restrict whether a user can insert new data?(a) Primary Key(b) Query Only(c) Query Allowed(d) Insert Allowed(e) Lock Allowed

    ObjectivesAfter you complete this lesson, you should be able to perform the following tasks :

    Define ButtonsDefine Check BoxesCreate a Check BoxDefine Display ItemsDefine List ItemsCreate a List ItemDefine Radio GroupsCreate a Radio Group with Radio ButtonsDefine Text ItemsFormatValues with Format Masks

    Defining ButtonsButtons are interface items that operators select to execute commands or initiate actions. Buttons can, for example, be used to initiate navigation, display LOVs, invoke an editor or window, commit data in a form, issue a query, or virtually any other operation that can be coded with PL/SQL.To create a button:Select the block where you want to insert the button, then select the Items node, and then choose Navigator->Create.You can also create buttons by drawing them on a canvas in the Layout Editor. In the Properties window, set the Item Type property to Button. Enter the desired text in the Label Property field.Functionality to buttons is added through writing Triggers (When-Button-Pressed Trigger) only.

    Defining Check Boxes A check box is a two-state control that indicates whether a certain condition or value is on or off, true or false.The display state of a check box is always either checked or unchecked. Check boxes store CHAR, NUMBER, or DATE values. The value of a check box can be set by a fetch from a corresponding database column, by operator input via item manipulation, or through default value or runtime assignment. Similarly, the value of a check box can be committed to the database through standard commit processing.When you define a check box, you specify what value you want the check box to represent as checked and what value you want it to represent as unchecked. To Create a Check BoxSelect the block where you want to insert the check box, then select the Items node, and then choose Navigator->Create.You can also create check boxes by drawing them on a canvas in the Layout Editor. In the Properties window, set the Item Type property to Check Box.

    Create a label for the button by entering the desired text in the Label property field.Specify the values you want the check box to display as "checked" and "unchecked" in the Checked Value and Unchecked Value property fields. For example, if you want the check box to be "checked," or On, whenever its stored value is XYZ, enter the string XYZ in the Checked Value property field.If you want a check box to display a NULL value as checked or unchecked, leave either the Checked Value or Unchecked Value property blank. Set the Check Box Other Values property to specify how you want the check box to handle other values. Choose Checked if you want the check box to be checked when its value is set to any value other than those entered in the Checked Value and Unchecked Value property fields. Choose Unchecked if you want the check box to be unchecked when its value is any value other than those entered in the Checked Value and Unchecked Value property fields. Choose Not Allowed if you want the check box to reject any value other than those entered in the Checked Value and Unchecked Value property fields as invalid. When an invalid Other Value is fetched or assigned to the check box, the record is silently rejected. You can enter a default value for a check box in the Default Value property field, which specifies the initial value of the item, and thus determines whether the check box is initially checked or unchecked.

    Defining Display Items Display items are similar to text items with the exception that display items only store and display fetched or assigned values. Display items are generally used as boilerplate or as conditional text.One advantage to using a display item is that it requires less memory than a text item.To create a display item:Select the block where you want to insert the display item, then select the Items node, and then choose Navigator->Create.You can also create display items by drawing them on a canvas in the Layout Editor. In the Properties window, set the Item Type property to Display Item.Values are assigned to Display Items through PL/SQL code only. Similarly, to fetch a value into a Display Item, you have to write PL/SQL code.

    Defining List Items A list item is a list of text elements that can be displayed as either a poplist, text list, or combo box. A list item displays a fixed number of elements. Each element in a list is a text string up to 30 characters long. At runtime, you can programmatically evaluate, add, or remove list elements.To Create a List Item Select the block where you want to insert the list item, then select the Items node, and then choose Navigator->Create.You can also create list items by drawing them on a canvas in the Layout Editor. In the Properties window, set the Item Type property to List Item. Specify the display style for the list by setting the List Style property to Poplist, Text List, or Combo Box. Poplist is the default. Double-click on the List Elements property to display the List Item Elements dialog, then enter the elements exactly as you want them to appear in the list item at runtime. Associate a value with each element in the list by entering the desired value in the List Item Value field, then choose OK. To assign a NULL value to an element, leave the List Item Value field blank. You must specify how you want a list item to handle a fetched or assigned value that is not one of the values associated with a specific element. To do so, set the list item's Other Values property: Leave the Other Values property blank to indicate that other values are not allowed for this item. Any queried record that contains a value that does not match one of the values associated with an element in the list is silently rejected. Any attempt to assign an other value is disallowed. Enter a value that evaluates to one of the values associated with a specific element, or to the name of one of the elements. You can enter a default value for a list item in the Default Value property field. The default value you enter here specifies the initial value of the list item and, thus, determines which element in a list is initially selected.

    A radio group is an interface control that displays a fixed number of options that are mutually exclusive. Each option is represented by an individual radio button. A radio group can include any number of radio buttons. Radio buttons can be sized, positioned, and formatted independently of each other. At runtime, only one radio button can be selected at any time. When you create a radio group, you associate a specific data value with each radio button in the group. When an operator selects a radio button, the value of the radio group changes to the value that you associated with the selected button.To Create a Radio Group with Radio ButtonsSelect the block where you want to insert the radio group, then select the Items node, and then choose Navigator->Create.You can also create radio groups by drawing them on a canvas in the Layout Editor. In the Properties window, set the Item Type property to Radio Group. Create the desired number of radio buttons.To create a radio button, expand the radio group item, then select the Radio Buttons node, and then choose Navigator->Create. In the Properties window, create a label for the radio button by entering the desired text in the Label property field. Enter a value for the currently selected radio button in the Value property field. When an operator selects the radio button, Oracle Forms sets the value of the radio group item to the value entered in the Value property field. Specify the display properties of the currently selected radio button. Specify how you want the radio group to handle a fetched or assigned value that is not one of the values associated with a specific radio button. To do so, set the Other Values property for the radio group: Leave the Other Values property blank to indicate that other values are not allowed for this item. Any queried record that contains a value that does not match one of the button values is silently rejected. Any attempt to assign another value is disallowed. Enter a value that evaluates to the name of one of the radio buttons or to the value associated with one of the radio buttons. You can enter a default value for a radio group in the Default Value property field.

    A text item is an interface control that displays operator-enterable text in a field in either single or multi-line display. To create a text item: Select the block where you want to insert the text item, then select the Items node, and then choose Navigator->Create. You can also create text items by drawing them on a canvas in the Layout Editor. In the Properties window, set the Item Type property to Text Item. Set the desired properties. Oracle Forms supports both single-line and multi-line text items. You can specify different text wrapping styles for multi-line text items. You can add scroll bars to your multi-line text items.Text Items: Formatting Values with Format MasksYou can format numbers and dates in single-line text items with format masks. When a format mask is assigned to a text item, any value entered by the operator or fetched or assigned to the item is displayed in the format specified by the mask. A format mask can be applied to text items with the following data types: NUMBER, DATEExamples:To Assign a Format Mask to a Text Item In Navigator, select the desired text item. In the Properties window, enter the characters of the format mask directly in the Format Mask property field. Make sure the item's data type is compatible with the format mask. Make sure the text item's Maximum Length property is set to allow the text item to store any additional characters that will be embedded by the format mask.

    Briefly answer the following :1. What item type would you use to allow users to select rows froma multicolumn list?------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    2. What is the main difference between a group of check boxes and a group of radio buttons?------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    3. What limitation does a check box place on values within a database column?------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    4. What check box property controls the text that displays on the form next to the check box?------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    5. What are the differences between the various types of lists available inform builder?------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    6. You create a data block and specify that one of its items is to be represented as a radio group. How many radio buttons will be generated?------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    7. What does the layout editor do when you add a radio button to a block that contains a radio group?------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    8. What is the difference between a text item and a display item?---------------------------------------------------------------------------------------------------------------

    9. What are the benefits of using a display item instead of a text item for read-only data?------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Review Questions :1. Which check box property controls the text that displays next to the check box?(a) Text(b) Name(c) Label(d) A check boxs text is fixed and cannot be changed2. You are working with an existing radio group in the layout editor and try to add a radio button to the group. The layout editor responds by:(a) offering to create a check box instead, since a radio button group already exists(b) Display a warning message, and then returning you to the layout editor(c) Presenting a dialog box giving you the chance to select a radio group for the new radio button, or create a new radio group for it3. Your employee form includes a salary text item. You want to ensure that standard users cannot input or change a salary value, but you want the value to look exactly like a regular field. What is the best way to do this?(a) Set the items insert allowed property to No, and its update allowed property