empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From doeb...@apache.org
Subject svn commit: r1416942 - /empire-db/trunk/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pages/Page.java
Date Tue, 04 Dec 2012 13:59:42 GMT
Author: doebele
Date: Tue Dec  4 13:59:41 2012
New Revision: 1416942

URL: http://svn.apache.org/viewvc?rev=1416942&view=rev
Log:
EMPIREDB-174
JSF2 provide access to SESSION_MESSAGE const and check parent

Modified:
    empire-db/trunk/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pages/Page.java

Modified: empire-db/trunk/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pages/Page.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pages/Page.java?rev=1416942&r1=1416941&r2=1416942&view=diff
==============================================================================
--- empire-db/trunk/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pages/Page.java (original)
+++ empire-db/trunk/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pages/Page.java Tue
Dec  4 13:59:41 2012
@@ -48,7 +48,7 @@ public abstract class Page implements Se
 {
     private static final long   serialVersionUID = 1L;
 
-    private static final String SESSION_MESSAGE  = "PAGE_SESSION_MESSAGE";
+    public static final String  SESSION_MESSAGE  = "PAGE_SESSION_MESSAGE";
 
     // private static final String INVALID_ACTION   = "XXXXXXXXXXXX";
 
@@ -160,7 +160,9 @@ public abstract class Page implements Se
             if (context.getResponseComplete())
                 return;
             // Oops, not redirected yet?
-            redirectTo(getParentOutcome(true));
+            if (getParentPage()!=null)
+                redirectTo(getParentOutcome(true)); 
+            // Done
             return;
         }
 
@@ -280,7 +282,9 @@ public abstract class Page implements Se
         // Return to parent page
         PageDefinition parentPage = getParentPage();
         if (parentPage == null)
+        {   FacesContext.getCurrentInstance().addMessage(getPageName(), facesMsg);
             return false;
+        }
         // redirect
         redirectTo(parentPage.getRedirect());
         return true;



Mime
View raw message