You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ri...@apache.org on 2005/09/22 19:52:32 UTC

svn commit: r290996 - in /beehive/trunk/netui: src/tags-html/org/apache/beehive/netui/tags/html/ src/tags-html/org/apache/beehive/netui/tags/javascript/ test/webapps/drt/testRecorder/tests/

Author: rich
Date: Thu Sep 22 10:52:13 2005
New Revision: 290996

URL: http://svn.apache.org/viewcvs?rev=290996&view=rev
Log:
This is a contribution from Carlin Rogers to address http://issues.apache.org/jira/browse/BEEHIVE-542 : Multiple popup scripts generated when multiple popup config exist in one page

tests: bvt in netui (WinXP)
BB: self (linux)


Modified:
    beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/PopupSupport.java
    beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/javascript/CoreScriptFeature.java
    beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/javascript/ScriptRequestState.java
    beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/javascript/javaScript.properties
    beehive/trunk/netui/test/webapps/drt/testRecorder/tests/MockPortalPopupWindows.xml
    beehive/trunk/netui/test/webapps/drt/testRecorder/tests/PopupAttribute.xml
    beehive/trunk/netui/test/webapps/drt/testRecorder/tests/UpdateFormFromNestedPopup.xml

Modified: beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/PopupSupport.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/PopupSupport.java?rev=290996&r1=290995&r2=290996&view=diff
==============================================================================
--- beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/PopupSupport.java (original)
+++ beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/PopupSupport.java Thu Sep 22 10:52:13 2005
@@ -39,6 +39,7 @@
     private static final String VIEW_RENDERER_CLASS_NAME = ReturnActionViewRenderer.class.getName();
     private static final String ON_POPUP_DONE_FUNC = "Netui_OnPopupDone";
     private static final String POPUP_FUNC = "Netui_Popup";
+    private static final String POPUP_WINDOW = "Netui_Window";
 
     private String _name = "";
     private HashMap _features;
@@ -141,8 +142,9 @@
             }
         }
         
-        String popupFunc = (_popupFunc != null ? _popupFunc : getScopedFunctionName(req, POPUP_FUNC));
-        Object[] args = new Object[]{popupFunc, url, _name, features.toString(), Boolean.valueOf(_replace)};
+        String popupFunc = (_popupFunc != null ? _popupFunc : POPUP_FUNC);
+        String popupWindow = getScopedFunctionName(req, POPUP_WINDOW);
+        Object[] args = new Object[]{popupFunc, url, _name, features.toString(), Boolean.valueOf(_replace), popupWindow};
         return ScriptRequestState.getString("popupSupportOnClick", args);
     }
 
@@ -162,11 +164,14 @@
     public void writeScript(ServletRequest req, ScriptRequestState srs, IScriptReporter scriptReporter, AbstractRenderAppender results)
     {
         // Write the generic function for popping a window.
-        String popupFunc = getScopedFunctionName(req, POPUP_FUNC);
-        srs.writeFeature(scriptReporter, results, "popupSupportPopupWindow", new Object[]{popupFunc});
+        srs.writeFeature(scriptReporter, results, CoreScriptFeature.POPUP_OPEN, true, false, new Object[]{POPUP_FUNC});
 
         // Write the callback that's triggered when the popup window is closing.
         srs.writeFeature(scriptReporter, results, CoreScriptFeature.POPUP_DONE, true, false, new Object[]{ON_POPUP_DONE_FUNC});
+
+        // Write the initialization of the popup window variable.
+        String popupWindow = getScopedFunctionName(req, POPUP_WINDOW);
+        srs.writeFeature(scriptReporter, results, "popupSupportWindowVariable", new Object[]{popupWindow});
     }
     
     private static String getScopedFunctionName(ServletRequest req, String funcName)

