From d81935a1280d2fd17438aba1a24b37d8547193e8 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 20 Jan 2021 14:46:35 +0100 Subject: [PATCH] IDEMPIERE-4658 The operator Dropdown entries for a foreign ID column is corrupted when a search preset is loaded in any window's Advanced Search tab. (#538) --- .../WEB-INF/src/org/adempiere/webui/window/FindWindow.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 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 9936edbca1..27af8238b8 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 @@ -1224,6 +1224,7 @@ public class FindWindow extends Window implements EventListener, ValueCha boolean selected = false; listColumn.appendItem("",""); + ListItem liCol = null; for (int i = 0; i < cols.length; i++) { ValueNamePair item = cols[i]; @@ -1232,7 +1233,7 @@ public class FindWindow extends Window implements EventListener, ValueCha { listColumn.setSelectedItem(li); selected = true; - break; + liCol = li; } } if(!selected) listColumn.setSelectedIndex(0); @@ -1246,10 +1247,12 @@ public class FindWindow extends Window implements EventListener, ValueCha { listOperator.setSelectedItem(li); selected = true; - break; } } if(!selected) listOperator.setSelectedIndex(0); + + if (liCol != null) + addOperators(liCol, listOperator); } } // setValues