[
https://issues.apache.org/jira/browse/MYFACES-4536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17753299#comment-17753299
]
Melloware commented on MYFACES-4536:
------------------------------------
OK I ran both the old and the new code in PrimeFaces CSP mode and the only
difference in the Partial Response is in the non wrapped mode MyFaces is
stripping this from the end of the payload.
{code:java}
<eval><![CDATA[if(window.PrimeFaces){PrimeFaces.csp.init('NjcwMDg5ZDgtYmEwZi00NDAzLWI3Y2MtZTk1OTY4Y2VjNzY2');};;PrimeFaces.csp.register('j_id_7k:j_id_7l:globalFilter','onchange',function(event){PF('customersTable').filter()});PrimeFaces.csp.register('j_id_7k:j_id_7l:j_id_7o','onclick',function(event){PrimeFaces.ab({s:"j_id_7k:j_id_7l:j_id_7o",f:"j_id_7k",u:"@form"});return
false;});;]]></eval> {code}
So its not evaluating our CSP.register() scripts thus breaking our integration
tests. I have a feeling it has to do with MyFaces
PartialResponseWriterImpl.java which does some double buffering [~werpu] ???
It has all kinds of logic in there trying to strip CDATA out??? This stuff
does not exist in Mojarra and its currently working. So to me this is a
MyFaces bug buried in this PartialResponseWriterImpl logic.
> PartialResponseWriter: Do no wrap the writer
> --------------------------------------------
>
> Key: MYFACES-4536
> URL: https://issues.apache.org/jira/browse/MYFACES-4536
> Project: MyFaces Core
> Issue Type: Improvement
> Components: General
> Affects Versions: 2.2.14, 2.3.10, 2.3-next-M7, 4.0.0-RC2
> Reporter: Melloware
> Assignee: Melloware
> Priority: Major
>
> Per BalusC:
> Since JSF 2.3 the default constructor of {{FacesWrapper}} subclasses has been
> deprecated in order to force implementors to instead use the constructor
> taking the wrapped instance (and to raise their awareness), so that logically
> the inherited {{getWrapped()}} method will be used throughout the
> implementation instead of the local {{wrapped}} variable. This will ensure
> that the correct implementation is returned and correct behavior is performed
> might the {{FacesWrapper}} implementation itself being wrapped by yet another
> {{FacesWrapper}} implementation further down the chain. Because, when the
> {{FacesWrapper}} implementation incorrectly/accidentally uses the local
> {{wrapped}} variable instead of the {{getWrapped()}} method, then that other
> {{FacesWrapper}} implementation will basically be completely ignored, hereby
> breaking the decorator pattern.
>
> PrimeFaces ticket: https://github.com/primefaces/primefaces/issues/9518
--
This message was sent by Atlassian Jira
(v8.20.10#820010)