Skip to main content

How to add screen in your favourite list (Part 2)

In the first part, we explored how to quickly add screens to your Favourite List for faster navigation. Now, in Part 2 , we’ll dive deeper and extend the functionality—making it even smarter and more user-friendly. This continuation will help you maximize productivity while managing complex applications with thousands of menus. If you not explore the part one then please follow it first from  here (Part 1) . You can follow below tutorials for better understanding.  Part 2  and  Part 1 from here . Let's walk through the implementation process of part 2 step by step- Step-1 : Open your application and navigate to shared components. Under "Navigation and Search" section, click on "Navigation Bar List". A new page open. Click on the "Navigation Bar" link column titled "Name". Click on "Create Entry" button. A new page open. Set the below properties as like below- Sequence: 8 Image/Class: fa-bookmark List Entry Label:   Target ...

How to add screen in your favourite list (Part 2)

In the first part, we explored how to quickly add screens to your Favourite List for faster navigation. Now, in Part 2, we’ll dive deeper and extend the functionality—making it even smarter and more user-friendly. This continuation will help you maximize productivity while managing complex applications with thousands of menus. If you not explore the part one then please follow it first from here (Part 1).

You can follow below tutorials for better understanding. 

Part 2 and Part 1 from here.

Let's walk through the implementation process of part 2 step by step-

Step-1 :

Open your application and navigate to shared components. Under "Navigation and Search" section, click on "Navigation Bar List". A new page open. Click on the "Navigation Bar" link column titled "Name". Click on "Create Entry" button. A new page open. Set the below properties as like below-

Sequence: 8

Image/Class: fa-bookmark

List Entry Label:  

Target Type: URL

URL Target: #

After setting the above properties click on the "Create List Entry" button. This will create a navigation bar list in your application which will displayed in the navigation.

Step- 2:

Go back to your application builder home page and open page 0. Create a new region and set it propertise as like-

Name: Bookmarks

Type: Dynamic Content

PL/SQL Function Body returning a CLOB: Click on the code editor icon. A code editor window opened. Paste the below code here-

        DECLARE

            l_clob      CLOB;

        BEGIN

           l_clob  := '<div id="bookmark-list" onmouseleave="hideBookmark()"><ul>';

    

            FOR i IN (

                SELECT b.bookmark_id

                    , b.page_id

                    , aap.page_name

                    , LOWER(aap.page_alias) AS page_alias

                FROM bookmark b

                    , apex_application_pages aap

                WHERE 1                = 1

                AND b.page_id          = aap.page_id

                AND aap.application_id = :APP_ID

                AND b.user_id          = :USER_ID

                ORDER BY b.bookmark_id

            ) LOOP

               l_clob := l_clob||'<li><a href="http://localhost:9090/ords/r/hr/tutorial/'||i.page_alias||'?        session='||apex_application .g_instance||'">'||i.page_name||'</a></li>';

            END LOOP;

            l_clob := l_clob||'</ul></div>';

            RETURN l_clob;

        END;

Template: Blank with Attributes

Static ID: bookmark-container


Step- 3:

Select the region titled "JS 2" and navigate to properties section. Scroll down till "Header and Footer" section. Open "Header Text" code editor and add the below line of code under the success attribute.

    apex.region('bookmark-container').refresh();


Create another 2 JavaScript function here to show and hide the added favorite lists menu. Paste the below code here-

 function showBookmark() {

        var list = document.getElementById('bookmark-list');

        list.style.right = 0;

        list.style.position = 'fixed';

        list.style.top = '80px';

        list.style.borderRadius = '0px';

        list.style.backgroundColor = 'lightgray';

        list.style.zIndex = 5000 ;

    }

    function hideBookmark() {

        var list = document.getElementById('bookmark-list');

        list.style.right = "-5000px";

    }


