session().postInit();\r
return "";\r
}\r
+ \r
+ public String postInit(byte[] initDoc) throws UnsupportedEncodingException, IOException {\r
+ logger.info("Posting init: " + System.currentTimeMillis());\r
+ session().postInit(initDoc);\r
+ return "";\r
+ \r
+ }\r
\r
@Override\r
public void setServiceProxyUrl(String url) {\r
logger.info("Setting Service Proxy url: " + url);\r
- session().setServiceProxyUrl(url); \r
+ session().setServiceProxyUrl(url); \r
+ session().setQuery(null);\r
+ session().resetDataObjects();\r
}\r
\r
@Override\r
logger.debug("Processing request for " + commands); \r
List<CommandThread> threadList = new ArrayList<CommandThread>();\r
StringTokenizer tokens = new StringTokenizer(commands,",");\r
- while (tokens.hasMoreElements()) {\r
+ while (tokens.hasMoreElements()) { \r
threadList.add(new CommandThread(getCommand(tokens.nextToken()),searchClient)); \r
}\r
for (CommandThread thread : threadList) {\r
}\r
\r
protected boolean hasQuery() {\r
- return !(getCommand("search").getParameter("query") == null);\r
+ return getCommand("search").getParameter("query") != null && getCommand("search").getParameter("query").getValueWithExpressions().length()>0;\r
}\r
\r
public boolean hasRecords () {\r
}\r
\r
protected void handleQueryStateChanges (String commands) {\r
- if (queryStates.hasPendingStateChange("search")) { \r
+ if (queryStates.hasPendingStateChange("search") && hasQuery()) { \r
logger.debug("Found pending search change. Doing search before updating " + commands); \r
doSearch();\r
} \r