In gates 1.4 webResponse.reset () clears the buffer. But in gate 1.5 there is some kind of garbage.
Answer:
<tr></tr> <tr></tr>
And then my current json follows.
WebResponse webResponse = (WebResponse) cycle.getResponse(); webResponse.reset(); webResponse.setContentType("application/x-json; charset=utf-8"); //$NON-NLS-1$ Url url = RequestCycle.get().getUrlRenderer().getBaseUrl(); webResponse.setHeader("Wicket-Ajax-BaseURL", url.toString()); //$NON-NLS-1$ webResponse.disableCaching(); // Write x-json content to the response. String output = json.toString(); webResponse.write(output);
source share