What i want is put some performance statistics in the page. (how long it did take to render on the client and server side)
This means just a few lines of _javascript_ one in the head and one at the end of the file.
I don't want to specify this _javascript_ for all the html files (maybe i want to turn it off)
The first thought it it is simple just override:
WebApplication.WebResponse newWebResponse(final HttpServletResponse servletResponse)
{
return (getSettings().getBufferResponse()
? new BufferedWebResponse(servletResponse)
: new WebResponse(servletResponse));
}
and return youre own version of the bufferedWebResponse that does some parsing when close is called on it.
This would work only that inside wicket we have the special REDIRECT_TO_BUFFER and this makes
it own BufferedResponse where everything is streamed to. And the buffered web response above is only used for the redirect url.
Now i am thinking of change the 2 close() methods of the 2
Buffered(Web)Response classes that they call a postProcessor with there
buffer
Like this:
public final void close()
{
if (stringBuffer == null)
{
throw new
WicketRuntimeException("The response has already been closed.");
}
super.close();
stringBuffer =
application.getPostProcessor().process(stringBuffer);
<<<<<<<<<<<<<
this.byteBuffer = convertToCharset(getCharacterEncoding());
this.stringBuffer = null;
}
Or we could make a WebApplication.newBufferedREsponse() (like newWebResponse())
Currently it is just a bit strange that you can overwrite youre own WebResponse but for the most part of wicket
that one won't be used for anything except sending a client side redirect.
anybody a better idea?
johan
- [Wicket-develop] post processing output (some kind of f... Johan Compagner
- Re: [Wicket-develop] post processing output (some ... Juergen Donnerstag
- Re: [Wicket-develop] post processing output (s... Juergen Donnerstag
- Re: [Wicket-develop] post processing outpu... Juergen Donnerstag
- Re: [Wicket-develop] post processing o... Juergen Donnerstag
- Re: [Wicket-develop] post process... Johan Compagner
- Re: [Wicket-develop] post processing o... Johan Compagner
- Re: [Wicket-develop] post processing output (some ... Eelco Hillenius
- Re: [Wicket-develop] post processing output (s... Johan Compagner
