diff options
author | Leif Åstrand <legioth@gmail.com> | 2017-01-25 08:36:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-25 08:36:25 +0200 |
commit | 8300e3e9f079e901765bbae74b15d8f0c05c4160 (patch) | |
tree | 0cba1106bdd05ed94d5a2c3fca488e6871d67631 /uitest | |
parent | 0f350c6e58bf18fae54c6af77bc37fed14e83a7f (diff) | |
download | vaadin-framework-8300e3e9f079e901765bbae74b15d8f0c05c4160.tar.gz vaadin-framework-8300e3e9f079e901765bbae74b15d8f0c05c4160.zip |
Add static helpers for creating callback data providers (#8314)
Cannot overload the same create method for this purpose since it
conflicts with T... overload. Each case is instead given its own
descriptive but still discoverable method name.
Diffstat (limited to 'uitest')
4 files changed, 4 insertions, 4 deletions
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridColumnWidthsWithoutData.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridColumnWidthsWithoutData.java index c184cd71d1..851e164731 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridColumnWidthsWithoutData.java +++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridColumnWidthsWithoutData.java @@ -79,7 +79,7 @@ public class GridColumnWidthsWithoutData extends AbstractTestUI { grid.setSelectionMode(selectionMode); items = new ArrayList<>(); - provider = DataProvider.create(items); + provider = DataProvider.ofCollection(items); grid.setDataProvider(provider); if (withData) { diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridDataSourceReset.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridDataSourceReset.java index b04e004f53..a2589ce452 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridDataSourceReset.java +++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridDataSourceReset.java @@ -37,7 +37,7 @@ public class GridDataSourceReset extends AbstractTestUI { persons = createPersons(10, new Random(1)); grid = new Grid<>(); - ListDataProvider<ComplexPerson> provider = DataProvider.create(persons); + ListDataProvider<ComplexPerson> provider = DataProvider.ofCollection(persons); grid.setDataProvider(provider); grid.getSelectionModel().select(persons.get(0)); addComponent(new Button("Remove first", event -> { diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/basics/RefreshDataProvider.java b/uitest/src/main/java/com/vaadin/tests/components/grid/basics/RefreshDataProvider.java index 68865b98fa..87da435796 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/grid/basics/RefreshDataProvider.java +++ b/uitest/src/main/java/com/vaadin/tests/components/grid/basics/RefreshDataProvider.java @@ -35,7 +35,7 @@ public class RefreshDataProvider extends AbstractReindeerTestUI { Grid<DataObject> grid = new Grid<>(); List<DataObject> data = DataObject.generateObjects(); - ListDataProvider<DataObject> dataProvider = DataProvider.create(data); + ListDataProvider<DataObject> dataProvider = DataProvider.ofCollection(data); grid.setDataProvider(dataProvider); grid.setDataProvider(dataProvider); diff --git a/uitest/src/main/java/com/vaadin/tests/fieldgroup/ComplexPerson.java b/uitest/src/main/java/com/vaadin/tests/fieldgroup/ComplexPerson.java index 217eaab378..777bbbc09e 100644 --- a/uitest/src/main/java/com/vaadin/tests/fieldgroup/ComplexPerson.java +++ b/uitest/src/main/java/com/vaadin/tests/fieldgroup/ComplexPerson.java @@ -107,7 +107,7 @@ public class ComplexPerson { list.add(cp); } - return DataProvider.create(list); + return DataProvider.ofCollection(list); } public static ComplexPerson create(Random r) { |