🔒 How to Control Visibility in Oracle APEX Using Developer Mode
🚩Introduction
In real-world Oracle APEX applications, there are situations where certain items, regions, or buttons should behave differently depending on how the application is accessed. For example, when developers run the app from App Builder (developer mode), they may need to see additional debug information or admin controls, while end users accessing the app through a normal URL should not see these elements. Managing this behavior using static conditions can become difficult and less flexible.
To handle this, APEX provides a simple way to detect whether the application is running in developer mode using
APEX_APPLICATION.G_EDIT_COOKIE_SESSION_ID. By checking if this value is not null, we can dynamically show or hide items, regions, and buttons at runtime. This approach helps create cleaner user interfaces for end users while still giving developers the controls they need during development and testing.
📑 Why This Approach Is Needed
In Oracle APEX applications, not all components should be visible to every user. Some elements are useful only during development, while others are meant for end users. Without a proper way to control this, the interface can become cluttered and confusing.
This approach becomes useful when:
- Developer-only buttons or regions should be hidden from end users
Debug or testing information needs to be visible only in App Builder mode
Admin controls should not appear in production access
UI behavior needs to change between development and runtime
A cleaner and safer user experience is required for end users
Using this method ensures better control, improved security, and a more flexible way to manage UI components based on the application context.
👉 Use Case: Show/Hide Components Based on Developer Mode
Step 1:
Step 2:
APEX_APPLICATION.G_EDIT_COOKIE_SESSION_ID is not null Step 3:
Now save and run the page from the app builder (Developer Mode), you will see the button rendered in the page.
🔥 Conclusion
APEX_APPLICATION.G_EDIT_COOKIE_SESSION_ID without any plugins. This helps show developer-specific elements only in App Builder and keep the UI clean for end users, improving both usability and maintainability.



Comments
Post a Comment