Skip Headers
Oracle® Application Express Application Builder User's Guide
Release 4.2 for Oracle Database 12c

E17961-10
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

7.1 About Creating a Database Application

By using the Create Application Wizard, you can create a complete application containing multiple pages including reports, interactive reports, forms, tabular forms, and master detail forms. The Create Application Wizard is designed to easily and quickly create basic Oracle Application Express applications. After you create an application using this wizard, you can modify pages and add additional pages using the Create Page Wizard. See "About Creating Pages in a Database Application".

You can use the Create Application Wizard to create blank pages, or pages based on SQL queries or existing database tables. Applications based on tables can consist of a simple report, a form and report, or a tabular form. To learn more, see and "Creating Forms". You can create SQL queries by manually typing SQL, or by using the graphical user interface of Query Builder.

At the workspace level, you have the option of setting defaults that are used for applications built in that workspace. Setting these defaults enables you to exit the wizard without paging through each step. When you exit the wizard, the application you create uses the values you specified as defaults.

See Also:

"Building Queries with Query Builder" in Oracle Application Express SQL Workshop Guide and "Leveraging Application Builder Defaults" in Oracle Application Express Administration Guide

Topics:

7.1.1 Creating a Database Application Based on a Table, Query, or Drill-down Query

You can create a database application based on a table, query, or drill-down query by selecting Database in the Create Application Wizard. A key decision point when running the Create Application Wizard is choosing a target user interface. Based on the user interface you select, the wizard is optimized to display the appropriate page types, attributes, and themes.

