IMO the name BufferedResponse is very much misleading. It should
better be something like TemporaryResponseBuffer or ResponseCache
maybe.
Juergen
On 11/9/05, Juergen Donnerstag <[EMAIL PROTECTED]> wrote:
> Why do we have two BufferedResponse? What is the difference?
>
> Juergen
>
> On 11/9/05, Johan Compagner <[EMAIL PROTECTED]> wrote:
> > 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
> >
> >
>
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop