From: Matti Tahvonen Date: Wed, 29 Jul 2009 08:53:21 +0000 (+0000) Subject: Updated to use gwt handlers instead of listeners (deprecated). X-Git-Tag: 6.7.0.beta1~2638 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=78c03fc6799b2eb58965e1ed2ad4cc7ae50104b4;p=vaadin-framework.git Updated to use gwt handlers instead of listeners (deprecated). svn changeset:8418/svn branch:6.0 --- diff --git a/src/com/vaadin/terminal/gwt/client/ui/VUriFragmentUtility.java b/src/com/vaadin/terminal/gwt/client/ui/VUriFragmentUtility.java index 2b53711cc1..c67de9aebf 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VUriFragmentUtility.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VUriFragmentUtility.java @@ -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 { 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 event) { + String historyToken = event.getValue(); fragment = historyToken; if (client != null) { client.updateVariable(paintableId, "fragment", fragment, immediate);