To create a database application based on a table, query, or drill-down query:

  1. On the Workspace home page, click the Application Builder icon.

  2. Click the Create button.

  3. For Method, select Database and click Next.

  4. For Name:

    1. Application - Enter a unique integer value to identify the application. Note that Application IDs between 3000 to 9000 are reserved for internal use by Oracle Application Express.

    2. Name - Enter a name to identify the application.

    3. Schema - Each application obtains its privileges by parsing all SQL as a specific database schema. Identify the database schema owner.

    4. Create Options:

      • Start from scratch - Enables you to manually add all pages.

      • Include Home page - Includes a blank page, which automatically acts as the parent of any new pages added. A list region is also created on the home page, providing navigation to the additional pages.

      • Use previously created application model - Reuses an existing application definition. Using an existing application definition enables you to run this wizard without reentering application property values.

        Note that you still have to define all other application attributes, or you can choose to copy some attributes by choosing to copy shared components from another application (See "About Application Models and User Interface Defaults").

    5. User Interface - Select a user interface for the application. For application primarily designed for desktop use, select Desktop.

    6. Click Next.

    Tip:

    To create an instant application consisting of just a login page and blank page, click Create Application.

    Next, add pages to your application.

  5. For Pages, select the type of page you want to add.

    1. Select the type of page you want to add.

      Table 7-1 lists available page types by target user interface (that is, Desktop and jQuery Mobile Smartphone).

      Table 7-1 Available Create Application Wizard Page Types

      Page Type Description Desktop jQuery Mobile Smartphone

      Blank

      Creates a page with no built-in functionality.

      Available

      Available

      List View

      Creates a page that contains the formatted result of a SQL query. You can choose a table to build the List view on, and select a column to be used for the List view display information.

      Not applicable

      Available

      Report

      Creates a page that contains the formatted result of a SQL query. You can choose to build a report based on a table you select, or based on a custom SQL SELECT statement or a PL/SQL function returning a SQL SELECT statement that you provide.

      Note: jQuery Mobile Smartphone only supports classic reports.

      Available

      Available

      List View and Form

      Builds a two page List view and form combination. On the first page, users select a row to update from the List View. On the second page, users can update the selected table or view.

      Not applicable

      Available

      Report and Form

      Builds a two page report and form combination. On the first page, users select a row to update. On the second page, users can add a record or update or delete an existing record.

      Available

      Available

      Form

      Creates a form to update a single row in a database table.

      Available

      Available

      Tabular Form

      Creates a form to perform update, insert, and delete operations on multiple rows in a database table.

      Available

      Not applicable

      Master Detail

      Builds a two page report and form combination. On the first page, users select a row to update. On the second page, users can update the selected table or view and its associated detail.

      Available

      Not applicable

      Chart

      Creates a page with a chart to represent the result of a SQL query.

      Available

      Available


      Action displays the currently selected page type. For each selection, the wizard prompts you for different types of information, such as selecting a table name or report implementation. To learn more, see item Help.

    2. Click Add Page.

      The page (or pages) appear at the top of the page. To delete a page, click the Delete icon.

    3. Repeat the previous steps until all pages have been added.

    4. Click Next.

      Tip:

      To exit this wizard early and use Application Builder Defaults, click the Create Application button. To configure Application Builder Defaults, see "Leveraging Application Builder Defaults" in Oracle Application Express Administration Guide.
  6. For Shared Components, indicate whether to copy shared components from another application. Select Yes or No. If you select Yes, select where to copy them from and which components to import.

    Shared components are common application elements that can be displayed or applied across multiple pages in an application. To save time or maintain consistency between applications, copy the shared components from an existing application. The types of shared components you can copy include: user interface themes, lists of values, navigation bar entries, authorization schemes and authentication schemes.

  7. For Attributes:

    1. Authentication Scheme - Determine how establish user identity before accessing an application. Options include:

      • Application Express - Uses the user account credentials created and maintained with the Application Express Service Administration application. These are the accounts you use to log in to the Application Express development environment. You can also create accounts in this user account repository for end users of your applications.

      • Database Account - Requires users logging into your application to enter a database schema name (or user name) and a password in order to authenticate. This account information is managed entirely within the Oracle database.

      • No Authentication - Also known as Database Account Credentials. This option enables users to access your application using the account credentials stored in the mod_plsql DAD definition. In most cases this results in users not having to login when accessing your application. This is the quickest way to create a ”public” application.

      To learn more, see "Establishing User Identity Through Authentication"

    2. Tabs - Select whether to include tabs in your application. You can create one level tabs, two level tabs, or no tabs at all. To learn more, see "Creating Tabs"

      This attribute identifies the language in which an application is developed. This language is the base language from which all translations are made.

    3. Language - Select the primary language for this application.

      This attribute identifies the language in which an application is developed. This language is the base language from which all translations are made.

    4. User Language Preference Derived From - Specifies how the engine determines the application language. The application primary language can be static (that is, derived from the web browser language) or determined from a user preference or item. The database language setting determines date display and sorting characteristics. To learn more, see item Help.

      You can alter the Language and User Language Preference Derived From attributes later on the Edit Globalization attributes page. See "Configuring Globalization Attributes".

    5. Date Format - Specifies the date format to be used in the application.

      Use this date format to alter the NLS_DATE_FORMAT database session setting before showing or submitting any page within the application. This value can be a literal string containing a valid Oracle date format mask or an item reference through substitution syntax. If no value is specified, the default date format is derived from the database session at runtime. If supplied, this is also used as the date format for any items resulting from columns of type DATE.

    6. Date Time Format - Specifies the date time format to be used in the application.

      This date time format can be referenced in an application using the substitution reference &APP_DATE_TIME_FORMAT., or in PL/SQL using the function v('APP_DATE_TIME_FORMAT'). This attribute does not alter any NLS settings. This value can be a literal string containing a valid Oracle date format mask or an item reference using substitution syntax. If this attribute value is not specified, then a reference to APP_DATE_TIME_FORMAT returns the NLS database session date format and the NLS time format.

    7. Timestamp Format - Specifies the timestamp format to be used in your application.

      Use this timestamp format to alter the NLS_TIMESTAMP_FORMAT database session setting before showing or submitting any page within the application. This value can be a literal string containing a valid Oracle timestamp format mask or an item reference through substitution syntax. If no value is specified, the default timestamp format is derived from the database session at runtime.

    8. Timestamp Time Zone Format - Specifies the timestamp with time zone format to be used in your application.

      Use this timestamp with time zone format to alter the NLS_TIMESTAMP_TZ_FORMAT database session setting before showing or submitting any page within the application. This value can be a literal string containing a valid Oracle timestamp with time zone format mask or an item reference through substitution syntax. If no value is specified, the default timestamp with time zone format is derived from the database session at runtime.

    9. Click Next.

  8. For User Interface Theme, select a theme and click Next.

    Themes are collections of templates used to define the layout and style of an entire application. See "Managing Themes".

  9. Confirm your selections and click Create Application.

7.1.2 Creating an Application from a Spreadsheet

You can create an application based on spreadsheet data by selecting From Spreadsheet in the Create Application Wizard.

