incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurie Harper <>
Subject Dialogs loading in popup *and* parent window
Date Thu, 24 Aug 2006 03:22:14 GMT
I'm trying to get Trinidad dialogs working in an application and it's  
almost working, with one caveat: when a dialog opens, a new window  
pops up as expected, with the correct page displayed, but the calling  
window *also* refreshes to display the dialog -- in other words, I  
end up with the dialog displayed in both the popup window and the  
originating window.

I have a somewhat involved configuration, using custom ViewHandler  
and NavigationHandler implementations, with Shale, Facelets, Trinidad  
and MyFaces all in the mix, so it's probably some undesired  
interaction between one or more of these components that's causing  
the problem. The trouble is, I'm not quite sure where to start  

Since the correct dialog *is* opening in a new window, I suspect that  
the undesired refresh of the originating window is due to a mis-step  
somewhere in the dialog handling on the client side. Here's a simple- 
as-possible Facelets view to invoke a dialog:

<tr:document xmlns="" xmlns:tr="http://">
         <h1>Launch a dialog</h1>
         <tr:commandLink action="popup:edit" useWindow="true">edit</ 


The rendered HTML from dialog.xhtml is included below. I can see that  
the command link calls submitForm() on click, and tracing through  
that with Venkman shows that it eventually calls form.submit(). What  
I'm unclear about is how/where the response gets redirected to a  
popup window, and how it's getting rendered in the originating window  
*as well as* in the popup window.

I'm using a recent Trinidad build from svn trunk. Any suggestions for  
how to further diagnose this would be *most* welcome...


<?xml version='1.0' encoding='UTF-8'?>
<html dir="ltr" lang="en">
<meta name="generator" content="Oracle ADF Faces">
<link rel="stylesheet" charset="UTF-8" type="text/css" href="/adf/ 
<script>var _AdfWindowOpenError='A popup window blocker has been  
detected in your browser. Popup blockers interfere with the operation  
of this application. Please disable your popup blocker or allow  
popups from this site.';</script>
<script src="/adf/jsLibs/Common11-m7.js"></script>
<body onload="_checkLoad(event)" onunload="_checkUnload(event)">
<iframe id="_pprIFrame" name="_pprIFrame" frameborder="0"  
longdesc="#" title="" src="about:blank"  
style="position:absolute;top:-100px;visibility:hidden" width="0"  
<div id="_pprBlockingDiv" onclick="return _pprConsumeClick(event);"  
onkeydown="return false;" onkeyup="return false;" onmousedown="return  
false;" onmouseup="return false;" onkeypress="return false;"></div>
<script>var _cachedLibs;</script>
<a name="top"></a>
<noscript>This page uses JavaScript and requires a JavaScript enabled  
browser.Your browser is not JavaScript enabled.</noscript>
<form id="_id2" name="_id2" style="margin:0px" method="POST"  
onkeypress="return _submitOnEnter(event,'_id2');" action="/faces/foo/ 
         <h1>Launch a dialog</h1>
         <a onclick="submitForm('_id2',1,{source:'_id4'});return  
false;" class="xi" href="#">edit</a>
         <input type="hidden"  
name="org.apache.myfaces.trinidad.faces.FORM" value="_id2">
         <span id="__id2_Postscript">
                 <input type="hidden"  
name="org.apache.myfaces.trinidad.faces.STATE" value="!-47b9b9a5">
                 <input type="hidden" name="source">
                 <script>var _reset_id2Names=["source"];</script>
                 <script>function __id2Validator(){return true;}var  
<!-- Created by Oracle ADF Faces (Version unknown: ADF Faces API - ??/ 
ADF Faces Implementation - ??), skin:minimal.desktop (minimal) -->

Laurie Harper
Open Source advocate, Java geek:
Founder, Zotech Software:

View raw message