From 7e592db2d99301ff414c497943943ac84e7de3ac Mon Sep 17 00:00:00 2001 From: Miguel Payet Date: Mon, 31 Oct 2016 14:01:28 -0500 Subject: [PATCH] Fix the save action in an EditableGrid when there are more than 1 editable grids on the page (#558) * Fix edit and save actions for multiple editable grids in one page * Fix save action when there is more than one grid in the same page --- .../org/wicketstuff/egrid/component/EditableDataTable.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/editable-grid-parent/editable-grid/src/main/java/org/wicketstuff/egrid/component/EditableDataTable.java b/editable-grid-parent/editable-grid/src/main/java/org/wicketstuff/egrid/component/EditableDataTable.java index ef36c6256f..78236c689b 100644 --- a/editable-grid-parent/editable-grid/src/main/java/org/wicketstuff/egrid/component/EditableDataTable.java +++ b/editable-grid-parent/editable-grid/src/main/java/org/wicketstuff/egrid/component/EditableDataTable.java @@ -32,6 +32,7 @@ import org.wicketstuff.egrid.model.OperationType; import org.wicketstuff.egrid.provider.IEditableDataProvider; import org.wicketstuff.egrid.toolbar.AbstractEditableGridToolbar; +import org.wicketstuff.egrid.component.EditableDataTable; /** * @@ -517,8 +518,10 @@ public void onEvent(IEvent event) { @SuppressWarnings("unchecked") Item rowItem = ((Item)event.getPayload()); - this.datagrid.refreash(rowItem); - event.stop(); + if (rowItem.findParent(EditableDataTable.class).equals(this)) { + this.datagrid.refreash(rowItem); + event.stop(); + } } else if (event.getPayload() instanceof GridOperationData) {