summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2012-08-13 19:13:24 +0300
committerArtur Signell <artur@vaadin.com>2012-08-13 19:18:50 +0300
commitacf099b41fe1f983d416e598b5b49eaea9f35c66 (patch)
treeda664e675e639a074b6d8abde3af4d7a7b52055a /server
parente85d933b25cc3c5cc85eb7eb4b13b950fd8e1569 (diff)
downloadvaadin-framework-acf099b41fe1f983d416e598b5b49eaea9f35c66.tar.gz
vaadin-framework-acf099b41fe1f983d416e598b5b49eaea9f35c66.zip
Eliminated dependencies from server to client (#9279)
Diffstat (limited to 'server')
-rw-r--r--server/src/com/vaadin/Application.java4
-rw-r--r--server/src/com/vaadin/terminal/Page.java20
-rw-r--r--server/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java6
-rw-r--r--server/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java23
-rw-r--r--server/src/com/vaadin/terminal/gwt/server/AbstractWebApplicationContext.java10
-rw-r--r--server/src/com/vaadin/terminal/gwt/server/BootstrapHandler.java6
-rw-r--r--server/src/com/vaadin/terminal/gwt/server/JsonCodec.java64
-rw-r--r--server/src/com/vaadin/terminal/gwt/server/LegacyChangeVariablesInvocation.java10
-rw-r--r--server/src/com/vaadin/terminal/gwt/server/PortletCommunicationManager.java4
-rw-r--r--server/src/com/vaadin/terminal/gwt/server/ServletPortletHelper.java8
-rw-r--r--server/src/com/vaadin/terminal/gwt/server/WrappedPortletRequest.java4
-rw-r--r--server/src/com/vaadin/ui/AbsoluteLayout.java6
-rw-r--r--server/src/com/vaadin/ui/AbstractJavaScriptComponent.java2
-rw-r--r--server/src/com/vaadin/ui/AbstractOrderedLayout.java6
-rw-r--r--server/src/com/vaadin/ui/AbstractSplitPanel.java9
-rw-r--r--server/src/com/vaadin/ui/AbstractTextField.java18
-rw-r--r--server/src/com/vaadin/ui/ComboBox.java6
-rw-r--r--server/src/com/vaadin/ui/ConnectorTracker.java1
-rw-r--r--server/src/com/vaadin/ui/CssLayout.java6
-rw-r--r--server/src/com/vaadin/ui/DateField.java5
-rw-r--r--server/src/com/vaadin/ui/DragAndDropWrapper.java6
-rw-r--r--server/src/com/vaadin/ui/Embedded.java14
-rw-r--r--server/src/com/vaadin/ui/GridLayout.java6
-rw-r--r--server/src/com/vaadin/ui/LoginForm.java4
-rw-r--r--server/src/com/vaadin/ui/MenuBar.java19
-rw-r--r--server/src/com/vaadin/ui/OptionGroup.java7
-rw-r--r--server/src/com/vaadin/ui/Panel.java10
-rw-r--r--server/src/com/vaadin/ui/Root.java22
-rw-r--r--server/src/com/vaadin/ui/TabSheet.java16
-rw-r--r--server/src/com/vaadin/ui/Table.java36
-rw-r--r--server/src/com/vaadin/ui/Tree.java19
-rw-r--r--server/src/com/vaadin/ui/TreeTable.java4
-rw-r--r--server/src/com/vaadin/ui/TwinColSelect.java8
-rw-r--r--server/src/com/vaadin/ui/Window.java6
34 files changed, 201 insertions, 194 deletions
diff --git a/server/src/com/vaadin/Application.java b/server/src/com/vaadin/Application.java
index 1d31410185..c7f3462b05 100644
--- a/server/src/com/vaadin/Application.java
+++ b/server/src/com/vaadin/Application.java
@@ -38,6 +38,7 @@ import com.vaadin.data.util.converter.ConverterFactory;
import com.vaadin.data.util.converter.DefaultConverterFactory;
import com.vaadin.event.EventRouter;
import com.vaadin.service.ApplicationContext;
+import com.vaadin.shared.ApplicationConstants;
import com.vaadin.terminal.AbstractErrorMessage;
import com.vaadin.terminal.ApplicationResource;
import com.vaadin.terminal.CombinedRequest;
@@ -48,7 +49,6 @@ import com.vaadin.terminal.VariableOwner;
import com.vaadin.terminal.WrappedRequest;
import com.vaadin.terminal.WrappedRequest.BrowserDetails;
import com.vaadin.terminal.WrappedResponse;
-import com.vaadin.terminal.gwt.client.ApplicationConnection;
import com.vaadin.terminal.gwt.server.AbstractApplicationServlet;
import com.vaadin.terminal.gwt.server.BootstrapFragmentResponse;
import com.vaadin.terminal.gwt.server.BootstrapListener;
@@ -2300,7 +2300,7 @@ public class Application implements Terminal.ErrorListener, Serializable {
request = combinedRequest.getSecondRequest();
}
String rootIdString = request
- .getParameter(ApplicationConnection.ROOT_ID_PARAMETER);
+ .getParameter(ApplicationConstants.ROOT_ID_PARAMETER);
Integer rootId = rootIdString == null ? null
: new Integer(rootIdString);
return rootId;
diff --git a/server/src/com/vaadin/terminal/Page.java b/server/src/com/vaadin/terminal/Page.java
index a068e7573e..5ae8f7b775 100644
--- a/server/src/com/vaadin/terminal/Page.java
+++ b/server/src/com/vaadin/terminal/Page.java
@@ -13,9 +13,8 @@ import java.util.List;
import com.vaadin.event.EventRouter;
import com.vaadin.shared.ui.root.PageClientRpc;
+import com.vaadin.shared.ui.root.RootConstants;
import com.vaadin.terminal.WrappedRequest.BrowserDetails;
-import com.vaadin.terminal.gwt.client.ui.notification.VNotification;
-import com.vaadin.terminal.gwt.client.ui.root.VRoot;
import com.vaadin.terminal.gwt.server.WebApplicationContext;
import com.vaadin.terminal.gwt.server.WebBrowser;
import com.vaadin.tools.ReflectTools;
@@ -467,31 +466,32 @@ public class Page implements Serializable {
target.startTag("notification");
if (n.getCaption() != null) {
target.addAttribute(
- VNotification.ATTRIBUTE_NOTIFICATION_CAPTION,
+ RootConstants.ATTRIBUTE_NOTIFICATION_CAPTION,
n.getCaption());
}
if (n.getDescription() != null) {
target.addAttribute(
- VNotification.ATTRIBUTE_NOTIFICATION_MESSAGE,
+ RootConstants.ATTRIBUTE_NOTIFICATION_MESSAGE,
n.getDescription());
}
if (n.getIcon() != null) {
target.addAttribute(
- VNotification.ATTRIBUTE_NOTIFICATION_ICON,
+ RootConstants.ATTRIBUTE_NOTIFICATION_ICON,
n.getIcon());
}
if (!n.isHtmlContentAllowed()) {
target.addAttribute(
- VRoot.NOTIFICATION_HTML_CONTENT_NOT_ALLOWED, true);
+ RootConstants.NOTIFICATION_HTML_CONTENT_NOT_ALLOWED,
+ true);
}
target.addAttribute(
- VNotification.ATTRIBUTE_NOTIFICATION_POSITION,
+ RootConstants.ATTRIBUTE_NOTIFICATION_POSITION,
n.getPosition());
- target.addAttribute(VNotification.ATTRIBUTE_NOTIFICATION_DELAY,
+ target.addAttribute(RootConstants.ATTRIBUTE_NOTIFICATION_DELAY,
n.getDelayMsec());
if (n.getStyleName() != null) {
target.addAttribute(
- VNotification.ATTRIBUTE_NOTIFICATION_STYLE,
+ RootConstants.ATTRIBUTE_NOTIFICATION_STYLE,
n.getStyleName());
}
target.endTag("notification");
@@ -501,7 +501,7 @@ public class Page implements Serializable {
}
if (fragment != null) {
- target.addAttribute(VRoot.FRAGMENT_VARIABLE, fragment);
+ target.addAttribute(RootConstants.FRAGMENT_VARIABLE, fragment);
}
}
diff --git a/server/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java b/server/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java
index 603bc74a21..6a6a00843c 100644
--- a/server/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java
+++ b/server/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java
@@ -37,12 +37,12 @@ import javax.servlet.http.HttpSession;
import com.vaadin.Application;
import com.vaadin.Application.ApplicationStartEvent;
import com.vaadin.Application.SystemMessages;
+import com.vaadin.shared.ApplicationConstants;
import com.vaadin.terminal.DeploymentConfiguration;
import com.vaadin.terminal.Terminal;
import com.vaadin.terminal.ThemeResource;
import com.vaadin.terminal.WrappedRequest;
import com.vaadin.terminal.WrappedResponse;
-import com.vaadin.terminal.gwt.client.ApplicationConnection;
import com.vaadin.terminal.gwt.server.AbstractCommunicationManager.Callback;
import com.vaadin.ui.Root;
@@ -299,7 +299,7 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
// key).
if (requestType == RequestType.UIDL
&& request.getParameterMap().containsKey(
- ApplicationConnection.PARAM_UNLOADBURST)
+ ApplicationConstants.PARAM_UNLOADBURST)
&& request.getContentLength() < 1
&& getExistingApplication(request, false) == null) {
redirectToApplication(request, response);
@@ -1204,7 +1204,7 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
}
private boolean isOnUnloadRequest(HttpServletRequest request) {
- return request.getParameter(ApplicationConnection.PARAM_UNLOADBURST) != null;
+ return request.getParameter(ApplicationConstants.PARAM_UNLOADBURST) != null;
}
/**
diff --git a/server/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java b/server/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java
index ba1b3cadb6..3143ba2e35 100644
--- a/server/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java
+++ b/server/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java
@@ -55,6 +55,7 @@ import com.vaadin.annotations.StyleSheet;
import com.vaadin.external.json.JSONArray;
import com.vaadin.external.json.JSONException;
import com.vaadin.external.json.JSONObject;
+import com.vaadin.shared.ApplicationConstants;
import com.vaadin.shared.Connector;
import com.vaadin.shared.communication.MethodInvocation;
import com.vaadin.shared.communication.SharedState;
@@ -74,7 +75,6 @@ import com.vaadin.terminal.Vaadin6Component;
import com.vaadin.terminal.VariableOwner;
import com.vaadin.terminal.WrappedRequest;
import com.vaadin.terminal.WrappedResponse;
-import com.vaadin.terminal.gwt.client.ApplicationConnection;
import com.vaadin.terminal.gwt.server.BootstrapHandler.BootstrapContext;
import com.vaadin.terminal.gwt.server.ComponentSizeValidator.InvalidLayout;
import com.vaadin.terminal.gwt.server.RpcManager.RpcInvocationException;
@@ -90,7 +90,7 @@ import com.vaadin.ui.Window;
* This is a common base class for the server-side implementations of the
* communication system between the client code (compiled with GWT into
* JavaScript) and the server side components. Its client side counterpart is
- * {@link ApplicationConnection}.
+ * {@link ApplicationConstants}.
*
* TODO Document better!
*/
@@ -768,8 +768,8 @@ public abstract class AbstractCommunicationManager implements Serializable {
public String getSecurityKeyUIDL(WrappedRequest request) {
final String seckey = getSecurityKey(request);
if (seckey != null) {
- return "\"" + ApplicationConnection.UIDL_SECURITY_TOKEN_ID
- + "\":\"" + seckey + "\",";
+ return "\"" + ApplicationConstants.UIDL_SECURITY_TOKEN_ID + "\":\""
+ + seckey + "\",";
} else {
return "";
}
@@ -784,11 +784,11 @@ public abstract class AbstractCommunicationManager implements Serializable {
protected String getSecurityKey(WrappedRequest request) {
String seckey = null;
seckey = (String) request
- .getSessionAttribute(ApplicationConnection.UIDL_SECURITY_TOKEN_ID);
+ .getSessionAttribute(ApplicationConstants.UIDL_SECURITY_TOKEN_ID);
if (seckey == null) {
seckey = UUID.randomUUID().toString();
request.setSessionAttribute(
- ApplicationConnection.UIDL_SECURITY_TOKEN_ID, seckey);
+ ApplicationConstants.UIDL_SECURITY_TOKEN_ID, seckey);
}
return seckey;
@@ -1286,7 +1286,7 @@ public abstract class AbstractCommunicationManager implements Serializable {
}
}
- return ApplicationConnection.CONNECTOR_PROTOCOL_PREFIX + "/" + name;
+ return ApplicationConstants.CONNECTOR_PROTOCOL_PREFIX + "/" + name;
}
/**
@@ -1543,7 +1543,7 @@ public abstract class AbstractCommunicationManager implements Serializable {
// ApplicationServlet has stored the security token in the
// session; check that it matched the one sent in the UIDL
String sessId = (String) request
- .getSessionAttribute(ApplicationConnection.UIDL_SECURITY_TOKEN_ID);
+ .getSessionAttribute(ApplicationConstants.UIDL_SECURITY_TOKEN_ID);
if (sessId == null || !sessId.equals(bursts[0])) {
throw new InvalidUIDLSecurityKeyException(
@@ -2342,7 +2342,7 @@ public abstract class AbstractCommunicationManager implements Serializable {
streamVariableToSeckey.put(value, seckey);
}
- return ApplicationConnection.APP_PROTOCOL_PREFIX
+ return ApplicationConstants.APP_PROTOCOL_PREFIX
+ ServletPortletHelper.UPLOAD_URL_PREFIX + key + "/" + seckey;
}
@@ -2406,8 +2406,7 @@ public abstract class AbstractCommunicationManager implements Serializable {
params.put("widgetset", widgetset);
params.put("themeUri", themeUri);
// Root id might have changed based on e.g. window.name
- params.put(ApplicationConnection.ROOT_ID_PARAMETER,
- root.getRootId());
+ params.put(ApplicationConstants.ROOT_ID_PARAMETER, root.getRootId());
if (sendUIDL) {
String initialUIDL = getInitialUIDL(combinedRequest, root);
params.put("uidl", initialUIDL);
@@ -2484,7 +2483,7 @@ public abstract class AbstractCommunicationManager implements Serializable {
String pathInfo = request.getRequestPathInfo();
// + 2 to also remove beginning and ending slashes
String resourceName = pathInfo
- .substring(ApplicationConnection.CONNECTOR_RESOURCE_PREFIX
+ .substring(ApplicationConstants.CONNECTOR_RESOURCE_PREFIX
.length() + 2);
final String mimetype = response.getDeploymentConfiguration()
diff --git a/server/src/com/vaadin/terminal/gwt/server/AbstractWebApplicationContext.java b/server/src/com/vaadin/terminal/gwt/server/AbstractWebApplicationContext.java
index 3a33621d10..33f4cd118d 100644
--- a/server/src/com/vaadin/terminal/gwt/server/AbstractWebApplicationContext.java
+++ b/server/src/com/vaadin/terminal/gwt/server/AbstractWebApplicationContext.java
@@ -23,8 +23,8 @@ import javax.servlet.http.HttpSessionBindingListener;
import com.vaadin.Application;
import com.vaadin.service.ApplicationContext;
+import com.vaadin.shared.ApplicationConstants;
import com.vaadin.terminal.ApplicationResource;
-import com.vaadin.terminal.gwt.client.ApplicationConnection;
/**
* Base class for web application contexts (including portlet contexts) that
@@ -181,8 +181,8 @@ public abstract class AbstractWebApplicationContext implements
final String filename = resource.getFilename();
if (filename == null) {
- return ApplicationConnection.APP_PROTOCOL_PREFIX
- + ApplicationConnection.APP_REQUEST_PATH + mapKey + "/";
+ return ApplicationConstants.APP_PROTOCOL_PREFIX
+ + ApplicationConstants.APP_REQUEST_PATH + mapKey + "/";
} else {
// #7738 At least Tomcat and JBoss refuses requests containing
// encoded slashes or backslashes in URLs. Application resource URLs
@@ -190,8 +190,8 @@ public abstract class AbstractWebApplicationContext implements
// in the future.
String encodedFileName = urlEncode(filename).replace("%2F", "/")
.replace("%5C", "\\");
- return ApplicationConnection.APP_PROTOCOL_PREFIX
- + ApplicationConnection.APP_REQUEST_PATH + mapKey + "/"
+ return ApplicationConstants.APP_PROTOCOL_PREFIX
+ + ApplicationConstants.APP_REQUEST_PATH + mapKey + "/"
+ encodedFileName;
}
diff --git a/server/src/com/vaadin/terminal/gwt/server/BootstrapHandler.java b/server/src/com/vaadin/terminal/gwt/server/BootstrapHandler.java
index e89737337b..4d278a55a1 100644
--- a/server/src/com/vaadin/terminal/gwt/server/BootstrapHandler.java
+++ b/server/src/com/vaadin/terminal/gwt/server/BootstrapHandler.java
@@ -29,12 +29,12 @@ import com.vaadin.RootRequiresMoreInformationException;
import com.vaadin.Version;
import com.vaadin.external.json.JSONException;
import com.vaadin.external.json.JSONObject;
+import com.vaadin.shared.ApplicationConstants;
import com.vaadin.terminal.DeploymentConfiguration;
import com.vaadin.terminal.PaintException;
import com.vaadin.terminal.RequestHandler;
import com.vaadin.terminal.WrappedRequest;
import com.vaadin.terminal.WrappedResponse;
-import com.vaadin.terminal.gwt.client.ApplicationConnection;
import com.vaadin.ui.Root;
public abstract class BootstrapHandler implements RequestHandler {
@@ -256,7 +256,7 @@ public abstract class BootstrapHandler implements RequestHandler {
Element body = document.body();
body.attr("scroll", "auto");
- body.addClass(ApplicationConnection.GENERATED_BODY_CLASSNAME);
+ body.addClass(ApplicationConstants.GENERATED_BODY_CLASSNAME);
}
public BootstrapContext createContext(WrappedRequest request,
@@ -410,7 +410,7 @@ public abstract class BootstrapHandler implements RequestHandler {
JSONObject appConfig = new JSONObject();
if (rootId != null) {
- appConfig.put(ApplicationConnection.ROOT_ID_PARAMETER, rootId);
+ appConfig.put(ApplicationConstants.ROOT_ID_PARAMETER, rootId);
}
if (context.getThemeName() != null) {
diff --git a/server/src/com/vaadin/terminal/gwt/server/JsonCodec.java b/server/src/com/vaadin/terminal/gwt/server/JsonCodec.java
index 8199bc6ada..7df4e3e7c4 100644
--- a/server/src/com/vaadin/terminal/gwt/server/JsonCodec.java
+++ b/server/src/com/vaadin/terminal/gwt/server/JsonCodec.java
@@ -30,8 +30,8 @@ import com.vaadin.external.json.JSONArray;
import com.vaadin.external.json.JSONException;
import com.vaadin.external.json.JSONObject;
import com.vaadin.shared.Connector;
+import com.vaadin.shared.JsonConstants;
import com.vaadin.shared.communication.UidlValue;
-import com.vaadin.terminal.gwt.client.communication.JsonEncoder;
import com.vaadin.ui.Component;
import com.vaadin.ui.ConnectorTracker;
@@ -52,24 +52,24 @@ public class JsonCodec implements Serializable {
private static Map<String, Class<?>> transportTypeToType = new HashMap<String, Class<?>>();
static {
- registerType(String.class, JsonEncoder.VTYPE_STRING);
- registerType(Connector.class, JsonEncoder.VTYPE_CONNECTOR);
- registerType(Boolean.class, JsonEncoder.VTYPE_BOOLEAN);
- registerType(boolean.class, JsonEncoder.VTYPE_BOOLEAN);
- registerType(Integer.class, JsonEncoder.VTYPE_INTEGER);
- registerType(int.class, JsonEncoder.VTYPE_INTEGER);
- registerType(Float.class, JsonEncoder.VTYPE_FLOAT);
- registerType(float.class, JsonEncoder.VTYPE_FLOAT);
- registerType(Double.class, JsonEncoder.VTYPE_DOUBLE);
- registerType(double.class, JsonEncoder.VTYPE_DOUBLE);
- registerType(Long.class, JsonEncoder.VTYPE_LONG);
- registerType(long.class, JsonEncoder.VTYPE_LONG);
- registerType(String[].class, JsonEncoder.VTYPE_STRINGARRAY);
- registerType(Object[].class, JsonEncoder.VTYPE_ARRAY);
- registerType(Map.class, JsonEncoder.VTYPE_MAP);
- registerType(HashMap.class, JsonEncoder.VTYPE_MAP);
- registerType(List.class, JsonEncoder.VTYPE_LIST);
- registerType(Set.class, JsonEncoder.VTYPE_SET);
+ registerType(String.class, JsonConstants.VTYPE_STRING);
+ registerType(Connector.class, JsonConstants.VTYPE_CONNECTOR);
+ registerType(Boolean.class, JsonConstants.VTYPE_BOOLEAN);
+ registerType(boolean.class, JsonConstants.VTYPE_BOOLEAN);
+ registerType(Integer.class, JsonConstants.VTYPE_INTEGER);
+ registerType(int.class, JsonConstants.VTYPE_INTEGER);
+ registerType(Float.class, JsonConstants.VTYPE_FLOAT);
+ registerType(float.class, JsonConstants.VTYPE_FLOAT);
+ registerType(Double.class, JsonConstants.VTYPE_DOUBLE);
+ registerType(double.class, JsonConstants.VTYPE_DOUBLE);
+ registerType(Long.class, JsonConstants.VTYPE_LONG);
+ registerType(long.class, JsonConstants.VTYPE_LONG);
+ registerType(String[].class, JsonConstants.VTYPE_STRINGARRAY);
+ registerType(Object[].class, JsonConstants.VTYPE_ARRAY);
+ registerType(Map.class, JsonConstants.VTYPE_MAP);
+ registerType(HashMap.class, JsonConstants.VTYPE_MAP);
+ registerType(List.class, JsonConstants.VTYPE_LIST);
+ registerType(Set.class, JsonConstants.VTYPE_SET);
}
private static void registerType(Class<?> type, String transportType) {
@@ -215,24 +215,24 @@ public class JsonCodec implements Serializable {
}
// Collections
- if (JsonEncoder.VTYPE_LIST.equals(transportType)) {
+ if (JsonConstants.VTYPE_LIST.equals(transportType)) {
return decodeList(targetType, restrictToInternalTypes,
(JSONArray) encodedJsonValue, connectorTracker);
- } else if (JsonEncoder.VTYPE_SET.equals(transportType)) {
+ } else if (JsonConstants.VTYPE_SET.equals(transportType)) {
return decodeSet(targetType, restrictToInternalTypes,
(JSONArray) encodedJsonValue, connectorTracker);
- } else if (JsonEncoder.VTYPE_MAP.equals(transportType)) {
+ } else if (JsonConstants.VTYPE_MAP.equals(transportType)) {
return decodeMap(targetType, restrictToInternalTypes,
encodedJsonValue, connectorTracker);
}
// Arrays
- if (JsonEncoder.VTYPE_ARRAY.equals(transportType)) {
+ if (JsonConstants.VTYPE_ARRAY.equals(transportType)) {
return decodeObjectArray(targetType, (JSONArray) encodedJsonValue,
connectorTracker);
- } else if (JsonEncoder.VTYPE_STRINGARRAY.equals(transportType)) {
+ } else if (JsonConstants.VTYPE_STRINGARRAY.equals(transportType)) {
return decodeStringArray((JSONArray) encodedJsonValue);
}
@@ -240,23 +240,23 @@ public class JsonCodec implements Serializable {
String stringValue = String.valueOf(encodedJsonValue);
- if (JsonEncoder.VTYPE_CONNECTOR.equals(transportType)) {
+ if (JsonConstants.VTYPE_CONNECTOR.equals(transportType)) {
return connectorTracker.getConnector(stringValue);
}
// Legacy types
- if (JsonEncoder.VTYPE_STRING.equals(transportType)) {
+ if (JsonConstants.VTYPE_STRING.equals(transportType)) {
return stringValue;
- } else if (JsonEncoder.VTYPE_INTEGER.equals(transportType)) {
+ } else if (JsonConstants.VTYPE_INTEGER.equals(transportType)) {
return Integer.valueOf(stringValue);
- } else if (JsonEncoder.VTYPE_LONG.equals(transportType)) {
+ } else if (JsonConstants.VTYPE_LONG.equals(transportType)) {
return Long.valueOf(stringValue);
- } else if (JsonEncoder.VTYPE_FLOAT.equals(transportType)) {
+ } else if (JsonConstants.VTYPE_FLOAT.equals(transportType)) {
return Float.valueOf(stringValue);
- } else if (JsonEncoder.VTYPE_DOUBLE.equals(transportType)) {
+ } else if (JsonConstants.VTYPE_DOUBLE.equals(transportType)) {
return Double.valueOf(stringValue);
- } else if (JsonEncoder.VTYPE_BOOLEAN.equals(transportType)) {
+ } else if (JsonConstants.VTYPE_BOOLEAN.equals(transportType)) {
return Boolean.valueOf(stringValue);
}
@@ -280,7 +280,7 @@ public class JsonCodec implements Serializable {
if (encodedTransportType.equals(transportType)) {
return true;
}
- if (encodedTransportType.equals(JsonEncoder.VTYPE_NULL)) {
+ if (encodedTransportType.equals(JsonConstants.VTYPE_NULL)) {
return true;
}
diff --git a/server/src/com/vaadin/terminal/gwt/server/LegacyChangeVariablesInvocation.java b/server/src/com/vaadin/terminal/gwt/server/LegacyChangeVariablesInvocation.java
index 9dba05d2c1..a6b72a3fb5 100644
--- a/server/src/com/vaadin/terminal/gwt/server/LegacyChangeVariablesInvocation.java
+++ b/server/src/com/vaadin/terminal/gwt/server/LegacyChangeVariablesInvocation.java
@@ -6,24 +6,24 @@ package com.vaadin.terminal.gwt.server;
import java.util.HashMap;
import java.util.Map;
+import com.vaadin.shared.ApplicationConstants;
import com.vaadin.shared.communication.MethodInvocation;
-import com.vaadin.terminal.gwt.client.ApplicationConnection;
public class LegacyChangeVariablesInvocation extends MethodInvocation {
private Map<String, Object> variableChanges = new HashMap<String, Object>();
public LegacyChangeVariablesInvocation(String connectorId,
String variableName, Object value) {
- super(connectorId, ApplicationConnection.UPDATE_VARIABLE_INTERFACE,
- ApplicationConnection.UPDATE_VARIABLE_METHOD);
+ super(connectorId, ApplicationConstants.UPDATE_VARIABLE_INTERFACE,
+ ApplicationConstants.UPDATE_VARIABLE_METHOD);
setVariableChange(variableName, value);
}
public static boolean isLegacyVariableChange(String interfaceName,
String methodName) {
- return ApplicationConnection.UPDATE_VARIABLE_METHOD
+ return ApplicationConstants.UPDATE_VARIABLE_METHOD
.equals(interfaceName)
- && ApplicationConnection.UPDATE_VARIABLE_METHOD
+ && ApplicationConstants.UPDATE_VARIABLE_METHOD
.equals(methodName);
}
diff --git a/server/src/com/vaadin/terminal/gwt/server/PortletCommunicationManager.java b/server/src/com/vaadin/terminal/gwt/server/PortletCommunicationManager.java
index 39c27d05fe..b082cd4729 100644
--- a/server/src/com/vaadin/terminal/gwt/server/PortletCommunicationManager.java
+++ b/server/src/com/vaadin/terminal/gwt/server/PortletCommunicationManager.java
@@ -17,11 +17,11 @@ import javax.portlet.ResourceURL;
import com.vaadin.Application;
import com.vaadin.external.json.JSONException;
import com.vaadin.external.json.JSONObject;
+import com.vaadin.shared.ApplicationConstants;
import com.vaadin.terminal.DeploymentConfiguration;
import com.vaadin.terminal.PaintException;
import com.vaadin.terminal.WrappedRequest;
import com.vaadin.terminal.WrappedResponse;
-import com.vaadin.terminal.gwt.client.ApplicationConfiguration;
import com.vaadin.ui.Root;
/**
@@ -91,7 +91,7 @@ public class PortletCommunicationManager extends AbstractCommunicationManager {
.createResourceURL();
portletResourceUrl
.setResourceID(AbstractApplicationPortlet.RESOURCE_URL_ID);
- defaults.put(ApplicationConfiguration.PORTLET_RESOUCE_URL_BASE,
+ defaults.put(ApplicationConstants.PORTLET_RESOUCE_URL_BASE,
portletResourceUrl.toString());
defaults.put("pathInfo", "");
diff --git a/server/src/com/vaadin/terminal/gwt/server/ServletPortletHelper.java b/server/src/com/vaadin/terminal/gwt/server/ServletPortletHelper.java
index 2a1dc31897..ce8e8946ce 100644
--- a/server/src/com/vaadin/terminal/gwt/server/ServletPortletHelper.java
+++ b/server/src/com/vaadin/terminal/gwt/server/ServletPortletHelper.java
@@ -3,9 +3,9 @@ package com.vaadin.terminal.gwt.server;
import java.io.Serializable;
import com.vaadin.Application;
+import com.vaadin.shared.ApplicationConstants;
import com.vaadin.terminal.DeploymentConfiguration;
import com.vaadin.terminal.WrappedRequest;
-import com.vaadin.terminal.gwt.client.ApplicationConnection;
import com.vaadin.ui.Root;
/*
@@ -106,15 +106,15 @@ class ServletPortletHelper implements Serializable {
public static boolean isConnectorResourceRequest(WrappedRequest request) {
return hasPathPrefix(request,
- ApplicationConnection.CONNECTOR_RESOURCE_PREFIX + "/");
+ ApplicationConstants.CONNECTOR_RESOURCE_PREFIX + "/");
}
public static boolean isUIDLRequest(WrappedRequest request) {
- return hasPathPrefix(request, ApplicationConnection.UIDL_REQUEST_PATH);
+ return hasPathPrefix(request, ApplicationConstants.UIDL_REQUEST_PATH);
}
public static boolean isApplicationResourceRequest(WrappedRequest request) {
- return hasPathPrefix(request, ApplicationConnection.APP_REQUEST_PATH);
+ return hasPathPrefix(request, ApplicationConstants.APP_REQUEST_PATH);
}
}
diff --git a/server/src/com/vaadin/terminal/gwt/server/WrappedPortletRequest.java b/server/src/com/vaadin/terminal/gwt/server/WrappedPortletRequest.java
index a3fa172034..0a3623f987 100644
--- a/server/src/com/vaadin/terminal/gwt/server/WrappedPortletRequest.java
+++ b/server/src/com/vaadin/terminal/gwt/server/WrappedPortletRequest.java
@@ -14,10 +14,10 @@ import javax.portlet.PortletRequest;
import javax.portlet.ResourceRequest;
import com.vaadin.Application;
+import com.vaadin.shared.ApplicationConstants;
import com.vaadin.terminal.CombinedRequest;
import com.vaadin.terminal.DeploymentConfiguration;
import com.vaadin.terminal.WrappedRequest;
-import com.vaadin.terminal.gwt.client.ApplicationConnection;
/**
* Wrapper for {@link PortletRequest} and its subclasses.
@@ -94,7 +94,7 @@ public class WrappedPortletRequest implements WrappedRequest {
String resourceID = resourceRequest.getResourceID();
if (AbstractApplicationPortlet.RESOURCE_URL_ID.equals(resourceID)) {
String resourcePath = resourceRequest
- .getParameter(ApplicationConnection.V_RESOURCE_PATH);
+ .getParameter(ApplicationConstants.V_RESOURCE_PATH);
return resourcePath;
}
return resourceID;
diff --git a/server/src/com/vaadin/ui/AbsoluteLayout.java b/server/src/com/vaadin/ui/AbsoluteLayout.java
index 1c84ca2865..687f7452c5 100644
--- a/server/src/com/vaadin/ui/AbsoluteLayout.java
+++ b/server/src/com/vaadin/ui/AbsoluteLayout.java
@@ -13,11 +13,11 @@ import com.vaadin.event.LayoutEvents.LayoutClickEvent;
import com.vaadin.event.LayoutEvents.LayoutClickListener;
import com.vaadin.event.LayoutEvents.LayoutClickNotifier;
import com.vaadin.shared.Connector;
+import com.vaadin.shared.EventId;
import com.vaadin.shared.MouseEventDetails;
import com.vaadin.shared.ui.absolutelayout.AbsoluteLayoutServerRpc;
import com.vaadin.shared.ui.absolutelayout.AbsoluteLayoutState;
import com.vaadin.terminal.Sizeable;
-import com.vaadin.terminal.gwt.client.ui.LayoutClickEventHandler;
/**
* AbsoluteLayout is a layout implementation that mimics html absolute
@@ -618,14 +618,14 @@ public class AbsoluteLayout extends AbstractLayout implements
@Override
public void addListener(LayoutClickListener listener) {
- addListener(LayoutClickEventHandler.LAYOUT_CLICK_EVENT_IDENTIFIER,
+ addListener(EventId.LAYOUT_CLICK_EVENT_IDENTIFIER,
LayoutClickEvent.class, listener,
LayoutClickListener.clickMethod);
}
@Override
public void removeListener(LayoutClickListener listener) {
- removeListener(LayoutClickEventHandler.LAYOUT_CLICK_EVENT_IDENTIFIER,
+ removeListener(EventId.LAYOUT_CLICK_EVENT_IDENTIFIER,
LayoutClickEvent.class, listener);
}
diff --git a/server/src/com/vaadin/ui/AbstractJavaScriptComponent.java b/server/src/com/vaadin/ui/AbstractJavaScriptComponent.java
index 5ec80573ab..12f1f83968 100644
--- a/server/src/com/vaadin/ui/AbstractJavaScriptComponent.java
+++ b/server/src/com/vaadin/ui/AbstractJavaScriptComponent.java
@@ -5,8 +5,6 @@ package com.vaadin.ui;
import com.vaadin.shared.ui.JavaScriptComponentState;
import com.vaadin.terminal.JavaScriptCallbackHelper;
-import com.vaadin.terminal.gwt.client.ApplicationConnection;
-import com.vaadin.terminal.gwt.client.ui.JavaScriptWidget;
/**
* Base class for Components with all client-side logic implemented using
diff --git a/server/src/com/vaadin/ui/AbstractOrderedLayout.java b/server/src/com/vaadin/ui/AbstractOrderedLayout.java
index 0581d0a279..1a3b9407e8 100644
--- a/server/src/com/vaadin/ui/AbstractOrderedLayout.java
+++ b/server/src/com/vaadin/ui/AbstractOrderedLayout.java
@@ -11,12 +11,12 @@ import com.vaadin.event.LayoutEvents.LayoutClickEvent;
import com.vaadin.event.LayoutEvents.LayoutClickListener;
import com.vaadin.event.LayoutEvents.LayoutClickNotifier;
import com.vaadin.shared.Connector;
+import com.vaadin.shared.EventId;
import com.vaadin.shared.MouseEventDetails;
import com.vaadin.shared.ui.orderedlayout.AbstractOrderedLayoutServerRpc;
import com.vaadin.shared.ui.orderedlayout.AbstractOrderedLayoutState;
import com.vaadin.shared.ui.orderedlayout.AbstractOrderedLayoutState.ChildComponentData;
import com.vaadin.terminal.Sizeable;
-import com.vaadin.terminal.gwt.client.ui.LayoutClickEventHandler;
@SuppressWarnings("serial")
public abstract class AbstractOrderedLayout extends AbstractLayout implements
@@ -345,14 +345,14 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements
@Override
public void addListener(LayoutClickListener listener) {
- addListener(LayoutClickEventHandler.LAYOUT_CLICK_EVENT_IDENTIFIER,
+ addListener(EventId.LAYOUT_CLICK_EVENT_IDENTIFIER,
LayoutClickEvent.class, listener,
LayoutClickListener.clickMethod);
}
@Override
public void removeListener(LayoutClickListener listener) {
- removeListener(LayoutClickEventHandler.LAYOUT_CLICK_EVENT_IDENTIFIER,
+ removeListener(EventId.LAYOUT_CLICK_EVENT_IDENTIFIER,
LayoutClickEvent.class, listener);
}
diff --git a/server/src/com/vaadin/ui/AbstractSplitPanel.java b/server/src/com/vaadin/ui/AbstractSplitPanel.java
index 90dc38ff65..3b51e6099b 100644
--- a/server/src/com/vaadin/ui/AbstractSplitPanel.java
+++ b/server/src/com/vaadin/ui/AbstractSplitPanel.java
@@ -10,12 +10,12 @@ import java.util.Iterator;
import com.vaadin.event.ComponentEventListener;
import com.vaadin.event.MouseEvents.ClickEvent;
+import com.vaadin.shared.EventId;
import com.vaadin.shared.MouseEventDetails;
import com.vaadin.shared.ui.splitpanel.AbstractSplitPanelRpc;
import com.vaadin.shared.ui.splitpanel.AbstractSplitPanelState;
import com.vaadin.shared.ui.splitpanel.AbstractSplitPanelState.SplitterState;
import com.vaadin.terminal.Sizeable;
-import com.vaadin.terminal.gwt.client.ui.ClickEventHandler;
import com.vaadin.tools.ReflectTools;
/**
@@ -500,13 +500,12 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
}
public void addListener(SplitterClickListener listener) {
- addListener(ClickEventHandler.CLICK_EVENT_IDENTIFIER,
- SplitterClickEvent.class, listener,
- SplitterClickListener.clickMethod);
+ addListener(EventId.CLICK_EVENT_IDENTIFIER, SplitterClickEvent.class,
+ listener, SplitterClickListener.clickMethod);
}
public void removeListener(SplitterClickListener listener) {
- removeListener(ClickEventHandler.CLICK_EVENT_IDENTIFIER,
+ removeListener(EventId.CLICK_EVENT_IDENTIFIER,
SplitterClickEvent.class, listener);
}
diff --git a/server/src/com/vaadin/ui/AbstractTextField.java b/server/src/com/vaadin/ui/AbstractTextField.java
index 2326c07d97..2ded12d18d 100644
--- a/server/src/com/vaadin/ui/AbstractTextField.java
+++ b/server/src/com/vaadin/ui/AbstractTextField.java
@@ -16,10 +16,10 @@ import com.vaadin.event.FieldEvents.TextChangeEvent;
import com.vaadin.event.FieldEvents.TextChangeListener;
import com.vaadin.event.FieldEvents.TextChangeNotifier;
import com.vaadin.shared.ui.textfield.AbstractTextFieldState;
+import com.vaadin.shared.ui.textfield.TextFieldConstants;
import com.vaadin.terminal.PaintException;
import com.vaadin.terminal.PaintTarget;
import com.vaadin.terminal.Vaadin6Component;
-import com.vaadin.terminal.gwt.client.ui.textfield.VTextField;
public abstract class AbstractTextField extends AbstractField<String> implements
BlurNotifier, FocusNotifier, TextChangeNotifier, Vaadin6Component {
@@ -105,9 +105,9 @@ public abstract class AbstractTextField extends AbstractField<String> implements
}
if (hasListeners(TextChangeEvent.class)) {
- target.addAttribute(VTextField.ATTR_TEXTCHANGE_EVENTMODE,
+ target.addAttribute(TextFieldConstants.ATTR_TEXTCHANGE_EVENTMODE,
getTextChangeEventMode().toString());
- target.addAttribute(VTextField.ATTR_TEXTCHANGE_TIMEOUT,
+ target.addAttribute(TextFieldConstants.ATTR_TEXTCHANGE_TIMEOUT,
getTextChangeTimeout());
if (lastKnownTextContent != null) {
/*
@@ -118,7 +118,8 @@ public abstract class AbstractTextField extends AbstractField<String> implements
* the actual value, depending on its state.
*/
target.addAttribute(
- VTextField.ATTR_NO_VALUE_CHANGE_BETWEEN_PAINTS, true);
+ TextFieldConstants.ATTR_NO_VALUE_CHANGE_BETWEEN_PAINTS,
+ true);
}
}
@@ -130,12 +131,13 @@ public abstract class AbstractTextField extends AbstractField<String> implements
try {
- if (variables.containsKey(VTextField.VAR_CURSOR)) {
- Integer object = (Integer) variables.get(VTextField.VAR_CURSOR);
+ if (variables.containsKey(TextFieldConstants.VAR_CURSOR)) {
+ Integer object = (Integer) variables
+ .get(TextFieldConstants.VAR_CURSOR);
lastKnownCursorPosition = object.intValue();
}
- if (variables.containsKey(VTextField.VAR_CUR_TEXT)) {
+ if (variables.containsKey(TextFieldConstants.VAR_CUR_TEXT)) {
/*
* NOTE, we might want to develop this further so that on a
* value change event the whole text content don't need to be
@@ -439,7 +441,7 @@ public abstract class AbstractTextField extends AbstractField<String> implements
* some sort of diffs instead of always sending the whole text content.
* Also on value change events we could use the mechanism.
*/
- String object = (String) variables.get(VTextField.VAR_CUR_TEXT);
+ String object = (String) variables.get(TextFieldConstants.VAR_CUR_TEXT);
lastKnownTextContent = object;
textChangeEventPending = true;
}
diff --git a/server/src/com/vaadin/ui/ComboBox.java b/server/src/com/vaadin/ui/ComboBox.java
index 6286dad124..a4dcdc152d 100644
--- a/server/src/com/vaadin/ui/ComboBox.java
+++ b/server/src/com/vaadin/ui/ComboBox.java
@@ -7,9 +7,9 @@ package com.vaadin.ui;
import java.util.Collection;
import com.vaadin.data.Container;
+import com.vaadin.shared.ui.combobox.ComboBoxConstants;
import com.vaadin.terminal.PaintException;
import com.vaadin.terminal.PaintTarget;
-import com.vaadin.terminal.gwt.client.ui.combobox.VFilterSelect;
/**
* A filtering dropdown single-select. Suitable for newItemsAllowed, but it's
@@ -75,12 +75,12 @@ public class ComboBox extends Select {
@Override
public void paintContent(PaintTarget target) throws PaintException {
if (inputPrompt != null) {
- target.addAttribute("prompt", inputPrompt);
+ target.addAttribute(ComboBoxConstants.ATTR_INPUTPROMPT, inputPrompt);
}
super.paintContent(target);
if (!textInputAllowed) {
- target.addAttribute(VFilterSelect.ATTR_NO_TEXT_INPUT, true);
+ target.addAttribute(ComboBoxConstants.ATTR_NO_TEXT_INPUT, true);
}
}
diff --git a/server/src/com/vaadin/ui/ConnectorTracker.java b/server/src/com/vaadin/ui/ConnectorTracker.java
index e3d1bf86db..0eeaa0d9e1 100644
--- a/server/src/com/vaadin/ui/ConnectorTracker.java
+++ b/server/src/com/vaadin/ui/ConnectorTracker.java
@@ -13,7 +13,6 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import com.vaadin.terminal.AbstractClientConnector;
-import com.vaadin.terminal.gwt.client.ServerConnector;
import com.vaadin.terminal.gwt.server.ClientConnector;
/**
diff --git a/server/src/com/vaadin/ui/CssLayout.java b/server/src/com/vaadin/ui/CssLayout.java
index 356f0a3843..24f12e8403 100644
--- a/server/src/com/vaadin/ui/CssLayout.java
+++ b/server/src/com/vaadin/ui/CssLayout.java
@@ -10,10 +10,10 @@ import com.vaadin.event.LayoutEvents.LayoutClickEvent;
import com.vaadin.event.LayoutEvents.LayoutClickListener;
import com.vaadin.event.LayoutEvents.LayoutClickNotifier;
import com.vaadin.shared.Connector;
+import com.vaadin.shared.EventId;
import com.vaadin.shared.MouseEventDetails;
import com.vaadin.shared.ui.csslayout.CssLayoutServerRpc;
import com.vaadin.shared.ui.csslayout.CssLayoutState;
-import com.vaadin.terminal.gwt.client.ui.LayoutClickEventHandler;
/**
* CssLayout is a layout component that can be used in browser environment only.
@@ -270,14 +270,14 @@ public class CssLayout extends AbstractLayout implements LayoutClickNotifier {
@Override
public void addListener(LayoutClickListener listener) {
- addListener(LayoutClickEventHandler.LAYOUT_CLICK_EVENT_IDENTIFIER,
+ addListener(EventId.LAYOUT_CLICK_EVENT_IDENTIFIER,
LayoutClickEvent.class, listener,
LayoutClickListener.clickMethod);
}
@Override
public void removeListener(LayoutClickListener listener) {
- removeListener(LayoutClickEventHandler.LAYOUT_CLICK_EVENT_IDENTIFIER,
+ removeListener(EventId.LAYOUT_CLICK_EVENT_IDENTIFIER,
LayoutClickEvent.class, listener);
}
diff --git a/server/src/com/vaadin/ui/DateField.java b/server/src/com/vaadin/ui/DateField.java
index d0a22f3c29..ff597f8699 100644
--- a/server/src/com/vaadin/ui/DateField.java
+++ b/server/src/com/vaadin/ui/DateField.java
@@ -24,10 +24,10 @@ import com.vaadin.event.FieldEvents.BlurEvent;
import com.vaadin.event.FieldEvents.BlurListener;
import com.vaadin.event.FieldEvents.FocusEvent;
import com.vaadin.event.FieldEvents.FocusListener;
+import com.vaadin.shared.ui.datefield.DateFieldConstants;
import com.vaadin.terminal.PaintException;
import com.vaadin.terminal.PaintTarget;
import com.vaadin.terminal.Vaadin6Component;
-import com.vaadin.terminal.gwt.client.ui.datefield.VDateField;
/**
* <p>
@@ -303,7 +303,8 @@ public class DateField extends AbstractField<Date> implements
target.addAttribute("strict", true);
}
- target.addAttribute(VDateField.WEEK_NUMBERS, isShowISOWeekNumbers());
+ target.addAttribute(DateFieldConstants.ATTR_WEEK_NUMBERS,
+ isShowISOWeekNumbers());
target.addAttribute("parsable", uiHasValidDateString);
/*
* TODO communicate back the invalid date string? E.g. returning back to
diff --git a/server/src/com/vaadin/ui/DragAndDropWrapper.java b/server/src/com/vaadin/ui/DragAndDropWrapper.java
index 67229a45fe..b5bd3097b2 100644
--- a/server/src/com/vaadin/ui/DragAndDropWrapper.java
+++ b/server/src/com/vaadin/ui/DragAndDropWrapper.java
@@ -20,11 +20,11 @@ import com.vaadin.event.dd.TargetDetailsImpl;
import com.vaadin.shared.MouseEventDetails;
import com.vaadin.shared.ui.dd.HorizontalDropLocation;
import com.vaadin.shared.ui.dd.VerticalDropLocation;
+import com.vaadin.shared.ui.draganddropwrapper.DragAndDropWrapperConstants;
import com.vaadin.terminal.PaintException;
import com.vaadin.terminal.PaintTarget;
import com.vaadin.terminal.StreamVariable;
import com.vaadin.terminal.Vaadin6Component;
-import com.vaadin.terminal.gwt.client.ui.draganddropwrapper.VDragAndDropWrapper;
@SuppressWarnings("serial")
public class DragAndDropWrapper extends CustomComponent implements DropTarget,
@@ -221,7 +221,7 @@ public class DragAndDropWrapper extends CustomComponent implements DropTarget,
@Override
public void paintContent(PaintTarget target) throws PaintException {
- target.addAttribute(VDragAndDropWrapper.DRAG_START_MODE,
+ target.addAttribute(DragAndDropWrapperConstants.DRAG_START_MODE,
dragStartMode.ordinal());
if (getDropHandler() != null) {
getDropHandler().getAcceptCriterion().paint(target);
@@ -245,7 +245,7 @@ public class DragAndDropWrapper extends CustomComponent implements DropTarget,
}
}
}
- target.addAttribute(VDragAndDropWrapper.HTML5_DATA_FLAVORS,
+ target.addAttribute(DragAndDropWrapperConstants.HTML5_DATA_FLAVORS,
html5DataFlavors);
}
diff --git a/server/src/com/vaadin/ui/Embedded.java b/server/src/com/vaadin/ui/Embedded.java
index 6088c5aa66..ffa47f60b8 100644
--- a/server/src/com/vaadin/ui/Embedded.java
+++ b/server/src/com/vaadin/ui/Embedded.java
@@ -10,14 +10,14 @@ import java.util.Map;
import com.vaadin.event.MouseEvents.ClickEvent;
import com.vaadin.event.MouseEvents.ClickListener;
+import com.vaadin.shared.EventId;
import com.vaadin.shared.MouseEventDetails;
+import com.vaadin.shared.ui.embedded.EmbeddedConstants;
import com.vaadin.shared.ui.embedded.EmbeddedServerRpc;
import com.vaadin.terminal.PaintException;
import com.vaadin.terminal.PaintTarget;
import com.vaadin.terminal.Resource;
import com.vaadin.terminal.Vaadin6Component;
-import com.vaadin.terminal.gwt.client.ui.ClickEventHandler;
-import com.vaadin.terminal.gwt.client.ui.embedded.EmbeddedConnector;
/**
* Component for embedding external objects.
@@ -158,7 +158,7 @@ public class Embedded extends AbstractComponent implements Vaadin6Component {
target.addAttribute("archive", archive);
}
if (altText != null && !"".equals(altText)) {
- target.addAttribute(EmbeddedConnector.ALTERNATE_TEXT, altText);
+ target.addAttribute(EmbeddedConstants.ALTERNATE_TEXT, altText);
}
// Params
@@ -507,8 +507,8 @@ public class Embedded extends AbstractComponent implements Vaadin6Component {
* The listener to add
*/
public void addListener(ClickListener listener) {
- addListener(ClickEventHandler.CLICK_EVENT_IDENTIFIER, ClickEvent.class,
- listener, ClickListener.clickMethod);
+ addListener(EventId.CLICK_EVENT_IDENTIFIER, ClickEvent.class, listener,
+ ClickListener.clickMethod);
}
/**
@@ -519,8 +519,8 @@ public class Embedded extends AbstractComponent implements Vaadin6Component {
* The listener to remove
*/
public void removeListener(ClickListener listener) {
- removeListener(ClickEventHandler.CLICK_EVENT_IDENTIFIER,
- ClickEvent.class, listener);
+ removeListener(EventId.CLICK_EVENT_IDENTIFIER, ClickEvent.class,
+ listener);
}
@Override
diff --git a/server/src/com/vaadin/ui/GridLayout.java b/server/src/com/vaadin/ui/GridLayout.java
index 2391a9cd3a..49d4c26936 100644
--- a/server/src/com/vaadin/ui/GridLayout.java
+++ b/server/src/com/vaadin/ui/GridLayout.java
@@ -16,6 +16,7 @@ import com.vaadin.event.LayoutEvents.LayoutClickEvent;
import com.vaadin.event.LayoutEvents.LayoutClickListener;
import com.vaadin.event.LayoutEvents.LayoutClickNotifier;
import com.vaadin.shared.Connector;
+import com.vaadin.shared.EventId;
import com.vaadin.shared.MouseEventDetails;
import com.vaadin.shared.ui.gridlayout.GridLayoutServerRpc;
import com.vaadin.shared.ui.gridlayout.GridLayoutState;
@@ -23,7 +24,6 @@ import com.vaadin.terminal.LegacyPaint;
import com.vaadin.terminal.PaintException;
import com.vaadin.terminal.PaintTarget;
import com.vaadin.terminal.Vaadin6Component;
-import com.vaadin.terminal.gwt.client.ui.LayoutClickEventHandler;
/**
* A layout where the components are laid out on a grid using cell coordinates.
@@ -1401,14 +1401,14 @@ public class GridLayout extends AbstractLayout implements
@Override
public void addListener(LayoutClickListener listener) {
- addListener(LayoutClickEventHandler.LAYOUT_CLICK_EVENT_IDENTIFIER,
+ addListener(EventId.LAYOUT_CLICK_EVENT_IDENTIFIER,
LayoutClickEvent.class, listener,
LayoutClickListener.clickMethod);
}
@Override
public void removeListener(LayoutClickListener listener) {
- removeListener(LayoutClickEventHandler.LAYOUT_CLICK_EVENT_IDENTIFIER,
+ removeListener(EventId.LAYOUT_CLICK_EVENT_IDENTIFIER,
LayoutClickEvent.class, listener);
}
diff --git a/server/src/com/vaadin/ui/LoginForm.java b/server/src/com/vaadin/ui/LoginForm.java
index db7e5f9dd9..9a217f0c69 100644
--- a/server/src/com/vaadin/ui/LoginForm.java
+++ b/server/src/com/vaadin/ui/LoginForm.java
@@ -13,12 +13,12 @@ import java.util.Iterator;
import java.util.Map;
import com.vaadin.Application;
+import com.vaadin.shared.ApplicationConstants;
import com.vaadin.terminal.ApplicationResource;
import com.vaadin.terminal.DownloadStream;
import com.vaadin.terminal.RequestHandler;
import com.vaadin.terminal.WrappedRequest;
import com.vaadin.terminal.WrappedResponse;
-import com.vaadin.terminal.gwt.client.ApplicationConnection;
/**
* LoginForm is a Vaadin component to handle common problem among Ajax
@@ -156,7 +156,7 @@ public class LoginForm extends CustomComponent {
+ " if (keycode == 13) {document.forms[0].submit();} } \n"
+ "</script>"
+ "</head><body onload='setTarget();' style='margin:0;padding:0; background:transparent;' class=\""
- + ApplicationConnection.GENERATED_BODY_CLASSNAME
+ + ApplicationConstants.GENERATED_BODY_CLASSNAME
+ "\">"
+ "<div class='v-app v-app-loginpage' style=\"background:transparent;\">"
+ "<iframe name='logintarget' style='width:0;height:0;"
diff --git a/server/src/com/vaadin/ui/MenuBar.java b/server/src/com/vaadin/ui/MenuBar.java
index 5b5dc13e20..abf71858ae 100644
--- a/server/src/com/vaadin/ui/MenuBar.java
+++ b/server/src/com/vaadin/ui/MenuBar.java
@@ -10,11 +10,11 @@ import java.util.List;
import java.util.Map;
import java.util.Stack;
+import com.vaadin.shared.ui.menubar.MenuBarConstants;
import com.vaadin.terminal.PaintException;
import com.vaadin.terminal.PaintTarget;
import com.vaadin.terminal.Resource;
import com.vaadin.terminal.Vaadin6Component;
-import com.vaadin.terminal.gwt.client.ui.menubar.VMenuBar;
/**
* <p>
@@ -41,10 +41,11 @@ public class MenuBar extends AbstractComponent implements Vaadin6Component {
/** Paint (serialise) the component for the client. */
@Override
public void paintContent(PaintTarget target) throws PaintException {
- target.addAttribute(VMenuBar.OPEN_ROOT_MENU_ON_HOWER, openRootOnHover);
+ target.addAttribute(MenuBarConstants.OPEN_ROOT_MENU_ON_HOWER,
+ openRootOnHover);
if (isHtmlContentAllowed()) {
- target.addAttribute(VMenuBar.HTML_CONTENT_ALLOWED, true);
+ target.addAttribute(MenuBarConstants.HTML_CONTENT_ALLOWED, true);
}
target.startTag("options");
@@ -80,7 +81,7 @@ public class MenuBar extends AbstractComponent implements Vaadin6Component {
target.addAttribute("id", item.getId());
if (item.getStyleName() != null) {
- target.addAttribute(VMenuBar.ATTRIBUTE_ITEM_STYLE,
+ target.addAttribute(MenuBarConstants.ATTRIBUTE_ITEM_STYLE,
item.getStyleName());
}
@@ -96,22 +97,24 @@ public class MenuBar extends AbstractComponent implements Vaadin6Component {
Resource icon = item.getIcon();
if (icon != null) {
- target.addAttribute(VMenuBar.ATTRIBUTE_ITEM_ICON, icon);
+ target.addAttribute(MenuBarConstants.ATTRIBUTE_ITEM_ICON, icon);
}
if (!item.isEnabled()) {
- target.addAttribute(VMenuBar.ATTRIBUTE_ITEM_DISABLED, true);
+ target.addAttribute(MenuBarConstants.ATTRIBUTE_ITEM_DISABLED,
+ true);
}
String description = item.getDescription();
if (description != null && description.length() > 0) {
- target.addAttribute(VMenuBar.ATTRIBUTE_ITEM_DESCRIPTION,
+ target.addAttribute(
+ MenuBarConstants.ATTRIBUTE_ITEM_DESCRIPTION,
description);
}
if (item.isCheckable()) {
// if the "checked" attribute is present (either true or false),
// the item is checkable
- target.addAttribute(VMenuBar.ATTRIBUTE_CHECKED,
+ target.addAttribute(MenuBarConstants.ATTRIBUTE_CHECKED,
item.isChecked());
}
if (item.hasChildren()) {
diff --git a/server/src/com/vaadin/ui/OptionGroup.java b/server/src/com/vaadin/ui/OptionGroup.java
index e3bcdd61b7..25a6e5132a 100644
--- a/server/src/com/vaadin/ui/OptionGroup.java
+++ b/server/src/com/vaadin/ui/OptionGroup.java
@@ -15,9 +15,9 @@ import com.vaadin.event.FieldEvents.BlurEvent;
import com.vaadin.event.FieldEvents.BlurListener;
import com.vaadin.event.FieldEvents.FocusEvent;
import com.vaadin.event.FieldEvents.FocusListener;
+import com.vaadin.shared.ui.optiongroup.OptionGroupConstants;
import com.vaadin.terminal.PaintException;
import com.vaadin.terminal.PaintTarget;
-import com.vaadin.terminal.gwt.client.ui.optiongroup.VOptionGroup;
/**
* Configures select to be used as an option group.
@@ -49,7 +49,7 @@ public class OptionGroup extends AbstractSelect implements
public void paintContent(PaintTarget target) throws PaintException {
target.addAttribute("type", "optiongroup");
if (isHtmlContentAllowed()) {
- target.addAttribute(VOptionGroup.HTML_CONTENT_ALLOWED, true);
+ target.addAttribute(OptionGroupConstants.HTML_CONTENT_ALLOWED, true);
}
super.paintContent(target);
}
@@ -59,7 +59,8 @@ public class OptionGroup extends AbstractSelect implements
throws PaintException {
super.paintItem(target, itemId);
if (!isItemEnabled(itemId)) {
- target.addAttribute(VOptionGroup.ATTRIBUTE_OPTION_DISABLED, true);
+ target.addAttribute(OptionGroupConstants.ATTRIBUTE_OPTION_DISABLED,
+ true);
}
}
diff --git a/server/src/com/vaadin/ui/Panel.java b/server/src/com/vaadin/ui/Panel.java
index 3c26b73f09..fab8d57c02 100644
--- a/server/src/com/vaadin/ui/Panel.java
+++ b/server/src/com/vaadin/ui/Panel.java
@@ -13,6 +13,7 @@ import com.vaadin.event.Action.Handler;
import com.vaadin.event.ActionManager;
import com.vaadin.event.MouseEvents.ClickEvent;
import com.vaadin.event.MouseEvents.ClickListener;
+import com.vaadin.shared.EventId;
import com.vaadin.shared.MouseEventDetails;
import com.vaadin.shared.ui.panel.PanelServerRpc;
import com.vaadin.shared.ui.panel.PanelState;
@@ -20,7 +21,6 @@ import com.vaadin.terminal.PaintException;
import com.vaadin.terminal.PaintTarget;
import com.vaadin.terminal.Scrollable;
import com.vaadin.terminal.Vaadin6Component;
-import com.vaadin.terminal.gwt.client.ui.ClickEventHandler;
import com.vaadin.ui.Component.Focusable;
/**
@@ -425,8 +425,8 @@ public class Panel extends AbstractComponentContainer implements Scrollable,
* The listener to add
*/
public void addListener(ClickListener listener) {
- addListener(ClickEventHandler.CLICK_EVENT_IDENTIFIER, ClickEvent.class,
- listener, ClickListener.clickMethod);
+ addListener(EventId.CLICK_EVENT_IDENTIFIER, ClickEvent.class, listener,
+ ClickListener.clickMethod);
}
/**
@@ -437,8 +437,8 @@ public class Panel extends AbstractComponentContainer implements Scrollable,
* The listener to remove
*/
public void removeListener(ClickListener listener) {
- removeListener(ClickEventHandler.CLICK_EVENT_IDENTIFIER,
- ClickEvent.class, listener);
+ removeListener(EventId.CLICK_EVENT_IDENTIFIER, ClickEvent.class,
+ listener);
}
/**
diff --git a/server/src/com/vaadin/ui/Root.java b/server/src/com/vaadin/ui/Root.java
index bd4842632b..c5840a61de 100644
--- a/server/src/com/vaadin/ui/Root.java
+++ b/server/src/com/vaadin/ui/Root.java
@@ -20,7 +20,9 @@ import com.vaadin.event.Action.Handler;
import com.vaadin.event.ActionManager;
import com.vaadin.event.MouseEvents.ClickEvent;
import com.vaadin.event.MouseEvents.ClickListener;
+import com.vaadin.shared.EventId;
import com.vaadin.shared.MouseEventDetails;
+import com.vaadin.shared.ui.root.RootConstants;
import com.vaadin.shared.ui.root.RootServerRpc;
import com.vaadin.shared.ui.root.RootState;
import com.vaadin.terminal.Page;
@@ -32,7 +34,6 @@ import com.vaadin.terminal.Resource;
import com.vaadin.terminal.Vaadin6Component;
import com.vaadin.terminal.WrappedRequest;
import com.vaadin.terminal.WrappedRequest.BrowserDetails;
-import com.vaadin.terminal.gwt.client.ui.root.VRoot;
import com.vaadin.ui.Window.CloseListener;
/**
@@ -412,8 +413,6 @@ public abstract class Root extends AbstractComponentContainer implements
private static final ThreadLocal<Root> currentRoot = new ThreadLocal<Root>();
/** Identifies the click event */
- private static final String CLICK_EVENT_ID = VRoot.CLICK_EVENT_ID;
-
private ConnectorTracker connectorTracker = new ConnectorTracker(this);
private Page page = new Page(this);
@@ -537,7 +536,7 @@ public abstract class Root extends AbstractComponentContainer implements
}
if (isResizeLazy()) {
- target.addAttribute(VRoot.RESIZE_LAZY, true);
+ target.addAttribute(RootConstants.RESIZE_LAZY, true);
}
}
@@ -556,8 +555,9 @@ public abstract class Root extends AbstractComponentContainer implements
@Override
@SuppressWarnings("unchecked")
public void changeVariables(Object source, Map<String, Object> variables) {
- if (variables.containsKey(CLICK_EVENT_ID)) {
- fireClick((Map<String, Object>) variables.get(CLICK_EVENT_ID));
+ if (variables.containsKey(EventId.CLICK_EVENT_IDENTIFIER)) {
+ fireClick((Map<String, Object>) variables
+ .get(EventId.CLICK_EVENT_IDENTIFIER));
}
// Actions
@@ -565,8 +565,9 @@ public abstract class Root extends AbstractComponentContainer implements
actionManager.handleActions(variables, this);
}
- if (variables.containsKey(VRoot.FRAGMENT_VARIABLE)) {
- String fragment = (String) variables.get(VRoot.FRAGMENT_VARIABLE);
+ if (variables.containsKey(RootConstants.FRAGMENT_VARIABLE)) {
+ String fragment = (String) variables
+ .get(RootConstants.FRAGMENT_VARIABLE);
getPage().setFragment(fragment, true);
}
@@ -1026,7 +1027,7 @@ public abstract class Root extends AbstractComponentContainer implements
* The listener to add
*/
public void addListener(ClickListener listener) {
- addListener(CLICK_EVENT_ID, ClickEvent.class, listener,
+ addListener(EventId.CLICK_EVENT_IDENTIFIER, ClickEvent.class, listener,
ClickListener.clickMethod);
}
@@ -1038,7 +1039,8 @@ public abstract class Root extends AbstractComponentContainer implements
* The listener to remove
*/
public void removeListener(ClickListener listener) {
- removeListener(CLICK_EVENT_ID, ClickEvent.class, listener);
+ removeListener(EventId.CLICK_EVENT_IDENTIFIER, ClickEvent.class,
+ listener);
}
@Override
diff --git a/server/src/com/vaadin/ui/TabSheet.java b/server/src/com/vaadin/ui/TabSheet.java
index c52e9394c0..f6db9f9b91 100644
--- a/server/src/com/vaadin/ui/TabSheet.java
+++ b/server/src/com/vaadin/ui/TabSheet.java
@@ -18,6 +18,8 @@ import com.vaadin.event.FieldEvents.BlurNotifier;
import com.vaadin.event.FieldEvents.FocusEvent;
import com.vaadin.event.FieldEvents.FocusListener;
import com.vaadin.event.FieldEvents.FocusNotifier;
+import com.vaadin.shared.ui.tabsheet.TabsheetBaseConstants;
+import com.vaadin.shared.ui.tabsheet.TabsheetConstants;
import com.vaadin.terminal.ErrorMessage;
import com.vaadin.terminal.KeyMapper;
import com.vaadin.terminal.LegacyPaint;
@@ -25,8 +27,6 @@ import com.vaadin.terminal.PaintException;
import com.vaadin.terminal.PaintTarget;
import com.vaadin.terminal.Resource;
import com.vaadin.terminal.Vaadin6Component;
-import com.vaadin.terminal.gwt.client.ui.tabsheet.TabsheetBaseConnector;
-import com.vaadin.terminal.gwt.client.ui.tabsheet.VTabsheet;
import com.vaadin.ui.Component.Focusable;
import com.vaadin.ui.themes.Reindeer;
import com.vaadin.ui.themes.Runo;
@@ -390,7 +390,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
target.startTag("tab");
if (!tab.isEnabled() && tab.isVisible()) {
target.addAttribute(
- TabsheetBaseConnector.ATTRIBUTE_TAB_DISABLED, true);
+ TabsheetBaseConstants.ATTRIBUTE_TAB_DISABLED, true);
}
if (!tab.isVisible()) {
@@ -405,30 +405,30 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
// VCaption.updateCaption(uidl)
final Resource icon = tab.getIcon();
if (icon != null) {
- target.addAttribute(TabsheetBaseConnector.ATTRIBUTE_TAB_ICON,
+ target.addAttribute(TabsheetBaseConstants.ATTRIBUTE_TAB_ICON,
icon);
}
final String caption = tab.getCaption();
if (caption != null && caption.length() > 0) {
target.addAttribute(
- TabsheetBaseConnector.ATTRIBUTE_TAB_CAPTION, caption);
+ TabsheetBaseConstants.ATTRIBUTE_TAB_CAPTION, caption);
}
ErrorMessage tabError = tab.getComponentError();
if (tabError != null) {
target.addAttribute(
- TabsheetBaseConnector.ATTRIBUTE_TAB_ERROR_MESSAGE,
+ TabsheetBaseConstants.ATTRIBUTE_TAB_ERROR_MESSAGE,
tabError.getFormattedHtmlMessage());
}
final String description = tab.getDescription();
if (description != null) {
target.addAttribute(
- TabsheetBaseConnector.ATTRIBUTE_TAB_DESCRIPTION,
+ TabsheetBaseConstants.ATTRIBUTE_TAB_DESCRIPTION,
description);
}
final String styleName = tab.getStyleName();
if (styleName != null && styleName.length() != 0) {
- target.addAttribute(VTabsheet.TAB_STYLE_NAME, styleName);
+ target.addAttribute(TabsheetConstants.TAB_STYLE_NAME, styleName);
}
target.addAttribute("key", keyMapper.key(component));
diff --git a/server/src/com/vaadin/ui/Table.java b/server/src/com/vaadin/ui/Table.java
index 39b7fb7473..24cf608dd4 100644
--- a/server/src/com/vaadin/ui/Table.java
+++ b/server/src/com/vaadin/ui/Table.java
@@ -41,12 +41,12 @@ import com.vaadin.event.dd.DropHandler;
import com.vaadin.event.dd.DropTarget;
import com.vaadin.event.dd.acceptcriteria.ServerSideCriterion;
import com.vaadin.shared.MouseEventDetails;
+import com.vaadin.shared.ui.table.TableConstants;
import com.vaadin.terminal.KeyMapper;
import com.vaadin.terminal.LegacyPaint;
import com.vaadin.terminal.PaintException;
import com.vaadin.terminal.PaintTarget;
import com.vaadin.terminal.Resource;
-import com.vaadin.terminal.gwt.client.ui.table.VScrollTable;
/**
* <p>
@@ -2874,9 +2874,9 @@ public class Table extends AbstractSelect implements Action.Container,
*/
int pageBufferLastIndex = pageBufferFirstIndex
+ pageBuffer[CELL_ITEMID].length - 1;
- target.addAttribute(VScrollTable.ATTRIBUTE_PAGEBUFFER_FIRST,
+ target.addAttribute(TableConstants.ATTRIBUTE_PAGEBUFFER_FIRST,
pageBufferFirstIndex);
- target.addAttribute(VScrollTable.ATTRIBUTE_PAGEBUFFER_LAST,
+ target.addAttribute(TableConstants.ATTRIBUTE_PAGEBUFFER_LAST,
pageBufferLastIndex);
} else if (target.isFullRepaint() || isRowCacheInvalidated()) {
paintRows(target, cells, actionSet);
@@ -2899,7 +2899,7 @@ public class Table extends AbstractSelect implements Action.Container,
if (keyMapperReset) {
keyMapperReset = false;
- target.addAttribute(VScrollTable.ATTRIBUTE_KEY_MAPPER_RESET, true);
+ target.addAttribute(TableConstants.ATTRIBUTE_KEY_MAPPER_RESET, true);
}
if (dropHandler != null) {
@@ -4579,14 +4579,14 @@ public class Table extends AbstractSelect implements Action.Container,
@Override
public void addListener(ItemClickListener listener) {
- addListener(VScrollTable.ITEM_CLICK_EVENT_ID, ItemClickEvent.class,
+ addListener(TableConstants.ITEM_CLICK_EVENT_ID, ItemClickEvent.class,
listener, ItemClickEvent.ITEM_CLICK_METHOD);
}
@Override
public void removeListener(ItemClickListener listener) {
- removeListener(VScrollTable.ITEM_CLICK_EVENT_ID, ItemClickEvent.class,
- listener);
+ removeListener(TableConstants.ITEM_CLICK_EVENT_ID,
+ ItemClickEvent.class, listener);
}
// Identical to AbstractCompoenentContainer.setEnabled();
@@ -4930,8 +4930,9 @@ public class Table extends AbstractSelect implements Action.Container,
* The handler which should handle the header click events.
*/
public void addListener(HeaderClickListener listener) {
- addListener(VScrollTable.HEADER_CLICK_EVENT_ID, HeaderClickEvent.class,
- listener, HeaderClickEvent.HEADER_CLICK_METHOD);
+ addListener(TableConstants.HEADER_CLICK_EVENT_ID,
+ HeaderClickEvent.class, listener,
+ HeaderClickEvent.HEADER_CLICK_METHOD);
}
/**
@@ -4941,7 +4942,7 @@ public class Table extends AbstractSelect implements Action.Container,
* The listener to remove.
*/
public void removeListener(HeaderClickListener listener) {
- removeListener(VScrollTable.HEADER_CLICK_EVENT_ID,
+ removeListener(TableConstants.HEADER_CLICK_EVENT_ID,
HeaderClickEvent.class, listener);
}
@@ -4957,8 +4958,9 @@ public class Table extends AbstractSelect implements Action.Container,
* The handler which should handle the footer click events.
*/
public void addListener(FooterClickListener listener) {
- addListener(VScrollTable.FOOTER_CLICK_EVENT_ID, FooterClickEvent.class,
- listener, FooterClickEvent.FOOTER_CLICK_METHOD);
+ addListener(TableConstants.FOOTER_CLICK_EVENT_ID,
+ FooterClickEvent.class, listener,
+ FooterClickEvent.FOOTER_CLICK_METHOD);
}
/**
@@ -4968,7 +4970,7 @@ public class Table extends AbstractSelect implements Action.Container,
* The listener to remove.
*/
public void removeListener(FooterClickListener listener) {
- removeListener(VScrollTable.FOOTER_CLICK_EVENT_ID,
+ removeListener(TableConstants.FOOTER_CLICK_EVENT_ID,
FooterClickEvent.class, listener);
}
@@ -5124,7 +5126,7 @@ public class Table extends AbstractSelect implements Action.Container,
* The listener to attach to the Table
*/
public void addListener(ColumnResizeListener listener) {
- addListener(VScrollTable.COLUMN_RESIZE_EVENT_ID,
+ addListener(TableConstants.COLUMN_RESIZE_EVENT_ID,
ColumnResizeEvent.class, listener,
ColumnResizeEvent.COLUMN_RESIZE_METHOD);
}
@@ -5136,7 +5138,7 @@ public class Table extends AbstractSelect implements Action.Container,
* The listener to remove
*/
public void removeListener(ColumnResizeListener listener) {
- removeListener(VScrollTable.COLUMN_RESIZE_EVENT_ID,
+ removeListener(TableConstants.COLUMN_RESIZE_EVENT_ID,
ColumnResizeEvent.class, listener);
}
@@ -5190,7 +5192,7 @@ public class Table extends AbstractSelect implements Action.Container,
* The listener to attach to the Table
*/
public void addListener(ColumnReorderListener listener) {
- addListener(VScrollTable.COLUMN_REORDER_EVENT_ID,
+ addListener(TableConstants.COLUMN_REORDER_EVENT_ID,
ColumnReorderEvent.class, listener, ColumnReorderEvent.METHOD);
}
@@ -5201,7 +5203,7 @@ public class Table extends AbstractSelect implements Action.Container,
* The listener to remove
*/
public void removeListener(ColumnReorderListener listener) {
- removeListener(VScrollTable.COLUMN_REORDER_EVENT_ID,
+ removeListener(TableConstants.COLUMN_REORDER_EVENT_ID,
ColumnReorderEvent.class, listener);
}
diff --git a/server/src/com/vaadin/ui/Tree.java b/server/src/com/vaadin/ui/Tree.java
index c15975d879..f84146ffc3 100644
--- a/server/src/com/vaadin/ui/Tree.java
+++ b/server/src/com/vaadin/ui/Tree.java
@@ -39,12 +39,11 @@ import com.vaadin.event.dd.acceptcriteria.ServerSideCriterion;
import com.vaadin.event.dd.acceptcriteria.TargetDetailIs;
import com.vaadin.shared.MouseEventDetails;
import com.vaadin.shared.ui.dd.VerticalDropLocation;
+import com.vaadin.shared.ui.tree.TreeConstants;
import com.vaadin.terminal.KeyMapper;
import com.vaadin.terminal.PaintException;
import com.vaadin.terminal.PaintTarget;
import com.vaadin.terminal.Resource;
-import com.vaadin.terminal.gwt.client.ui.tree.TreeConnector;
-import com.vaadin.terminal.gwt.client.ui.tree.VTree;
import com.vaadin.tools.ReflectTools;
/**
@@ -604,7 +603,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
if (itemStyleGenerator != null) {
String stylename = itemStyleGenerator.getStyle(itemId);
if (stylename != null) {
- target.addAttribute(TreeConnector.ATTRIBUTE_NODE_STYLE,
+ target.addAttribute(TreeConstants.ATTRIBUTE_NODE_STYLE,
stylename);
}
}
@@ -618,11 +617,11 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
}
// Adds the attributes
- target.addAttribute(TreeConnector.ATTRIBUTE_NODE_CAPTION,
+ target.addAttribute(TreeConstants.ATTRIBUTE_NODE_CAPTION,
getItemCaption(itemId));
final Resource icon = getItemIcon(itemId);
if (icon != null) {
- target.addAttribute(TreeConnector.ATTRIBUTE_NODE_ICON,
+ target.addAttribute(TreeConstants.ATTRIBUTE_NODE_ICON,
getItemIcon(itemId));
}
final String key = itemIdMapper.key(itemId);
@@ -680,11 +679,11 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
final Action a = i.next();
target.startTag("action");
if (a.getCaption() != null) {
- target.addAttribute(TreeConnector.ATTRIBUTE_ACTION_CAPTION,
+ target.addAttribute(TreeConstants.ATTRIBUTE_ACTION_CAPTION,
a.getCaption());
}
if (a.getIcon() != null) {
- target.addAttribute(TreeConnector.ATTRIBUTE_ACTION_ICON,
+ target.addAttribute(TreeConstants.ATTRIBUTE_ACTION_ICON,
a.getIcon());
}
target.addAttribute("key", actionMapper.key(a));
@@ -1162,13 +1161,13 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
@Override
public void addListener(ItemClickListener listener) {
- addListener(VTree.ITEM_CLICK_EVENT_ID, ItemClickEvent.class, listener,
- ItemClickEvent.ITEM_CLICK_METHOD);
+ addListener(TreeConstants.ITEM_CLICK_EVENT_ID, ItemClickEvent.class,
+ listener, ItemClickEvent.ITEM_CLICK_METHOD);
}
@Override
public void removeListener(ItemClickListener listener) {
- removeListener(VTree.ITEM_CLICK_EVENT_ID, ItemClickEvent.class,
+ removeListener(TreeConstants.ITEM_CLICK_EVENT_ID, ItemClickEvent.class,
listener);
}
diff --git a/server/src/com/vaadin/ui/TreeTable.java b/server/src/com/vaadin/ui/TreeTable.java
index 6132b652f7..058a8640ce 100644
--- a/server/src/com/vaadin/ui/TreeTable.java
+++ b/server/src/com/vaadin/ui/TreeTable.java
@@ -20,10 +20,10 @@ import com.vaadin.data.Container.ItemSetChangeEvent;
import com.vaadin.data.util.ContainerHierarchicalWrapper;
import com.vaadin.data.util.HierarchicalContainer;
import com.vaadin.data.util.HierarchicalContainerOrderedWrapper;
+import com.vaadin.shared.ui.treetable.TreeTableConstants;
import com.vaadin.terminal.PaintException;
import com.vaadin.terminal.PaintTarget;
import com.vaadin.terminal.Resource;
-import com.vaadin.terminal.gwt.client.ui.treetable.TreeTableConnector;
import com.vaadin.ui.Tree.CollapseEvent;
import com.vaadin.ui.Tree.CollapseListener;
import com.vaadin.ui.Tree.ExpandEvent;
@@ -472,7 +472,7 @@ public class TreeTable extends Table implements Hierarchical {
Object object = visibleColumns2[i];
if (hierarchyColumnId.equals(object)) {
target.addAttribute(
- TreeTableConnector.ATTRIBUTE_HIERARCHY_COLUMN_INDEX,
+ TreeTableConstants.ATTRIBUTE_HIERARCHY_COLUMN_INDEX,
i);
break;
}
diff --git a/server/src/com/vaadin/ui/TwinColSelect.java b/server/src/com/vaadin/ui/TwinColSelect.java
index 5539236f77..c0dda44710 100644
--- a/server/src/com/vaadin/ui/TwinColSelect.java
+++ b/server/src/com/vaadin/ui/TwinColSelect.java
@@ -7,9 +7,9 @@ package com.vaadin.ui;
import java.util.Collection;
import com.vaadin.data.Container;
+import com.vaadin.shared.ui.twincolselect.TwinColSelectConstants;
import com.vaadin.terminal.PaintException;
import com.vaadin.terminal.PaintTarget;
-import com.vaadin.terminal.gwt.client.ui.twincolselect.VTwinColSelect;
/**
* Multiselect component with two lists: left side for available items and right
@@ -128,10 +128,12 @@ public class TwinColSelect extends AbstractSelect {
String lc = getLeftColumnCaption();
String rc = getRightColumnCaption();
if (lc != null) {
- target.addAttribute(VTwinColSelect.ATTRIBUTE_LEFT_CAPTION, lc);
+ target.addAttribute(TwinColSelectConstants.ATTRIBUTE_LEFT_CAPTION,
+ lc);
}
if (rc != null) {
- target.addAttribute(VTwinColSelect.ATTRIBUTE_RIGHT_CAPTION, rc);
+ target.addAttribute(TwinColSelectConstants.ATTRIBUTE_RIGHT_CAPTION,
+ rc);
}
super.paintContent(target);
diff --git a/server/src/com/vaadin/ui/Window.java b/server/src/com/vaadin/ui/Window.java
index e413d35e6d..0d18f5d28e 100644
--- a/server/src/com/vaadin/ui/Window.java
+++ b/server/src/com/vaadin/ui/Window.java
@@ -20,12 +20,12 @@ import com.vaadin.event.ShortcutAction.KeyCode;
import com.vaadin.event.ShortcutAction.ModifierKey;
import com.vaadin.event.ShortcutListener;
import com.vaadin.shared.MouseEventDetails;
+import com.vaadin.shared.ui.root.RootConstants;
import com.vaadin.shared.ui.window.WindowServerRpc;
import com.vaadin.shared.ui.window.WindowState;
import com.vaadin.terminal.PaintException;
import com.vaadin.terminal.PaintTarget;
import com.vaadin.terminal.Vaadin6Component;
-import com.vaadin.terminal.gwt.client.ui.root.VRoot;
/**
* A component that represents a floating popup window that can be added to a
@@ -161,14 +161,14 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
sizeHasChanged = true;
}
Integer browserHeightVar = (Integer) variables
- .get(VRoot.BROWSER_HEIGHT_VAR);
+ .get(RootConstants.BROWSER_HEIGHT_VAR);
if (browserHeightVar != null
&& browserHeightVar.intValue() != browserWindowHeight) {
browserWindowHeight = browserHeightVar.intValue();
sizeHasChanged = true;
}
Integer browserWidthVar = (Integer) variables
- .get(VRoot.BROWSER_WIDTH_VAR);
+ .get(RootConstants.BROWSER_WIDTH_VAR);
if (browserWidthVar != null
&& browserWidthVar.intValue() != browserWindowWidth) {
browserWindowWidth = browserWidthVar.intValue();