Using apex 4.2.
I have created form item on page and item attribute DISABLES IN SEETINGS , set value as YES and SESSION STATE value as YES.
SETTINGS->DISABLES-> SESSION STATE
by doung this i am getting the error. Error is
Session state protection violation: This may be caused by manual alteration of protected page item P98_CHECK_AMOUNT. If you are unsure what caused this error, please contact the application administrator for assistance.
So, If you are dynamically changing item value of disabled item that is saved to session state, in APEX 4.2 you'll get this error.
You can change type of item, for example to text item and add to it readonly property in items attributes field.
You can't change readonly item value dynamically. Some solutions:
1. Remove readonly condition and in property HTML Form Element Attributes to readonly=readonly. User will not be able to change item value and item will be saved to session state (but he can change it modifying HTML, e.g. with FireBug).
2. Remove readonly condition and leave disabled property. User will not be able to change item value and item will NOT be saved to session state.
3. Don't change item value with dynamic actions or JS.
The option to set a single item as both disable and read-only is a bug/oversight, and I already been told that it will be fixed in APEX 5.0.
If you need to both change the value of a protected item and save its session state, the following suggest a possible solution: