Oracle application template form




















A master detail form reflects a one-to-many relationship between two tables in a database. Typically, a master detail form displays a master row and multiple detail rows within a single HTML form. With this form, users can insert, update, and delete values from two tables or views. When running a master detail form, data is rendered as a report using various form elements including text fields, text areas, date pickers, select lists, radio groups, and so on. On the Master Detail, the master record displays as a standard form and the detail records display in a tabular form at the bottom of the page.

Click Add Item to Order to add a new row. Wizard generated master detail forms also automatically create validations for some columns. This wizard uses general best practices to generate the application and does not include several advanced options included in the Create Page Wizard.

Master Table Name - Select the table or view to be used as your master table. This table is used to create a report page and a master form on the master detail page. Only tables and views that are associated to your selected Master Table using a foreign key are displayed.

Authentication Scheme - Determine how establish user identity before accessing an application. Application Express - Uses the user account credentials created and maintained with the Oracle Application Express Service Administration application.

The Create Page Wizard provides support for creating a master detail from two tables that do not have foreign key relationship defined in the database. Although Oracle recommends the use of foreign keys and properly defined relationships in the underlying database, developers do not always have the ability to modify their database model.

When created using a wizard, the master form on a master detail form page includes buttons that enable the user to move forward and backward within the master result set. While running the wizard, you choose which columns determine the navigation order. You also have the option to choose whether to create a two-page or three-page master detail form, with the detail records shown in a report with single-record editing on a separate page.

Show Only Related Tables - Specify whether to restrict the list of detail tables to only those tables related to the master table. The default selected owner for the table or view is the same owner as for your application.

If the owner of your application has select privileges on tables or views in other schemas, you may select another schema. Select columns for detail page - Select the columns to display in your detail page.

You may add columns later. Forms perform insert, update and delete operations on table rows in the database. Select Primary Key Column s - Use the source table's primary key column s. For Master Options, define the relationship between the Master and Detail tables. You may type in the column names fully qualified with table names , or choose them from the list.

Click Next. For Primary Key Source, select the method by which the primary key is populated and click Next. For Master Options, specify whether to include master row navigation and click Next. If you include master row navigation, define navigation order columns. If a navigation order column is not defined, the master update form navigates by the primary key column.

On Layout, specify how to build the master detail and click Next. Edit detail as tabular form on same page creates a two page master detail. Edit detail on separate page creates a three page master detail. Entry Name Master Report - Specify the name of the breadcrumb entry for the master report page.

Navigate to the appropriate Page Definition. See "Accessing the Page Definition". Start adding items to the page. Once you create a form, the next step is to process the data a user types by inserting into or updating the underlying database tables or views.

There are three ways to process a form:. This approach offers three advantages. First, you are not required to provide any SQL coding. Third, this process automatically performs lost update detection.

Lost update detection ensures data integrity in applications where data can be accessed concurrently. Tree view - Under the appropriate location, right-click and click Create Process. From the Point list, select the appropriate processing point. In most instances, select Onload - After Header. In this approach to form handling, you create one or more processes to handle insert, update, and delete actions.

Instead of having the Application Express engine handling everything transparently, you are in complete control. Assume also there are three buttons labeled Insert, Update, and Delete. The table has a trigger that automatically populates the ID column when there is no value supplied. For example:. To process the deletion of a row, you create a conditional process that executes when the user clicks the Delete button.

Oracle Application Express populates a form either on load or when the Application Express engine renders the page.

You can populate a form in the following ways:. You can also populate a form manually by referencing a hidden session state item. The process point for this process would be set to execute or fire on or before Onload - Before Regions. You can use validations to check data a user enters before processing. Once you create a validation and the associated error message, you can associate it with a specific item.

You can choose to have validation error messages display inline that is, on the page where the validation is performed or on a separate error page. Create a validation and specify error message text. To learn more, see "Creating Item and Page Validations". Error message display location identifies where a validation error message displays. Validation error messages can display on an error page or inline within the existing page. Inline error messages can display in a notification area defined as part of the page template or within the field label.

To create a hard error that stops processes, including any remaining validations, you must display the error on an error page. To create a form using a wizard: On the Workspace home page, click the Application Builder icon. Select an application.

Click Create Page. Select Form and click Next. Under Forms, select a type of form page as described in Table Form on a Table or View Creates a form that enables users to update a single row in a database table. Form on a Table with Report Creates two pages. Summary Page Creates a read-only version of a form. Form on Web Service Creates a page with items based on a Web service definition. Note: Oracle does not recommend modifications of the select list of a SQL statement of a tabular form after it has been generated using a wizard.