Modified: beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/javascript/CoreScriptFeature.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/javascript/CoreScriptFeature.java?rev=290996&r1=290995&r2=290996&view=diff
==============================================================================
--- beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/javascript/CoreScriptFeature.java (original)
+++ beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/javascript/CoreScriptFeature.java Thu Sep 22 10:52:13 2005
@@ -22,22 +22,23 @@
  */
 public class CoreScriptFeature
 {
-    public static final int INT_LEGACY_LOOKUP = 0x0001;
-    public static final int INT_ID_LOOKUP = 0x0002;
-    public static final int INT_NAME_LOOKUP = 0x0004;
-    public static final int INT_SCOPE_LOOKUP = 0x0008;
-    public static final int INT_ROLLOVER = 0x0010;
-    public static final int INT_ANCHOR_SUBMIT = 0x0020;
-    public static final int INT_POPUP_DONE = 0x0040;
-    public static final int INT_ALLOCATE_LEGACY = 0x0080;
-    public static final int INT_ALLOCATE_ID = 0x0100;
-    public static final int INT_ALLOCATE_NAME = 0x0200;
-    public static final int INT_LEGACY_SCOPE_LOOKUP = 0x0400;
-    public static final int INT_TREE_INIT = 0x0800;
-    public static final int INT_DIVPANEL_INIT = 0x1000;
-    public static final int INT_DYNAMIC_INIT = 0x2000;
-    public static final int INT_BUTTON_DISABLE_AND_SUBMIT = 0x4000;
-    public static final int INT_BUTTON_DISABLE = 0x8000;
+    public static final int INT_LEGACY_LOOKUP = 0x00001;
+    public static final int INT_ID_LOOKUP = 0x00002;
+    public static final int INT_NAME_LOOKUP = 0x00004;
+    public static final int INT_SCOPE_LOOKUP = 0x00008;
+    public static final int INT_ROLLOVER = 0x00010;
+    public static final int INT_ANCHOR_SUBMIT = 0x00020;
+    public static final int INT_POPUP_OPEN = 0x00040;
+    public static final int INT_POPUP_DONE = 0x00080;
+    public static final int INT_ALLOCATE_LEGACY = 0x00100;
+    public static final int INT_ALLOCATE_ID = 0x00200;
+    public static final int INT_ALLOCATE_NAME = 0x00400;
+    public static final int INT_LEGACY_SCOPE_LOOKUP = 0x00800;
+    public static final int INT_TREE_INIT = 0x01000;
+    public static final int INT_DIVPANEL_INIT = 0x02000;
+    public static final int INT_DYNAMIC_INIT = 0x04000;
+    public static final int INT_BUTTON_DISABLE_AND_SUBMIT = 0x08000;
+    public static final int INT_BUTTON_DISABLE = 0x10000;
 
     // These features are not written out once.  They are identified by setting the top bit
     protected static final int INT_SET_FOCUS = 0x10000001;
@@ -55,6 +56,7 @@
     public static final CoreScriptFeature SCOPE_LOOKUP = new CoreScriptFeature(INT_SCOPE_LOOKUP);
     public static final CoreScriptFeature ROLLOVER = new CoreScriptFeature(INT_ROLLOVER);
     public static final CoreScriptFeature ANCHOR_SUBMIT = new CoreScriptFeature(INT_ANCHOR_SUBMIT);
+    public static final CoreScriptFeature POPUP_OPEN = new CoreScriptFeature(INT_POPUP_OPEN);
     public static final CoreScriptFeature POPUP_DONE = new CoreScriptFeature(INT_POPUP_DONE);
     public static final CoreScriptFeature ALLOCATE_LEGACY = new CoreScriptFeature(INT_ALLOCATE_LEGACY);
     public static final CoreScriptFeature ALLOCATE_ID = new CoreScriptFeature(INT_ALLOCATE_ID);
@@ -66,7 +68,7 @@
     public static final CoreScriptFeature BUTTON_DISABLE_AND_SUBMIT = new CoreScriptFeature(INT_BUTTON_DISABLE_AND_SUBMIT);
     public static final CoreScriptFeature BUTTON_DISABLE = new CoreScriptFeature(INT_BUTTON_DISABLE);
     public static final CoreScriptFeature SET_FOCUS = new CoreScriptFeature(INT_SET_FOCUS);
-    
+
     public String toString()
     {
         switch ( value )
@@ -77,6 +79,7 @@
             case INT_SCOPE_LOOKUP: return "SCOPE_LOOKUP";
             case INT_ROLLOVER: return "ROLLOVER";
             case INT_ANCHOR_SUBMIT: return "ANCHOR_SUBMIT";
+            case INT_POPUP_OPEN: return "POPUP_OPEN";
             case INT_POPUP_DONE: return "POPUP_DONE";
             case INT_ALLOCATE_LEGACY: return "ALLOCATE_LEGACY";
             case INT_ALLOCATE_ID: return "ALLOCATE_ID";

Modified: beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/javascript/ScriptRequestState.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/javascript/ScriptRequestState.java?rev=290996&r1=290995&r2=290996&view=diff
==============================================================================
--- beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/javascript/ScriptRequestState.java (original)
+++ beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/javascript/ScriptRequestState.java Thu Sep 22 10:52:13 2005
@@ -282,6 +282,8 @@
                 return "anchorFormSubmit";
             case CoreScriptFeature.INT_SET_FOCUS:
                 return "setFocus";
+            case CoreScriptFeature.INT_POPUP_OPEN:
+                return "popupSupportPopupWindow";
             case CoreScriptFeature.INT_POPUP_DONE:
                 return "popupDone";
             case CoreScriptFeature.INT_ROLLOVER:

Modified: beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/javascript/javaScript.properties
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/javascript/javaScript.properties?rev=290996&r1=290995&r2=290996&view=diff
==============================================================================
--- beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/javascript/javaScript.properties (original)
+++ beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/javascript/javaScript.properties Thu Sep 22 10:52:13 2005
@@ -72,22 +72,29 @@
 # The action event that will call the form submit javascript
 buttonDisableAction=button_disable(this);return false;
 
+# array of the popup windows associated by name
+popupSupportWindowVariable=\
+window_netui_popup["{0}"] = null;\n
+
 # generic method to open a popup window
 popupSupportPopupWindow=\
-window_{0} = null;\n\
-function {0}(url, name, features, replace)\n\
+if (!window_netui_popup) '{'\n\
+\  var window_netui_popup = new Array();\n\
+'}'\n\
+\n\
+function {0}(url, name, features, replace, popup)\n\
 '{'\n\
-\  if (window_{0} != null && ! window_{0}.closed)\n\
+\  if (window_netui_popup[popup] != null && ! window_netui_popup[popup].closed)\n\
 \  '{'\n\
-\    window_{0}.focus();\n\
+\    window_netui_popup[popup].focus();\n\
 \    return;\n\
 \  '}'\n\
-\  window_{0}=open(url, name, features, replace);\n\
-\  if (window_{0}.opener == null) window_{0}.opener=self;\n\
+\  window_netui_popup[popup]=open(url, name, features, replace);\n\
+\  if (window_netui_popup[popup].opener == null) window_netui_popup[popup].opener=self;\n\
 '}'\n
 
 # Open a popup window using a custom function
-popupSupportOnClick={0}(''{1}'',''{2}'',''{3}'',{4});return false;
+popupSupportOnClick={0}(''{1}'',''{2}'',''{3}'',{4},''{5}'');return false;
 
 popupDone=\
 function {0}(map)\n\

Modified: beehive/trunk/netui/test/webapps/drt/testRecorder/tests/MockPortalPopupWindows.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/MockPortalPopupWindows.xml?rev=290996&r1=290995&r2=290996&view=diff
==============================================================================
--- beehive/trunk/netui/test/webapps/drt/testRecorder/tests/MockPortalPopupWindows.xml (original)
+++ beehive/trunk/netui/test/webapps/drt/testRecorder/tests/MockPortalPopupWindows.xml Thu Sep 22 10:52:13 2005
@@ -135,7 +135,7 @@
               <input type="text" name="portletA{actionForm.zip}" id="portletA.zipField">
               <span style="color:red"></span>
 
-              <a href="/coreWeb/miniTests/updateFormFromNestedPopup/getZip.do?_netui%3AreturnActionViewRenderer=org.apache.beehive.netui.tags.internal.ReturnActionViewRenderer&amp;_netui%3AretrieveItem=outputFormBean.state%3AportletA.stateField&amp;_netui%3AretrieveItem=outputFormBean.zip%3AportletA.zipField&amp;_netui%3AreturnActionCallback=Netui_OnPopupDone&amp;jpfScopeID=portletA" onclick="Netui_Popup_portletA('/coreWeb/miniTests/updateFormFromNestedPopup/getZip.do?_netui%3AreturnActionViewRenderer=org.apache.beehive.netui.tags.internal.ReturnActionViewRenderer&amp;_netui%3AretrieveItem=outputFormBean.state%3AportletA.stateField&amp;_netui%3AretrieveItem=outputFormBean.zip%3AportletA.zipField&amp;_netui%3AreturnActionCallback=Netui_OnPopupDone&amp;jpfScopeID=portletA','','width=550,height=150,location=0',false);return false;">look up</a>
+              <a href="/coreWeb/miniTests/updateFormFromNestedPopup/getZip.do?_netui%3AreturnActionViewRenderer=org.apache.beehive.netui.tags.internal.ReturnActionViewRenderer&amp;_netui%3AretrieveItem=outputFormBean.state%3AportletA.stateField&amp;_netui%3AretrieveItem=outputFormBean.zip%3AportletA.zipField&amp;_netui%3AreturnActionCallback=Netui_OnPopupDone&amp;jpfScopeID=portletA" onclick="Netui_Popup('/coreWeb/miniTests/updateFormFromNestedPopup/getZip.do?_netui%3AreturnActionViewRenderer=org.apache.beehive.netui.tags.internal.ReturnActionViewRenderer&amp;_netui%3AretrieveItem=outputFormBean.state%3AportletA.stateField&amp;_netui%3AretrieveItem=outputFormBean.zip%3AportletA.zipField&amp;_netui%3AreturnActionCallback=Netui_OnPopupDone&amp;jpfScopeID=portletA','','width=550,height=150,location=0',false,'Netui_Window_portletA');return false;">look up</a>
 
             </td>
           </tr>
@@ -149,16 +149,19 @@
 
 // **** Start the NetUI Framework Generated JavaScript ****
 
-window_Netui_Popup_portletA = null;
-function Netui_Popup_portletA(url, name, features, replace)
+if (!window_netui_popup) {
+  var window_netui_popup = new Array();
+}
+
+function Netui_Popup(url, name, features, replace, popup)
 {
-  if (window_Netui_Popup_portletA != null && ! window_Netui_Popup_portletA.closed)
+  if (window_netui_popup[popup] != null && ! window_netui_popup[popup].closed)
   {
-    window_Netui_Popup_portletA.focus();
+    window_netui_popup[popup].focus();
     return;
   }
-  window_Netui_Popup_portletA=open(url, name, features, replace);
-  if (window_Netui_Popup_portletA.opener == null) window_Netui_Popup_portletA.opener=self;
+  window_netui_popup[popup]=open(url, name, features, replace);
+  if (window_netui_popup[popup].opener == null) window_netui_popup[popup].opener=self;
 }
 
 function Netui_OnPopupDone(map)
@@ -173,6 +176,8 @@
   }
 }
 
