From 392c96708b6bbfce0baf66232384c762af0cd022 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 1 Jul 2015 10:02:03 -0500 Subject: [PATCH] IDEMPIERE-2657 Null Pointer Exception in Payment Selection (Manual) / integrate patch from Pritesh Shah --- .../src/org/adempiere/webui/apps/form/WPaySelect.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaySelect.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaySelect.java index 6039c5609e..f55105e170 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaySelect.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaySelect.java @@ -64,6 +64,7 @@ import org.compiere.util.Msg; import org.compiere.util.ValueNamePair; import org.zkoss.zk.ui.Executions; import org.zkoss.zk.ui.SuspendNotAllowedException; +import org.zkoss.zk.ui.WrongValueException; import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.util.Clients; @@ -174,7 +175,9 @@ public class WPaySelect extends PaySelect dataStatus.setPre(true); onlyDue.addActionListener(this); fieldPayDate.addValueChangeListener(this); - // + + //IDEMPIERE-2657, pritesh shah + bGenerate.setEnabled(false); bGenerate.addActionListener(this); bCancel.addActionListener(this); // @@ -289,6 +292,11 @@ public class WPaySelect extends PaySelect private void loadTableInfo() { Timestamp payDate = (Timestamp)fieldPayDate.getValue(); + + //IDEMPIERE-2657, pritesh shah + if(payDate == null){ + throw new WrongValueException(fieldPayDate.getComponent(), Msg.getMsg(Env.getCtx(), "FillMandatory") + labelPayDate.getValue()); + } miniTable.setColorCompare(payDate); if (log.isLoggable(Level.CONFIG)) log.config("PayDate=" + payDate);