Forum Stats

  • 3,874,249 Users
  • 2,266,706 Discussions
  • 7,911,780 Comments

Discussions

Session State ..... costing me a lot of time and headache

Geert01
Geert01 Member Posts: 202 Bronze Badge

Hi all!

I have created a page (on apex.oracle.com).

The page as one Select list item, with only the value One (1) and Two(2)

The page also has a button that is linked to a modal page.

The modal page has only one text item.

All I want is to pass the current value of the select list to the modal page.

After changing the value of the select list item, I verify the session state and see that it is what I expect it to be,

But then pressing the button, I always see the value of 1, regardless of the current value in session state.


Is this a bug? It seems that the button gets its 'linked value' at page load time, and never gets the current value of the select list. Is this a bug?

Page can be viewed on apex.oracle.com

Workspace: HUE_API

User name: Forum Member

Password: Help_Jan_22

Application: 56914 - Link to Modal Page

Tagged:

Best Answers

Answers

  • fac586
    fac586 Senior Technical Architect Member Posts: 21,459 Red Diamond
    edited Mar 3, 2022 9:19AM

    Is this a bug? It seems that the button gets its 'linked value' at page load time, and never gets the current value of the select list. Is this a bug?

    No. This is not a bug, but it is a common issue for new developers. &ITEM. text substitutions only occur during page rendering, using the value that existed in session state during page show processing. No matter what changes are subsequently made to the item value in session state, the targets and parameter values in redirect button URLs stay as they were originally rendered. They are not updated in real time to reflect the current item value in the page or session state.

    Eslam_Elbyaly
  • Geert01
    Geert01 Member Posts: 202 Bronze Badge

    Do you know if there is any logic behind this? Why can't, or shouldn't apex evaluate the values of the text substitutions before executing (in this case) the redirect?

  • Sylvain Martel
    Sylvain Martel Member Posts: 856 Silver Trophy
  • Geert01
    Geert01 Member Posts: 202 Bronze Badge

    Thank you fac586 for this elaborate explanation!