Matthias Füssel created TRINIDAD-2563:
-----------------------------------------

             Summary: Trinidad with MyFaces leads to empty ajax-response when 
render="@all" is used
                 Key: TRINIDAD-2563
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-2563
             Project: MyFaces Trinidad
          Issue Type: Bug
    Affects Versions: 2.2.1-core
            Reporter: Matthias Füssel


Trindidad pvovides its own XmlHttpServletResponse for ajax requests. This 
response puts Tinidad's XmlOutput into its ResponseWriter chain which causes 
everything written before a "<?xml version="1.0" ?>" header to be thrown away. 
I have no idea why.

Trinidad's PartialViewContextImpl uses two different writer chains:
 * for "real" partial renderings, it uses its own PPResponseWriter -> 
XmlResponseWriter -> ... . This combination creates a "<?xml version="1.0" ?>" 
header at the begin of the output, so everything works as expected.
 * for "render all" requests, it uses a standard PartialResponseWriter from the 
JSF API. The PartialResponseWriter from MyFaces doesn't create any xml header. 
So everything "written" will be ignored and the request returns a completely 
empty response which causes a javascript error on the client.

Options:
 * remove XmlOutput from XmlHttpServletResponse's writer chain or
 * use Trinidad's writer chain also for "render all" requests, as there is no 
guarantee that PartialResponseWriter will use an xml header

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to