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");