From 741743751b1948ccefcfb2ce56d0211a6a56e5e2 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 30 Aug 2012 00:37:05 -0500 Subject: [PATCH] IDEMPIERE-229 Bug with Process parameter range --- .../src/org/compiere/model/GridFieldVO.java | 5 +++++ .../adempiere/webui/apps/ProcessParameterPanel.java | 10 +++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/model/GridFieldVO.java b/org.adempiere.base/src/org/compiere/model/GridFieldVO.java index 79967a8746..78d5f0d1e5 100644 --- a/org.adempiere.base/src/org/compiere/model/GridFieldVO.java +++ b/org.adempiere.base/src/org/compiere/model/GridFieldVO.java @@ -332,6 +332,11 @@ public class GridFieldVO implements Serializable // Genied: For a range parameter the second field // lookup behaviour should match the first one. voT.AD_Reference_Value_ID = voF.AD_Reference_Value_ID; + // IDEMPIERE-229 Bug with Process parameter range + voT.ValidationCode = voF.ValidationCode; + voT.IsEncryptedField = voF.IsEncryptedField; + voT.ReadOnlyLogic = voF.ReadOnlyLogic; + voT.DisplayLogic = voF.DisplayLogic; voT.initFinish(); return voT; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessParameterPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessParameterPanel.java index 2a6ad14b87..2b2ba2a794 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessParameterPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessParameterPanel.java @@ -46,6 +46,7 @@ import org.compiere.process.ProcessInfo; import org.compiere.util.CLogger; import org.compiere.util.DB; import org.compiere.util.Env; +import org.compiere.util.Msg; import org.zkoss.zul.Div; import org.zkoss.zul.Hbox; import org.zkoss.zul.Label; @@ -359,21 +360,24 @@ public class ProcessParameterPanel extends Panel implements if (sb.length() > 0) sb.append(", "); sb.append(field.getHeader()); + if (m_wEditors2.get(i) != null) // is a range + sb.append(" (").append(Msg.getMsg(Env.getCtx(), "From")).append(")"); } else field.setError(false); // Check for Range WEditor wEditor2 = (WEditor) m_wEditors2.get(i); if (wEditor2 != null) { - Object data2 = wEditor.getValue(); + Object data2 = wEditor2.getValue(); GridField field2 = (GridField) m_mFields2.get(i); if (data2 == null || data2.toString().length() == 0) { - field.setInserting(true); // set editable (i.e. + field2.setInserting(true); // set editable (i.e. // updateable) otherwise // deadlock field2.setError(true); if (sb.length() > 0) sb.append(", "); - sb.append(field.getHeader()); + sb.append(field2.getHeader()); + sb.append(" (").append(Msg.getMsg(Env.getCtx(), "To")).append(")"); } else field2.setError(false); } // range field