From be80f21469ec01b89dfd9f25f6b4293cabb90363 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Tue, 26 Feb 2013 07:10:41 +0800 Subject: [PATCH] IDEMPIERE-663 Zk: Remove the need of re-query for table editor after user have create a new record. Fixed NPE. --- .../src/org/adempiere/webui/editor/WTableDirEditor.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WTableDirEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WTableDirEditor.java index a0a137f24b..fa8bbf2225 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WTableDirEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WTableDirEditor.java @@ -211,9 +211,11 @@ ContextMenuListener, IZoomableEditor } private void createCacheListener() { - String columnName = lookup.getColumnName(); - String tableName = columnName.substring(0, columnName.indexOf(".")); - tableCacheListener = new CCacheListener(tableName, this); + if (lookup != null) { + String columnName = lookup.getColumnName(); + String tableName = columnName.substring(0, columnName.indexOf(".")); + tableCacheListener = new CCacheListener(tableName, this); + } } @Override