You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "simon.kitching@chello.at" <si...@chello.at> on 2008/07/10 15:26:13 UTC
Recent tomahawk ExtensionsFilter change breaks orchestra
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.
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.
Regards,
Simon
Re: Recent tomahawk ExtensionsFilter change breaks orchestra
Posted by "simon.kitching@chello.at" <si...@chello.at>.
Leonardo Uribe schrieb:
> Solved. Just pass the wrapped response on TomahawkFacesContextFactory
> as parameter. Fixed at revision 675608.
Yep, that fixed it. Thanks.
Re: Recent tomahawk ExtensionsFilter change breaks orchestra
Posted by Leonardo Uribe <lu...@gmail.com>.
On Thu, Jul 10, 2008 at 8:26 AM, simon.kitching@chello.at <
simon.kitching@chello.at> 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
>
>