myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott O'Bryan (JIRA)" <...@myfaces.apache.org>
Subject [jira] Commented: (TRINIDAD-1709) Remove PPRResponseWriter._disableIfNeeded() hack
Date Wed, 02 Mar 2011 00:07:37 GMT

    [ https://issues.apache.org/jira/browse/TRINIDAD-1709?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13001200#comment-13001200
] 

Scott O'Bryan commented on TRINIDAD-1709:
-----------------------------------------

Sweet Andy, thanks for looking into this.  I'm not too worried about MyFaces (since it's in
beta) but I assume this would make us dependent on Mojarra 2.0.3 as our minimum version though,
is that correct?  If so, we probably should put something up on the dev mailing list to make
sure that nobody has an issue with it.

> Remove PPRResponseWriter._disableIfNeeded() hack
> ------------------------------------------------
>
>                 Key: TRINIDAD-1709
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1709
>             Project: MyFaces Trinidad
>          Issue Type: Task
>    Affects Versions: 2.0.0-alpha
>            Reporter: Andy Schwartz
>            Priority: Minor
>
> PPRResponseWriter includes the following hack to work around some legacy Facelets behavior:
>   // Facelets - as of version 1.1.11 - does something
>   // very strange with its ResponseWriter stack.
>   // It starts with an ordinary stack (which will have 
>   // a PPRResponseWriter around an HtmlResponseWriter).
>   // Then it treats that *as an ordinary Writer*, and
>   // wraps it in a "StateWriter" class, which merely
>   // is used to switch between passing output through
>   // and buffering it.  Then it takes that StateWriter
>   // and uses it to cloneWithWriter() a new ResponseWriter
>   // stack!  As a result, we have the following stack
>   // outermost to innermost:
>   //   PPRResponseWriter
>   //   HtmlResponseWriter
>   //   StateWriter
>   //   PPRResponseWriter
>   //   HtmlResponseWriter
>   //   ServletResponse's Writer
>   // In the end, we have to get that "inner" PPRResponseWriter
>   // to just cut it out and pass everything through.  Hence,
>   // this hack!  So If I get a "write" call while we're
>   // inside of startDocument(), assume that I must be an
>   // abused PPRResponseWriter, and just put myself in
>   // pass-everything-through mode
>   //
>   private void _disableIfNeeded()
>   {
>     if (_state.documentStarting)
>     {
>       _state = new State(_state.pprContext);
>       _state.forceInsideTarget = true;
>     }
>   }
> We should remove this hack once the underlying Facelets behavior is fixed in both MyFaces
and Mojarra.  The MyFaces issue is here:
> https://issues.apache.org/jira/browse/MYFACES-2500
> The Mojarra issue is here:
> https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=1515
> I just checked in a fix for Mojarra.  Looking into a patch for the MyFaces side.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message