]> source.dussan.org Git - vaadin-framework.git/commitdiff
Updated to use gwt handlers instead of listeners (deprecated).
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Wed, 29 Jul 2009 08:53:21 +0000 (08:53 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Wed, 29 Jul 2009 08:53:21 +0000 (08:53 +0000)
svn changeset:8418/svn branch:6.0

src/com/vaadin/terminal/gwt/client/ui/VUriFragmentUtility.java

index 2b53711cc1f54a67efc2d25c3fa3ad250c02079a..c67de9aebfbd6bcbe946bc834a529baeb40769db 100644 (file)
@@ -1,8 +1,9 @@
 package com.vaadin.terminal.gwt.client.ui;
 
 import com.google.gwt.dom.client.Document;
+import com.google.gwt.event.logical.shared.ValueChangeEvent;
+import com.google.gwt.event.logical.shared.ValueChangeHandler;
 import com.google.gwt.user.client.History;
-import com.google.gwt.user.client.HistoryListener;
 import com.google.gwt.user.client.ui.Widget;
 import com.vaadin.terminal.gwt.client.ApplicationConnection;
 import com.vaadin.terminal.gwt.client.BrowserInfo;
@@ -15,7 +16,7 @@ import com.vaadin.terminal.gwt.client.UIDL;
  * 
  */
 public class VUriFragmentUtility extends Widget implements Paintable,
-        HistoryListener {
+        ValueChangeHandler<String> {
 
     private String fragment;
     private ApplicationConnection client;
@@ -28,7 +29,7 @@ public class VUriFragmentUtility extends Widget implements Paintable,
             getElement().getStyle().setProperty("overflow", "hidden");
             getElement().getStyle().setProperty("height", "0");
         }
-        History.addHistoryListener(this);
+        History.addValueChangeHandler(this);
         History.fireCurrentHistoryState();
     }
 
@@ -57,7 +58,8 @@ public class VUriFragmentUtility extends Widget implements Paintable,
         }
     }
 
-    public void onHistoryChanged(String historyToken) {
+    public void onValueChange(ValueChangeEvent<String> event) {
+        String historyToken = event.getValue();
         fragment = historyToken;
         if (client != null) {
             client.updateVariable(paintableId, "fragment", fragment, immediate);