Skip to content

Commit

Permalink
Fix the save action in an EditableGrid when there are more than 1 edi…
Browse files Browse the repository at this point in the history
…table grids on the page (wicketstuff#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
  • Loading branch information
miguelpayet authored and martin-g committed Oct 31, 2016
1 parent 34151f3 commit 7e592db
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
*
Expand Down Expand Up @@ -517,8 +518,10 @@ public void onEvent(IEvent<?> event)
{
@SuppressWarnings("unchecked")
Item<T> rowItem = ((Item<T>)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)
{
Expand Down

0 comments on commit 7e592db

Please sign in to comment.