If you do modify the query, make sure the values of the updatable columns are not altered after being queried from the database by the Application Express engine. Tip: You can control the appearance of a specific column by editing column attributes. Tip: When creating a tabular form, Oracle recommends using a generic column template and avoiding column report templates.

See "Report Templates". Select the application. Select a page containing the tabular form. The Page Definition appears. Click Synchronize. Click the Create button. Inline error messages can be displayed next to a field, inline in the notification area, or both. Use this string as a substitute in a JavaScript call to be executed when a page is loaded by the Web browser.

The JavaScript to be called can vary for each page. Identifies the display of parent tabs. Parent tabs require standard tabs. If your application only has one level of tabs, you do not need this substitution string. Identifies the exact placement of regions within a page. Defines where in the page success and error messages appear. If the page process runs without raising errors, then this text displays. You can customize the display of the success message for each template by adding HTML to be displayed before and after the success message.

This section describes specific sections of the Edit Page Template page. Each template consists of a header, a body, a footer, and subtemplates. Use substitution strings to include dynamic content. All template substitution strings must be in uppercase letters and begin and end with a number sign. See item Help for information about supported substitution strings.

Header is the first section of the page template. Body is the second section in the page template and is rendered after the header section but before the footer section.

Footer is the third section in the page template that displays after the body. Breadcrumb Display Point applies to generated components that use breadcrumbs. It defines where the breadcrumbs are placed on the page. Sidebar Display Point applies to generated components that use Sidebars. It defines where sidebars are placed on the page. Success Message. You can define a success message either programmatically or as an attribute of a process. Navigation Bar. Controls the display of navigation bar entries.

Navigation Bar Entry. Use the following substitution strings to create the navigation bar entry subtemplate. You must populate this attribute if your application includes standard tabs. This subtemplate defines how these tabs display by defining the specific cell. Available attributes include:. Current Tab. Enter HTML or text to be substituted for the currently selected standard tab. Whether a tab is current is determined by standard tab attributes. Non Current Standard Tab.

Enter HTML or text that will be substituted for the unselected standard tabs. You must populate this attribute if your application includes two levels of tabs. Enter HTML or text that will be substituted for the selected parent tabs. Parent tabs only display with standard tabs. Current Parent Tab. Whether a tab is current is determined by the page that displays and the standard tab set that the page uses.

Non Current Parent Tab. Enter HTML or text that will be substituted for the unselected parent tabs. Current Image Tab. Enter HTML to be used to indicate that an image-based tab is currently selected. Non Current Image Tab. Enter the HTML to be used to indicate that an image tab is not currently selected. Use this attribute only when a page template will be designated as an error template. A template can be designated as an error template by editing the application attributes.

You can only specify one popup LOV template for each theme. You can access the sections of the page either by scrolling down the page or by clicking a navigation button at the top of the page. By default, the Application Express engine uses a list.

Use these attributes to specify how a Search field displays. Table describes available Search Field attributes. Table Search Field Attributes.

Use these attributes to define the button name and attributes for the Find, Close, Next, and Previous buttons. Popup lists of values are executed using JavaScript.

For information about default values, see item Help. Region templates control the appearance and placement of region attributes. Region templates frequently use HTML tables to arrange content. Region templates apply style elements to regions. Region templates display substitution strings. The only required substitution string, BODY , identifies where the source of the region should be placed. All other substitution strings are optional.

You can use these substitution strings to indicate the existence and placement of a page control, such as a button, within the region. This section describes specific sections of the Edit Region Template page. Region templates provide the appearance for a portion of a page called a region. Use substitution strings to indicate the existence and placement of a component within the region.

BODY is the only required substitution string. It identifies where the source of the region should be placed. The following are valid substitution strings:. When you create a button in a region position, the positions you define will appear in a select list. Use the following substitution strings to define positions for the placement of buttons in a region:. Page items display within regions.

Report column templates provide you with control over the results of a row from a SQL query. This type of template defines a cell, not an entire row. Each report template identifies column names using the syntax 1 , 2 , 3 , and so on. You can reference any item from your application within your template. For example, to reference an item called ABC.

The actual value of ABC. A generic column template determines the appearance of a report by defining the look of the column once. This look is then repeated as many times as is necessary, based on the number of columns specified in the report's definition. This type of template is limited to reports that have a standard row and column structure.

Additional style can be applied to a report using this type of template through the use of conditions. This example assumes your page template includes a CSS containing the class tabledata. If you actually ran this report, these substitution strings would be replaced with values generated by the results of a SQL query. If your query uses an expression in the select list, it is a good idea to create an alias for the columns to avoid run time errors. For example, suppose your query was as follows:.

