From 9f5b458cca85e1c6b6934202e9f0e841eec07127 Mon Sep 17 00:00:00 2001 From: "Niels Erik G. Nielsen" Date: Tue, 4 Jun 2013 22:10:27 -0400 Subject: [PATCH] Fixes search state bug --- src/main/java/com/indexdata/mkjsf/pazpar2/Pz2Service.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/indexdata/mkjsf/pazpar2/Pz2Service.java b/src/main/java/com/indexdata/mkjsf/pazpar2/Pz2Service.java index 44cb05b..55c4f25 100644 --- a/src/main/java/com/indexdata/mkjsf/pazpar2/Pz2Service.java +++ b/src/main/java/com/indexdata/mkjsf/pazpar2/Pz2Service.java @@ -194,6 +194,7 @@ public class Pz2Service implements StateListener, Configurable, Serializable { try { if (commands.equals("search")) { pzreq.getSearch().run(); + pzresp.getSearch().setIsNew(false); return "new"; } else if (commands.equals("record")) { pzreq.getRecord().run(); @@ -260,6 +261,7 @@ public class Pz2Service implements StateListener, Configurable, Serializable { if (stateMgr.hasPendingStateChange("search") && hasQuery()) { logger.info("Triggered search: Found pending search change [" + pzreq.getCommand("search").toString() + "], doing search before updating " + commands); pzreq.getSearch().run(); + pzresp.getSearch().setIsNew(false); } if (stateMgr.hasPendingStateChange("record") && ! commands.equals("record")) { logger.debug("Found pending record ID change. Doing record before updating " + commands); -- 1.7.10.4