3 Replies Latest reply on Feb 11, 2013 8:51 PM by BJones

    dynamic default page?

      I have a scheduling app that has tabs for days of the week (Sun - Sat). I would like to set the home page to the tab matching today.

      The Home url is f?p=&APP_ID.:10:&SESSION.

      I've created a page 0 item P0_DOW to contain the day of week and am assigning value with the following statement. (the +8 is to adjust the weekday integer to the correct page # for each day of the week).

      select to_char(sysdate,'D') +8
      into :P0_DOW
      from dual;

      The P0_DOW value is set - I can see it in the session values - but the url is not picking up the value. The rendered url is


      Apparently the p0 item calculates after the URL. I've tried moving this calculation to the application security Initialization PL/SQL Code, thinking the value would be assigned earlier, but it doesn't appear to be early enough.

      Is there a way to accomplish this dynamic assignment of the initial page to display?

      The other option I can think of is to create a dynamic action on the first page to do the same thing.

      Thanks -
        • 1. Re: dynamic default page?
          Matthew Morris
          Use an application item (F###_DOW) to hold the DOW rather than P0_DOW. Set the F###_DOW value as part of the login page processing.

          Set the 'Home Link' for your application to f?p=&APP_ID.:&F###_DOW.:&SESSION.
          • 2. Re: dynamic default page?
            Hi Matthew -

            Thank you for the suggestion. I'm using sso authentication so I don't have a login page. I've tried assigning the application item value in an Application Computation at the 'on new instance' computation point. I'm seeing the same behavior - the value of F01_DOW is set correctly, but it's doesn't make it to the url.

            Application     Item Value     Item Name
            11604     15     F01_DOW

            Home URL as defined in the Application Properties -> User Interface section : f?p=&APP_ID.:&F01_DOW.:&SESSION.

            on load: f?p=11604::35145701434366

            I'm getting the same results when placing the assignment at these points as well -

            Application Properties -> Security -> Database Session Initialization PL/SQL Code
            Shared Components -> Authentication Schemes -> Current -> Source PL/SQL code

            I'm obviously not setting the value early enough.
            • 3. Re: dynamic default page?
              Just thinking out loud.

              What about having a dynamic re-direct that appends the appropriate value to the url? So, in essence, the person would hit the home page, retrieve the value, and then be redirected to the appropriate page? It is definitely not the most elegant approach but conceivably it might work.