+window_netui_popup["Netui_Window_portletA"] = null;
+
 // Build the netui_names table to map the tagId attributes
 // to the real id written into the HTML
 if (netui_names == null)
@@ -310,7 +315,7 @@
               <input type="text" name="portletB{actionForm.zip}" id="portletB.zipField">
               <span style="color:red"></span>
 
-              <a href="/coreWeb/miniTests/updateFormFromNestedPopup/getZip.do?_netui%3AreturnActionViewRenderer=org.apache.beehive.netui.tags.internal.ReturnActionViewRenderer&amp;_netui%3AretrieveItem=outputFormBean.state%3AportletB.stateField&amp;_netui%3AretrieveItem=outputFormBean.zip%3AportletB.zipField&amp;_netui%3AreturnActionCallback=Netui_OnPopupDone&amp;jpfScopeID=portletB" onclick="Netui_Popup_portletB('/coreWeb/miniTests/updateFormFromNestedPopup/getZip.do?_netui%3AreturnActionViewRenderer=org.apache.beehive.netui.tags.internal.ReturnActionViewRenderer&amp;_netui%3AretrieveItem=outputFormBean.state%3AportletB.stateField&amp;_netui%3AretrieveItem=outputFormBean.zip%3AportletB.zipField&amp;_netui%3AreturnActionCallback=Netui_OnPopupDone&amp;jpfScopeID=portletB','','width=550,height=150,location=0',false);return false;">look up</a>
+              <a href="/coreWeb/miniTests/updateFormFromNestedPopup/getZip.do?_netui%3AreturnActionViewRenderer=org.apache.beehive.netui.tags.internal.ReturnActionViewRenderer&amp;_netui%3AretrieveItem=outputFormBean.state%3AportletB.stateField&amp;_netui%3AretrieveItem=outputFormBean.zip%3AportletB.zipField&amp;_netui%3AreturnActionCallback=Netui_OnPopupDone&amp;jpfScopeID=portletB" onclick="Netui_Popup('/coreWeb/miniTests/updateFormFromNestedPopup/getZip.do?_netui%3AreturnActionViewRenderer=org.apache.beehive.netui.tags.internal.ReturnActionViewRenderer&amp;_netui%3AretrieveItem=outputFormBean.state%3AportletB.stateField&amp;_netui%3AretrieveItem=outputFormBean.zip%3AportletB.zipField&amp;_netui%3AreturnActionCallback=Netui_OnPopupDone&amp;jpfScopeID=portletB','','width=550,height=150,location=0',false,'Netui_Window_portletB');return false;">look up</a>
 
             </td>
           </tr>
