6.2 Creating a Database Application

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 displays the appropriate page types, attributes, and themes.

Topics:

6.2.1 Creating a Database Application Based on a Table, Query, or Drill-Down Query

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

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

  2. Click the Create button.

  3. Select the application type, select Desktop and click Next.

  4. For Name:

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

    2. Name - Enter the name used to identify the application to developers.

    3. Application - Specify an integer value that identifies the application. The application ID must be unique within your Application Express instance. Application IDs between 3000 to 9000 are reserved for internal use by Oracle Application Express.

    4. Theme - Select a theme. Themes are collections of templates used to define the layout and style of an entire application.

      To view available themes, click Select Theme. Standard themes display. To view additional themes, make a selection from the Show list. When you select a theme the application automatically subscribes to it.

    5. Theme Style - Select a theme style. Theme styles are only available for newer applications such as theme 42 and 51.

    6. Click Next.

    Tip:

    To create an instant application that includes just a login page and blank page, click the Create Application button.

    Next, add pages to your application.

  5. For Pages, click Add Page.

    1. Select Page Type - Select the type of page you want to add. See "Available Page Types When Running the Create Application Wizard."

      Based on the Page Type, the wizard prompts you for different information, such as selecting a table name or report implementation. To learn more, see field-level Help.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 field-level Help.

    2. Click Add Page.

      The page (or pages) appear at the top of the page. To delete a page, click the Delete icon (the X in the far right column).

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

      Tip:

      To exit the wizard early and use App Builder Defaults, click the Create Application button.

    4. Click Next

  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. If copying the theme from another application, you are to subscribe the theme.

  7. For Attributes:

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

      • Application Express Accounts - Utilizes the user account credentials created and maintained with the Application Express Administration Services 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.

      • No Authentication - Also known as database authentication. This option enables users to access your application using the account credentials stored in the mod_plsql DAD definition. This authentication scheme requires that a database user (schema) exists in the local database. In most cases this results in users not having to login when accessing your application and is quickest way to create a "public" application.

      • Database Account - Requires users log in to an application by entering a database schema name (or username) and password. This account information is managed entirely within the Oracle database.

    2. 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.

      User Language Preference Derived From - Specifies how Application Express derives the translated application language. The application primary language can be static, derived from the Web browser language, or determined from a user preference or item. To learn more, see field-level Help.

      Tip:

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

    3. 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.

    4. 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.

    5. 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.

    6. 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.

    7. Click Next.

  8. Confirm your selections and click Create Application.

6.2.2 Creating a Desktop Database Application from a Spreadsheet

You can create a desktop 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 App Builder icon.
  2. Click the Create button.
  3. Select From a spreadsheet.
  4. For Load Method, specify how spreadsheet data is imported:
    • 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.

      • First row contains column names - Select this option if your data contains column names in the first row.

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

    • 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 Application Options:
    1. Application Name - Enter an alphanumeric name for this application.

    2. Report Type - Select one of the following

      • Interactive Grid - Creates an interactive grid.

      • Interactive Report - Creates an interactive report.

      • Classic - Creates a SQL report.

    3. For Page Type - Select the type of page to generate. The options that display depend upon the selected Report Type.

      Tip:

      If the Report Type is Interactive Grid, you can create either a non-editable interactive grid (report) page and a standard form page, or an interactive grid on a single page. All other report types create a report page and a form page.

  7. Click Create Application.

    See Also:

    "Using Themes" and "Using Theme Styles."

6.2.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:

6.2.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 App Builder icon.

  2. Click the Create button.

  3. Select Copy an existing application and click Next.

  4. 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. 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.

  5. Click Create Application.

6.2.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 App Builder icon.

  2. Select an application to copy.

    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. 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.