Forum Stats

  • 3,874,157 Users
  • 2,266,675 Discussions
  • 7,911,745 Comments

Discussions

How to open modal dialog from another modal page

Soukaina IDRISSI
Soukaina IDRISSI Member Posts: 896 Bronze Badge
edited Feb 26, 2019 3:42AM in APEX Discussions

Hi Experts,

I want to open modal dialog inside another without closing it, but im getting a error;

I created demo on apex.oracle.com with this credentials:

Workspace: ws_formation

Username: asoukaina

Password: password

I used the Application 1900 - Open Multi Modal Page

Thank you for help.

Tagged:
Prze-moC

Best Answer

  • fac586
    fac586 Senior Technical Architect Member Posts: 21,456 Red Diamond
    edited Feb 25, 2019 2:06PM Answer ✓
    Soukaina IDRISSI wrote:I want to open modal dialog inside another without closing it, but im getting a error;I created demo on apex.oracle.com with this credentials:Workspace: ws_formationUsername: asoukainaPassword: passwordI used the Application 1900 - Open Multi Modal Page

    Getting multiple errors, initially due to using an invalid APEX URL when invoking the dialog in the report link column:

    javascript:apex.navigation.dialog('f?p=3:11:APP_SESSION::NO:::',{modal:true,dialog:null},'t-Dialog--standard',this);

    1. This is not application "3".
    2. There is no page "11".
    3. "APP_SESSION" does not produce a valid session identifier.

    This can be resolved (see application 106566 in your workspace) using the appropriate substitution strings and the correct page target:

    javascript:apex.navigation.dialog('f?p=&APP_ID.:3:&APP_SESSION.::NO:::',{modal:true,dialog:null},'t-Dialog--standard',this);

    Unfortunately this then produces the catch-all error:

    Application 106566 Dialog page 3 cannot be rendered successfully. Ensure the page template in use on page 3 is of template type "Dialog page", with appropriate JavaScript dialog initialization, dialog closure and dialog cancel code defined.

    The reasons for this are not so obvious—and definitely nothing to do with the template on page 3—but probably stem from the use of incorrect or incomplete parameters in the JS API call.

    However, this begs the question: having successfully opened the first dialog page using declarative column link properties, why complicate matters by taking this approach rather than repeating the working formula? Simply set the Dialog Chained property on page 3 to No, and create a basic link to in the report on page 2 (LOC column) and we're done.

    Prze-moC

Answers

  • fac586
    fac586 Senior Technical Architect Member Posts: 21,456 Red Diamond
    edited Feb 25, 2019 2:06PM Answer ✓
    Soukaina IDRISSI wrote:I want to open modal dialog inside another without closing it, but im getting a error;I created demo on apex.oracle.com with this credentials:Workspace: ws_formationUsername: asoukainaPassword: passwordI used the Application 1900 - Open Multi Modal Page

    Getting multiple errors, initially due to using an invalid APEX URL when invoking the dialog in the report link column:

    javascript:apex.navigation.dialog('f?p=3:11:APP_SESSION::NO:::',{modal:true,dialog:null},'t-Dialog--standard',this);

    1. This is not application "3".
    2. There is no page "11".
    3. "APP_SESSION" does not produce a valid session identifier.

    This can be resolved (see application 106566 in your workspace) using the appropriate substitution strings and the correct page target:

    javascript:apex.navigation.dialog('f?p=&APP_ID.:3:&APP_SESSION.::NO:::',{modal:true,dialog:null},'t-Dialog--standard',this);

    Unfortunately this then produces the catch-all error:

    Application 106566 Dialog page 3 cannot be rendered successfully. Ensure the page template in use on page 3 is of template type "Dialog page", with appropriate JavaScript dialog initialization, dialog closure and dialog cancel code defined.

    The reasons for this are not so obvious—and definitely nothing to do with the template on page 3—but probably stem from the use of incorrect or incomplete parameters in the JS API call.

    However, this begs the question: having successfully opened the first dialog page using declarative column link properties, why complicate matters by taking this approach rather than repeating the working formula? Simply set the Dialog Chained property on page 3 to No, and create a basic link to in the report on page 2 (LOC column) and we're done.

    Prze-moC
  • Soukaina IDRISSI
    Soukaina IDRISSI Member Posts: 896 Bronze Badge
    edited Feb 26, 2019 3:42AM

    Thank you fac586 for help