diff options
author | Artur Signell <artur@vaadin.com> | 2013-02-14 15:06:21 +0200 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2013-02-14 15:06:21 +0200 |
commit | 6628e5097a127caaa547f5745f89d455620d5531 (patch) | |
tree | 132f74427b9baac15640165c1eb687d5a9f4504d | |
parent | 54597654e13a2d2dd98fae14e762eb8e325ec514 (diff) | |
download | vaadin-framework-6628e5097a127caaa547f5745f89d455620d5531.tar.gz vaadin-framework-6628e5097a127caaa547f5745f89d455620d5531.zip |
Fixed resetting link target and updated javadoc (#10543)
Change-Id: I91d0eb553542b5f65fb8ab25c3fc357272d87a74
-rw-r--r-- | client/src/com/vaadin/client/ui/AbstractConnector.java | 6 | ||||
-rw-r--r-- | client/src/com/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. <code>null</code> is returned if no corresponding * resource is found. - * <p> - * To get an event when a resource changes, you can use - * {@link #addStateChangeHandler(String, StateChangeHandler)} with - * <code>resources.[key]</code> 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 |