From 60521383118cdbdddacd8a204b3116ca14524d09 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Sat, 26 Dec 2009 04:22:27 +0000 Subject: [PATCH] * Row content not updated after exit edit mode Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=2921253 --- .../org/adempiere/webui/component/GridPanel.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/component/GridPanel.java b/zkwebui/WEB-INF/src/org/adempiere/webui/component/GridPanel.java index 346f909154..3effc20be7 100644 --- a/zkwebui/WEB-INF/src/org/adempiere/webui/component/GridPanel.java +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/component/GridPanel.java @@ -52,7 +52,7 @@ import org.zkoss.zul.event.ZulEvents; public class GridPanel extends Borderlayout implements EventListener { /** - * + * */ private static final long serialVersionUID = -8735897196875342427L; @@ -419,7 +419,13 @@ public class GridPanel extends Borderlayout implements EventListener if (!isRowRendered(row, pgIndex)) { listbox.renderRow(row); } else { + Row old = renderer.getCurrentRow(); + int oldIndex = renderer.getCurrentRowIndex(); renderer.setCurrentRow(row); + if (old != null && old != row && oldIndex >= 0 && oldIndex != gridTab.getCurrentRow()) + { + listModel.updateComponent(oldIndex % pageSize); + } } if (modeless && !renderer.isEditing()) { renderer.editCurrentRow(); @@ -437,7 +443,13 @@ public class GridPanel extends Borderlayout implements EventListener if (!isRowRendered(row, rowIndex)) { listbox.renderRow(row); } else { + Row old = renderer.getCurrentRow(); + int oldIndex = renderer.getCurrentRowIndex(); renderer.setCurrentRow(row); + if (old != null && old != row && oldIndex >= 0 && oldIndex != gridTab.getCurrentRow()) + { + listModel.updateComponent(oldIndex); + } } if (modeless && !renderer.isEditing()) { renderer.editCurrentRow();