@@ -324,17 +329,7 @@
 
 // **** Start the NetUI Framework Generated JavaScript ****
 
-window_Netui_Popup_portletB = null;
-function Netui_Popup_portletB(url, name, features, replace)
-{
-  if (window_Netui_Popup_portletB != null && ! window_Netui_Popup_portletB.closed)
-  {
-    window_Netui_Popup_portletB.focus();
-    return;
-  }
-  window_Netui_Popup_portletB=open(url, name, features, replace);
-  if (window_Netui_Popup_portletB.opener == null) window_Netui_Popup_portletB.opener=self;
-}
+window_netui_popup["Netui_Window_portletB"] = null;
 
 // Build the netui_names table to map the tagId attributes
 // to the real id written into the HTML
@@ -1180,7 +1175,7 @@
               <input type="text" name="portletB{actionForm.zip}" id="portletB.zipField">
               <span style="color:red"></span>
 
-              <a href="/coreWeb/miniTests/updateFormFromNestedPopup/getZip.do?_netui%3AreturnActionViewRenderer=org.apache.beehive.netui.tags.internal.ReturnActionViewRenderer&amp;_netui%3AretrieveItem=outputFormBean.state%3AportletB.stateField&amp;_netui%3AretrieveItem=outputFormBean.zip%3AportletB.zipField&amp;_netui%3AreturnActionCallback=Netui_OnPopupDone&amp;jpfScopeID=portletB" onclick="Netui_Popup_portletB('/coreWeb/miniTests/updateFormFromNestedPopup/getZip.do?_netui%3AreturnActionViewRenderer=org.apache.beehive.netui.tags.internal.ReturnActionViewRenderer&amp;_netui%3AretrieveItem=outputFormBean.state%3AportletB.stateField&amp;_netui%3AretrieveItem=outputFormBean.zip%3AportletB.zipField&amp;_netui%3AreturnActionCallback=Netui_OnPopupDone&amp;jpfScopeID=portletB','','width=550,height=150,location=0',false);return false;">look up</a>
+              <a href="/coreWeb/miniTests/updateFormFromNestedPopup/getZip.do?_netui%3AreturnActionViewRenderer=org.apache.beehive.netui.tags.internal.ReturnActionViewRenderer&amp;_netui%3AretrieveItem=outputFormBean.state%3AportletB.stateField&amp;_netui%3AretrieveItem=outputFormBean.zip%3AportletB.zipField&amp;_netui%3AreturnActionCallback=Netui_OnPopupDone&amp;jpfScopeID=portletB" onclick="Netui_Popup('/coreWeb/miniTests/updateFormFromNestedPopup/getZip.do?_netui%3AreturnActionViewRenderer=org.apache.beehive.netui.tags.internal.ReturnActionViewRenderer&amp;_netui%3AretrieveItem=outputFormBean.state%3AportletB.stateField&amp;_netui%3AretrieveItem=outputFormBean.zip%3AportletB.zipField&amp;_netui%3AreturnActionCallback=Netui_OnPopupDone&amp;jpfScopeID=portletB','','width=550,height=150,location=0',false,'Netui_Window_portletB');return false;">look up</a>
 
             </td>
           </tr>
