From 0655a2b950ea9b814607cef9eb633acead47d454 Mon Sep 17 00:00:00 2001 From: vpj-cd Date: Wed, 6 Jan 2010 00:52:41 +0000 Subject: [PATCH] Fix some NPE on -> Add change log context menu for field Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=2898860 --- .../WEB-INF/src/org/adempiere/webui/editor/WLocatorEditor.java | 2 +- .../WEB-INF/src/org/adempiere/webui/editor/WNumberEditor.java | 2 +- .../WEB-INF/src/org/adempiere/webui/editor/WStringEditor.java | 2 +- .../WEB-INF/src/org/adempiere/webui/editor/WTableDirEditor.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/editor/WLocatorEditor.java b/zkwebui/WEB-INF/src/org/adempiere/webui/editor/WLocatorEditor.java index 568ec83e74..ce720f2adb 100644 --- a/zkwebui/WEB-INF/src/org/adempiere/webui/editor/WLocatorEditor.java +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/editor/WLocatorEditor.java @@ -114,7 +114,7 @@ public class WLocatorEditor extends WEditor implements EventListener, PropertyCh if (gridField != null) { popupMenu = new WEditorPopupMenu(true, true, false); - if (gridField.getGridTab() != null) + if (gridField != null && gridField.getGridTab() != null) { WFieldRecordInfo.addMenu(popupMenu); } diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/editor/WNumberEditor.java b/zkwebui/WEB-INF/src/org/adempiere/webui/editor/WNumberEditor.java index a05b4bffa7..e4e4211178 100644 --- a/zkwebui/WEB-INF/src/org/adempiere/webui/editor/WNumberEditor.java +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/editor/WNumberEditor.java @@ -116,7 +116,7 @@ public class WNumberEditor extends WEditor implements ContextMenuListener getComponent().getDecimalbox().setFormat(format.toPattern()); popupMenu = new WEditorPopupMenu(true, true, false); - if (gridField.getGridTab() != null) + if (gridField != null && gridField.getGridTab() != null) { WFieldRecordInfo.addMenu(popupMenu); } diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/editor/WStringEditor.java b/zkwebui/WEB-INF/src/org/adempiere/webui/editor/WStringEditor.java index 679a6760dd..70474a7c14 100644 --- a/zkwebui/WEB-INF/src/org/adempiere/webui/editor/WStringEditor.java +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/editor/WStringEditor.java @@ -146,7 +146,7 @@ public class WStringEditor extends WEditor implements ContextMenuListener editor.addEventListener(Events.ON_CLICK, popupMenu); popupMenu.appendChild(editor); - if (gridField.getGridTab() != null) + if (gridField != null && gridField.getGridTab() != null) { WFieldRecordInfo.addMenu(popupMenu); } diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/editor/WTableDirEditor.java b/zkwebui/WEB-INF/src/org/adempiere/webui/editor/WTableDirEditor.java index 971d1e4f0a..faf30abf5f 100644 --- a/zkwebui/WEB-INF/src/org/adempiere/webui/editor/WTableDirEditor.java +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/editor/WTableDirEditor.java @@ -145,7 +145,7 @@ ContextMenuListener, IZoomableEditor if (gridField != null) { popupMenu = new WEditorPopupMenu(zoom, true, true); - if (gridField.getGridTab() != null) + if (gridField != null && gridField.getGridTab() != null) { WFieldRecordInfo.addMenu(popupMenu); }