Wed. Jan 26th, 2022

Requirement: I have a button on my APEX page with the name as “Click to Reload Page“.

Now when user click on the “Click to Reload Page” button, it should reload or refresh the whole page.

Also, to address this requirement I want to Execute a JavaScript code. I will call the location.reload() function here to reload the page.

Explanation on location.reload() function: The location.reload() method reloads the current URL, like the Refresh button.

The reload may be blocked and a SECURITY_ERROR DOMException thrown. This happens if the origin of the script calling location.reload() differs from the origin of the page that owns the Location object.

Solution: For solution of the above requirement follow the steps as shown below:

Step 1: Create a Region inside a page and set the Title as Reload Page

Step 2: Create a button inside the Region and set the below properties for the button.

  • Name: P2_RELOAD_BTN
  • Label: Click to Reload Page

Step 3: Create a Dynamic Action for the P2_RELOAD_BTN button and set the Name as reload_btn_clicked

Step 4: Set the Properties of the True outcome as shown below

  • Action: Execute JavaScript Code
  • Code: location.reload();

Save and run the application. Thus, the ran application is shown below:

Click on “Click to Reload Page” button and with that the page will be reloaded or refreshed again.

Hence, the solution to our requirement.

If you like the post please comment, share, and do join me on Facebook. Please subscribe to my YouTube Channel for video tutorials.

Thanks & Regards,
Susanto Paul

 1,964 total views,  4 views today

By Susanto Paul

Susanto is an Oracle ACE, a qualified MCA, MBA, and a highly-skilled Senior Oracle Specialist. He is an enthusiastic Blogger and YouTuber who helps learners to solve their complex problems more efficiently. He has 9+ years of experience in multiple technologies like AWS, Oracle ADF, Oracle APEX, Oracle JET, Oracle VBCS, Oracle IDCS, Oracle PL/SQL, Oracle Integration Cloud, Java, JDBC, Servlets, JSP, Spring, Hibernate, HTML5, CSS3, JavaScript, TypeScript, NodesJS, Angular, MySQL, Oracle WebLogic Server, JUnit, JMeter, Selenium Web Driver, etc. He is a certified: Oracle Certified Professional Java SE 6 Programmer, Oracle ADF 11g Certified Implementation Specialist, Oracle Cloud Platform Application Integration 2020 Certified Specialist, Oracle Cloud Infrastructure Foundations 2020 Certified Associate, and Oracle Cloud Infrastructure Developer 2020 Certified Associate

Leave a Reply

Your email address will not be published. Required fields are marked *