diff options
4 files changed, 10 insertions, 3 deletions
diff --git a/server/src/com/vaadin/data/RpcDataProviderExtension.java b/server/src/com/vaadin/data/RpcDataProviderExtension.java index a24ee9acd7..2b3e00e6f0 100644 --- a/server/src/com/vaadin/data/RpcDataProviderExtension.java +++ b/server/src/com/vaadin/data/RpcDataProviderExtension.java @@ -508,7 +508,7 @@ public class RpcDataProviderExtension extends AbstractExtension { activeRange.getEnd(), count); removeValueChangeListeners(deprecatedRange); - final Range freshRange = Range.between(firstIndex, count); + final Range freshRange = Range.withLength(firstIndex, count); addValueChangeListeners(freshRange); } else { // out of view, noop diff --git a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/GridBasicFeatures.java b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/GridBasicFeatures.java index 99b7ef21c7..20b6a3c418 100644 --- a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/GridBasicFeatures.java +++ b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/GridBasicFeatures.java @@ -787,7 +787,7 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> { createClickAction("Add first row", "Body rows", newRowCommand, null); - createClickAction("Add second row", "Body rows", new NewRowCommand(1), + createClickAction("Add third row", "Body rows", new NewRowCommand(2), null); createClickAction("Remove first row", "Body rows", diff --git a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridCellFocusAdjustmentTest.java b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridCellFocusAdjustmentTest.java index ef6d6bfa82..0c26ceb5c9 100644 --- a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridCellFocusAdjustmentTest.java +++ b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridCellFocusAdjustmentTest.java @@ -78,7 +78,7 @@ public class GridCellFocusAdjustmentTest extends GridBasicFeaturesTest { assertTrue("Body 0,0 should've gotten focus", getGridElement().getCell(0, 0).isFocused()); - selectMenuPath("Component", "Body rows", "Add second row"); + selectMenuPath("Component", "Body rows", "Add third row"); assertTrue("Body 0,0 should've remained focused", getGridElement() .getCell(0, 0).isFocused()); } diff --git a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridStructureTest.java b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridStructureTest.java index 97a4fb8f4a..08f903b3fe 100644 --- a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridStructureTest.java +++ b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridStructureTest.java @@ -475,4 +475,11 @@ public class GridStructureTest extends GridBasicFeaturesTest { assertFalse("Exception occurred when reloading page", isElementPresent(NotificationElement.class)); } + + @Test + public void testAddThirdRowToGrid() { + openTestURL(); + selectMenuPath("Component", "Body rows", "Add third row"); + assertFalse(logContainsText("Exception occured")); + } } |