You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ba...@apache.org on 2006/02/09 20:13:11 UTC

svn commit: r376391 - /myfaces/commons/trunk/src/main/java/org/apache/myfaces/renderkit/html/util/JavascriptUtils.java

Author: baranda
Date: Thu Feb  9 11:13:10 2006
New Revision: 376391

URL: http://svn.apache.org/viewcvs?rev=376391&view=rev
Log:
Commented a clause for test purposes in my previous commit. Fixed that.

Modified:
    myfaces/commons/trunk/src/main/java/org/apache/myfaces/renderkit/html/util/JavascriptUtils.java

Modified: myfaces/commons/trunk/src/main/java/org/apache/myfaces/renderkit/html/util/JavascriptUtils.java
URL: http://svn.apache.org/viewcvs/myfaces/commons/trunk/src/main/java/org/apache/myfaces/renderkit/html/util/JavascriptUtils.java?rev=376391&r1=376390&r2=376391&view=diff
==============================================================================
--- myfaces/commons/trunk/src/main/java/org/apache/myfaces/renderkit/html/util/JavascriptUtils.java (original)
+++ myfaces/commons/trunk/src/main/java/org/apache/myfaces/renderkit/html/util/JavascriptUtils.java Thu Feb  9 11:13:10 2006
@@ -319,8 +319,8 @@
                      "}\n");
         ExternalContext externalContext = facesContext.getExternalContext();
         String oldViewId = getOldViewId(externalContext);
-        //if (oldViewId != null && oldViewId.equals(facesContext.getViewRoot().getViewId()))
-        //{
+        if (oldViewId != null && oldViewId.equals(facesContext.getViewRoot().getViewId()))
+        {
             //ok, we stayed on the same page, so let's scroll it to the former place
             String scrolling = (String)externalContext.getRequestParameterMap().get(AUTO_SCROLL_PARAM);
             if (scrolling != null && scrolling.length() > 0)
@@ -341,7 +341,7 @@
                 }
                 script.append("window.scrollTo(").append(x).append(",").append(y).append(");\n");
             }
-        //}
+        }
 
         writer.writeText(script.toString(),null);