12.4.3 Editing Regions

Alter the appearance of a page by editing Region attributes.

12.4.3.1 Editing Region Attributes

Edit Region attributes in Page Designer.

To edit region attributes:

  1. View the page in Page Designer:
    1. On the Workspace home page, click the App Builder icon.
    2. Select an application.
    3. Select a page.
    Page Designer appears.
  2. In the Rendering tab, select the region.

    The Property Editor displays attributes in the Region tab in the right pane.

    To find a group or attribute:

    • Search for the group or attribute - Enter keywords in the Filter Properties field. The Property Editor displays the group or attributes. To return to the default display, delete the keywords.

    • Use Go to Group - Click Go to Group and select the group. To return the default display, click Go to Group again and select Expand All.

  3. Edit the Region attributes in the Property Editor.

    To learn more about an attribute, see field-level Help.

  4. To save your changes click Save. To save and run the page, click Save and Run Page.

12.4.3.2 Controlling Region Positioning

Use the Layout, Position attribute to select the template position for this region.

Configure the Layout, Position attribute to select the position used to display a region. The positions are derived from the appropriate page or region template positions.

12.4.3.3 Specifying a Region Header and Footer

Edit the Header and Footer attributes to specify additional HTML to be placed above and below a region.

In the Header Text attribute, enter HTML text to display at the top of the region above the #BODY# content. 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.

In the Footer Text attribute, enter a region footer that displays directly after the body content, after #BODY# in the region template. You may use shortcuts, as well as the substitution string #TIMING#, to display the time consumed to render the region.

For classic report regions, the region footer supports the following substitution strings:

  • #ROWS_FETCHED# shows the number of rows fetched by the Oracle APEX 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. For example:

    Z in rows X - Y of Z

  • #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

12.4.3.4 Enabling Region Caching

Enable region caching 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 APEX 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 APEX 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 APEX 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.

To enable region caching:

  1. View the page in Page Designer:
    1. On the Workspace home page, click the App Builder icon.
    2. Select an application.
    3. Select a page.
    Page Designer appears.
  2. In the Rendering tab, select the region.

    The Property Editor displays attributes in the Region tab in the right pane.

  3. Server Cache, Caching - Select one of the following:
    • Disabled - Content is not cached and computed for each request.
    • Enabled - Content is cached and utilized by all users.
    • Cached by User - Content is cached specifically for each user.
    • Cache by Session - Content is cached specifically for each session.
  4. Click Save.

See Also:

Managing Page and Region Caching in Oracle APEX Administration Guide

12.4.3.5 Enabling Users to Customize a Page

Use the Customizable 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:

  1. View the page in Page Designer:
    1. On the Workspace home page, click the App Builder icon.
    2. Select an application.
    3. Select a page.
    Page Designer appears.
  2. Select the region in the Rendering tab or the Layout tab.

    The Property Editor displays attributes in the Region tab in the right pane.

  3. Customization, Customizable - Select one of the following:
    • Not Customizable By End Users
    • Customizable and Not Shown By Default
    • Customizable and Shown By Default
  4. To save your changes click Save. To save and run the page, click Save and Run Page.

12.4.3.6 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:

  1. View the page in Page Designer:
    1. On the Workspace home page, click the App Builder icon.
    2. Select an application.
    3. Select a page.
    Page Designer appears.
  2. Select the region in the Rendering tab or the Layout tab.

    The Property Editor displays attributes in the Region tab in the right pane.

  3. Advanced, Static ID - Enter the static ID for this region. The Static ID is used as the ID for the region, using the substitution string #REGION_STATIC_ID#. #REGION_STATIC_ID# is useful if you are developing custom JavaScript behavior for the region. If this attribute is not defined, the region generates an internal ID.

    Tip:

    The region template must include the #REGION_STATIC_ID# substitution string, in order for the region to utilize the static ID entered.

  4. To save your changes click Save. To save and run the page, click Save and Run Page.

12.4.3.7 Adding a Region Image

Use Region Image and Image Tag Attributes to add an image to the upper left side of a region.

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:

  1. View the page in Page Designer:
    1. On the Workspace home page, click the App Builder icon.
    2. Select an application.
    3. Select a page.
    Page Designer appears.
  2. Select the region in the Rendering tab or the Layout tab.

    The Property Editor displays attributes in the Region tab in the right pane.

  3. Under Advanced, edit the following attributes:
    • Region Image - Enter a reference to an image that displays in the upper left of the region. There is no control over the table tag used to display this image.

    • Image Tag Attributes - Enter image tag attributes included in the image HTML. This can be used for attributes such as height, width or image ALT text (if the image is non-decorative).

      If no ALT is defined in the image tag attributes, APEX defaults to rendering the image as a decorative image, for example with an empty ALT tag.

  4. To save your changes click Save. To save and run the page, click Save and Run Page.

12.4.3.8 Creating a Region Display Selector

Create a Region Display Selector region to include show and hide controls for each region on a page. to include the current region in the Region Display Selector.

When a user clicks on a region name included in the Region Display Selector, only the selected region shows and all other listed regions are hidden. The first entry within the Region Display Selector is Show All, which enables the user to show all of the available regions rather than only the previously selected region.

To create a Region Display Selector:

  1. Create the page and regions to be included in the Region Page Selector.
  2. For each region to be included in the selector, set the Region Display Selector attribute to On.
  3. In the Gallery, right-click Region Display Selector region, select Add To, and select the appropriate location.

    Tip:

    You can also drag and drop from the Gallery. From the Gallery select the Region Display Selector region and drag it to the appropriate location in the Layout tab.

  4. Edit the Region attributes in the Property Editor:
    1. In the Rendering tab (left pane), select the region.
      The Property Editor displays attributes in the Region tab. Attributes are organized in groups.
    2. Identification, Title - Enter a region title. The region title only displays when it is defined in the region template.
    3. Advanced, Region Display Selector - Select On if you want this region included in the Region Display Selector. This attribute is only utilized if a region type of Region Display Selector is defined and viewable on the page.
    4. Edit additional attributes as needed.

      To learn more about an attribute, select the attribute in the Property Editor and click the Help tab in the central pane.

  5. Edit Attributes in the Property Editor:
    1. In the Rendering tab (left pane), select the region.
    2. In the Property Editor, select the Attributes tab.
    3. Settings, Mode - Select how Region Display Selector regions display on the page. Options include:
      • View Single Region - Show regions as tabs. Selecting a tab will make the corresponding region visible and hide the other selections.

      • Scroll Window - Always display all the regions on the page. Selecting a tab will scroll your window to the corresponding region.

    4. Settings, Display Region Icons - Region Display Selector tabs will include the icon and title associated with each region.
    5. Settings, Include 'Show All' - Prepend a "Show All" tab which, when selected, displays all regions on the page.
    6. Settings, Remember Last Selection - Select how the Region Display Selectors remember the tab selection on page load. Options include:
      • By User - Tab selection will always be remembered across all sessions unless intentionally reset.
      • By Session - Tab selection will be remembered for the duration of a single session. Once the session ends, the tab selection will be reset.
      • No - Tab selection will be reset to the first tab each time the page reloads.
  6. To save your changes click Save. To save and run the page, click Save and Run Page.