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
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