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:47:09 UTC
[myfaces-tobago] 01/02: TOBAGO-2062 - Tobago2: Navigation after
ajax request not working on immediate
This is an automated email from the ASF dual-hosted git repository.
weber pushed a commit to branch tobago-2.x
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git
commit 785fbd4cf31d2d80ac59387ad450a6331693ff85
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));