Press "Enter" to skip to content

Resolve “Session State Protection Violation” Error in Oracle Apex

In Oracle Apex page, if you are having Display Only or Hidden page items or a page item whose Read-Only property is set to true. And you are updating the field values at runtime using the JavaScript, then on page submit you will face the “Session State Protection Violation” error.

The following are the examples to show you the solution for the “Session State Protection Violation” error in Oracle Apex.

Resolve Session State Protection Violation Error for Display Only and Read-Only items

We use Display Only and Read Only items so that the user can not edit the field values at runtime. But if you are updating the values programmatically using the JavaScript then rather than setting it from Oracle Apex as Display only or Read-only, it is better to set it using the JavaScript.

In the below example, it will set the page item P3_COMMISSION_PCT is read-only. Add this JavaScript code for your page items in your page properties Executes when page load section.

document.getElementById("P3_COMMISSION_PCT").readOnly = true;

Resolve Session State Protection Violation Error in Oracle Apex for Hidden Items

For the Hidden page items, set its Value Protected Property to No or Turn off the switch. As shown in the below image:

Hidden page item.

Check more on JavaScript for Input.

Related Tutorials:

Oracle Apex: Display Custom Error Messages from PL/SQL Process

Have you found the answer to your question? If not, you can discuss it with me in the comments section below or join my Q&A community OrclQA.com for developers and ask your question. It is FREE.

Vinish Kapoor

Follow

Hi, I am a full stack developer and writing about development. I document everything I learn and help thousands of people. foxinfotech.in is created, written, and maintained by me; it is built on WordPress, and hosted by Bluehost. Connect with me on Facebook, Twitter, GitHub, and get notifications for new posts.

guest
0 Comments
Inline Feedbacks
View all comments