From 497cf480afbb14af943222a3a7b8b4f13653a5a2 Mon Sep 17 00:00:00 2001 From: Nicolas Micoud Date: Tue, 28 May 2013 12:59:14 +0200 Subject: [PATCH] IDEMPIERE-968 - Can't use WLocationEditor.setValue from a form --- .../src/org/adempiere/webui/editor/WLocationEditor.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WLocationEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WLocationEditor.java index 42852e99e6..e79384a71d 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WLocationEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WLocationEditor.java @@ -117,7 +117,10 @@ public class WLocationEditor extends WEditor implements EventListener, Pr } else { - String trxName = this.gridField.getGridTab().getTableModel().get_TrxName(); + String trxName = null; // could be null if called from a form + if (this.gridField != null) + trxName = this.gridField.getGridTab().getTableModel().get_TrxName(); + m_value = m_Location.getLocation(value, trxName); if (m_value == null) getComponent().setText("<" + value + ">");