Moves filter settings from pz2 bean to search command
[mkjsf-moved-to-github.git] / src / main / java / com / indexdata / pz2utils4jsf / pazpar2 / Pz2ProxyBean.java
index ae742f3..15821ea 100644 (file)
@@ -13,6 +13,7 @@ import org.apache.log4j.Logger;
 \r
 import com.indexdata.pz2utils4jsf.config.Configuration;\r
 import com.indexdata.pz2utils4jsf.config.ConfigurationReader;\r
+import com.indexdata.pz2utils4jsf.pazpar2.commands.SearchCommand;\r
 import com.indexdata.pz2utils4jsf.pazpar2.sp.ForServiceProxy;\r
 import com.indexdata.pz2utils4jsf.pazpar2.sp.ServiceProxyClient;\r
 import com.indexdata.pz2utils4jsf.pazpar2.sp.ServiceProxyInterface;\r
@@ -49,7 +50,7 @@ public class Pz2ProxyBean extends Pz2Bean implements ServiceProxyInterface {
     session().setUser(user);\r
     session().resetDataObjects();\r
     session().removeCommand("record");\r
-    session().setQuery(null);\r
+    ((SearchCommand)session().getCommand("search")).setQuery(null);\r
     return session().login(navigateTo);\r
   }\r
 \r
@@ -90,7 +91,7 @@ public class Pz2ProxyBean extends Pz2Bean implements ServiceProxyInterface {
   public void setServiceProxyUrl(String url) {\r
     logger.info("Setting Service Proxy url: " + url);\r
     session().setServiceProxyUrl(url); \r
-    session().setQuery(null);\r
+    ((SearchCommand)session().getCommand("search")).setQuery(null);\r
     session().resetDataObjects();\r
   }\r
 \r