@@ -1194,16 +1189,19 @@
 
 // **** Start the NetUI Framework Generated JavaScript ****
 
-window_Netui_Popup_portletB = null;
-function Netui_Popup_portletB(url, name, features, replace)
+if (!window_netui_popup) {
+  var window_netui_popup = new Array();
+}
+
+function Netui_Popup(url, name, features, replace, popup)
 {
-  if (window_Netui_Popup_portletB != null && ! window_Netui_Popup_portletB.closed)
+  if (window_netui_popup[popup] != null && ! window_netui_popup[popup].closed)
   {
-    window_Netui_Popup_portletB.focus();
+    window_netui_popup[popup].focus();
     return;
   }
-  window_Netui_Popup_portletB=open(url, name, features, replace);
-  if (window_Netui_Popup_portletB.opener == null) window_Netui_Popup_portletB.opener=self;
+  window_netui_popup[popup]=open(url, name, features, replace);
+  if (window_netui_popup[popup].opener == null) window_netui_popup[popup].opener=self;
 }
 
 function Netui_OnPopupDone(map)
@@ -1217,6 +1215,8 @@
     }
   }
 }
+
+window_netui_popup["Netui_Window_portletB"] = null;
 
 // Build the netui_names table to map the tagId attributes
 // to the real id written into the HTML

Modified: beehive/trunk/netui/test/webapps/drt/testRecorder/tests/PopupAttribute.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/PopupAttribute.xml?rev=290996&r1=290995&r2=290996&view=diff
==============================================================================
--- beehive/trunk/netui/test/webapps/drt/testRecorder/tests/PopupAttribute.xml (original)
+++ beehive/trunk/netui/test/webapps/drt/testRecorder/tests/PopupAttribute.xml Thu Sep 22 10:52:13 2005
@@ -78,42 +78,45 @@
         &lt;h3>/tags/popup/Controller.jpf&lt;/h3>
 
         anchor:
