Managing Regions
Developers create regions to function as containers for content.
Parent topic: Controlling Page Layout
About Regions
Each page in an Oracle Application Express application contains one or more regions. A region is a area on a page that serves as a container for content. Each page can have any number of regions. You control the appearance of a region through a specific region template. The region template controls the look of the region, the size, determines whether there is a border or a background color, and what type of fonts display. A region template also determines the standard placement for any buttons placed in region positions.
You can use regions to group page controls (such as items or buttons). You can create simple regions that do not generate additional HTML, or create elaborate regions that frame content within HTML tables or images.
Regions display in sequence in the page template body or can be placed explicitly into region positions. The page structure can be defined using HTML tables or more commonly today using DIV
tags.
See Also:
Parent topic: Managing Regions
Creating a Region
Tip:
You can also create a form or breadcrumb region from the Page Designer toolbar. On the Page Designer toolbar, click the Create menu and then selecting Form Region or Breadcrumb Region.
To create a region in Page Designer:
See Also:
Parent topic: Managing Regions
Editing Regions
A region is an area of a page that serves as a container for content. You can alter the appearance of a page by editing region attributes.
- Editing Region Attributes
- Controlling Region Positioning
- Specifying a Region Header and Footer
- Enabling Users to Customize a Page
- Utilizing Region Caching in Page Designer
- Specifying a Static Region ID
- Adding a Region Image
- Creating a Region Display Selector
Parent topic: Managing Regions
Controlling Region Positioning
When you create a region, you can specify its position in the Property Editor by editing the Layout, Position attribute. The template positions defined within the current theme for the page's user interface determine the available selections.
Parent topic: Editing Regions
Specifying a Region Header and Footer
In addition to the body content of a region, you can specify additional HTML to be placed above and below a region by editing the Header and Footer attributes in the Property Editor.
For all report regions, the substitution string #TIMING#
shows the elapsed time in seconds used when rendering a region. You can use this substitution string for debugging purposes.
For classic report regions, the region footer supports the following substitution strings:
-
#ROWS_FETCHED#
shows the number of rows fetched by the Oracle Application Express reporting engine (the page size). You can use these substitution strings to display customized messages to the user. For example:Fetched #ROWS_FETCHED# rows in #TIMING# seconds.
-
#TOTAL_ROWS#
displays the total number of rows that satisfy a SQL query used for a report. -
#FIRST_ROW_FETCHED#
and#LAST_ROW_FETCHED#
display the range of rows displayed. For example:Row(s) #FIRST_ROW_FETCHED# through #LAST_ROW_FETCHED# of #ROWS_FETCHED# displayed
Parent topic: Editing Regions
Enabling Users to Customize a Page
You can use the Customization attribute to control whether display attributes in a region can be customized by users. To use this feature, you must include the #CUSTOMIZE#
substitution string in the Header, Body, or Footer section of the page template.
If at least one region supports end-user customization, a Customize link appears wherever you include the #CUSTOMIZE#
substitution string in the page template. When users click this link, a window appears, enabling them to display or hide regions on the page.
To enable end user customization:
See Also:
Parent topic: Editing Regions
Utilizing Region Caching in Page Designer
Enabling region caching is an effective way to improve the performance of static regions such as regions containing lists that do not use conditions or regions containing static HTML.
Tip:
Region caching is not available for interactive report regions.
See Also:
"Managing Page and Region Caching" in Oracle Application Express Administration Guide
Parent topic: Editing Regions
About Region Caching
Enabling region caching is an effective way to improve the performance of static regions such as regions containing lists that do not use conditions or regions containing static HTML.
When you enable region caching, the Application Express engine renders a region from a cached (or stored) repository instead of rendering it dynamically. Keep in mind that the actual session identifiers are not cached. Instead, the Application Express engine caches a &SESSION.
substitution string and the current session rendering the cached region is substituted on display. For example, if a region contains a link and the link includes a session, the exact session is not cached to ensure that the links works for all sessions.
The Application Express engine only renders a region from cache if it meets the defined condition. Additionally, regions can be cached specific to a user or cached independent of a user.
Parent topic: Utilizing Region Caching in Page Designer
Enabling Region Caching in Page Designer
To enable region caching:
Parent topic: Utilizing Region Caching in Page Designer
Specifying a Static Region ID
Specifying a static region ID is useful when creating custom JavaScript or cascading style sheets. You can use the Static ID attribute on the Edit Region page to uniquely identify a region. You can then reference the region using the #REGION_STATIC_ID#
substitution string in a region templates, the header, the footer, or the body.
A static region ID is included by assigning it as an HTML element ID to the region container object (that is, the table or DIV). The ID of an HTML element must be unique for the entire page. For example, to keep the page HTML valid you cannot have a button and region with the same ID.
To specify a static region ID:
Parent topic: Editing Regions
Adding a Region Image
Use the Region Image and Image tag attributes to add an image to the upper left side of a region.
To add a region image:
Parent topic: Editing Regions
Creating a Region Display Selector
Region Display Selector region enables you to include show and hide controls for each region on a page.
To create a Region Display Selector:
Parent topic: Editing Regions
Copying a Region
Note:
You cannot copy a Tree region since this type of region encompasses more than one region.
To copy a region:
Tip:
To copy a region to another page, select the region in the Rendering tab, right-click, and select Copy to Other Page. Follow the on-screen instructions.
Parent topic: Managing Regions