The Problem
A user fills in a form, clicks Submit, and after the page reloads some items are blank even though the user entered values. Or a value set in a Before Header process is not visible when the page renders. Session state confusion is behind most of these issues.
Understanding When Session State Is Set
APEX updates session state at specific points in the page lifecycle. During page submission, all submitted page items are written to session state. During page rendering, Before Header and After Header computations and processes run. Item default values apply only when the item has no session state value.
Common Cause 1: Item Not Submitted
Page items are only submitted if they are in the HTML form. Items with Condition “Never” or items in regions with Server-side Condition = false are not rendered and therefore not submitted. Items in regions outside the page’s form element are also not submitted. Check that the item exists in the rendered HTML by inspecting the page source.
Common Cause 2: Source Settings Override User Input
If a page item has its Source set to “Always, replacing any existing value in session state” and the Source Type is a SQL Query or PL/SQL Expression, the item’s value is overwritten on every page load, discarding what the user entered. Change the Source “Used” setting to “Only when current value in session state is null” to preserve user input.
Common Cause 3: Computation Overwrites the Value
Computations on the page or at the application level might overwrite the item’s value. Check for computations that target the affected item in both Page Processing and Shared Components, then Computations. Review their Compute When conditions.
Debugging Session State
-- View all session state for current session
SELECT item_name, item_value
FROM apex_application_session_state
WHERE application_id = :APP_ID
ORDER BY item_name;
You can also click the Session link in the APEX Developer Toolbar to see all current session state values.
Common Cause 4: Caching / Browser Autofill
If the page URL includes a cache directive like RP (Reset Pagination) or CIR (Clear Interactive Report), it may also clear item values. Browser autofill can also interfere. Set the item’s HTML Form Element Attribute autocomplete="off" to prevent browser interference.