-        &lt;a href="/coreWeb/tags/popup/goNested.do?_netui%3AreturnActionViewRenderer=org.apache.beehive.netui.tags.internal.ReturnActionViewRenderer&amp;amp;_netui%3AreturnActionCallback=Netui_OnPopupDone" onclick="Netui_Popup('/coreWeb/tags/popup/goNested.do?_netui%3AreturnActionViewRenderer=org.apache.beehive.netui.tags.internal.ReturnActionViewRenderer&amp;amp;_netui%3AreturnActionCallback=Netui_OnPopupDone','','width=200,height=100',false);return false;">goNested&lt;/a>
+        &lt;a href="/coreWeb/tags/popup/goNested.do?_netui%3AreturnActionViewRenderer=org.apache.beehive.netui.tags.internal.ReturnActionViewRenderer&amp;amp;_netui%3AreturnActionCallback=Netui_OnPopupDone" onclick="Netui_Popup('/coreWeb/tags/popup/goNested.do?_netui%3AreturnActionViewRenderer=org.apache.beehive.netui.tags.internal.ReturnActionViewRenderer&amp;amp;_netui%3AreturnActionCallback=Netui_OnPopupDone','','width=200,height=100',false,'Netui_Window');return false;">goNested&lt;/a>
 
         &lt;br/>
         imageAnchor: 
-        &lt;a href="/coreWeb/tags/popup/goNested.do?_netui%3AreturnActionViewRenderer=org.apache.beehive.netui.tags.internal.ReturnActionViewRenderer&amp;amp;_netui%3AreturnActionCallback=Netui_OnPopupDone" onclick="Netui_Popup('/coreWeb/tags/popup/goNested.do?_netui%3AreturnActionViewRenderer=org.apache.beehive.netui.tags.internal.ReturnActionViewRenderer&amp;amp;_netui%3AreturnActionCallback=Netui_OnPopupDone','','width=200,height=100',false);return false;">&lt;img src="/coreWeb/tags/popup/cool.gif">&lt;/a>
+        &lt;a href="/coreWeb/tags/popup/goNested.do?_netui%3AreturnActionViewRenderer=org.apache.beehive.netui.tags.internal.ReturnActionViewRenderer&amp;amp;_netui%3AreturnActionCallback=Netui_OnPopupDone" onclick="Netui_Popup('/coreWeb/tags/popup/goNested.do?_netui%3AreturnActionViewRenderer=org.apache.beehive.netui.tags.internal.ReturnActionViewRenderer&amp;amp;_netui%3AreturnActionCallback=Netui_OnPopupDone','','width=200,height=100',false,'Netui_Window');return false;">&lt;img src="/coreWeb/tags/popup/cool.gif">&lt;/a>
 
         &lt;br/>
         area: 
         &lt;img src="cool.gif" usemap="#map1"/>
         &lt;map name="map1">