Create another JavaScript function here to check the screen is already added into the bookmark lists or not. Paste the below code here-

    function isAddedToBookmark() {

        var userId = apex.item('P0_USER_ID').getValue();

        var pageId = $v('pFlowStepId');

        apex.server.process(

            'CHECK_BOOKMARK_ADDED' ,

            {

                x01: userId,

                x02: pageId

            } ,

            {

                dataType: 'json',

                success: function(pData) {

                    var bkmrk = document.getElementById('bookmark');

                    if (pData[0].ADDED === 'Y') {

                        bkmrk.innerHTML = '★ Remove Bookmark';

                        bkmrk.style.backgroundColor = 'red';

                        bkmrk.style.color = '#fff'

                    } else {

                        bkmrk.innerHTML = '★ Add to Bookmark';

                        bkmrk.style.backgroundColor = '#ccc';

                        bkmrk.style.color = 'black' 

                    }

                }

            }

        )

    }


Click OK.

Step- 4:

Click on "Shared Components" icon immediate before the save button. Then click on the "Navigation Bar Lists" menu under the "Navigation and Search" section. Click on "Navigation Bar" link to edit. Click on "name" column value in associate with sequence no. 8 (If you use lower version of APEX then you can find a pencil icon for editing purpose).


A new page will be appeared. Set the below properties as like-

Attributes: onclick="showBookmark()"


Click on Apply Changes.

With these enhancements, the Favourite List feature becomes more powerful and adaptable, ensuring seamless access to frequently used screens even in large applications. By combining simplicity with efficiency, this solution continues to reduce navigation time and improve overall user productivity.
















Comments

Popular posts from this blog

How to preview & download files from database or local directory in Oracle APEX

 It is common for Oracle APEX developers to need to handle files. This blog post will show you how to preview and download files stored in a database or a local directory. The most common approach in Oracle APEX is to store files directly in the database, typically within a BLOB (Binary Large Object) column. The primary reason is that this method simplifies data management and backup. Sometimes, you may need to handle files stored directly on the server's file system rather than in the database. This is common for large files or when files are managed by other systems. We will cover the basic steps and code snippets required for each method. Before approaching this tutorial, you must need to cover ( preview image in large scale  and  save file into database/local directory ) these two tutorial. Step 1: Create a blank page and then create 3 regions. Set these three regions properties as like below- Region-1:     Name:           ...

How to integrate gmail and send email from Oracle APEX

Manually managing communications with vendors and customers in today's enterprise environment is a time-consuming and often inefficient process. Juggling emails, follow-ups, and notifications can quickly become overwhelming, leading to missed opportunities and delays. To streamline this critical aspect of business, it's essential to modernize your communication system. By integrating email directly into your business software, you can automate these interactions, ensuring timely and consistent communication without the manual effort. I have try to demonstrate step by step how to integrate gamil account with application in Oracle APEX. For better understanding, you can follow the email configuration system. Step 1: Create Access Control List (ACL). Connect your sys user and execute the below command- DECLARE     l_acl_path     VARCHAR2(3000); BEGIN     SELECT acl     INTO l_acl_path     FROM dba_network_acls     WHERE host = '*'...

How to send SMS from Oracle APEX

 In today’s digitalized business solution world, SMS notifications are one of the fastest ways to reach users. Whether it’s for OTP (One-Time Password), reminders, or alerts, integrating SMS with your Oracle APEX application can add huge value. In this guide, we’ll walk through different ways to send SMS from Oracle APEX . For better understand follow this  Tutorial in Youtube. Why Send SMS from Oracle APEX? Oracle APEX already provides built-in features for sending emails, but sometimes email isn’t enough. SMS can be useful for: OTP & Two-factor Authentication Order Confirmations Text Notifications Promotional Messages Process to Send SMS in Oracle APEX 1. Register with Third Party SMS Gateway Most SMS providers (like Twilio, Nexmo, or local telecom gateways) expose a REST API to send SMS. Oracle APEX supports REST integrations, so you can call these APIs directly. Steps: Choose an SMS provider (e.g., Twilio, Nexmo, Clickatell, or your local...