To create an application from spreadsheet data:

  1. On the Workspace home page, click the Application Builder icon.

  2. Click the Create button.

  3. For Method, select From Spreadsheet.

    Description of create_app_spread.gif follows
    Description of the illustration create_app_spread.gif

  4. For Load Method, specify how spreadsheet data is imported. Select one of the following and click Next:

    1. Upload file, comma separated (*.csv) or tab delimited. Specify the following and click Next:

      • Text File - Click Choose File to locate the file to be uploaded.

      • Separator - Specify the column separator character. Use \t for tab separators.

      • Optionally Enclosed By - Enter a delimiter character. You can use this character to deliminate the starting and ending boundary of a data value. If you specify a delimiter character, the wizard ignores white space occurring before the starting and ending boundary of a data value. You can also use this option to enclose a data value with the specified delimiter character. If applicable, select First row contains column names.

      • File Character Set - Choose the character set in which the text file is encoded.

    2. Copy and paste. Copy and paste the tab delimited data you want to import.

  5. For Table Properties:

    1. Schema - Identify the database schema owner.

    2. Table - Enter a name for the table being created.

    3. Set Table Properties - Review the table properties. Modify the data types or enter format masks.Specify whether to include a column by selecting Yes or No from the Upload list.

    4. Click Next.

  6. For User Interface Defaults:

    1. Review the displayed Singular Name and Plural Name.

    2. (Optional) Under Column User Interface Defaults, review the displayed column labels.

    3. Click Next.

  7. For Application Options, specify the following:

    1. Application Name - Enter an alphanumeric name for this application.

    2. Create Mode - Options include:

      • Read Only does not include insert and update pages.

      • Read and Write includes insert and update pages.

    3. Report Implementation:

      • Classic creates a SQL report.

      • Interactive creates an interactive report.

    4. Click Next.

  8. For User Interface Theme, select a theme and click Next.

    Themes are collections of templates used to define the layout and style of an entire application. See "Managing Themes".

  9. Confirm your selections and click Create Application.

7.1.3 Copying a Database Application

You can create a copy of an existing application by running the Create Application Wizard or by selecting the application and then Copy this Application on the Application home page.

Topics:

7.1.3.1 Copying a Database Application Using the Create Application Wizard

To copy application by running the Create Application Wizard:

  1. On the Workspace home page, click the Application Builder icon.

  2. Click the Create button.

  3. Select Copy of an existing Application.

    Description of create_app_wiz_copy.gif follows
    Description of the illustration create_app_wiz_copy.gif

  4. For Method, click the As a copy of an existing application link.

  5. For Identify Copy Target:

    1. Copy From - Select the name of the application to copy.

    2. Copy To - Enter a short descriptive name for the application to distinguish the new application in select lists and reports.

    3. New Application ID - Enter a unique integer value to identify the application. Note that Application IDs between 3000 to 9000 are reserved for internal use.

    4. Copy Supporting Object Definitions - Specify whether to include supporting object definitions. Options include:

      • Yes - Include database object definitions, image definitions, and seed data SQL statements encapsulated in a single file.

      • No - Do not include supporting object definitions.

    5. Click Next.

  6. Click Create Application.

7.1.3.2 Copying an Application from the Application Home Page

To copy a database application from the Application home page:

  1. On the Workspace home page, click the Application Builder icon.

  2. Select an application.

    The Application home page appears.

  3. From the Tasks list, click Copy this Application.

  4. For Identify Copy Target:

    1. New Application ID - Enter a unique integer value to identify the application. Note that Application IDs between 3000 to 9000 are reserved for internal use.

    2. New Application Name - Enter a short descriptive name for the application to distinguish the new application in select lists and reports.

    3. Copy Supporting Object Definitions - Specify whether to include supporting object definitions. Options include:

      • Yes - Include database object definitions, image definitions, and seed data SQL statements encapsulated in a single file.

      • No - Do not include supporting object definitions.

    4. Click Next.

  5. Click Copy Application.

7.1.4 Creating a Database Application from a Template

Instance administrators manage the template application repository for an entire Oracle Application Express instance. Developers can create robust applications based on template applications stored in the template application repository.

Only an instance administrator can add or remove an application template from the repository. To create a template application, an instance administrator must first export the application and then add it to the template application repository.

See Also:

"Managing Template Applications" in Oracle Application Express Administration Guide

To create an application based on a template application:

  1. On the Workspace home page, click the Application Builder icon.

  2. Click the Create button.

  3. For Method, select From Application Template.

    Description of create_app_wiz_temp.gif follows
    Description of the illustration create_app_wiz_temp.gif

  4. For Select Application:

    1. Application Type - Select the type of template application on which to base your new application. Select either Database or Websheet.

    2. Template Application - Select the name of the template application on which to base your new application.

    3. Name - Enter a short descriptive name for the application, helping to distinguish the new application in select lists and reports.

    4. Application - Specify an integer value that identifies the application. The application ID must be unique within your Application Express instance.

      Application IDs in the range of 3000 to 9000 are reserved for internal use by Application Express.

    5. Schema - Your application obtains its privileges by parsing all SQL as a specific database schema. Identify the database schema owner. This option only displays if you select Database for Application Type.

    6. Click Next.

  5. Confirm your selections and click Create Application.

