From e11d43b05909852bade74ac70d7414a7289e8f55 Mon Sep 17 00:00:00 2001 From: Juan David Arboleda Date: Fri, 31 May 2013 18:06:48 -0500 Subject: [PATCH] IDEMPIERE-925 Date field shows error for incorrect format but allow user to proceed on ok button / peer review --- .../adempiere/webui/window/FindWindow.java | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java index 8149afc0b7..0b20d2518b 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java @@ -1337,16 +1337,16 @@ public class FindWindow extends Window implements EventListener, ValueCha Object value = null; //Allowing Date validation before save - List compoList = cellQueryFrom.getChildren(); - if(compoList.get(0) instanceof Datebox) { - Datebox dbox = (Datebox)compoList.get(0); - if(dbox.getValue() != null) - value = new Timestamp(((Date)dbox.getValue()).getTime()); + Component compo = cellQueryFrom.getFirstChild(); + if(compo instanceof Datebox) { + Datebox dbox = (Datebox)compo; + if(dbox.getValue() != null) + value = new Timestamp(((Date)dbox.getValue()).getTime()); } - else if(compoList.get(0) instanceof DatetimeBox) { - DatetimeBox dtbox = (DatetimeBox)compoList.get(0); - if(dtbox.getValue() != null) - value = new Timestamp(((Date)dtbox.getValue()).getTime()); + else if(compo instanceof DatetimeBox) { + DatetimeBox dtbox = (DatetimeBox)compo; + if(dtbox.getValue() != null) + value = new Timestamp(((Date)dtbox.getValue()).getTime()); } else { value = cellQueryFrom.getAttribute("value"); @@ -1391,16 +1391,16 @@ public class FindWindow extends Window implements EventListener, ValueCha ListCell cellQueryTo = (ListCell)row.getFellow("cellQueryTo"+row.getId()); //Allowing Date validation before save - compoList = cellQueryTo.getChildren(); - if(compoList.get(0) instanceof Datebox) { - Datebox dbox = (Datebox)compoList.get(0); - if(dbox.getValue() != null) - value2 = new Timestamp(((Date)dbox.getValue()).getTime()); + compo = cellQueryTo.getFirstChild(); + if(compo instanceof Datebox) { + Datebox dbox = (Datebox)compo; + if(dbox.getValue() != null) + value2 = new Timestamp(((Date)dbox.getValue()).getTime()); } - else if(compoList.get(0) instanceof DatetimeBox) { - DatetimeBox dtbox = (DatetimeBox)compoList.get(0); - if(dtbox.getValue() != null) - value2 = new Timestamp(((Date)dtbox.getValue()).getTime()); + else if(compo instanceof DatetimeBox) { + DatetimeBox dtbox = (DatetimeBox)compo; + if(dtbox.getValue() != null) + value2 = new Timestamp(((Date)dtbox.getValue()).getTime()); } else { value2 = cellQueryFrom.getAttribute("value");