empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From doeb...@apache.org
Subject svn commit: r1400094 - in /empire-db/trunk/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pages: Page.java PageDefinition.java
Date Fri, 19 Oct 2012 13:38:04 GMT
Author: doebele
Date: Fri Oct 19 13:38:03 2012
New Revision: 1400094

URL: http://svn.apache.org/viewvc?rev=1400094&view=rev
Log:
EMPIREDB-157 
JSF2: make sure action name cannot be 'null'

Modified:
    empire-db/trunk/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pages/Page.java
    empire-db/trunk/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pages/PageDefinition.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=1400094&r1=1400093&r2=1400094&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 Fri
Oct 19 13:38:03 2012
@@ -167,6 +167,12 @@ public abstract class Page implements Se
         // Initialize
         this.initialized = true;
 
+        // String value of "null"?
+        if (this.action!=null && "null".equals(this.action))
+        {   log.warn("Invalid action name 'null' for {}", getClass().getName());
+            this.action = null;
+        }    
+        
         // Execute Action
         if (this.action != null)
         {

Modified: empire-db/trunk/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pages/PageDefinition.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pages/PageDefinition.java?rev=1400094&r1=1400093&r2=1400094&view=diff
==============================================================================
--- empire-db/trunk/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pages/PageDefinition.java
(original)
+++ empire-db/trunk/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/pages/PageDefinition.java
Fri Oct 19 13:38:03 2012
@@ -76,7 +76,7 @@ public class PageDefinition implements S
         ParameterMap pm = FacesUtils.getParameterMap(FacesUtils.getContext());
         if (pm==null)
             return param;
-        String action = StringUtils.valueOf(pm.get(ACTION_PARAMETER_TYPE, param));
+        String action = StringUtils.toString(pm.get(ACTION_PARAMETER_TYPE, param));
         if (action==null)
             log.warn("no action available for param {}.", param);
         return action;



Mime
View raw message