Skip to Main Content
Feature Request FR-1815
Product Area Application Builder
Status ROADMAP

136 Voters

Allow Modal Dialog Title to Include Page Item Values

steve.muench APEX Team
· Aug 22 2021

Idea Summary
Allow modal dialog title to show context info by including page items values where appropriate

Use Case
Including a dynamic value in a modal dialog is a common requirement to reinforce the context of the data being edited. I tried many combinations of populating page items using page processes/computations and page items populated from SELECT statements but they all seemed to be calculated too late to be included in the modal dialog title. Or at least none of the things I tried was working as I was hoping. Googling around I found Ronny Weiss' Dynamic Dialog Title plugin with which I ended up being able to accomplish my goal. Studying the plugin, it appeared to boil down to one strategic line of JavaScript that dynamically set the title, but this situation seems common enough that it should be something I could have accomplished without having to discover 3rd-party plugins or learn JavaScript.

This is currently on the roadmap for a future release of Oracle APEX.

3 Comments

Comments

  • werner OP 3.5 years ago

    Prerendering - before header

    populate the page items (Select or PlSql or Form-Content)

    Events / Page load / JavaScript-Code :

    apex.util.getTopApex().jQuery(".ui-dialog-content").dialog("option", "title", "&Pnn_xxxxx.");

    Applied in various modal pages, works fine.

    Hope this helps

    Werner

  • carl2 OP 1 years ago

    I have a very strange phenomenon :
    I have a page that queries the database and displays rows in a Interactive report
    I open a modal dialog via a link to the dialog page
    upon loading the dialog I execute the javascript code above.

    Now upon the first query, I can click several links on several lines in the interactive report and the dialog is opened and the title is modified as it should be

    However, when I change some of the query parameters of the Interactive report and the interactive report is rendered again, when I then click on the link to the modal dialog the following happens :

    • everything on the modal dialog is normal
    • however a javascript error occurs that says “cannot call methods on dialog prior to initialization; attempted to call method 'option'”
    • and of course the title of the dialog is not changed

    Remains to be pointed out : the interactive report is populated based on an apex_collection, however I don't think that has anything to do with it…

  • phillip.grimshaw OP 8 weeks ago

    long overdue