7.1.5 Installing Sample Applications

Oracle Application Express includes many sample applications. You can install, run, and use sample applications as is, or analyze them to better understand how to use Application Builder to build specific types of functionality.

To install sample applications:

  1. On the Workspace home page, click the Application Builder icon.

  2. Click the Create button.

  3. For Method, select Install Sample applications.

    Description of create_app_wiz_sample.gif follows
    Description of the illustration create_app_wiz_sample.gif

    The Packaged Applications page appears.

    Description of create_app_install_sampl.gif follows
    Description of the illustration create_app_install_sampl.gif

    Note that the application category (for example, Sample Application) displays beneath the application title. You can identify installed applications by the green Installed tag that displays beneath the product category.

    Description of packapp_installed.gif follows
    Description of the illustration packapp_installed.gif

  4. Locate the application to be installed.

  5. Click the application image.

    A summary page appears.

  6. Click Install Application.

  7. Select an Authentication scheme and click Next.

  8. Click Install Application again.

    A success message appears.

  9. To run the application, click the Run Application icon.

  10. Enter the appropriate login credentials:

    1. Username - Enter your workspace username.

    2. Password - Enter your workspace password.

    3. Click Login.

7.1.6 Deleting a Database Application

You can delete an application from within Application Builder, or while editing application attributes. If you delete an application you also delete all defined components (reports, charts, or forms), page controls (buttons, items, list of values), and shared components (breadcrumbs, lists, and tabs, but not user interface defaults).

Topics:

7.1.6.1 Deleting an Application from the Application Builder Home Page

To delete an application from Application Builder:

  1. On the Workspace home page, click the Application Builder icon.

  2. Select an application.

  3. When Application Builder appears, verify the application ID and name at the top of the page.

  4. On the Tasks list, click Delete this Application.

  5. When prompted, click Permanently Delete Now.

7.1.6.2 Deleting an Application from the Edit Application Definition Page

To delete an application from the Edit Application Definition page:

  1. On the Workspace home page, click the Application Builder icon.

  2. Select an application.

  3. Click the Edit Application Properties button to the right of the application name.

    The Edit Application Definition page appears.

  4. Verify the application ID and name.

  5. Click Delete at the top of the page.

  6. When prompted, click Permanently Delete Now.

7.1.7 About Application Models and User Interface Defaults

The Create Application Wizard is designed with the assumption that the developer may run it multiple times. To facilitate this iterative approach to application development, every time you run the wizard it saves the page definitions to an application model.

Consider the following example. You create an application by running the Create Application Wizard. After viewing the application, you realize it is not quite what you wanted. Instead of altering it, you can run the wizard again and select an application model. By selecting an existing application model when you rerun the wizard, you can quickly improve your application with minimal time and effort.

See Also:

"Managing Application Models" in Oracle Application Express Administration Guide

Another way to increase your productivity when creating an application is to specify user interface defaults. User interface defaults are metadata that enable you to assign default user interface properties to a table, column, or view within a specified schema.

See Also:

"Managing User Interface Defaults" in Oracle Application Express SQL Workshop Guide

7.1.7.1 Leveraging Application Models and User Interface Defaults

You can increase your productivity when creating applications by leveraging application models and user interface defaults. Consider the following scenario:

  1. Create an application based on tables or views by running the Create Application Wizard.

  2. Run the generated application. Note any functional deficiencies.

  3. Evaluate whether to create or edit user interface defaults.

    For example, you can use user interface defaults to control how form field or report labels display. You can also use user interface defaults to display specific columns or have columns display in an alternate order.

  4. Navigate to the Application Builder home page and create an application by clicking Create.

  5. For Method, select Database.

  6. For Name:

    1. Application - Enter a unique integer value to identify the application. Note that Application IDs between 3000 to 9000 are reserved for internal use by Oracle Application Express.

    2. Name - Enter a name to identify the application.

    3. Schema - Each application obtains its privileges by parsing all SQL as a specific database schema. Identify the database schema owner.

    4. For Create Options - Select Use previously created application model. This option reuses an existing application definition. Using an existing application definition enables you to run the wizard without reentering application property values.

      Note that you still have to define all other application attributes, or you can choose to copy some attributes by choosing to copy shared components from another application (See "About Application Models and User Interface Defaults").

    5. User Interface - Select user interface for the application.

    6. Click Next.

  7. Select a design model and developer.

    Note the pages you previously created already appear.

  8. Add pages, edit pages, or remove pages.

  9. Complete the wizard.

  10. Repeat steps 2 through 9 until the application meets your functional requirements.