deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tandrasc...@apache.org
Subject deltaspike git commit: DELTASPIKE-993 Disabled initialRedirect is generating dswid=null
Date Wed, 07 Oct 2015 07:53:27 GMT
Repository: deltaspike
Updated Branches:
  refs/heads/master 8b339706d -> 61306d154


DELTASPIKE-993 Disabled initialRedirect is generating dswid=null

Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/61306d15
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/61306d15
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/61306d15

Branch: refs/heads/master
Commit: 61306d1543ed2b563b2b703bb8761cbee4619602
Parents: 8b33970
Author: tandraschko <tandraschko@apache.org>
Authored: Wed Oct 7 09:53:17 2015 +0200
Committer: tandraschko <tandraschko@apache.org>
Committed: Wed Oct 7 09:53:17 2015 +0200

----------------------------------------------------------------------
 .../resources/deltaspike/windowhandler.js         | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/61306d15/deltaspike/modules/jsf/impl/src/main/resources/META-INF/resources/deltaspike/windowhandler.js
----------------------------------------------------------------------
diff --git a/deltaspike/modules/jsf/impl/src/main/resources/META-INF/resources/deltaspike/windowhandler.js
b/deltaspike/modules/jsf/impl/src/main/resources/META-INF/resources/deltaspike/windowhandler.js
index 2bcb89d..923231d 100644
--- a/deltaspike/modules/jsf/impl/src/main/resources/META-INF/resources/deltaspike/windowhandler.js
+++ b/deltaspike/modules/jsf/impl/src/main/resources/META-INF/resources/deltaspike/windowhandler.js
@@ -81,7 +81,7 @@ window.dswh = window.dswh || {
                 this.overwriteButtonOnClickEvents();
 
                 dswh.utils.appendHiddenWindowIdToForms();
-                
+
                 if (ajax === false && dswh.utils.isHtml5() && dswh.cfg.storeWindowTreeOnAjaxRequest)
{
                     // JSF ajax callback
                     jsf.ajax.addOnEvent(function(event) {
@@ -145,7 +145,7 @@ window.dswh = window.dswh || {
                                                 if (storeWindowTreeEnabled) {
                                                     dswh.strategy.CLIENTWINDOW.storeWindowTree();
                                                 }
-                                                
+
                                                 if (tokenizedRedirectEnabled) {
                                                     dswh.strategy.CLIENTWINDOW.tokenizedRedirect(this);
                                                     return false;
@@ -160,11 +160,11 @@ window.dswh = window.dswh || {
                     }
                 }
             },
-            
+
             overwriteButtonOnClickEvents : function() {
 
                 var storeWindowTreeEnabled = dswh.utils.isHtml5() && dswh.cfg.storeWindowTreeOnButtonClick;
-                
+
                 if (storeWindowTreeEnabled) {
                     var inputs = document.getElementsByTagName("input");
                     for (var i = 0; i < inputs.length; i++) {
@@ -292,8 +292,14 @@ window.dswh = window.dswh || {
                 }
                 else {
                     if (window.name === 'tempWindowId') {
-                        // we triggered the windowId recreation last request - use it now!
-                        window.name = dswid;
+                        if (dswid) {
+                            // we triggered the windowId recreation last request - use it
now!
+                            window.name = dswid;
+                        }
+                        else {
+                            // it could be from dswh.windowId in case of open in new tab
and initial redirect is disabled
+                            window.name = dswh.windowId;
+                        }
                     }
                     else if (window.name !== dswid) {
                         // window.name doesn't match requested windowId


Mime
View raw message