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

Leonardo Uribe commented on MYFACES-3412:
-----------------------------------------

It worked before because PartialResponseWriter had two lines that removed all 
CDATA sections:

             //we now first remove pending javascript CDATA blocks
             //the reason is if we leave them the ppr chokes on them
             //the syntax from the auto generated CDATA usually is 
//\s+<![CDATA[
-            resultString = 
resultString.replaceAll("//\\s*((\\<\\!\\[CDATA\\[)|(\\]\\]\\>))", "");

In 2.1.4, in MYFACES-3339 this was replaced with:

+            // -= Leonardo Uribe =- Do this cause a bug on the client side, 
because
+            // scripts containing '&' will be considered invalid xml. 
+            //resultString = 
resultString.replaceAll("//\\s*((\\<\\!\\[CDATA\\[)|(\\]\\]\\>))", "");

If no CDATA, primefaces javascript works but with the fix, now there are 2 
different CDATA blocks per component and primefaces only handle one of them, 
trimming the other one.
                
> updated AJAX values sometimes delete other elements
> ---------------------------------------------------
>
>                 Key: MYFACES-3412
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3412
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 2.0.10, 2.1.4
>            Reporter: Mark Struberg
>            Assignee: Werner Punz
>         Attachments: ajaxbug.zip
>
>
> The attached examples shows a problem I face after updating to the latest 
> 2.0.10/11 and 2.1.4/5 MyFaces versions.
> I have 2 primefaces date pickers inside a h:panelGroup. Both date pickers 
> create ajax requests and refresh their values. If you click one of them (both 
> update the whole panelGroup), the 2nd date picker disapears.
> This might have something to do with the AJAX js rework?
> I can easily work around this issue, but I'm not sure which other problems 
> might arise as well, thus we better fix this 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to