IDEMPIERE-1028 Custom form : remove blank item for a list. Accepted patch from Nicolas Micoud.

This commit is contained in:
Heng Sin Low 2013-06-10 14:50:53 +08:00
parent 39ca003c65
commit bbbb6b7327
1 changed files with 1 additions and 2 deletions

View File

@ -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)