aboutsummaryrefslogtreecommitdiffstats
path: root/server/src
diff options
context:
space:
mode:
authorHenri Sara <hesara@vaadin.com>2016-11-26 09:02:53 +0200
committerVaadin Code Review <review@vaadin.com>2016-11-28 07:59:37 +0000
commit0fdb14f74525592221923ab6e1980681ae1b96d7 (patch)
treec2e17bce979d21315012c1ce6595f952931a5d76 /server/src
parent051bac514c04c76c4291c106cd77dc9ea1255ac8 (diff)
downloadvaadin-framework-0fdb14f74525592221923ab6e1980681ae1b96d7.tar.gz
vaadin-framework-0fdb14f74525592221923ab6e1980681ae1b96d7.zip
Add shared state for CustomComponent and DragAndDropWrapper
Change-Id: Ib640e5ea97bccffb889d3213a4f588b828fb07bf
Diffstat (limited to 'server/src')
-rw-r--r--server/src/main/java/com/vaadin/ui/CustomComponent.java12
-rw-r--r--server/src/main/java/com/vaadin/ui/DragAndDropWrapper.java11
2 files changed, 23 insertions, 0 deletions
diff --git a/server/src/main/java/com/vaadin/ui/CustomComponent.java b/server/src/main/java/com/vaadin/ui/CustomComponent.java
index ced986d6a8..67a0b4fff7 100644
--- a/server/src/main/java/com/vaadin/ui/CustomComponent.java
+++ b/server/src/main/java/com/vaadin/ui/CustomComponent.java
@@ -19,6 +19,8 @@ package com.vaadin.ui;
import java.util.Collections;
import java.util.Iterator;
+import com.vaadin.shared.customcomponent.CustomComponentState;
+
/**
* Custom component provides a simple implementation of the {@link Component}
* interface to allow creating new UI components by composition of existing
@@ -147,4 +149,14 @@ public class CustomComponent extends AbstractComponent
return (root != null ? 1 : 0);
}
+ @Override
+ protected CustomComponentState getState() {
+ return (CustomComponentState) super.getState();
+ }
+
+ @Override
+ protected CustomComponentState getState(boolean markAsDirty) {
+ return (CustomComponentState) super.getState(markAsDirty);
+ }
+
}
diff --git a/server/src/main/java/com/vaadin/ui/DragAndDropWrapper.java b/server/src/main/java/com/vaadin/ui/DragAndDropWrapper.java
index 4b9a7afbfb..d2079d8609 100644
--- a/server/src/main/java/com/vaadin/ui/DragAndDropWrapper.java
+++ b/server/src/main/java/com/vaadin/ui/DragAndDropWrapper.java
@@ -41,6 +41,7 @@ import com.vaadin.shared.ui.dd.HorizontalDropLocation;
import com.vaadin.shared.ui.dd.VerticalDropLocation;
import com.vaadin.shared.ui.draganddropwrapper.DragAndDropWrapperConstants;
import com.vaadin.shared.ui.draganddropwrapper.DragAndDropWrapperServerRpc;
+import com.vaadin.shared.ui.draganddropwrapper.DragAndDropWrapperState;
import com.vaadin.ui.declarative.DesignContext;
@SuppressWarnings("serial")
@@ -502,4 +503,14 @@ public class DragAndDropWrapper extends CustomComponent
design.appendChild(child);
}
}
+
+ @Override
+ protected DragAndDropWrapperState getState() {
+ return (DragAndDropWrapperState) super.getState();
+ }
+
+ @Override
+ protected DragAndDropWrapperState getState(boolean markAsDirty) {
+ return (DragAndDropWrapperState) super.getState(markAsDirty);
+ }
}