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 2020/12/15 13:48:34 UTC

[myfaces-tobago] branch TOBAGO-1999_Select2 updated (252c3bb -> c6add35)

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

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


    from 252c3bb  fix CVE
     new 8d1a9ce  TOBAGO-2062 - Tobago2: Navigation after ajax request not working on immediate
     new c6add35  TOBAGO-2062 - Tobago2: Navigation after ajax request not working on immediate: deltaspike.js

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../tobago/internal/ajax/AjaxNavigationListener.java     |  5 ++++-
 .../tobago/internal/ajax/AjaxNavigationState.java        |  2 +-
 .../html/standard/standard/script/tobago-deltaspike.js   | 16 +++++++++-------
 3 files changed, 14 insertions(+), 9 deletions(-)


[myfaces-tobago] 01/02: TOBAGO-2062 - Tobago2: Navigation after ajax request not working on immediate

Posted by we...@apache.org.
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 8d1a9ce238a6d922df4a6a84c5579fcc791ad193
Author: Volker Weber <v....@inexso.de>
AuthorDate: Tue Dec 15 10:57:55 2020 +0100

    TOBAGO-2062 - Tobago2: Navigation after ajax request not working on immediate
---
 .../apache/myfaces/tobago/internal/ajax/AjaxNavigationListener.java  | 5 ++++-
 .../org/apache/myfaces/tobago/internal/ajax/AjaxNavigationState.java | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/ajax/AjaxNavigationListener.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/ajax/AjaxNavigationListener.java
index 6ba9c4e..e254e99 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/ajax/AjaxNavigationListener.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/ajax/AjaxNavigationListener.java
@@ -37,8 +37,11 @@ public class AjaxNavigationListener implements PhaseListener {
     if (!facesContext.getResponseComplete()) {
       if (phaseEvent.getPhaseId() == PhaseId.RESTORE_VIEW) {
         AjaxNavigationState.afterRestoreView(facesContext);
+      } else if (phaseEvent.getPhaseId() == PhaseId.APPLY_REQUEST_VALUES
+          && facesContext.getRenderResponse()) {
+        AjaxNavigationState.checkNavigation(facesContext);
       } else if (phaseEvent.getPhaseId() == PhaseId.INVOKE_APPLICATION) {
-        AjaxNavigationState.afterInvokeApplication(facesContext);
+        AjaxNavigationState.checkNavigation(facesContext);
       }
     }
     debug(facesContext);
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/ajax/AjaxNavigationState.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/ajax/AjaxNavigationState.java
index 2dca522..6932eac 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/ajax/AjaxNavigationState.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/ajax/AjaxNavigationState.java
@@ -196,7 +196,7 @@ public final class AjaxNavigationState {
     return false;
   }
 
-  public static void afterInvokeApplication(FacesContext facesContext) {
+  public static void checkNavigation(FacesContext facesContext) {
     if (AjaxUtils.isAjaxRequest(facesContext) && isNavigation(facesContext)) {
       try {
         AjaxInternalUtils.requestNavigationReload(facesContext, new AjaxNavigationState(facesContext));


[myfaces-tobago] 02/02: TOBAGO-2062 - Tobago2: Navigation after ajax request not working on immediate: deltaspike.js

Posted by we...@apache.org.
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 c6add3520c7c794e72463873c4e05cbc07caece4
Author: Volker Weber <v....@inexso.de>
AuthorDate: Tue Dec 15 14:35:58 2020 +0100

    TOBAGO-2062 - Tobago2: Navigation after ajax request not working on immediate: deltaspike.js
---
 .../html/standard/standard/script/tobago-deltaspike.js   | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

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 876a3c3..967d0ba 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
@@ -18,13 +18,15 @@
  */
 
 jQuery(document).ready(function() {
-  var dswid = location.search.replace(/.*dswid=(\-?[0-9]+).*/, "$1");
-  if (dswid) {
-    dswh.init(dswid, 'LAZY', 10, {
-      'tokenizedRedirect': false,
-      'storeWindowTreeOnLinkClick': true,
-      'storeWindowTreeOnButtonClick': false
-    });
+  if (location.search.match(/.*dswid=(\-?[0-9]+).*/) !== null) {
+    var dswid = location.search.replace(/.*dswid=(\-?[0-9]+).*/, "$1");
+    if (dswid) {
+      dswh.init(dswid, 'LAZY', 10, {
+        'tokenizedRedirect': false,
+        'storeWindowTreeOnLinkClick': true,
+        'storeWindowTreeOnButtonClick': false
+      });
+    }
   }
 });