Using Oracle Forms  Hot PDF Print E-mail
Tag it:
Delicious
Furl it!
Digg
NewsVine
Reddit
YahooMyWeb
Technorati
Articles Reviews Oracle
Written by Bogdan V   
Tuesday, 31 October 2006
Article Index
Using Oracle Forms  Hot
Single-Record and MultiRecord Blocks
Canvases



Blocks can be displayed on the canvas either as a single-record-per-screen (form layout), or with multiple records displayed (tabular format). Which layout you use depends on the kind of data displayed and the functionality of the forms. For example, maintaining a list of codes is more easily done when the data is displayed in multiple rows, spreadsheet-fashion. Working with customer data, on the other hand, may require showing more details, and a forms-type layout is more readable.

Master-Detail Relationships

Oracle Forms 10g easily manages the concept of parent-child relationships between blocks. A parent-child (or Master-Detail) relationship between tables in the database, such as a customer having many locations, or an order having many lines, is usually represented by foreign-key relationships between the tables. However, a master detail relationship does not require that this database relationship exist.

Within Oracle Forms 10g, the relationship between the master and detail blocks ensures that the detail block displays only those records that are associated with the current master record, and coordinates querying, data entry, and deletion between the blocks.

The detail block must be created after the master block is created (the easiest way to do this is to use the wizard, which will allow you to set up the relationship automatically). An important component of the relationship is how the blocks remain coordinated.

Forms can either automatically query the detail information every time the master record is viewed, or querying the detail blocks can be deferred until they are needed and then they’re either automatically queried on first use, or manually queried via code.

By far the most common master-detail relationship is one parent and one child. For example, an order header and order lines. One parent and many children is common for informational forms, such as customer information which has various subtables of information such as addresses, shipping and billing information, and contacts.

It is uncommon to have one child record belong to more than one parent record. This situation requires that you manipulate the auto-generated triggers for master-detail relationships.

Canvases, Windows, and Views

Canvases, windows, and views are the components of Forms that the user sees when the form is run; each is a different “layer” in the display of the form on screen (Figure 3-2). The canvas is the object on which the GUI is drawn, the “background” of the form. All the other visible objects in the form are drawn on the canvas. The window is the frame through which the canvas is seen. The View is the object that controls how much of the canvas can be seen at any given time.

 The View is the object that controls how much of the canvas can be seen at any given time.

Figure 3-2:  A graphical representation of windows, views, canvases, and items


The canvas can be any size (within reason), while the window controls the ultimate size of the interface. It controls how much of the canvas can be seen at any one time. If the canvas is larger than the window, then only what can fit into the window will be visible.

Windows


When a Forms application is displayed, it is enclosed in a master window, called the Multiple Document Interface (MDI) window. This is the outer “container” window for the application; other windows will open within the MDI.

There are two types of windows within Forms: a document window and a dialog window. The document window is the “standard” window of an application, while a dialog window is a “pop-up” window that is independent of the application and can be moved outside of the MDI window.

Dialog windows have an additional property that controls their behavior. The modal property determines if the dialog window has a synchronous or an asynchronous display. A modal window must be explicitly dismissed before the user can return to another window. A nonmodal window allows the user to switch back and forth between open windows. Error messaging and confirmation dialog windows are usually modal windows: processing stops until the user acknowledges the message.

An application may have a single window into which all canvases are displayed, or it may have multiple windows. Some forms display each canvas in the same window, while others display each canvas in its own window and have multiple popup displays of different sizes. There is no practical limit to the number of windows in a form. In practice, however, there are rarely more than five to ten.



Last Updated ( Monday, 14 January 2008 )
 
< Prev   Next >