Introduction: –
This document is about how to hierarchical iframe error message clearance in Oracle APEX. When working with Oracle APEX applications, especially those that incorporate embedded iFrames to load external or internal content, error messages from these iFrames can disrupt the user experience. These errors often stem from mismatched configurations, cross-origin policies, or hierarchical dependencies between the parent application and embedded content.
The following technologies have been used to hierarchical iframe error message clearance in Oracle APEX.
- Javascript
- Oracle APEX
Why we need to do: –
If the requirement arises to dynamically clear error messages based on the parent and child page components behavior change this approach can be used to achieve the functionality.
How do we solve:
The following steps will help to dynamically clear error messages,
Step 1: Create a new page with interactive report and page item which will popup error based on the value changes.
Step2: Create dynamic action for the select list and add the below code.
Code:
apex.message.showErrors([
{
type: “error”,
location: [ “page”, “inline” ],
pageItem: “P93_LOB”,
message: “DBA can’t be choosen”,
unsafe: false
}
])
Step 3: Create new form and link with the interactive report.
Step 4: Create dynamic action for department page item to restrict changes on it.
Code:
parent.apex.message.clearErrors();
apex.message.showErrors([
{
type: “error”,
location: [ “page”, “inline” ],
pageItem: “P94_DEPARTMENT”,
message: “Department can’t be edited”,
unsafe: false
}])
Conclusion:
This document provides strategies for managing and clearing hierarchical iFrame error messages in Oracle APEX applications. Hierarchical iFrames, commonly used for embedding external or internal content, can encounter issues such as cross-origin errors, session timeouts, or JavaScript conflicts, which disrupt the user experience.
Parent page error message
While opening modal dialog page(child page) error messages in parent pages are cleared.