Forum Stats

  • 3,726,962 Users
  • 2,245,299 Discussions
  • 7,852,512 Comments

Discussions

How to open a page through branching in a new tab (APEX 20)

Laury
Laury Member Posts: 1,639 Silver Badge

Hi,

I am working with APEX 20.

Depending of the value of an item through a radio group, I want a branching to a specific page, when pressing a button.

There are two kind of pages: a modal page, and a regular page.

For instance, I choose "Modal page" and press the button that is a submit button, the branching mechanism pops up to the given modal page.

Using the APEX features, it works fine.

If I choose "New tab page" and press the button (that is the same button) that is a submit button, the branching mechanism (that's a different one becauase I wish the branching to another page) open the desired page, but on the same tab.

How can I instruct APEX to open that page in a new tab?

The "Link Builder - Target" wizard does not allow to set up a property like "_blank".

Thanks by advance for any tip.

Kind Regards

Tagged:

Answers

  • Laury
    Laury Member Posts: 1,639 Silver Badge
  • mwooldridge
    mwooldridge Member Posts: 159 Bronze Badge

    You could create a before header branch with conditions that define what page to branch to.

  • fac586
    fac586 Senior Technical Architect Member Posts: 19,529 Black Diamond

    I am working with APEX 20.

    Depending of the value of an item through a radio group, I want a branching to a specific page, when pressing a button.

    There are two kind of pages: a modal page, and a regular page.

    For instance, I choose "Modal page" and press the button that is a submit button, the branching mechanism pops up to the given modal page.

    Using the APEX features, it works fine.

    If I choose "New tab page" and press the button (that is the same button) that is a submit button, the branching mechanism (that's a different one becauase I wish the branching to another page) open the desired page, but on the same tab.

    How can I instruct APEX to open that page in a new tab?

    The "Link Builder - Target" wizard does not allow to set up a property like "_blank".

    This is not possible using branches. Opening links in new windows or tabs, and rendering content in modal dialogs are things that happen in the browser, for both security and technical reasons. Depending on the type of branch used, branching either occurs entirely within server processing, or is initiated by the server sending a redirect response to the browser, an action that does not support the opening of new browsing contexts.

    Additionally, branching to dialog pages is actually not supported behaviour. It only apparently "works" due to the current implementation details of another feature, and may stop "working" in the future.

    Other than submitting the value of this radio group, does clicking the button result in any other change to session state or execute any server-side processing?

    If not, replace the radio group, submit button, and branches with simple links implementing the required behaviours.

  • Laury
    Laury Member Posts: 1,639 Silver Badge

    I was in fact testing the possibility to open a new page depending on the value of an item.

    With value A, page1 is opened and with value B, page2 is opened.

    Pages are of different nature: page1 is an APEX modal page, and page2 a regular page to be displayed in a new tab.

    First, the item value is chosen from the radio group.

    Second, the submit button is pressed that triggers page processing and then branching.

    In this situation there is no page process defined for the above button, but the item in the calling page gets its value in session state.

    Third, the branching process is triggered. The value of the item from the calling page is passed to an item in the called page (see branching_regular_page.png).

    A branching is defined for each page.


    At that stage:

    - If I use a modal page, the modal page is called in "modal" mode.

    - If I use a regular APEX page for the called page, the called page after branching replaces the calling page I have in the browser.

    But, I wish to have it displayed in a new tab.

    I could use a dynamic action to implement the page in a new tab with a JavaScript function.

    But then, I guess I would need to create a different button for this process. This is not really user-friendly.

    How can I implement such mechanism with only one button (if possible)?


    You wrote "Additionally, branching to dialog pages is actually not supported behaviour. It only apparently "works" due to the current implementation details of another feature, and may stop "working" in the future".

    If it is not wise to usie a dialog page in branching, for what should I reserve the use of such dialog page?


    "Other than submitting the value of this radio group, does clicking the button result in any other change to session state or execute any server-side processing?"

    No, the submitting button does nothing more than just submitting the value of the radio group.


    "If not, replace the radio group, submit button, and branches with simple links implementing the required behaviours."

    How to implement a choice to another page then? A radio group seemed to me a user-friendly option.

  • Laury
    Laury Member Posts: 1,639 Silver Badge

    What do you mean with "You could create a before header branch with conditions that define what page to branch to"?

    I can only define one page per branching.

  • mwooldridge
    mwooldridge Member Posts: 159 Bronze Badge
    edited October 2020

    Is this what you want?

    If so, I used a dynamic actions on the submit button with javascript to check the value of the radio button.

    the url field is set using apex_item.prepare_url

    the page contains a branch to open the modal

  • fac586
    fac586 Senior Technical Architect Member Posts: 19,529 Black Diamond
  • Pavel_p
    Pavel_p Member Posts: 2,296 Gold Trophy

    Paul, you're the real wizard!

    Please, could you share the secret how you managed to find this thread? Searching is completely broken (hopefully they will eventually fix it but I would not bet on it) and a lot of knowledge is lost. I'm just curious and maybe I'll learn from you again something non-trivial like many times before🙂.

    ------

    Sorry for asking a completely irrelevant question in this thread but I just could not help myself.

  • fac586
    fac586 Senior Technical Architect Member Posts: 19,529 Black Diamond

    Paul, you're the real wizard!

    If so, a frustrated and grumpy one.

    Please, could you share the secret how you managed to find this thread?

    That one was relatively easy via Google: site:community.oracle.com modal branch

    However, Google failed for this one, despite days of trying to come up with the right incantation. I then tried Duck Duck Go with no success, and eventually got it through Bing. Great I thought, I'll try Bing for the modal branch post. Nothing but pages and pages of links to APEX documentation...

    Just shows how good the search on the old forum was if you knew how to use it.

    Searching is completely broken (hopefully they will eventually fix it but I would not bet on it) and a lot of knowledge is lost.

    Please go and complain about this on the Community Hub:

    I started a thread on this but it is has attracted no official response so far:


  • Pavel_p
    Pavel_p Member Posts: 2,296 Gold Trophy

    If so, a frustrated and grumpy one.

    I was right when I expected to learn something new - I did not know the word "grumpy"🙂

    So no arcane magic but the good old Uncle Google... OK, at least something.

    Of course I read your thread several days ago and noticed that there was no response but the feedback forum is full of complaints and (almost) nothing is happening. Also I'm afraid complaints are strictly forbidden, I participated in one such thread that got closed immediately and that's why I'm scared to complain publicly again.

  • Laury
    Laury Member Posts: 1,639 Silver Badge

    @mwooldridge:

    What I want to achieve is to open a page through a branching process in a new tab.

    In my situation I have two kind of pages (modal and regular).

    I want to be able to open one of these pages through a branching, after pressing a button - the same button for both pages.

    I didn't find a mechanism to unify both situations.

    is it possible or not? If yes, how?


    @fac586:

    I understood from you that "branching to dialog pages is actually not supported behaviour" (although it works).

    I have been thinking about that topic, and it makes sense.

    In what situations one wants to use modal/dialog pages?


    Kind Regards

  • Laury
    Laury Member Posts: 1,639 Silver Badge

    Hi,

    I still didn't find, and the only workaround I have is to use a modal page.

    Kind Regards

Sign In or Register to comment.