deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tandrasc...@apache.org
Subject git commit: DELTASPIKE-446 Added support for PF ajax events
Date Sun, 19 Jan 2014 12:55:18 GMT
Updated Branches:
  refs/heads/master d20060e5c -> 7f05f64b0


DELTASPIKE-446 Added support for PF ajax events

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

Branch: refs/heads/master
Commit: 7f05f64b0073e3e75ad357b80150da947c4c8c2b
Parents: d20060e
Author: tandraschko <tandraschko@apache.org>
Authored: Sun Jan 19 13:53:44 2014 +0100
Committer: tandraschko <tandraschko@apache.org>
Committed: Sun Jan 19 13:53:44 2014 +0100

----------------------------------------------------------------------
 .../META-INF/resources/deltaspike/windowhandler.js      | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/7f05f64b/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 1d1a664..a4fbb7b 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
@@ -181,12 +181,16 @@ function eraseRequestCookie() {
     }
 }
 
-var ajaxOnClick = function ajaxDecorateClick(event) {
+var jsfAjaxHandler = function(event) {
     if (event.status=="success") {
         applyWindowId();
     }
 }
 
+var pfAjaxHandler = function() {
+    applyWindowId();
+}
+
 var oldWindowOnLoad = window.onload;
 
 window.onload = function(evt) {
@@ -197,7 +201,11 @@ window.onload = function(evt) {
             eraseRequestCookie(); // manually erase the old dsRid cookie because Firefox
doesn't do it properly
             assertWindowId();
             applyWindowId();
-            jsf.ajax.addOnEvent(ajaxOnClick);
+            jsf.ajax.addOnEvent(jsfAjaxHandler);
+            
+            if (window.$ && window.PrimeFaces) {
+                $(document).on('pfAjaxComplete', pfAjaxHandler);
+            }
         }
     }
 }


Mime
View raw message