From: Artur Signell Date: Tue, 13 Mar 2012 06:56:23 +0000 (+0200) Subject: All components are RPCTargets X-Git-Tag: 7.0.0.alpha2~347 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=316074ddd8ece38cd6722cc72890963f7af58fbd;p=vaadin-framework.git All components are RPCTargets --- 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