From e460eca4723cb83f7bfc636dfa713e2a904a7aef Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Mon, 7 Feb 2011 18:11:50 +0800 Subject: [PATCH] Added NPE check. --- .../WEB-INF/src/org/adempiere/webui/editor/WEditor.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WEditor.java index 8a3da3fbdd..57f7dc1db4 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WEditor.java @@ -22,6 +22,7 @@ import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.util.ArrayList; +import org.adempiere.webui.AdempiereIdGenerator; import org.adempiere.webui.component.Bandbox; import org.adempiere.webui.component.Button; import org.adempiere.webui.component.Datebox; @@ -94,7 +95,10 @@ public abstract class WEditor implements EventListener, PropertyChangeListener this.setComponent(comp); String gridTabName = gridField.getGridTab() != null ? "_" + gridField.getGridTab().getName() : ""; - comp.setAttribute("zk_component_prefix", "Field_" + gridField.getColumnName() + gridTabName); + if (gridField.getGridTab() != null) + { + comp.setAttribute(AdempiereIdGenerator.ZK_COMPONENT_PREFIX_ATTRIBUTE, "Field_" + gridField.getColumnName() + gridTabName); + } this.gridField = gridField; this.setMandatory(gridField.isMandatory(false)); this.readOnly = gridField.isReadOnly();