Using a number of different Apex versions - on this particular server it is Apex v4.0.2
I have debugged the submission on the browser side and apex.submit() does POST the request value (as variable p_request). But the value is not accepted or set on the server side. Using :REQUEST or v('REQUEST) in the page's regions does not show the posted request value. It is null. There is no explicit branch condition on the page.
What do work is that the page items assigned values are submitted and seen by the back-end. E.g. if P1_NAME is set in apex.submit(), that value is seen via page regions/processes after submission. Unlike the request value.
Am I doing something wrong? Is this an issue with an older Apex version?
The REQUEST variable is populated when the page is submitted - REQUEST has no value until the page is submitted.
The regions are created when the page is rendered. They, therefore, can only see a null value for the REQUEST.
Rest assured that REQUEST is working as designed - otherwise no APEX interaction would take place!
What problem are you trying to address?
Correct. Which means post processing processes of the next page will be able to read the request variable. And yes, apex.submit() is used everywhere else and working fine.
This works fine. All Apex page items that are assigned values, are submitted with those values and the processes/regions/etc of the following page have the correct values. Except for the Apex request variable. If I define a Pn_REQUEST item on that page and set that instead via the apex.submit() call, the target page can successfully use this item instead, e.g. v('Pn_REQUEST'), as oppose to v('REQUEST').
So the weirdness is that in this case apex.submit() sets the items to the specified values - but it does not seem to set the request state variable in PL/SQL.
From the HTTP POST I can see the name-value p_request is set to the request value. But the target page rendered next, can use the item name-variables set (correct values), but not the request variable (is null).
Oh well - for the time being I worked around it by not using request and using an additional item on the target page for setting processing state, and setting that via apex.submit(). Not sure what I'm doing wrong...
This works fine. All Apex page items that are assigned values, are submitted with those values and the processes/regions/etc of the following page have the correct values.
The REQUEST value is cleared before page show processing unless it is set in a branch or URL, therefore it has no value when referenced in the following page.
Set the Request attribute in a post-submit branch to the target page to
&REQUEST. to make the current request value available during page show processing.