You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2014/06/04 15:07:39 UTC

svn commit: r1600178 - /myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/util/RenderUtils.java

Author: lofwyr
Date: Wed Jun  4 13:07:38 2014
New Revision: 1600178

URL: http://svn.apache.org/r1600178
Log:
TOBAGO-1304
 - be more tolerant
 - less logging

Modified:
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/util/RenderUtils.java

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/util/RenderUtils.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/util/RenderUtils.java?rev=1600178&r1=1600177&r2=1600178&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/util/RenderUtils.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/util/RenderUtils.java Wed Jun  4 13:07:38 2014
@@ -463,7 +463,9 @@ public class RenderUtils {
       final String key = component.getClientId(facesContext) + SCROLL_POSTFIX;
       scrollPosition = parseScrollPosition(facesContext.getExternalContext().getRequestParameterMap().get(key));
     }
-    writeScrollPosition(facesContext, writer, component, scrollPosition);
+    if (scrollPosition != null) {
+      writeScrollPosition(facesContext, writer, component, scrollPosition);
+    }
   }
 
   public static void writeScrollPosition(
@@ -501,11 +503,9 @@ public class RenderUtils {
     Integer[] position = null;
     if (!StringUtils.isBlank(value)) {
       final int sep = value.indexOf(";");
-      if (LOG.isInfoEnabled()) {
-        LOG.info("value = \"" + value + "\"  sep = " + sep + "");
-      }
       if (sep == -1) {
-        throw new NumberFormatException(value);
+        LOG.warn("Can't parse: '{}'", value);
+        return null;
       }
       final int left = Integer.parseInt(value.substring(0, sep));
       final int top = Integer.parseInt(value.substring(sep + 1));