Вы находитесь на странице: 1из 34

<Insert Picture Here>

<Insert Picture Here>

APEX 4.0 New Features Enhanced Tabular Forms


Marc Sewtz | Software Development Manager | Oracle Application Express Oracle USA Inc. 520 Madison Avenue, New York, NY 10022 marc.sewtz@oracle.com

The following is intended to outline Oracles general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracles products remain at the sole discretion of Oracle.

Agenda

Oracle APEX 4.0 - Overview

Tabular Forms and Master-Detail Forms


Tabular Form Enhancements in Oracle APEX 4.0

Oracle APEX 4.0 Overview

Oracle Application Express Overview


Unique Rapid Application Development (RAD) tool for the Oracle Database Browser based for Development, Deployment and Use Allows to declaratively build professional Web 2.0 applications that are fast and secure Leverages full Oracle database capabilities and existing SQL & PL/SQL skills Standard component of the database Fully supported, no-cost option with all editions of the Oracle Database Easy to develop Easy to deploy Easy to manage

Oracle APEX Typical Use Cases

Data-driven Applications
Develop opportunistic and departmental productivity applications

Oracle Forms Modernization


Leverage SQL & PL/SQL declarative programming skills to move Forms applications to HTML / Web 2.0

Online Reporting
Build SQL-based reporting applications on existing database schemas

Spreadsheet Web-ification
Convert spreadsheets to Web applications where they can be concurrently viewed and edited

Access Replacement
Consolidate outgrown Access applications to the Oracle database with an APEX Web front end

Tabular Forms and Master-Detail Forms

Oracle APEX 4.0 Tabular Forms


Create, Update, Delete Operations on multiple records Built-In automatic DML processes

Customization using public PL/SQL APIs

Oracle APEX 4.0 Tabular Forms


Wizard-generated Tabular Forms
Based on Table or View Tabular Form region source is a SQL query Multi-Row Update process references schema, table and primary key column(s) New rows identified by having primary key values be NULL Delete Rows process deletes checked rows based on row number and corresponding primary key value(s) Add Rows: In APEX 4.0, the add row functionality is implemented on the client via JavaScript, i.e. add-row process and additional MRU process, which was called when adding rows on the server, are no longer needed

Oracle APEX 4.0 Tabular Forms


Generated tabular form defaults:
Sorting & AJAX pagination enabled by default Row Selector for multi-row delete, using Delete button Submit button to submit form to database Add Row button for adding one or more additional rows

Oracle APEX 4.0 Tabular Forms


Column Display-Types
Display as Text (Standard Report Column) Display as Text (based on LOV) Display as Text (saves state / escape special characters) Text Field Text Area

Date Picker *) & Date Picker Classic


Select List Radio Group *) Popup LOV and Popup Key LOV *)

Simple Checkbox *)
Hidden
*)

new display types introduces in APEX 4.0

Oracle APEX 4.0 Tabular Forms


Optimistic Locking
Preventing lost updates, i.e. updating data modified by other users Checksum on column data computed when rendering tabular form Checksums stored in tabular forms page using hidden items Checksums compared with current data in database on submit Any mismatches cause update to be rejected

Oracle APEX 4.0 Tabular Forms


Creating Tabular Forms with the Create Application Wizard
Create Application Wizard includes Tabular Form and Master-Detail Form Page Types Simplified interface requiring certain criteria to be met: Tables must of primary keys defined Primary keys populated through triggers For master-detail, foreign key constrains required Customization options for column headings, display types, etc in popup page edit window Fully customizable after application is created

Oracle APEX 4.0 Tabular Forms


Creating Tabular Forms with the Create Page Wizard
Build tabular forms on tables and views, additional options: Choose allowed operations Selecting display-only and updateable columns Selecting primary key column and source

Oracle APEX 4.0 Tabular Forms


Master-Detail Forms with the Create Page Wizard
Build Master-Detail forms on related and unrelated tables Choose display-only and updateable columns Choose primary-key column(s) and primary key source Foreign-Key relationship derived from constrains - if defined For new rows, detail rows foreign key column populated with master rows primary key value(s) Choice of two- and three-page master-detail forms Two-Page: Detail Rows shown in Tabular Form Three-Page: Detail Rows shown as report with links to single-record forms

Oracle APEX 4.0 Tabular Forms


Master-Detail Forms

D E M O N S T R A T I O N

Tabular Forms

Customizing Tabular Forms

Oracle APEX 4.0 Customizing Tabular Forms


Report Column Attributes

Oracle APEX 4.0 Customizing Tabular Forms


Report Column Attributes
Changing Display-Types Using Date and Number Format Masks Excluding Columns vs. Hidden Columns List of Values Using Defaults

Oracle APEX 4.0 Customizing Tabular Forms


Custom Tabular Forms
APEX_ITEM PL/SQL API Use in SQL source query to render columns as form items Provides control over use of tabular form item arrays APEX_ITEM vs. Built-In Display Types Using Built-In Display types provides better performance with long result sets, because calls to underlying APEX_ITEM API limited to rows shown on current age Modifying the tabular form source query Source query customizable, but caution should be taken Joins possible, but only one table updateable

Manual Tabular Form validations and processes can be implemented using apex_application.f_xx arrays

D E M O N S T R A T I O N

Tabular Form Customizations

<Insert Picture Here>

Tabular Forms - New Features

Oracle APEX 4.0 Tabular Forms New Features


Declarative Validations
Tabular Form / Column Validations can be created using the same declarative wizards used for standard page items Standard validation types available, including Not-Null, Is-Date, Column value equal to Expression, etc Customizable error message with #COLUMN_HEADER# substitution

Validations executed on submit


Failed column values highlighted and error messages shown on top of page along with link to field Data entered by user prior to submit is recovered, i.e. no changes are lost

Oracle APEX 4.0 Tabular Forms New Features


Radio-Groups
New LOV based item type Works similar to select lists Allows selecting one value per column for each record Implementation using array of hidden items, radio groups disabled on submit and hidden values submitted to server

Oracle APEX 4.0 Tabular Forms New Features


Popup-Key LOV
New LOV based item type Similar to existing popup-key LOVs, however display values shown in report instead of return values Return values stored and submitted using array of hidden fields

Oracle APEX 4.0 Tabular Forms New Features


Simple Checkbox
Easy to use checkbox display type Based on one- or two-value LOV When using LOV with one value, this value is submitted when checkbox is checked, otherwise NULL When using LOV with two values, the first value is submitted when checkbox is checked, otherwise second value Full array of values submitted to server, i.e. apex_application.g_fxx array contains elements for each row, nor just those checked Implementation using array of hidden items, checkboxes disabled on submit and hidden values submitted to server

Oracle APEX 4.0 Tabular Forms New Features


Other new tabular form features
LOV based sorting Columns using LOV based display types now sorted by display value, rather than return value FMAP array Additional array of hidden fields included on tabular form pages, used to map arrays to underlying table columns

Highlighting of unsaved changes Paginating to subsequent or previous rows in a tabular form does not save any changes, however the user is now prompted whether or not to discard any unsaved changes and updated fields are highlighted Tabular form JavaScript code moved into APEX JavaScript libraries, no longer rendered on page

D E M O N S T R A T I O N

Tabular Forms New Features

Information:

http://otn.oracle.com/apex Hosted Development:


http://apex.oracle.com

2008 Oracle Corporation Proprietary

Вам также может понравиться