import com.google.gwt.json.client.JSONObject;
import com.google.gwt.json.client.JSONString;
import com.vaadin.terminal.gwt.client.ApplicationConnection;
-import com.vaadin.terminal.gwt.client.ServerConnector;
import com.vaadin.terminal.gwt.client.ConnectorMap;
+import com.vaadin.terminal.gwt.client.ServerConnector;
/**
* Client side decoder for decodeing shared state and other values from JSON
* @param jsonArray
* JSON array with two elements
* @param idMapper
- * mapper between connector ID and {@link ServerConnector} objects
+ * mapper between connector ID and {@link ServerConnector}
+ * objects
* @param connection
* reference to the current ApplicationConnection
* @return decoded value (does not contain JSON types)
// TODO handle properly
val = Boolean.valueOf(String.valueOf(value));
} else if (JsonEncoder.VTYPE_PAINTABLE.equals(variableType)) {
- // TODO handle properly
- val = idMapper.getConnector(String.valueOf(value));
+ val = idMapper.getConnector(((JSONString) value).stringValue());
} else {
// object, class name as type
JSONSerializer serializer = serializerMap
import com.vaadin.external.json.JSONException;
import com.vaadin.external.json.JSONObject;
import com.vaadin.terminal.Paintable;
+import com.vaadin.terminal.gwt.client.Connector;
import com.vaadin.terminal.gwt.client.communication.JsonEncoder;
/**
static {
registerType(String.class, JsonEncoder.VTYPE_STRING);
registerType(Paintable.class, JsonEncoder.VTYPE_PAINTABLE);
+ registerType(Connector.class, JsonEncoder.VTYPE_PAINTABLE);
registerType(Boolean.class, JsonEncoder.VTYPE_BOOLEAN);
registerType(Integer.class, JsonEncoder.VTYPE_INTEGER);
registerType(Float.class, JsonEncoder.VTYPE_FLOAT);
import com.vaadin.terminal.Sizeable;
import com.vaadin.terminal.VariableOwner;
import com.vaadin.terminal.gwt.client.ComponentState;
+import com.vaadin.terminal.gwt.client.Connector;
import com.vaadin.terminal.gwt.server.RpcTarget;
/**
* @VERSION@
* @since 3.0
*/
-public interface Component extends Paintable, VariableOwner, Sizeable,
- Serializable, RpcTarget {
+public interface Component extends Connector, Paintable, VariableOwner,
+ Sizeable, Serializable, RpcTarget {
/**
* Gets all user-defined CSS style names of a component. If the component