Named column templates allow for more flexibility in report design. However, because they reference columns by name, they can only be used by reports that are based on those columns. Although named column templates offer flexibility, you may need to create a new template for each query.

You can also include a position notation. The following example demonstrates how to use following HTML and substitution strings:. Template Type indicates the type of template. Named Column templates reference column names in the template.

Use the Translatable check box to indicate the template contains text strings that require translation. Opening an HTML table is a common use of this attribute as shown in the following example:. You can identify column headers using the syntax 1 , 2 , 3. Use Column Heading Template to add color to each column header cell.

Note that the text of this attribute must indicate where the cell heading text will be colorized. If you do use this attribute, Application Express engine applies the default column heading template.

In Before Each Row, enter text to display before all columns in the report. Use this attribute to open a new HTML row. Before Each Row supports the following substitution strings:.

Column templates define the look of each column. You can define up to four column templates; each can be conditional. In each Column Template, you define the look of each column. Column Templates support the substitution strings described in Table Table Column Template Substitution Strings. By creating conditions, you can create a report that displays columns differently depending on whether the specified condition is met.

To specify a column template be used conditionally, select a condition type from the Column Template Condition list. Valid values include:. Conditionally formats columns based on data in that row. For example, the following expression displays a value in bold if the value is greater than This attribute is often used to close an HTML table row.

Use After Rows to specify text that should display after the last row. A common use of this attribute is to close the HTML table tag. Use Background color for checked row to control the background color of a report row when the row selector is checked.

Use Background color for current row to control the background color of a report row when the user moves the mouse over the row. Table describes these templates. Table Pagination Subtemplate Attributes. You can use the substitution string TEXT to specify where you want the pagination subtemplate to display. Row templates define the look of each column.

You can define up to four row templates, each of which can be conditional. In each Row Template, you define the look of each row. Row Templates support the substitution strings described in Table Table Row Template Substitution Strings.

By creating conditions, you can create a report that displays rows differently depending on whether the specified condition is met. To specify a row template be used conditionally, select a condition type from the Column Template Condition list.

Use this template to add color to each column header cell. The text of this attribute must include help to indicate where the cell heading text should be colorized. If you do not enter a Column Heading Template, then a default column header template is applied. If you do not want any column headings, then enter OMIT.

Opening an HTML table is a common use of this attribute, as shown in the following example:. You upload cascading style sheets to your workspace using the Cascading Style Sheet Repository.

Uploaded cascading style sheets CSS are available to any application created in your workspace. The cascading style sheets are written to the file system, so you can reference them in your HTML source code. From the View list, select Details. Available options include:. Icons the default displays each CSS as a large icon. To edit a CSS, click the appropriate icon. Details displays each CSS as a line in a report.

To edit a CSS, click the appropriate name. You can reference an uploaded cascading style sheet within the Header section of the page template. Managing Themes Themes are collections of templates that can be used to define the layout and style of an entire application. You can add themes to the theme repository as follows: Workspace administrators can create Workspace themes.

Accessing the Themes Page You manage themes on the Themes page. Select an application. Click Shared Components. Under User Interface, select Themes. The Themes page appears. A check mark in the Current column indicates which theme is selected.

Click the theme name. Select a page. Under Shared Components, locate the Theme section. Click a theme name. Changing the Default Templates in a Theme A standard theme contains templates for every type of application component and region type. To review or change the default templates in a theme: Navigate to the Themes page: On the Workspace home page, click the Application Builder icon.

To edit a theme: From the View list, select Details and click Go. To change the theme name, enter a name in the Name field. To change a default template, make a selection from the appropriate list. See Also: "Display Attributes" for information about overriding the page template on the Page Attributes page Error Page Specifies a page template to use for errors that display on a separate page as opposed to those that display inline.

Printer Friendly Page Identifies the template to be used when the Application Express engine is in printer friendly mode. See Also: "Optimizing a Page for Printing" Breadcrumb Identifies the default breadcrumb template used when you create a breadcrumb. Button Identifies the default button template used when you create a button.

Calendar Specifies the default calendar template used when you create a calendar. Label Identifies the default label template used when you create a label. List Specifies the default list template used when you create a list. Region Specifies the default region template used when you create a region. Report Identifies the default region template used when you create a report. Table Region Defaults Attribute Description Breadcrumbs Default region template used when you create a breadcrumb.

Charts Default chart template used when you create a chart. Forms Default form template used when you create a form.

Lists Default region template used when you create a list. Reports Default region template used when you create a report. Tabular Forms Default region template used when you create a tabular form.

