Revision: 6212
Author: kpro...@google.com
Date: Fri Sep 25 09:28:36 2009
Log: Changes to History and Hyperlink to enable crawlability.


http://code.google.com/p/google-web-toolkit/source/detail?r=6212

Modified:
  /branches/crawlability/user/src/com/google/gwt/user/client/History.java
   
/branches/crawlability/user/src/com/google/gwt/user/client/impl/HistoryImpl.java
   
/branches/crawlability/user/src/com/google/gwt/user/client/ui/Hyperlink.java

=======================================
--- /branches/crawlability/user/src/com/google/gwt/user/client/History.java     
 
Thu Jan 22 08:32:30 2009
+++ /branches/crawlability/user/src/com/google/gwt/user/client/History.java     
 
Fri Sep 25 09:28:36 2009
@@ -138,7 +138,7 @@
    public static String getToken() {
      return impl != null ? HistoryImpl.getToken() : "";
    }
-
+
    /**
     * Adds a new browser history entry. In hosted mode, the 'back'  
and 'forward'
     * actions are accessible via the standard Alt-Left and Alt-Right  
keystrokes.
=======================================
---  
/branches/crawlability/user/src/com/google/gwt/user/client/impl/HistoryImpl.java
         
Thu Jul  9 09:10:32 2009
+++  
/branches/crawlability/user/src/com/google/gwt/user/client/impl/HistoryImpl.java
         
Fri Sep 25 09:28:36 2009
@@ -80,6 +80,12 @@
     * Fires the {...@link ValueChangeEvent} to all handlers with the given  
tokens.
     */
    public void fireHistoryChangedImpl(String newToken) {
+    if ((newToken.length() > 0) && (newToken.startsWith("!"))) {
+      newToken = newToken.substring(1);
+    }
+    if (newToken.compareTo("home") == 0) {
+      newToken = "";
+    }
      ValueChangeEvent.fire(this, newToken);
    }

=======================================
---  
/branches/crawlability/user/src/com/google/gwt/user/client/ui/Hyperlink.java    
 
Fri May 15 13:39:00 2009
+++  
/branches/crawlability/user/src/com/google/gwt/user/client/ui/Hyperlink.java    
 
Fri Sep 25 09:28:36 2009
@@ -189,8 +189,8 @@
    public void setTargetHistoryToken(String targetHistoryToken) {
      assert targetHistoryToken != null
        : "targetHistoryToken must not be null, consider using Anchor  
instead";
-    this.targetHistoryToken = targetHistoryToken;
-    DOM.setElementProperty(anchorElem, "href", "#" + targetHistoryToken);
+    this.targetHistoryToken = "!" + targetHistoryToken;
+    DOM.setElementProperty(anchorElem, "href", "#!" + targetHistoryToken);
    }

    public void setText(String text) {

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to