Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to create Dynamic Action so that according to user's choice page will or will not redirect

LukSkyWalkerSep 5 2019 — edited Sep 13 2019

I am not sure whether I write in right place so sorry for possible mistake.

  1. I have a Link which redirect user to another page in APEX. Link Attributes:  class="new_test_run t-Button t-Button--simple t-Button--hot t-Button--stretch" title="Create Test Run" tc_id="#ID#"
  2. There is also "Click" event which is run when user click mentioned link.
  3. Click event has dynamic action.
  4. When event is true, there is "Confirm" action with proper text and two buttons: "Ok" and "Cancel"
  5. Finally there is "Execute JavaScript Code" action which set a parameter:
    apex.confirm({ request:"CREATE_TEST_RUN", set:{"P300_TEST_CYCLE_ID": $(this.triggeringElement).attr('tc_id')} });

Actual result is: Not matter whether user select "OK" or "Cancel" in dialog window, page is redirected.

Expected result is: If user select "Cancel", dialog window should be closed and nothing should happen. So I am trying to find out how to stop redirection with Dynamic Action in case of click on "Cancel" button.

I have come to new project and I need to take care of some APEX issues because nobody knows it. I was learning it few years ago so I am dedicated for it.

I was trying something like this:

if (confirm { apex_util.redirect_url(p_url=>'f?p=110:309:&SESSION.::NO:RP::'); apex.confirm({ request:"CREATE_TEST_RUN", set:{"P300_TEST_CYCLE_ID": $(this.triggeringElement).attr('tc_id')} }); }

Actual result is: Not matter whether user select "OK" or "Cancel" in dialog window, page is redirected. Expected result is: If user select "Cancel" dialog window should be closed and nothing should happen. So I am trying to find out how to stop redirection with Dynamic Action in case of click on "Cancel" button.

I will really appreciate for some help.

This post has been answered by Pavel_p on Sep 9 2019
Jump to Answer
Comments
Post Details
Added on Sep 5 2019
18 comments
1,873 views