On Thu, Jul 10, 2008 at 8:26 AM,
simon.kitching@... <
simon.kitching@...> wrote:
The following change has recently been made to TomahawkFacesContextWrapper:
Old code:
if (addResource.requiresBuffer())
{
extensionsResponseWrapper = new ExtensionsResponseWrapper(httpResponse);
extendedResponse = extensionsResponseWrapper;
}
New Code:
if (addResource.requiresBuffer())
{
//If the request requires buffer, this was already
//wrapped (on TomahawkFacesContextFactory.getFacesContext(...) ),
//but we need to save the wrapped response value
//on a local variable to then reference it on release()
//method and parse the old response.
extensionsResponseWrapper = (ExtensionsResponseWrapper) extendedResponse;
}
Casting the "extendedResponse" object to a tomahawk-specific type doesn't work if something else has wrapped the ResponseWrapper too. And orchestra does exactly that.
So some other solution will be needed here.
Solved. Just pass the wrapped response on TomahawkFacesContextFactory as parameter. Fixed at revision 675608.
PS: "extendedResponse" is no longer an appropriate name for this variable. It was true in the filter approach, where the filter knows exactly what the object is because it just created it. But in the FacesContext approach, it can be any object that implements ServletResponse.
I removed this variable, since it is no longer used on this code.
Thanks for pointing this accurate observation.
regards
Leonardo Uribe
Regards,
Simon