Wizards Default region template used when you create a wizard component. Creating a Theme You can create a theme from scratch or select an existing theme from the repository. Click Create. To learn more about a specific field, click the field label. About the Themes Page Once you create a theme, it appears on the Themes page. A navigation bar appears at the top of the page and contains the following controls: Theme. Controls how the page displays.

Options include: Icons the default displays each theme as a large icon. In Details view, you can select the following options from the Show list: Summary View displays the theme number, name, and current status. Editing a Theme You can create a theme from scratch or select an existing theme from the repository.

On the Tasks list, click Edit Theme. Make the appropriate edits and click Apply Changes. See Also: "Customizing Templates". Switching the Active Theme When you switch to a theme, all components with assigned templates are assigned to a corresponding template in the theme. Note: You can only switch to a theme if that theme exists.

For example, before you can switch to a theme available in the repository, you must first create it. See "Creating a Theme". See Also: "Creating a Theme". Copying a Theme Each theme is identified by a numeric identification number ID.

On the Tasks list, click Copy Theme. Click Next. Click Copy Theme ID. Deleting a Theme You can only delete inactive themes. On the Tasks list, click Delete Theme. From Remove Theme, select the theme you want to delete and click Next. Click Delete Theme. Managing Workspace Themes Workspace administrators manage the theme repository for a workspace.

Select Create and click Next. Click Create Workspace Theme. On the Tasks list, click Workspace Themes. Select the theme to be deleted. Click Delete. Modifying a Workspace Theme You cannot edit a workspace theme directly.

To modify a workspace theme: Create an application using the theme you want to modify. Modify the theme. See "Editing a Theme". Delete the existing workspace theme. See "Deleting a Workspace Theme". About Exporting a Workspace Theme You export a theme in the same way you export any related application files.

First, you are not required to provide any SQL coding. Third, this process automatically performs lost update detection. Lost update detection ensures data integrity in applications where data can be accessed concurrently. From the Point list, select the appropriate processing point. In most instances, select Onload - After Header.

In this approach to form handling, you create one or more processes to handle insert, update, and delete actions. Instead of having the Application Express engine handling everything transparently, you are in complete control. Assume also there are three buttons labeled Insert, Update, and Delete. The table has a trigger that automatically populates the ID column when there is no value supplied. For example:. To process the deletion of a row, you create a conditional process that executes when the user clicks the Delete button.

Oracle Application Express populates a form either on load or when the Application Express engine renders the page. You can populate a form in the following ways:.

You can also populate a form manually by referencing a hidden session state item. The process point for this process would be set to execute or fire on or before Onload - Before Regions. You can use validations to check data a user enters before processing. Once you create a validation and the associated error message, you can associate it with a specific item.

You can choose to have validation error messages display inline that is, on the page where the validation is performed or on a separate error page. When the Create Validations Wizard appears, follow the on-screen instructions. These validations start with the term Item and provide common checks you may want to perform on the item with which the validation is associated.

Use this type of validation to perform custom validations that require verifying values of more than one item or accessing additional database tables. Error message display location identifies where a validation error message displays. Validation error messages can display on an error page or inline within the existing page. Inline error messages can display in a notification area defined as part of the page template or within the field label.

To create a hard error that stops processes, including any remaining validations, you must display the error on an error page. To create a form using a wizard: On the Workspace home page, click the Application Builder icon.

Select an application. Click Create Page. Select Form and click Next. Under Forms, select a type of form page as described in Table Form on a Table or View Creates a form that enables users to update a single row in a database table. Form on a Table with Report Creates two pages.

Summary Page Creates a read-only version of a form. Form on Web Service Creates a page with items based on a Web service definition. Creating a Tabular Form A tabular form enables users to update multiple rows in a table. To create a tabular form: On the Workspace home page, click the Application Builder icon.

Select Tabular Form and click Next. The Tabular Form Wizard appears. Click Next. For Displayed Columns: Select the columns updatable and nonupdatable to include in the form. Note that you can modify the column order or your SQL query after you create the page. Valid options include: Existing trigger - Select this option if a trigger is defined for the table.

On Page and Region Attributes: Specify page and region information. Select a region template. Select a report template. On Tab, specify a tab implementation for this page and click Next. Click Finish. Note: Any modification of the select list of a SQL statement of a tabular form after it has been generated is not recommended.

If you do modify the query, make sure the values of the updateable columns are not altered after being queried from the database by the Application Express engine. Creating a Master Detail Form A master detail form reflects a one-to-many relationship between two tables in a database. To create a master detail form: On the Workspace home page, click the Application Builder icon. Select Master Detail Form and click Next. The Master Detail Wizard appears. On Master Table: Select the table or view owner.

Select a table or view name.



0コメント

  • 1000 / 1000