From bbbb6b73275120f78daf281da19d82bb2fb53226 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Mon, 10 Jun 2013 14:50:53 +0800 Subject: [PATCH] IDEMPIERE-1028 Custom form : remove blank item for a list. Accepted patch from Nicolas Micoud. --- .../src/org/adempiere/webui/editor/WTableDirEditor.java | 3 +-- 1 file changed, 1 insertion(+), 2 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 34a199527d..91f5df4ef0 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 @@ -155,8 +155,7 @@ ContextMenuListener, IZoomableEditor if (lookup != null) { lookup.addListDataListener(this); - //always need the empty item for zk to work correctly - lookup.setMandatory(false); + lookup.setMandatory(isMandatory()); if ((lookup.getDisplayType() == DisplayType.List && Env.getContextAsInt(Env.getCtx(), "#AD_Role_ID") == 0) || lookup.getDisplayType() != DisplayType.List)