This discussion is archived
3 Replies Latest reply: Feb 11, 2013 12:51 PM by 878811 RSS

dynamic default page?

RL_TX Newbie
Currently Being Moderated
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 Expert
    Currently Being Moderated
    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?
    RL_TX Newbie
    Currently Being Moderated
    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?
    878811 Newbie
    Currently Being Moderated
    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.


  • Correct Answers - 10 points
  • Helpful Answers - 5 points