Renewing a session value on page render.

Hi,
Does anyone know of an easy way of renewing the session value when a page is loaded.
I have an app that is mostly public so logging in is not required for most of it. When the user returns to the initial page (probably using the browser buttons) I need the page to generate a new session value.
Can this be done in a simple url. I tried creating a process Before Header with
owa_util.redirect_URL('f?p=APP_ID.:6');
i.e. without the &SESSION. value, hoping that this would force a new session to be created, but it doesn't work.
Any ideas?
Cheers
Yog

Yog - what version of HTML DB? And why do you want a new session created?
Scott

Similar Messages

  • How to get Session value in Custom OAF page

    Hi,
    Already existing Custom oaf page is there in that they seted  session value using the following API
    String s = (String)oapagecontext.getSessionValueDirect("page");
    here s is getting null value how can i get the session value is there any another method to get the session value in custom page
    please  anybody help me ASAP.
    Thanks,
    Krishna Mannala

    Hi,
    Is that value set anytime before you are trying to get that?
    Please provide relevant details and code here.
    Regards,
    Sandeep M.

  • Passing Session Values to the Tabular Form Element of a Report Column

    Hello,
    I'm running application express version 2.0 with a 10.2.0.2.0 database on a 32 bit windows box. I'm trying to figure out sneaky a way to pass the &APP_PAGE_ID., #APP_PAGE_ID# or V('APP_PAGE_ID'); as an element attribute of a Report Tabular Form Element set to display as a Select List (named LOV).
    It seems that whatever option I choose, the Element Attributes field will only render the literal value of what I have entered. This is part of the solution but I would like to find a way to pass the current page id.
    What I'm trying to do is utilize the ONCHANGE attribute to redirect to a report page in my application when the value from a Select List (named LOV) is selected.
    I could work around this by creating my own table output with PL/SQL and HTP.P commands but would really be interested in finding out if I can use the reporting structures which are already available through Application Express.
    Any ideas?
    Thanks.
    Justin.

    Thanks for the response Earl. To clarify this is what I've done and what I hope to achieve:
    I currently have a LOV for my application that identifies a number of database report types: DB Options, DB Parameters, DB Version, and so on.
    I have an application express report being generated for the databases I'm monitoring and it displays as follows:
    - HOST -- DBTYPE -------- DBNAME - DBREPORTS
    =====================================
    - SVR 1 - Oracle 9.2.0.1 - DEV -------- [LOV HERE]
    - SVR 2 - Oracle 9.2.0.7 - TST --------- [LOV HERE]
    I am displaying the LOV on my report the the options under the reports attribute tab in my application builder. I insert my LOV select list by editing the DBREPORTS column and set the "Display As:" option under Tabular Form Element to "Select List (named LOV)"; I have also added my LOV to the "Named LOV" option under List of Values.
    So far this achieves everything I would expect and works quite well (a select list with my report types appears in my monitor report for each DB that is returned).
    What I'm interested in doing now is opening a DBREPORT for a given database by simply choosing the report type from my LOV. I can set the "Element Attributes" option under Tabular Form Element to execute a javascript call for any valid event (in my case I'm using ONCHANGE).
    My only issue is that I cannot find a way to pass any session values from my page to my Element Attribute. If, in the Element Attributes field I enter:
    onchange="alert(this.value);" //my dialogue box will display the value of my current selection when I choose a report type.
    What I'd love to be able to do is something like:
    onchange="alert('&APP_PAGE_ID.');" //so my current page id is written to the element.
    Unfortunately, only my literal text seems to be rendered. Rather than having my dialogue come back with my page number, say 75, I receive the literal value &APP_PAGE_ID.
    Notwithstanding any quote issues, I've tried to dump a test html attribute to my source html by entering any of the following in the Element Attributes field:
    test=&APP_PAGE_ID.
    test=#APP_PAGE_ID#
    and as a shot in the dark knowing that I'm not using PL/SQL:
    test=V('APP_PAGE_ID');
    In every case when I view source I see the literal value of what was entered in the Element Attributes field (ie "test=&APP_PAGE_ID." instead of "test=75").
    What makes things a little more frustrating is that I can drop &APP_PAGE_ID. into the Column Heading field (ex My Heading &APP_PAGE_ID.), it renders as I would expect; "My Heading 75". If we could find a solution to this, I could see a number of slick uses for this type of functionality.
    Hope this helps,
    Thanks.
    Justin.

  • GetParameter, setAttribute and session values

    I am having a problem forwarding values to a jsp from my servlet.
    This problem only occurs when multiple users are accessing the same pages to make a payment.
    The value is passed from the page to the servlet.
    The servlet gets the value using a getParameter.
    //Get the value from the previous page
    String DocTotal = request.getParameter("DocTotal");
    logger.debug("DocTotal: " + DocTotal);
    //set the value to pass to next page
    request.setAttribute("payAmount", DocTotal);
    displayTemplate(CREDITCARDPAYMENT);
    displayTemplate code follows.
    RequestDispatcher rd = getServletContext().getRequestDispatcher(template);
    rd.forward(req, res);
    I then set the value in the request object to pass to the next page.
    This all seems to work fine for a single user but when I I have more than one user, one user will get a null for value being passed on the next page and the other user will not get the page displayed.
    It is like my session values are getting stomped on by the other user.

    The changes that you have suggested seem to work, but I still have a problem.
    One user seems to be able to get the data passed successfully to the next jsp, but the other just gets a blank screen. If the user with the blank screen refreshes they get the screen with the data. It is as if the servlet hangs up when calling the page. I am not sure.
    Here is the code that is being accessed with formatting.
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    req = request;
    res = response;
    HttpSession session = req.getSession(true);
    logger.debug("Made it to the doPost method of DownloadUtilServlet!");
    logger.debug("session: " + session);
    String cmd = req.getParameter("cmd");
    logger.debug("cmd equals: " + cmd);
    if ((cmd != null) && cmd.equalsIgnoreCase("forwardPaymentInfo")){
    XCBillerCenterItem bci = null;
    try{
    logger.debug("XCConfig.CCUSER: " + XCConfig.CCUSER);
    bci = new XCBillerCenterItem(XCConfig.CCUSER);
    catch(Exception e) {
    logger.debug("XCBillerCenterItem Create: " + e);
    String ccList = bci.getCCTypes();
    req.setAttribute("ccList", ccList);
    logger.debug("cmd equals: " + cmd);
    String DocTotal = req.getParameter("DocTotal");
    logger.debug("DocTotal: " + DocTotal);
    req.setAttribute("payAmount", DocTotal);
    displayTemplate(CREDITCARDPAYMENT);
    }//User has paid, proceed to download
    else if ((cmd != null) && cmd.equalsIgnoreCase("downloadreportfilter")){
    displayTemplate(DOWNLOADREPORTFILTER);
    else{       
    GetParameters(req, res, session);
    public void displayTemplate(String template)
    try
    RequestDispatcher rd = getServletContext().getRequestDispatcher(template);
    rd.forward(req, res);
    catch(Exception e)
    e.printStackTrace();

  • How to get another page item value in page process.

    Hi all
    i have an after submit process on page 32 to insert into a table.
    and a page 34 where there is a region containing from page 32.
    when page 32 get submitted (process as well as) it contain no value for :P34_USER_ID although i am in page 34 and :P34_USER_ID item have value.
    after submit process on page 32 Type: PL/SQL anonymous block --> have code like...
    INSERT INTO LETTER_ATTACH (LETTER_ID,FILENAME,ATTACHMENT,MIMETYPE,UPDATE_DATE)
    SELECT :P34_USER_ID,:P32_FILE_INPUT,blob_content,mime_type,SYSDATE
    FROM wwv_flow_files
    WHERE NAME = :P32_FILE_INPUT;
    can't find anything wrong...!!?? :(
    please help me on this regards.
    Roman
    Edited by: user13416557 on Aug 27, 2011 1:48 PM

    Hi,
    When you are on page 32, check that there is value on page 34 item session state
    http://download.oracle.com/docs/cd/E23903_01/doc/doc.41/e21674/concept_ses.htm#sthref100
    Regards,
    Jari

  • Session in JSP page

    Hi all,
    i built a web application now i want to use session in JSP pages to remember some variable such as password and entered date because i need them in later pages and i also don't want to send them via HTML hidden field. I actually don't know how to use session. Can anyone please just tell me how to create a session and store a variable and also how to retrieve the data from the session.
    Another thing is guys can anyone tell me please that say i am user and i selected some items from a HTML select list and i submitted that and logged off the system now when i login later again i want to see those choices selected by default , i know it might have been done by sessions can anyone please tell me.
    THANKS VERY MUCH

    This is the way u can set and retrieve values from session
    <% session.setAttribute("key","value"); %>
    <% String user=(String)session.getAttribute("user");
    %>
    regards
    Shanu

  • Interactive Report & Item Value in Page 0

    Hi,
    Is it true that Interactive Report query couldn't read item value from Page 0?
    I have this Interactive Report region using the :P0_EMP_SEQ in the where CLAUSE, i found out that the value is always blank/NULL.
    I created a normal Report region to test the SQL, I can see records being returned.
    Cheers,
    -Joel

    Hi,
    When you are on page 32, check that there is value on page 34 item session state
    http://download.oracle.com/docs/cd/E23903_01/doc/doc.41/e21674/concept_ses.htm#sthref100
    Regards,
    Jari

  • Using Date Picker on form causes session values to be cleared on validation

    Got a really weird problem on a form (on a report). We have a basic form which has a date picker on. The form fires a number of bog standard validations when the Create button is clicked (values filled in, values are numbers etc).
    When a validation fails, the values inputted by the user are retained. So far so good. However, when the user selects a date, and a validation fails, all the session values are all cleared (not just the date picker) and they have to fill everything in again.
    At first we thought there must be a process resetting the page items - nothing. Also recreated the page from scratch and it still doesn't work. Strangely, the problem goes away if we change the date picker to a text field. Also, if the user doesn't select a date, the other session values are retained.
    Are we doing something daft here or is this a bug?

    Yes - we're using inbuilt validation to ensure it's a valid date. We tried turning this off and it makes no difference, the problem is still there.
    We tried changing the date picker to a text field and using the same validation (i.e. check it's a date) and this works fine. This is why we think it might be a bug.

  • ExecuteQuery WhereClause problem for first time in the session of the page

    I am new to OAF and I have panic problem.
    I have two pages application like following..
    First page “LookupTypes” and second page “LookupValues” for the selected first page Lookuptype.
    The problem is when I press first time(after lunching the page/first time for the session) the button in “LookupType” page I am getting all the “Lookup Values” for all the lookup types instead of getting only for one Lookuptype and I will press “back” button in “Lookup Values” Second page to come back “LookupType” first page, Again immediately I will press the same button which I pressed first time, this time I will get correct number of records for one Lookup Type. I don’t know why its where clause is not working first time.
    Please find the following code and help me.
    First page is LookupTypes->second page is Lookup Values
    Step 1 : I have button on “Lookup Types” page to call “Lookup values” page
    Step 2 : “Lookup Values” page control to receive the parameters from lookup type page.
    Step 3 : application module (AM) to execute the query..
    Code :
    Step 1 : I have button on “Lookup Types” page to call “Lookup values” page
    Following is the code from “Lookup Types” control.
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    String paramLookupTypeAction = pageContext.getParameter(EVENT_PARAM) ;
    String paramLookupType = pageContext.getParameter("paramLookupType");
    OAApplicationModule PafLookupAM = pageContext.getApplicationModule(webBean);
    //Adding calling LookUp Values screen
    if (paramLookupTypeAction.equals("viewLookupValues") )
    // PafLookupAM.invokeMethod("clearLookupValueMethod");
    //Here we prepare the HashMap object, that cotains name of the parameter and the value of the parameters
    HashMap phm = new HashMap() ;
    phm.put("xxparamLookupType",paramLookupType);
    phm.put("xxparamLookupTypeAction",paramLookupTypeAction);
    pageContext.setForwardURL(
    "OA.jsp?page=/oracle/apps/xxpaf/pafLookups/webui/pafLookupValuesPG"
    , null //not needed as we are retaining menu context
    ,OAWebBeanConstants.KEEP_MENU_CONTEXT
    ,null //not needed as we are retaining menu context
    ,phm //pass the hashMap that contains values for all of the parameters
    ,true //retain AM
    ,OAWebBeanConstants.ADD_BREAD_CRUMB_NO
    ,OAWebBeanConstants.IGNORE_MESSAGES);
    Step 2 : Following is the code from “Lookup Values” page control to receive the parameters from lookup type page.
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    String paramLookupTypeAction=pageContext.getParameter("xxparamLookupTypeAction");
    String paramLookupType=pageContext.getParameter("xxparamLookupType");
    OAApplicationModule PafLookupAM = pageContext.getApplicationModule(webBean);
    Serializable LookupTypeParamList[]= {paramLookupTypeAction,paramLookupType};
    System.out.println("viewLookupValues 3 " + paramLookupType);
    System.out.println("viewLookupValues 4 " + paramLookupTypeAction);
    if ( paramLookupTypeAction!=null && paramLookupTypeAction.equals("viewLookupValues"))
    System.out.println("viewLookupValues 5 " + paramLookupType);
    System.out.println("viewLookupValues 6 " + paramLookupTypeAction);
    PafLookupAM.invokeMethod("viewLookupValuesMethod", LookupTypeParamList);
              // Assuming the controller is associated with the pageLayout region
    // import oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean;
         //     OAPageLayoutBean page = (OAPageLayoutBean)webBean;
         //     page.setTitle("Lookup Type: " + paramLookupType);
    Step 3 : Following is the code from application module (AM) to execute the query..
    public void viewLookupValuesMethod( String pAction, String pLookupType)
    try
    OAViewObjectImpl pervo = getPafLookupValuesEOVO();
    String existingWhereClause = pervo.getWhereClause();
    pervo.setWhereClauseParams(null);
    pervo.setWhereClause("Lookup_Type = :1");
    pervo.setWhereClauseParam(0, new String (pLookupType));
    pervo.executeQuery();
    pervo.setWhereClauseParams(null);
    pervo.setWhereClause(existingWhereClause);
    catch(Exception exception1)
    throw OAException.wrapperException(exception1);
    Best Regards,
    Pathi TVB

    Pathi,
    Please try to have the WhereClause in the VO query as part of static definition itself. So you would only need to bind the parameter and execute the Query.
    Try and let me know if that helped.
    Thanks
    Sumit

  • Spreadsheet from Iframe in APEX 4.1 not using session values

    We recently upgrade to Apex 4.1 and now the spreadsheet option within an iframe is not using the session values to limit the records downloaded into the spreadsheet. This only happens with Internet Explorer running running under windows 7. I don't have control to change anything on the webserrver where the Apex Iframe is running. Is there any option within APEX that can be set so that the spreadsheet will only contain what is displayed on the form versus all the records. The spreadsheet download ignores any criteria that was applied the the report on the same page.
    Thanks,
    Nancy

    Hi Dan,
    thank you for your answer. I have the solution now from Kleber_M, this works.
    Dan McGhan wrote:
    1. Use bind variables in my query. It would look something like:
    SELECT *
    FROM region
    WHERE region LIKE '%'|| :P3_REGION ||'%'
    AND country LIKE '%'|| :P3_COUNTRY ||'%'
    AND city LIKE '%'|| :P3_CITY ||'%'
    This was only a mistake when writing the post, i forgot the colon. I use bind variables of course.
    2. Make sure you have a comma separated list of item names that the report depends on beneath the SQL Query where it says Page Items to Submit. This will make sure that the value of those items on the page are bound into session state prior to the query executing.I tried this, too, but without success...
    3. Use Dynamic Actions to perform the refresh action when any of the three items changes. This would be both more performant and a better experience for the end user than a full page refresh.How can i do this. This sounds good, because when refreshing the page often some items oder actions are done that i don´t want to.
    Regards,
    Matze

  • How To retain Session Value in OBIEE

    I have a requirement to pass session variable from one page to next page in the dashboard.
    Requirement :
    In Presentation Part:
    Prompt : Column1: Year
    Column2: Quarter
    I have to pass the Value selected in the dashboard prompt to the repository. To achieve this, I have stored the Year and Quarter Column value in 2 Request variables from the prompt.
    Request Variable1 : VarYear stores Year Value selected
    Request Variable2 : VarQuarter stores Quarter Value selected
    In Repository Part:
    1. I have created 02 session variables in repository with the same name as : VarYear and VarQuarter
    2. Under the Intitialization Block of Both Variables I have written a dummy Query as
    'SELECT PER_NAME_ENT_YEAR FROM W_DAY_D WHERE PER_NAME_ENT_QTR IS NOT
    NULL'
    3. Checked the Box to 'Enable any user to set the value' for both the session variables.
    4. Used the session variable to pass as a filter under the content tab of the LTS of Revenue Measure as follows:
    '"Oracle Data Warehouse".Catalog.dbo.Dim_W_DAY_D.PER_NAME_ENT_YEAR = VALUEOF(NQ_SESSION."VarYear") AND "Oracle Data Warehouse".Catalog.dbo.Dim_W_DAY_D.PER_NAME_ENT_QTR = VALUEOF(NQ_SESSION."VarQuarter")'
    Resolution : The session variables from the prompt is passing properly to the RPD and returning the result as expected for the current page(Both Prompt and the Report are in same page where I used the measure Revenue which is getting filtered in the LTS on the basis of Quarter & Year under Content Tab).
    Reuirement2 With Issue :
    I have to navigate from one page to another on click of Revenue measure value. The target page also contain the same Revenue measure as in First page. But On navigating from one page to another page the session value is getting lost and passing the by default value coming from the Session Initialization block insted of the value selected in the prompt.
    As per my understanding the session value should not be replaced untill a user log out from the application. But in my case for First page where I have both Promt and the Revenue measure the Prompt value is passing properly but When I am moving to second page where I have only the Revenue measure the session value which is already set early is replaced by Session IB query result.
    Please suggest me if there is any resolution for my issue.
    Thanks a Lot in advance.
    :)

    I've had this issue myself and here is what i found. The only way I could get it to work was to have the Prompts that populate the Session Variables on the pages. In other words if I had the prompt on one page and then used guided navigation to go to another dashboard page I needed to have the same prompts located on that page for the session values to get passed into. Since in my case I didn't want the prompts to display or the User to know I had to add Dashboard prompts in order to captures the passed Session Variable values, I placed the dashboard prompts for my Session Variables in a separate section and then hid that section from the User. I hid the section by selecting Properties - Custom CSS Style Options (HTML Only) and then clicked on the check box for Use Custom CSS Style. In the text box enter display:none which will cause the section to be hidden from the User. The prompts will then exist on the dashboard page to receive the session values and the User will never know it is there.
    Hopefully this helps.
    Eric
    http://www.BIConsultingGroup.com

  • How to display Session value of an item  using Javascript?

    Hello All,
    I have a file browse item and I browse some file and click on upload, i run this javascript :
    function passBack()
    javascript:doSubmit('UPLOAD');
    alert('hi');
    var var_flag = $x('P91_FILE');
    alert(var_flag.value);
    opener.document.forms["wwv_flow"].f05[3].value = var_flag.value;
    close();
    </script>
    It dispalys 'hi ' as per the first alert.
    For the second alert it shows the file path value . ( C:\test\test1.sql).
    I need the file session value to be displayed here
    Like the following :
    F477093380/test1.sql
    and then I need to pass that value to parent page. and close the child page.
    Any idea?
    Thanks in advance.
    Regards,
    Archana

    Archana,
    I'm not sure about javascript, but u can use a sql query on the "APEX_APPLICATION_FILES" view to obtain that.
    Something like:
    SELECT id,NAME
      FROM APEX_APPLICATION_FILES;

  • Can we pass the session values to with  ExecuteParms

    hi jdev experts,
    Using jdev 11.1.1.5.0-adfbc
    normally what we do in execute with params. manullay write query something
    like ah:
    select * from employees where empolyeeid= :eid
    here
    eid is bindvariable.
    drag and drop in the type of  execute with params into jspx page it will works fine.
    but my requirement same only one thing is added.
    i will explain in details from start to end.
    i had employee login page.
    Username:100       // this username holds in session
    password:100
    login button
    enters into index page welcome "100"
    when hits search page search page opens
    search page means i write vo as :
    empsearchvo
    select * from employees where empolyeeid= :eid and salary = :sid
    bindvariable
    eid: (default value) adf.context.current.sessionScope.get('eid') in expersion
    sid:
    this vo exposed as execute with params with af:table
    my search page:
    eid: 100   -output text         // by default no need enter the session value showing here.
    sid :  10000  -inputtext        //user has to enter this details
    search (excutewithprams)
    af:table details
    employeeid  | salry | address  | and so on details.is this possible.?
    why am posting the thread means session value is not coming ui. so i cant get my result in af:table.
    can anyone help me? out.

    You should assign the session variable to the parameter at the binding layer of your page.
    Go to the binding tab of your JSF page, find the execute with params - look for the paramter and set the NDValue to point to your session value.
    Similar to this:
    https://blogs.oracle.com/shay/entry/passing_parameters_to_adf_appl

  • [SOLVED]How can I setWhereClause using a session value ?

    I have a session value that I want to use to pass as the bind variable to my Where clause on a View object.
    I have dragged the view from the data control pallete onto my page as an ADF form.
    I need to be able to set the Where clause of this view programmatically but I don't know where I should do this. Basically on entering this page the where clause should get set programmatically to the session value.
    I thought about creating a static block in my page's backing bean and doing it there but how would I access the view object from there ?
    Or should I create a Service method that sets the where clause and does an executeQuery and expose that to my page and execute it from my page's backing bean ?
    cheers

    Hi Dom,
    If you are using Oracle's binding layer - you could add a binding for "ExecuteWithParams" to the pagedef (right-click the bindings folder, add action binding, pick your View Object, choose execute with parameters as action); use an EL expression based upon sessionScope as the value for the bind variable.Then, add an invokeAction to the pageDef (right-click executables folder, choose invokeAction), specifying your executeWithParams binding as the binds property.
    Hope this gets you started.
    John

  • Edit session value after login

    I would like to edit the session value of a session that is set after a user logs in.
    Problem:
    I have a field 'date of birth' in my database: yyyy-mm-dd, but i need the age value instead in the session.
    I know how to calculate this but that is not the question, i need to know where to edit this value so that after a login the session is set to the age of the user instead of his/her date of birth value from the database.
    I hope you understand.
    Can someone please help me out...
    Thanks,
    Jim

    Hi Jim,
    <br />
    <br />nope, Adobe/Interakt are not participating here.
    <br />
    <br />However, I do *think* that converting these values *upon* login seems quite weird to do -- ADDT´s session variables are based on the "as is" contents of DB table fields, and what you´re asking for is a very special usage scenario which was even never asked for in the Interakt forums, so that´s why assumingly other forum particpants reading this keep scratching their heads as well.
    <br />
    <br />The only approach I can suggest for now, is to convert the session variables *after* login, and that´s quite easily possible -- on that very page that´s going to display the banner, it should be possible to initialize the abovementioned "calculate age from birthday" conversion routine and assign the session variable "current_age" to the PHP variable "$birthday_user", e.g. $birthday_user = $_SESSION['current_age'];
    <br />
    <br />Once you have this clearly assigned, all you´d have to do is to apply a "Show IF conditional region" that´s checking against the $birthday_user value, e.g.
    <br />
    <br /><?php<br />// Show IF Conditional region_check_user_age<br />if ($birthday_user < 20) {<br />?>
    <br />display banner for folks under 20
    <br /><?php<br />// else Conditional region_check_user_age<br />} else { ?>
    <br />display banner for folks older than 20
    <br /><?php }<br />// endif Conditional region_check_user_age<br />?>
    <br />
    <br />As the line breaks in the code posted above will most likely disappear as before, I´m attaching a text-only version
    <br />
    <br />Cheers,
    <br />Günter Schenk
    <br />Adobe Community Expert, Dreamweaver

Maybe you are looking for