diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2016-02-02 18:55:36 +0200 |
---|---|---|
committer | Teemu Suo-Anttila <teemusa@vaadin.com> | 2016-02-03 12:26:29 +0200 |
commit | 84d9b40c7b80283095a242972fbbdb4b6b5552df (patch) | |
tree | 61a6be3b08c5da1d14da28a951f2221efabf00a0 /uitest/src/com | |
parent | 4b7b21d35cbf80ddfa6e16f62bc4ff65008a4cd5 (diff) | |
download | vaadin-framework-84d9b40c7b80283095a242972fbbdb4b6b5552df.tar.gz vaadin-framework-84d9b40c7b80283095a242972fbbdb4b6b5552df.zip |
Split SimpleDataProvider from DataProvider super class
Change-Id: Ib486553fa2f0f9d17de9012413b2647b73c07822
Diffstat (limited to 'uitest/src/com')
-rw-r--r-- | uitest/src/com/vaadin/tests/dataprovider/DummyDataProviderUI.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/uitest/src/com/vaadin/tests/dataprovider/DummyDataProviderUI.java b/uitest/src/com/vaadin/tests/dataprovider/DummyDataProviderUI.java index b86037c89e..c5e2dfedb2 100644 --- a/uitest/src/com/vaadin/tests/dataprovider/DummyDataProviderUI.java +++ b/uitest/src/com/vaadin/tests/dataprovider/DummyDataProviderUI.java @@ -25,6 +25,7 @@ import java.util.Random; import com.vaadin.annotations.Widgetset; import com.vaadin.server.VaadinRequest; import com.vaadin.server.communication.data.typed.DataProvider; +import com.vaadin.server.communication.data.typed.SimpleDataProvider; import com.vaadin.server.communication.data.typed.TypedDataGenerator; import com.vaadin.tests.components.AbstractTestUI; import com.vaadin.tests.fieldgroup.ComplexPerson; @@ -42,7 +43,7 @@ public class DummyDataProviderUI extends AbstractTestUI { public static class DummyDataComponent extends AbstractComponent { - private DataProvider<ComplexPerson> dataProvider; + private SimpleDataProvider<ComplexPerson> dataProvider; private List<ComplexPerson> data; public DummyDataComponent(Collection<ComplexPerson> data) { @@ -70,18 +71,21 @@ public class DummyDataProviderUI extends AbstractTestUI { } void addItem(ComplexPerson person) { + // TODO: This should be in the back end implementation if (data.add(person)) { dataProvider.add(person); } } void removeItem(ComplexPerson person) { + // TODO: This should be in the back end implementation if (data.remove(person)) { dataProvider.remove(person); } } public void sort(Comparator<ComplexPerson> comparator) { + // TODO: This should be in the back end implementation Collections.sort(data, comparator); dataProvider.reset(); } |