Fat P
Fat P

Reputation: 376

Distinguish between Page Submit and Direct Link in Oracle APEX

I am using Oracle APEX 21. How do I distinguish between page accessed by 'Submit' button and a direct link?

When I actually want to do: I want the page to clear session state when accessed directly (i.e., using a pre-generated link like f?p=...), but keep session state (of course) when 'Submit' button is clicked.

According to APEX 19 Documentation (can't Google APEX 21 doc),

Each application button sets the value of REQUEST to the name of the button or to the request value attribute associated with the button

However, :REQUEST is null when I use submit button. So this is not working for me.

Also tried 'Redirect Page to this Application', but it can't pick up new values in the form.

Note: I have no control on the direct link. I want to avoid changing it if there are alternative solution.

Upvotes: 0

Views: 354

Answers (1)

Justin Cave
Justin Cave

Reputation: 231851

It sounds like you want to specify one or more pages in the ClearCache section of the link you are creating. This comes after the Debug section and before the itemNames section. The URL

f?p=123:456:&SESSION.:::456:P456_ITEM1:Value

creates a link to page 456 in application 123, clears the cache for page 456, and sets the value of P456_Item1 to "Value".

Upvotes: 2

Related Questions