Fixes search state bug
authorNiels Erik G. Nielsen <nielserik@indexdata.com>
Wed, 5 Jun 2013 02:10:27 +0000 (22:10 -0400)
committerNiels Erik G. Nielsen <nielserik@indexdata.com>
Wed, 5 Jun 2013 02:10:27 +0000 (22:10 -0400)
src/main/java/com/indexdata/mkjsf/pazpar2/Pz2Service.java

index 44cb05b..55c4f25 100644 (file)
@@ -194,6 +194,7 @@ public class Pz2Service implements StateListener, Configurable, Serializable {
     try {\r
       if (commands.equals("search")) {\r
         pzreq.getSearch().run();\r
+        pzresp.getSearch().setIsNew(false);\r
         return "new";\r
       } else if (commands.equals("record")) {\r
         pzreq.getRecord().run();\r
@@ -260,6 +261,7 @@ public class Pz2Service implements StateListener, Configurable, Serializable {
     if (stateMgr.hasPendingStateChange("search") && hasQuery()) { \r
       logger.info("Triggered search: Found pending search change [" + pzreq.getCommand("search").toString() + "], doing search before updating " + commands);      \r
       pzreq.getSearch().run();\r
+      pzresp.getSearch().setIsNew(false);\r
     } \r
     if (stateMgr.hasPendingStateChange("record") && ! commands.equals("record")) {        \r
       logger.debug("Found pending record ID change. Doing record before updating " + commands);\r