Hello -
I would like to use a response filter to replace some very often occurring
placeholders in the markup with values that depend on which Application
instance is being used. I realize there are other ways of doing this with
Wicket, but I have my reasons to try to keep this particular part out of the
Page/Component code.
This worked fine for one of the applications, I added my filter using the
getRequestCycleSettings().addResponseFilter() method. However, in another
application where I am using a custom subclass of WebResponse (to accomodate
some special needs regarding redirect handling), the filter method isn't
being called.
I browsed through the Wicket source code, and to me it looks like the
filter() method is only being used if the Response is an instance of
BufferedWebResponse.
RequestCycle source:
...
if (getResponse() instanceof BufferedWebResponse)
{
try
{
((BufferedWebResponse)getResponse()).filter();
}
...
And the only reference to the filter method in Response that I found was the
one in - BufferedWebResponse. I can't subclass BufferedWebResponse for my
custom redirect needs, because the redirect method is marked final.
Any suggestions how to work around this? Am I trying to do something that
wasn't intended to be done? I know I can always fall back to a "normal"
filter and a HttpServletResponseWrapper, but I'd like to avoid it if I can
accomplish the same in Wicket code.
Many thanks in advance
--
Lauri Lehtinen
--
View this message in context:
http://www.nabble.com/Response-filters-not-being-applied-when-using-custom-subclass-of-WebResponse-tp20946421p20946421.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]