-            &lt;area href="/coreWeb/tags/popup/goNested.do?_netui%3AreturnActionViewRenderer=org.apache.beehive.netui.tags.internal.ReturnActionViewRenderer&amp;amp;_netui%3AreturnActionCallback=Netui_OnPopupDone" shape="rect" coords="0,0,25,25" onclick="Netui_Popup('/coreWeb/tags/popup/goNested.do?_netui%3AreturnActionViewRenderer=org.apache.beehive.netui.tags.internal.ReturnActionViewRenderer&amp;amp;_netui%3AreturnActionCallback=Netui_OnPopupDone','','width=200,height=100',false);return false;">
+            &lt;area href="/coreWeb/tags/popup/goNested.do?_netui%3AreturnActionViewRenderer=org.apache.beehive.netui.tags.internal.ReturnActionViewRenderer&amp;amp;_netui%3AreturnActionCallback=Netui_OnPopupDone" shape="rect" coords="0,0,25,25" onclick="Netui_Popup('/coreWeb/tags/popup/goNested.do?_netui%3AreturnActionViewRenderer=org.apache.beehive.netui.tags.internal.ReturnActionViewRenderer&amp;amp;_netui%3AreturnActionCallback=Netui_OnPopupDone','','width=200,height=100',false,'Netui_Window');return false;">
         &lt;/map>
 
         &lt;form action="/coreWeb/tags/popup/goNested.do" method="post">
             button (uses form's action):
-            &lt;input type="submit" value="goNested" onclick="Netui_Popup('/coreWeb/tags/popup/goNested.do?_netui%3AreturnActionViewRenderer=org.apache.beehive.netui.tags.internal.ReturnActionViewRenderer&amp;_netui%3AreturnActionCallback=Netui_OnPopupDone','','width=200,height=100',false);return false;">
+            &lt;input type="submit" value="goNested" onclick="Netui_Popup('/coreWeb/tags/popup/goNested.do?_netui%3AreturnActionViewRenderer=org.apache.beehive.netui.tags.internal.ReturnActionViewRenderer&amp;_netui%3AreturnActionCallback=Netui_OnPopupDone','','width=200,height=100',false,'Netui_Window');return false;">
 
             &lt;br/>
             button (overrides action):
-            &lt;input type="submit" name="actionOverride:goNested2?_netui%3AreturnActionViewRenderer=org.apache.beehive.netui.tags.internal.ReturnActionViewRenderer&amp;_netui%3AreturnActionCallback=Netui_OnPopupDone" value="goNested2" onclick="Netui_Popup('/coreWeb/tags/popup/goNested2.do?_netui%3AreturnActionViewRenderer=org.apache.beehive.netui.tags.internal.ReturnActionViewRenderer&amp;amp;_netui%3AreturnActionCallback=Netui_OnPopupDone','','width=200,height=100',false);return false;">
+            &lt;input type="submit" name="actionOverride:goNested2?_netui%3AreturnActionViewRenderer=org.apache.beehive.netui.tags.internal.ReturnActionViewRenderer&amp;_netui%3AreturnActionCallback=Netui_OnPopupDone" value="goNested2" onclick="Netui_Popup('/coreWeb/tags/popup/goNested2.do?_netui%3AreturnActionViewRenderer=org.apache.beehive.netui.tags.internal.ReturnActionViewRenderer&amp;amp;_netui%3AreturnActionCallback=Netui_OnPopupDone','','width=200,height=100',false,'Netui_Window');return false;">
         &lt;/form>
     &lt;script language="JavaScript" type="text/JavaScript">
 &lt;!--
 
 // **** Start the NetUI Framework Generated JavaScript ****
 
-window_Netui_Popup = null;
-function Netui_Popup(url, name, features, replace)
+if (!window_netui_popup) {
+  var window_netui_popup = new Array();
+}
+
+function Netui_Popup(url, name, features, replace, popup)
 {
-  if (window_Netui_Popup != null &amp;&amp; ! window_Netui_Popup.closed)
+  if (window_netui_popup[popup] != null &amp;&amp; ! window_netui_popup[popup].closed)
   {
-    window_Netui_Popup.focus();
+    window_netui_popup[popup].focus();
     return;
   }
-  window_Netui_Popup=open(url, name, features, replace);
-  if (window_Netui_Popup.opener == null) window_Netui_Popup.opener=self;
+  window_netui_popup[popup]=open(url, name, features, replace);
+  if (window_netui_popup[popup].opener == null) window_netui_popup[popup].opener=self;
 }
 
 function Netui_OnPopupDone(map)
@@ -128,53 +131,15 @@
   }
 }
 
-window_Netui_Popup = null;
-function Netui_Popup(url, name, features, replace)
-{
-  if (window_Netui_Popup != null &amp;&amp; ! window_Netui_Popup.closed)
-  {
-    window_Netui_Popup.focus();
-    return;
-  }
-  window_Netui_Popup=open(url, name, features, replace);
-  if (window_Netui_Popup.opener == null) window_Netui_Popup.opener=self;
-}
+window_netui_popup["Netui_Window"] = null;
 
-window_Netui_Popup = null;
-function Netui_Popup(url, name, features, replace)
-{
-  if (window_Netui_Popup != null &amp;&amp; ! window_Netui_Popup.closed)
-  {
-    window_Netui_Popup.focus();
-    return;
-  }
-  window_Netui_Popup=open(url, name, features, replace);
-  if (window_Netui_Popup.opener == null) window_Netui_Popup.opener=self;
-}
+window_netui_popup["Netui_Window"] = null;
 
-window_Netui_Popup = null;
-function Netui_Popup(url, name, features, replace)
-{
-  if (window_Netui_Popup != null &amp;&amp; ! window_Netui_Popup.closed)
-  {
-    window_Netui_Popup.focus();
-    return;
-  }
-  window_Netui_Popup=open(url, name, features, replace);
-  if (window_Netui_Popup.opener == null) window_Netui_Popup.opener=self;
-}
+window_netui_popup["Netui_Window"] = null;
 
