Forum Stats

  • 3,733,080 Users
  • 2,246,690 Discussions
  • 7,856,502 Comments

Discussions

redirect to page

Chandler Bing
Chandler Bing Member Posts: 127 Blue Ribbon
edited December 2019 in APEX Discussions

I have form ,and there is a button that performs to redirect another page in the same application and pass value. for example, as shown below. but the problem is value should be shown null.

I don't want this on a branch, bcoz i am dont want to submit page.

pastedImage_0.png

plz give any suggestion ?

Chandler Bing

Best Answer

  • Veerendra Patil
    Veerendra Patil Member Posts: 537 Gold Badge
    edited November 2019 Accepted Answer

    1. Create a dummy button and and make it hidden. Or create an Inline Dialog region and add the button there. This wont be displayed in that case.

        Give a static ID to that button eg "myBtn"

    2. On this button create action as Direct to another page in the application(which you want to navigate to) - Dont pass any parameters/Dont clear cache. Just add the            page number.

    3. On your button which you actually want to click to navigate - Create a dynamic action on button click

    action 1 - Execute PLSQL code

                     BEGIN

                        APEX_UTIL.SET_SESSION_STATE('P2_INPUT', :P1_INPUT);

                     END;

                    Items to submit - P1_INPUT

    action 2 - Execute Javascript code

                   $("#myBtn").click(); /// myBtn is the static id of dummy Btn you created in step 1.

    Thanks,

    Veerendra.

    Chandler BingChandler Bing

Answers

  • Mathias Maciel
    Mathias Maciel Member Posts: 29 Green Ribbon
    edited November 2019

    Is item storing a previous old value? If it does is probably because your item on target page has the Used property on Source defined as Only when current value in session state is null.

    Try on your Link Builder - Target settings by specifing on Clear Session State and set the number of your target page in Clear Cache attribute.

    Chandler BingChandler Bing
  • Veerendra Patil
    Veerendra Patil Member Posts: 537 Gold Badge
    edited November 2019 Accepted Answer

    1. Create a dummy button and and make it hidden. Or create an Inline Dialog region and add the button there. This wont be displayed in that case.

        Give a static ID to that button eg "myBtn"

    2. On this button create action as Direct to another page in the application(which you want to navigate to) - Dont pass any parameters/Dont clear cache. Just add the            page number.

    3. On your button which you actually want to click to navigate - Create a dynamic action on button click

    action 1 - Execute PLSQL code

                     BEGIN

                        APEX_UTIL.SET_SESSION_STATE('P2_INPUT', :P1_INPUT);

                     END;

                    Items to submit - P1_INPUT

    action 2 - Execute Javascript code

                   $("#myBtn").click(); /// myBtn is the static id of dummy Btn you created in step 1.

    Thanks,

    Veerendra.

    Chandler BingChandler Bing
  • Paavo
    Paavo Member Posts: 627 Silver Badge
    edited December 2019

    Hi Chandlerbing

    Hint, when you start having redirects in the application for various reasons, it is good to get browser addons like "Link redirect trace" to be occasionally  see what happens.

    Rgrds Paavo

    Chandler BingChandler Bing
Sign In or Register to comment.