empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From doeb...@apache.org
Subject [1/2] empire-db git commit: EMPIREDB-256 allow redirect in checkPageAccess
Date Fri, 16 Jun 2017 08:48:49 GMT
Repository: empire-db
Updated Branches:
  refs/heads/master ca0192e89 -> c37be6cd3
Updated Tags:  refs/tags/apache-empire-db-2.4.6 [created] 00f1033c4


EMPIREDB-256
allow redirect in checkPageAccess

Project: http://git-wip-us.apache.org/repos/asf/empire-db/repo
Commit: http://git-wip-us.apache.org/repos/asf/empire-db/commit/0e3ca59c
Tree: http://git-wip-us.apache.org/repos/asf/empire-db/tree/0e3ca59c
Diff: http://git-wip-us.apache.org/repos/asf/empire-db/diff/0e3ca59c

Branch: refs/heads/master
Commit: 0e3ca59c2947d230a89b03b7dbbada8b760b4b33
Parents: 6bcd642
Author: Rainer Döbele <doebele@apache.org>
Authored: Fri Jun 16 10:46:30 2017 +0200
Committer: Rainer Döbele <doebele@apache.org>
Committed: Fri Jun 16 10:46:30 2017 +0200

----------------------------------------------------------------------
 .../java/org/apache/empire/jsf2/pages/Page.java | 22 ++++++--------------
 1 file changed, 6 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/empire-db/blob/0e3ca59c/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pages/Page.java
----------------------------------------------------------------------
diff --git a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pages/Page.java b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pages/Page.java
index 0246ce2..d9d86ea 100644
--- a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pages/Page.java
+++ b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pages/Page.java
@@ -50,8 +50,6 @@ public abstract class Page implements Serializable
 
     public static final String  SESSION_MESSAGE  = "PAGE_SESSION_MESSAGE";
 
-    // private static final String INVALID_ACTION   = "XXXXXXXXXXXX";
-
     private static final Logger log              = LoggerFactory.getLogger(Page.class);
 
     private String              action           = null;
@@ -89,9 +87,6 @@ public abstract class Page implements Serializable
     {
         if (this.action==null)
             return null;
-        
-        // if (this.action==INVALID_ACTION)
-        //      return null;
 
         // Generate key
         ParameterMap pm = FacesUtils.getParameterMap(FacesUtils.getContext());
@@ -152,6 +147,9 @@ public abstract class Page implements Serializable
         try
         {
             checkPageAccess();
+            // redirected?
+            if (context.getResponseComplete())
+                return;
         }
         catch (Exception e)
         {
@@ -177,16 +175,8 @@ public abstract class Page implements Serializable
         
         // Execute Action
         if (this.action != null)
-        {
-            /*
-            if (this.action.equals(Page.INVALID_ACTION))
-            {
-                Page.log.error("Action probably executed twice. Ignoring action.");
-                return;
-            }
-            */
-            try
-            {
+        {   try
+            {   // Process action
                 log.info("Processing action {} on {}.", String.valueOf(action), getPageName());
                 Method method = getClass().getMethod(action);
                 Object result = method.invoke(this);
@@ -218,7 +208,7 @@ public abstract class Page implements Serializable
             }
         }
         else
-        { // call default Action
+        {   // call default Action
             try
             {
                 Page.log.debug("Initializing PageBean {}. Calling doInit()", getPageName());


Mime
View raw message