From 108f43d474c909c5ca2ff40c3d684e8ac7c97d0d Mon Sep 17 00:00:00 2001 From: Yuriy Artamonov Date: Fri, 25 Oct 2013 07:41:11 +0000 Subject: [PATCH] NPE when we press button "Add to current set" #PL-2827 --- .../com/haulmont/cuba/web/gui/components/WebFilter.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/web6/src/com/haulmont/cuba/web/gui/components/WebFilter.java b/modules/web6/src/com/haulmont/cuba/web/gui/components/WebFilter.java index a05d1bf6f2..f853098332 100644 --- a/modules/web6/src/com/haulmont/cuba/web/gui/components/WebFilter.java +++ b/modules/web6/src/com/haulmont/cuba/web/gui/components/WebFilter.java @@ -2005,7 +2005,13 @@ public class WebFilter extends WebAbstractComponent imple IFrame frame = WebFilter.this.getFrame(); String[] strings = ValuePathHelper.parse(getComponentPath()); String windowAlias = strings[0]; - frame.openLookup(windowAlias, new Window.Lookup.Handler() { + StringBuilder lookupAlias = new StringBuilder(windowAlias); + if (windowAlias.endsWith(".browse")) { + int index = lookupAlias.lastIndexOf(".browse"); + lookupAlias.delete(index, lookupAlias.length()); + lookupAlias.append(".lookup"); + } + frame.openLookup(lookupAlias.toString(), new Window.Lookup.Handler() { @Override public void handleLookup(Collection items) { String filterXml = filterEntity.getXml();