Previous
Previous
 
Next
Next

Block to Page Region Mappings

When an Oracle Form is loaded into an Oracle Application Express project, the various blocks are analyzed to determine how they will be generated. The conversion process uses information such as block relations, the number of records displayed, and whether insert or update are allowed. There are inherent differences between Oracle Forms and Oracle Application Express that have a direct bearing on the resulting pages that are generated.

Except for specific master-detail relationships, each block is generated onto a separate Oracle Application Express page. Furthermore, the canvases specified in Oracle Forms are ignored as multiple blocks are not generated as separate regions on the same page within Oracle Application Express. The sections that follow explains different Oracle Forms block types and how they are mapped into an Oracle Application Express application.

Single Record Block

In Oracle Forms a single record block can be used for both querying data and updating the records returned. Within Oracle Application Express, standard updatable regions cannot also be used as query regions. When an Oracle Forms block is defined as being insertable, updatable, and has a primary key, then the generation mapping defines an interactive report with a form. The interactive report enables you to query the records and the generated Edit link provides navigation to an individual record for update or deletion. A Create Record button enables you to insert records.

If not all the conditions are satisfied then only an interactive report is generated for a single record block. Therefore, only an interactive report is generated and not the corresponding form if one of the following conditions exist:

The interactive report uses the original query, enhanced query, or custom query defined within the project for the block. However, the form is based only on the underlying table. Items characteristics such as radio groups, check boxes, date pickers, editors and list of values will be generated where possible.

Tabular Form

A tabular form defined in Oracle Forms is generated as a tabular form in Oracle Application Expresss providing the number of records displayed is greater than one. Implementing item characteristics, such as select lists, needs to be performed manually post-generation. Non-database items specified in Oracle Forms are not be generated into the tabular form generated by Oracle Application Express, even if they have been included. Implementing non-database items in a tabular form needs to be performed manually post-generation. For more information, see "How to Create a Tabular Form" in Oracle Application Express Advanced Tutorials.

Currently adding validations and non-database items on a tabular form is non-declarative and is covered in the Oracle Application Express Advanced Workshop course. An alternative is to manually create a report and form to replace the tabular form post-generation where it is much easier to add validations and add items without a source of database.

Master Detail Blocks

Within Oracle Forms, master detail forms are defined using block relations. There are several additional criteria that must be examined in order to determine what will be generated for an Oracle Forms master detail relationship. The master block is generated as one of the following:

The detail blocks are generated independently as either a single record block or a tabular form based on the mappings provided.

An interactive report and master-detail form is only be generated if all the following criteria are satisfied:

When a master detail form is generated, the detail page is also created within Oracle Application Express. You can manually remove the detail page when reviewing the pages to be generated prior to creating the Oracle Application Express application, or you can delete it manually post-generation.

Alternatively, if both the master and the single detail block are based on the same table and that table has a primary key, then two interactive reports and forms are generated for each block. It is recommended that you manually modify one of the resulting forms post-generation to combine the functionality into a single form and delete the second interactive report and form. However, if the table does not have a primary key or is based on a view then only reports are generated.

Oracle Application Express cannot include more than one tabular form on a page. Therefore, when a file with a master and multiple detail blocks is loaded, the relations are ignored and the master block and each detail block are treated independently as either a single record block or a tabular form based on each blocks properties.

If there is no valid foreign key relationship and the table has a primary key, then the master block is generated as an interactive report and form. Otherwise, it is generated as an interactive report.

Non-Database Block

If a block is not associated with a database table or view then the block is not included for generation. These blocks typically hold menus, navigation bars, and buttons. Given that such components are handled and defined very differently within Oracle Application Express it is not appropriate to generate separate pages for these. However, such blocks can be included if required and will be generated as blank pages.