1 2 Previous Next 16 Replies Latest reply: Mar 18, 2013 2:55 PM by mike621062 RSS

    Application Item values in Session State in APEX 4.2

    Johnny98
      In 4.2, I am not able to see the session state values of my Application Items if I click "Session" at the bottom of a page. We just migrated from 4.1 and we login to a separate app than where we land upon login. I thought the "Global" scope of the Application Item would allow this to track across apps, but its not working. Is this a known issue?
        • 1. Re: Application Item values in Session State in APEX 4.2
          Howard (... in Training)
          Someone correct me here if I stray but Application items are global only to the pages on the application in which they are created. Even when an application, say with some menu pages, transfers from one application -- say with a top-level menu on a page, to another application -- say with a second level menu, only the application whose page is active, will have it's application items (or page items for that matter) in the active session state.

          Does this help? What were you expecting to happen?

          Kind regards,
          Howard
          • 2. Re: Application Item values in Session State in APEX 4.2
            Johnny98
            I login to App 1, but land in App 2. My Application Item lives in App 2. Upon login of App 1, an authentication scheme calls a back end function that assigns variables to the Application Item in App 2.

            In APEX 4.1 I can see the session state of my Application Items by clicking on the Session button. I cannot see the session state of Application Items after moving everything to APEX 4.2.
            • 3. Re: Application Item values in Session State in APEX 4.2
              Howard (... in Training)
              In that case, can you change the title of this thread to "BUG 4.2?: ..."? Then one of the moderators will get around to checking it out. If it's possible to illustrate with a simple example on apex.oracle.com, please do that as well.

              Regards,
              Howard
              • 4. Re: Application Item values in Session State in APEX 4.2
                fac586
                Howard (... in Training) wrote:
                Someone correct me here if I stray
                Happy to do so.
                but Application items are global only to the pages on the application in which they are created. Even when an application, say with some menu pages, transfers from one application -- say with a top-level menu on a page, to another application -- say with a second level menu, only the application whose page is active, will have it's application items (or page items for that matter) in the active session state.
                From APEX 4.2 application items with global scope are session global, with values available to all applications sharing the session.
                • 5. Re: Application Item values in Session State in APEX 4.2
                  Howard (... in Training)
                  Then is this unchanged from 4.1? Or is some modification to the code required in 4.2?

                  Howard
                  • 6. Re: Application Item values in Session State in APEX 4.2
                    fac586
                    Johnny98 wrote:
                    In 4.2, I am not able to see the session state values of my Application Items if I click "Session" at the bottom of a page. We just migrated from 4.1 and we login to a separate app than where we land upon login. I thought the "Global" scope of the Application Item would allow this to track across apps, but its not working. Is this a known issue?
                    When you say +"Global" scope of the Application Item+ do you mean the true global scope introduced in APEX 4.2, or are you using the term colloquially, as in "not a page item"?
                    Johnny98 wrote:
                    I login to App 1, but land in App 2. My Application Item lives in App 2. Upon login of App 1, an authentication scheme calls a back end function that assigns variables to the Application Item in App 2.
                    What back end function? How does this function assign values to application items in App 2?
                    In APEX 4.1 I can see the session state of my Application Items by clicking on the Session button. I cannot see the session state of Application Items after moving everything to APEX 4.2.
                    Have you selected Application Items from the View select list on the session tab and clicked the Set button?
                    • 7. Re: Application Item values in Session State in APEX 4.2
                      Johnny98
                      Global scope doesn't work...I think thats where the bug lies. Application scope doesn't work either. The only good news is that the Application Item does get set...its just not viewable from the Session window, which is frustrating.

                      Edited by: Johnny98 on Feb 27, 2013 12:50 PM
                      • 8. Re: Application Item values in Session State in APEX 4.2
                        fac586
                        Howard (... in Training) wrote:
                        Then is this unchanged from 4.1?
                        This is a new feature in APEX 4.2, as described (unsurprisingly) in the New Features section under Other New Features > Share Session State across Applications.
                        Or is some modification to the code required in 4.2?
                        The Scope selector with values "Application" or "Global" is added to the Application Item definition page in APEX 4.2.

                        The value of application items with "Global" scope can be accessed using standard session state references in any application sharing the session.
                        • 9. Re: Application Item values in Session State in APEX 4.2
                          Johnny98
                          fac586 wrote:
                          Johnny98 wrote:
                          In 4.2, I am not able to see the session state values of my Application Items if I click "Session" at the bottom of a page. We just migrated from 4.1 and we login to a separate app than where we land upon login. I thought the "Global" scope of the Application Item would allow this to track across apps, but its not working. Is this a known issue?
                          When you say +"Global" scope of the Application Item+ do you mean the true global scope introduced in APEX 4.2, or are you using the term colloquially, as in "not a page item"?
                          The new global scope introduced in 4.2
                          >
                          Johnny98 wrote:
                          I login to App 1, but land in App 2. My Application Item lives in App 2. Upon login of App 1, an authentication scheme calls a back end function that assigns variables to the Application Item in App 2.
                          What back end function? How does this function assign values to application items in App 2?
                          APEX_UTIL.SET_SESSION_STATE('APP_ROLE', rec.user_type);
                          >
                          In APEX 4.1 I can see the session state of my Application Items by clicking on the Session button. I cannot see the session state of Application Items after moving everything to APEX 4.2.
                          Have you selected Application Items from the View select list on the session tab and clicked the Set button?
                          Yes, thats what started this thread
                          • 10. Re: Application Item values in Session State in APEX 4.2
                            Jeff E
                            I noticed the same thing and added it to the APEX feature request page: https://apex.oracle.com/pls/apex/f?p=55447:1 - search for feature AEMY

                            This is making it difficult to troubleshoot/debug pages that are using values that are stored in global application items. (Application Items where the Scope is set to "Global")
                            • 11. Re: Application Item values in Session State in APEX 4.2
                              Patrick Wolf-Oracle
                              Hi Jeff,

                              this has already been identified as bug 16288600 - 'global' application items do not show in dev toolbar session window
                              which will be fixed in APEX 4.2.2. I have closed your feature request with a reference to this bug.

                              @Johnny, just to make sure. You where also just referring to the "Session" popup that it didn't display application items of scope "Global". The functionality of "global" application items is working fine for you, right? BTW, global application items can also be set using the bind variable syntax
                              :APP_ROLE := rec.user_type;
                              there is no need to use APEX_UTIL.SET_SESSION_STATE.

                              Regards
                              Patrick
                              -----------
                              Member of the APEX development team

                              My Blog: http://www.inside-oracle-apex.com
                              APEX Plug-Ins: http://apex.oracle.com/plugins
                              Twitter: http://www.twitter.com/patrickwolf
                              • 12. Re: Application Item values in Session State in APEX 4.2
                                Johnny98
                                Thanks Patrick, good to know about setting the Global variables. Also, yes I was just referring to the "Session" popup and the global functionality itself is working.
                                • 13. Re: Application Item values in Session State in APEX 4.2
                                  mike621062
                                  I am trying to use global scope of the application variables in apex 4.2 and does not seem to work at all.

                                  Setup:

                                  1) We have 2 applications both in 4.2, which use the same cookie name under authentication schemas (uses sso behind the scenes)

                                  2) Application 1 has the global variable defined with global scope

                                  3) User loggs in into application 1 and we are setting global application varaible to certain value, works fine within app

                                  4) Redirect to the second application and trying to reference the global application variiable from 1st app (getting null)

                                  Do we need to setup application variable with global scope in the second application as well ?

                                  Any advice would be great ? Thanks a lot

                                  Regards

                                  Mikhail

                                  Edited by: mike621062 on Mar 18, 2013 11:27 AM

                                  Edited by: mike621062 on Mar 18, 2013 11:29 AM
                                  • 14. Re: Application Item values in Session State in APEX 4.2
                                    Johnny98
                                    Creating the Global Application Item in both Apps worked for me...
                                    1 2 Previous Next