Before You Begin
This 20-minute tutorial demonstrates steps to enhance the Navigation Menu and also the Navigation Bar. In this tutorial, you will be adding icons to Navigation Menu, creating Application Items, defining Application Computations, and creating and using list for Navigation.
This is the third tutorial in Oracle Application Express 18: Universal Theme Migration Series. Read the tutorials in sequence:
- Oracle Application Express 18: Universal Theme Migration (1 of 4) - Getting Started
- Oracle Application Express 18: Universal Theme Migration (2 of 4) - Upgrading Components
- Oracle Application Express 18: Universal Theme Migration (3 of 4) - Updating Navigation, Items, and Computations
- Oracle Application Express 18: Universal Theme Migration (4 of 4) - Improving Pages
Background
Navigation is an important part of your application and can determine how your users navigate within your application. There are two navigation concepts that are key for Universal Theme: Navigation Menus and Navigation Bar. The primary navigation structure for your application is defined as a Navigation Menu and is based on the List component in Oracle Application Express. The Navigation Bar is positioned near the end of the application's header, and typically contains links for user authentication, help, feedback, and other global items. Navigation Bars are also based on the List component in Oracle Application Express.
When you build an application, you can include different types of navigation controls, such as navigation bar entries, tabs, breadcrumbs, lists, and trees. Navigation controls such as navigation bar entries, tabs, breadcrumbs, and lists are shared components. Shared components enable you to create a specific type of navigation control at the application level on the Shared Components page. Once created, you can add them to any page within your application.
What Do You Need?
To complete this tutorial you need to:
- Complete the preceding tutorials in this series.
Add
Icons to Navigation Menu
A navigation menu is a list with hierarchical list entries. When you create an application, the Create Application Wizard automatically creates a navigation menu for you and populates it with list entries linking to the application pages you have created.
In this section you add icons to each of the menu options.
- Select the Sample Database Application you worked on in the previous tutorial.
- Click Shared Components.
- Click Lists. Select the Navigation Menu list.
- The List Details page appears with Home, Customers, Products, Orders, Reports, and Administration list entries. You click each of these entries to add the corresponding icons.
- To edit the Home list entry:
- Click Home. The List Entry page opens.
- Image/Class: Select fa-home.
- List Entry Label: Accept the default Home.
- Click Apply Changes.
- To edit the Customers list entry:
- Click Customers. The List Entry page opens.
- Image/Class: Select fa-users.
- List Entry Label: Accept the default Customers.
- Click Apply Changes.
Description of the illustration list_entry_customers.png - To edit the Products list entry:
- Click Products. The List Entry page opens.
- Image/Class: Select fa-shopping-cart.
- List Entry Label: Accept the default Products.
- Click Apply Changes.
Description of the illustration list_entry_products.png - To edit the Orders list entry:
- Click Orders. The List Entry page opens.
- Image/Class: Select fa-list-alt.
- List Entry Label: Accept the default Orders.
- Click Apply Changes.
Description of the illustration list_entry_orders.png - To edit the Reports list entry:
- Click Reports. The List Entry page opens.
- Image/Class: Select fa-table.
- List Entry Label: Accept the default Reports.
- Click Apply Changes.
Description of the illustration list_entry_reports.png - To edit the Administration list entry:
- Click Administration. The List Entry page opens.
- Image/Class: Select fa-gear.
- List Entry Label: Accept the default Administration.
- Click Apply Changes.
Description of the illustration list_entry_admin.png
Create
Application Items
Application-level items do not get displayed, but are used as global variables to the application. You can use an application item as a global variable. Once you create an application item, it appears on the Application Items page. You can customize the appearance of a page by using the Search bar at the top of the page. You can view a list of where application items are used by clicking the Utilization tab at the top of the Application Items page.
In this section you add the application items for the counters in the list.
- Click Shared Components in the breadcrumb at the top of the page.
- Under Application Logic, click Application Items.
- On the Application Items page, click Create.
- To create an application item:
- Name: Enter
A01 - Click Create Application Item.
Description of the illustration A01_application_item.png - Name: Enter
- Create two additional applications items:
- Name: Enter
A02 - Click Create Application Item.
- Name: Enter
A03 - Click Create Application Item.
Description of the illustration A02_application_item.png
Description of the illustration A03_application_item.png
The following application items are created.
- Name: Enter
The create application items page appears.
Define
Application Computations
Application Computations are units of logic that set the value of a single page or application-level item and are run at the same point across multiple pages in an application. Like page-level computation, application computations can be based on static values, item values, PL/SQL, or SQL.
Once you create an application computation, you can view the Application Computation History report. The Application Computation History report displays a history of recently changed application computations by date.
In this section you define application computations to populate the application items.
- Click Shared Components in the breadcrumb at the top of the page.
- On the Shared Component page under Application Logic, click Application Computations.
- Click Create.
- Enter the following details, and then click Create
Computation.
- Computation Item: Enter
A01 - Computation Type: Select SQL Query (return single value)
- Computation: Enter:
select count(*)from demo_customers
- Computation Item: Enter
- Create two additional application computations:
- Enter the following details, and then click Create
Computation.
- Computation Item: Enter
A02 - Computation Type: Select SQL Query (return single value)
- Computation: Enter:
select count(*)from demo_product_info
- Computation Item: Enter
- Enter the following details, and then click Create
Computation.
- Computation Item: Enter
A03 - Computation Type: Select SQL Query (return single value)
- Computation: Enter:
select count(*)from demo_orders
The application computations are created.
- Computation Item: Enter
Description of the illustration app_computations.png - Enter the following details, and then click Create
Computation.
- The navigation menu is now complete. Click Run
Application
to review how the navigation menu looks.
Change
to Top Navigation (optional)
By default the navigation menu is displayed on the left side of the page. If you wish to move the menu to the top of the page, as it was when using Tabs, then perform the following steps:
- Click Application ID in the Runtime Developer Toolbar.
- Click Shared Components, then click User Interface Attributes.
- Click the Edit Desktop icon.
- Under the Navigation Menu section:
- Position: Select Top
- List Template: Select Top Navigation Menu
- Click Apply Changes.
- Click Run Page. Note that the icons are not displayed when the menu is at the top.
Create
and Use List for Navigation
By default, the navigation bar still uses the classic implementation after migrating to the Universal Theme. You will now enter a list for the navigation bar and switch your application to use this new list.
- Click Application ID in the Runtime Developer Toolbar.
- From the application page, click Shared Components.
- Click Lists and the click Create.
- Accept the default for Source and click Next .
- On the Create/Edit List: Name and Type page, enter the
following details:
- Name: Enter Navigation Bar
- Click Next.
- On the Create List: Query or Static Values page, enter the
following details:
- List Entry Label: Enter
Mobile, Target Page ID or custom URL: Enter200 - List Entry Label: Enter
Help, Target Page ID or custom URL: Enter15 - List Entry Label: Enter
Feedback, Target Page ID or custom URL: Enter102 - List Entry Label: Enter
&APP_USER., Target Page ID or custom URL: Enter# - List Entry Label: Enter
Sign Out, Target Page ID or custom URL: Enter&LOGOUT_URL. - Click Next.
- List Entry Label: Enter
- Click Create List.
- From the Lists page, click the Navigation Bar list entry to edit it. From this page you can choose each list item (that is, Mobile, Help, Feedback, App_User, and Sign-out) to edit it.
- Click
Mobile. Update the following:
- Image/Class: Select fa-mobile
- List Entry Label: Accept the default,
Mobile. - Click Apply Changes.
- Add the following Image/Class for the other list entries and
click Apply Changes:
-
Help: Select fa-question-circle-o -
Feedback: Select fa-bullhorn -
&APP_USER.: Select fa-user
-
- To enable user feedback, you edit the Feedback list entry:
- On the List Details page, click
Feedbacklist entry. - Conditions: Condition Type - Select PL/SQL Expression
- Expression 1: Enter:
nvl(:ENABLE_FEEDBACK, 'NO') = 'YES' - Click Apply Changes.
- On the List Details page, click
- Edit the
Sign Outlist entry.
- Parent List Entry: Select &APP_USER.
- Click Apply Changes.
- Now that you have created the list, you need to update the
desktop user interface to use the list.
- Click Shared Components breadcrumb.
- Click User Interface Attributes.
- Click the Edit Desktop icon.
- Navigation Bar: Implementation - Select List
- Navigation Bar List: Select Navigation Bar
- Template Options: Select the check box for Use Template Defaults
- Click Apply Changes.
- If you had changed to Top Navigation in the previous
section, change back to side navigation.
- Click the Edit Desktop icon.
- Under the Navigation Menu section:
- Position: Select Side
- List Template: Select Side Navigation Menu
- Click Apply Changes.
- The navigation bar is now complete. To review how the navigation bar looks like, click Run Page.
Next
Tutorial
Oracle Application Express 18: Universal Theme Migration (4 of 4) - Improving Pages
Oracle
Application Express 18: Universal Theme Migration (3 of 4) - Updating
Navigation, Items, and Computations