From 6628e5097a127caaa547f5745f89d455620d5531 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Thu, 14 Feb 2013 15:06:21 +0200 Subject: [PATCH] Fixed resetting link target and updated javadoc (#10543) Change-Id: I91d0eb553542b5f65fb8ab25c3fc357272d87a74 --- .../com/vaadin/client/ui/AbstractConnector.java | 6 ------ .../vaadin/client/ui/link/LinkConnector.java | 17 +++++++---------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/client/src/com/vaadin/client/ui/AbstractConnector.java b/client/src/com/vaadin/client/ui/AbstractConnector.java index 898b8cc483..32f5370dc3 100644 --- a/client/src/com/vaadin/client/ui/AbstractConnector.java +++ b/client/src/com/vaadin/client/ui/AbstractConnector.java @@ -18,9 +18,7 @@ package com.vaadin.client.ui; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Set; import com.google.gwt.core.client.JsArrayString; @@ -417,10 +415,6 @@ public abstract class AbstractConnector implements ServerConnector, * {@link com.vaadin.terminal.AbstractClientConnector#setResource(String, com.vaadin.terminal.Resource)} * with the same key. null is returned if no corresponding * resource is found. - *

- * To get an event when a resource changes, you can use - * {@link #addStateChangeHandler(String, StateChangeHandler)} with - * resources.[key] as the property name. * * @param key * a string identifying the resource. diff --git a/client/src/com/vaadin/client/ui/link/LinkConnector.java b/client/src/com/vaadin/client/ui/link/LinkConnector.java index 59d24ce986..807a9bcc64 100644 --- a/client/src/com/vaadin/client/ui/link/LinkConnector.java +++ b/client/src/com/vaadin/client/ui/link/LinkConnector.java @@ -38,16 +38,13 @@ public class LinkConnector extends AbstractComponentConnector implements @Override protected void init() { super.init(); - addStateChangeHandler("resources." + LinkConstants.HREF_RESOURCE, - new StateChangeHandler() { - @Override - public void onStateChanged(StateChangeEvent stateChangeEvent) { - getWidget().src = getResourceUrl(LinkConstants.HREF_RESOURCE); - getWidget().anchor - .setAttribute("href", getWidget().src); - - } - }); + addStateChangeHandler("resources", new StateChangeHandler() { + @Override + public void onStateChanged(StateChangeEvent stateChangeEvent) { + getWidget().src = getResourceUrl(LinkConstants.HREF_RESOURCE); + getWidget().anchor.setAttribute("href", getWidget().src); + } + }); } @Override -- 2.39.5