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!

Mobile Modal Dialogue page called from dynamic action

PaulCFeb 15 2016 — edited Feb 16 2016

Environment

Apex 5.0.3/Oracle12c/Linux/Tomcat/Ords 3


Scenario

Using theme 51, a page calls a modal dialogue page.  The modal page contains a list that allows the user to select a value that is returned to the parent page.  A button on the parent page uses dynamic actions to open and manage the close event for the modal dialog page.  


Problem

A dynamic action with a javascript call using apex.navigation.dialog results in an error:-

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

Detail

Using a button on the parent page (using standard mobile page and button template) and creating a dynamic action (as detailed in documentation https://docs.oracle.com/cd/E59726_01/doc.50/e39149/javascript_api.htm#AEAPI30089 ) throws an error.  The button has a static id set as the button name. DA also defines close dialogue event. The DA to open the modal page is a javascript call:-

      apex.navigation.dialog('f?p=70382:1005:&APP_SESSION.:::::',{title:'Contents Index',dialog:null},'',this);

In the example, page 1005 is a Modal Dialogue page using a Dialog template.  Various permutations have been tried in the javascript call (e.g. setting request value to button static id name).

On clicking the button the following error arises:-

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

  • is_internal_error: true
  • apex_error_code: APEX.DIALOG.PAGE.ERROR
  • component.type: APEX_APPLICATION_PAGES
  • component.id: 70382000001005
  • component.name: Contents Index

There is no javascript error in the console, so it looks like Apex is expecting something to be set that is not being set; unfortunately I cannot find what that might be from the documentation or other forum posts.

The problem has been recreated on apex.oracle:-

Workspace: Sibylline

User: test/test

Application: 70382 Link Test

Use mobile page 1001 to login, navigation menu option Mobile Page Link Problem will navigate you to parent page 1004, the button will call modal page 1005.  Page 1005 has a several different lists and reports to enable the user to select a value, the region “Index of Contents by list dialog” is currently displayed – all other regions are set not to display.  This region follows the recommended approach of using apex.navigation.dialog.close to return a value to parent page. 

Has anybody got a working example of calling a mobile modal page using dynamic actions?

Could the dev team advice if there is known problem or if something specific needs to be set to call the modal page?

Thanks  

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 15 2016
Added on Feb 15 2016
4 comments
1,484 views