From 316074ddd8ece38cd6722cc72890963f7af58fbd Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Tue, 13 Mar 2012 08:56:23 +0200 Subject: [PATCH] All components are RPCTargets --- src/com/vaadin/ui/AbstractComponent.java | 4 ++-- src/com/vaadin/ui/Button.java | 3 +-- src/com/vaadin/ui/Component.java | 3 ++- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/com/vaadin/ui/AbstractComponent.java b/src/com/vaadin/ui/AbstractComponent.java index 7e8ee0a068..5d0574b08e 100644 --- a/src/com/vaadin/ui/AbstractComponent.java +++ b/src/com/vaadin/ui/AbstractComponent.java @@ -1604,8 +1604,8 @@ public abstract class AbstractComponent implements Component, MethodEventSource protected void registerRpcImplementation(T implementation, Class rpcInterfaceType) { if (this instanceof RpcTarget) { - rpcManagerMap.put(rpcInterfaceType, new ServerRpcManager( - (RpcTarget) this, implementation, rpcInterfaceType)); + rpcManagerMap.put(rpcInterfaceType, new ServerRpcManager(this, + implementation, rpcInterfaceType)); } else { throw new RuntimeException( "Cannot register an RPC implementation for a component that is not an RpcTarget"); diff --git a/src/com/vaadin/ui/Button.java b/src/com/vaadin/ui/Button.java index 2fb174654f..2e23d4ae74 100644 --- a/src/com/vaadin/ui/Button.java +++ b/src/com/vaadin/ui/Button.java @@ -23,7 +23,6 @@ import com.vaadin.terminal.gwt.client.MouseEventDetails; import com.vaadin.terminal.gwt.client.ui.ButtonConnector; import com.vaadin.terminal.gwt.client.ui.ButtonConnector.ButtonServerRpc; import com.vaadin.terminal.gwt.client.ui.ButtonState; -import com.vaadin.terminal.gwt.server.RpcTarget; import com.vaadin.tools.ReflectTools; import com.vaadin.ui.ClientWidget.LoadStyle; import com.vaadin.ui.Component.Focusable; @@ -40,7 +39,7 @@ import com.vaadin.ui.Component.Focusable; @ClientWidget(value = ButtonConnector.class, loadStyle = LoadStyle.EAGER) public class Button extends AbstractComponent implements FieldEvents.BlurNotifier, FieldEvents.FocusNotifier, Focusable, - Action.ShortcutNotifier, RpcTarget { + Action.ShortcutNotifier { /** * Creates a new push button. diff --git a/src/com/vaadin/ui/Component.java b/src/com/vaadin/ui/Component.java index 0354bccd1f..9c3f1a02f1 100644 --- a/src/com/vaadin/ui/Component.java +++ b/src/com/vaadin/ui/Component.java @@ -18,6 +18,7 @@ import com.vaadin.terminal.Resource; import com.vaadin.terminal.Sizeable; import com.vaadin.terminal.VariableOwner; import com.vaadin.terminal.gwt.client.ComponentState; +import com.vaadin.terminal.gwt.server.RpcTarget; /** * {@code Component} is the top-level interface that is and must be implemented @@ -53,7 +54,7 @@ import com.vaadin.terminal.gwt.client.ComponentState; * @since 3.0 */ public interface Component extends Paintable, VariableOwner, Sizeable, - Serializable { + Serializable, RpcTarget { /** * Gets all user-defined CSS style names of a component. If the component -- 2.39.5