You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2021/03/09 13:26:50 UTC

[myfaces-tobago] 03/13: TOBAGO-2061: Window Scope broken

This is an automated email from the ASF dual-hosted git repository.

weber pushed a commit to branch TOBAGO-1999_Select2
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git

commit 3d590fe4e60cf7670c965958bd336c362b303a84
Author: Udo Schnurpfeil <ud...@irian.eu>
AuthorDate: Thu Dec 17 17:22:49 2020 +0100

    TOBAGO-2061: Window Scope broken
    
    * script part: implement the ajax case
---
 .../renderkit/html/standard/standard/script/tobago-deltaspike.js    | 6 +++++-
 .../tobago/renderkit/html/standard/standard/script/tobago.js        | 2 ++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-deltaspike.js b/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-deltaspike.js
index 3e71865..1a4a52a 100644
--- a/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-deltaspike.js
+++ b/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-deltaspike.js
@@ -87,7 +87,11 @@ window.dswh = window.dswh || {
           //     targetStrategy.init(true);
           //   }
           // });
-
+          // XXX Tobago replacement:
+          $(document).bind("tobago.partialSuccess", function(event) {
+            dswh.utils.log('--- #init(true)');
+            targetStrategy.init(true);
+          });
 
           // PF ajax callback
           if (window.$ && window.PrimeFaces) {
diff --git a/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js b/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
index a33ca4d..f3a656f 100644
--- a/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
+++ b/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
@@ -1920,6 +1920,8 @@ Tobago.Transport.JqueryTransport = {
       requestOptions.textStatus = textStatus;
 
       Tobago.Updater.onSuccess(requestOptions);
+
+      $(document).trigger("tobago.partialSuccess");
     };
 
     requestObject.error = function(xhr, textStatus, errorThrown) {