-window_Netui_Popup = null;
-function Netui_Popup(url, name, features, replace)
-{
-  if (window_Netui_Popup != null &amp;&amp; ! window_Netui_Popup.closed)
-  {
-    window_Netui_Popup.focus();
-    return;
-  }
-  window_Netui_Popup=open(url, name, features, replace);
-  if (window_Netui_Popup.opener == null) window_Netui_Popup.opener=self;
-}
+window_netui_popup["Netui_Window"] = null;
+
+window_netui_popup["Netui_Window"] = null;
 -->
 &lt;/script>&lt;/body>
 

Modified: beehive/trunk/netui/test/webapps/drt/testRecorder/tests/UpdateFormFromNestedPopup.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/UpdateFormFromNestedPopup.xml?rev=290996&r1=290995&r2=290996&view=diff
==============================================================================
--- beehive/trunk/netui/test/webapps/drt/testRecorder/tests/UpdateFormFromNestedPopup.xml (original)
+++ beehive/trunk/netui/test/webapps/drt/testRecorder/tests/UpdateFormFromNestedPopup.xml Thu Sep 22 10:52:13 2005
@@ -109,7 +109,7 @@
               &lt;input type="text" name="{actionForm.zip}" id="zipField">
               &lt;span style="color:red">&lt;/span>
 
-              &lt;a href="/coreWeb/miniTests/updateFormFromNestedPopup/getZip.do?_netui%3AreturnActionViewRenderer=org.apache.beehive.netui.tags.internal.ReturnActionViewRenderer&amp;amp;_netui%3AretrieveItem=outputFormBean.state%3AstateField&amp;amp;_netui%3AretrieveItem=outputFormBean.zip%3AzipField&amp;amp;_netui%3AreturnActionCallback=Netui_OnPopupDone" onclick="Netui_Popup('/coreWeb/miniTests/updateFormFromNestedPopup/getZip.do?_netui%3AreturnActionViewRenderer=org.apache.beehive.netui.tags.internal.ReturnActionViewRenderer&amp;amp;_netui%3AretrieveItem=outputFormBean.state%3AstateField&amp;amp;_netui%3AretrieveItem=outputFormBean.zip%3AzipField&amp;amp;_netui%3AreturnActionCallback=Netui_OnPopupDone','','width=550,height=150,location=0',false);return false;">look up&lt;/a>
+              &lt;a href="/coreWeb/miniTests/updateFormFromNestedPopup/getZip.do?_netui%3AreturnActionViewRenderer=org.apache.beehive.netui.tags.internal.ReturnActionViewRenderer&amp;amp;_netui%3AretrieveItem=outputFormBean.state%3AstateField&amp;amp;_netui%3AretrieveItem=outputFormBean.zip%3AzipField&amp;amp;_netui%3AreturnActionCallback=Netui_OnPopupDone" onclick="Netui_Popup('/coreWeb/miniTests/updateFormFromNestedPopup/getZip.do?_netui%3AreturnActionViewRenderer=org.apache.beehive.netui.tags.internal.ReturnActionViewRenderer&amp;amp;_netui%3AretrieveItem=outputFormBean.state%3AstateField&amp;amp;_netui%3AretrieveItem=outputFormBean.zip%3AzipField&amp;amp;_netui%3AreturnActionCallback=Netui_OnPopupDone','','width=550,height=150,location=0',false,'Netui_Window');return false;">look up&lt;/a>
 
             &lt;/td>
           &lt;/tr>
@@ -123,16 +123,19 @@
 
 // **** Start the NetUI Framework Generated JavaScript ****
 
-window_Netui_Popup = null;
-function Netui_Popup(url, name, features, replace)
+if (!window_netui_popup) {
+  var window_netui_popup = new Array();
+}
+
+function Netui_Popup(url, name, features, replace, popup)
 {
-  if (window_Netui_Popup != null &amp;&amp; ! window_Netui_Popup.closed)
+  if (window_netui_popup[popup] != null &amp;&amp; ! window_netui_popup[popup].closed)
   {
-    window_Netui_Popup.focus();
+    window_netui_popup[popup].focus();
     return;
   }
-  window_Netui_Popup=open(url, name, features, replace);
-  if (window_Netui_Popup.opener == null) window_Netui_Popup.opener=self;
+  window_netui_popup[popup]=open(url, name, features, replace);
+  if (window_netui_popup[popup].opener == null) window_netui_popup[popup].opener=self;
 }
 
 function Netui_OnPopupDone(map)
@@ -146,6 +149,8 @@
     }
   }
 }
+
+window_netui_popup["Netui_Window"] = null;
 
 // Build the netui_names table to map the tagId attributes
 // to the real id written into the HTML