« JDeveloper 11.1.1.0.1 (Build 5188) is now available | Main | Warning "Transient state added to StateManager. State may not be serialized." »

Dialog Not Opening In A Popup Window In JDev 11g

We get a lot of questions at Oracle Support about the dialogs not opening in a separate, dialog window in JDeveloper 11g.

For example, suppose you specified the following:

faces-config.xml

<?xml version="1.0" encoding="windows-1252"?>
<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee">
  <application>
    <default-render-kit-id>oracle.adf.rich</default-render-kit-id>
  </application>
  <navigation-rule>
    <navigation-case>
      <from-outcome>dialog:popup</from-outcome>
      <to-view-id>/popup.jspx</to-view-id>
    </navigation-case>
  </navigation-rule>
</faces-config>


yourMainPage.jspx
<?xml version='1.0' encoding='windows-1252'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
  <jsp:directive.page contentType="text/html;charset=windows-1252"/>
  <f:view>
    <af:document>
      <af:form>
        <af:commandButton useWindow="true" action="dialog:popup" text="Open Popup"/>
      </af:form>
    </af:document>
  </f:view>
</jsp:root>

Note the following properties:
useWindow="true" action="dialog:popup"
that should open the page as a popup dialog.


This worked correctly in JDeveloper 10g
In JDeveloper 11g however, it opens popup.jspx in the same browser window as yourMainPage.jspx, and not in a dialog window.

The reason is that you used faces-config.xml to configure your navigation rule, instead of adfc-config.xml.
From the "Oracle® Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework",
Chapter 17 Creating Complex Task Flows,
topic "17.7 Running an ADF Bounded Task Flow as a Modal Dialog"

If your application uses ADF Controller features (for example, ADF task flows), specifying dialog: syntax in navigation rules within faces-config.xml is not supported.
However, you can use the dialog: syntax in the control flow rules that you specify in the adfc-config.xml file.

So you should specify the flow in adfc-config.xml:

adfc-config.xml

<?xml version="1.0" encoding="windows-1252" ?>
<adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
  <view id="main">
    <page>/main.jspx</page>
  </view>
  <view id="popup">
    <page>/popup.jspx</page>
  </view>
  <control-flow-rule>
    <from-activity-id>*</from-activity-id>
    <control-flow-case>
      <from-outcome>dialog:popup</from-outcome>
      <to-activity-id>popup</to-activity-id>
    </control-flow-case>
  </control-flow-rule>
</adfc-config>

See also "A.3 Configuration in faces-config.xml"
Typically, you would configure the following in then faces-config.xml file:

  • Application resources such as message bundles and supported locales

  • Page-to-page navigation rules

  • Custom validators and converters

  • Managed beans for holding and processing data, handling UI events, and performing business logic

Note:
If your application uses the ADF Controller, these items are configured in the adfc-config.xml file. For more information, see the "Getting Started With Task Flows" chapter of the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About This Entry

This page contains a single entry from the blog posted on December 23, 2008 9:54 PM.

The previous post in this blog was JDeveloper 11.1.1.0.1 (Build 5188) is now available .

The next post in this blog is Warning "Transient state added to StateManager. State may not be serialized.".

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type and Oracle