cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gabriel Gruber <Gabriel.Gru...@workflow.at>
Subject Problems with latest changes in Servlet-Services-Framework
Date Sun, 24 Aug 2008 15:02:51 GMT
Hi guys,

just wanted to inform you, that latest trunk changes in 
ServletServiceFramework broke the ability of the form block to submit 
correctly, if ajax is enabled. I traced the issue down to this class:

HttpServletResponseBufferingWrapper

there have been some changes lately in connection with buffering and 
forewarding. It seems that those reworks actually broke the correct 
functioning of this snippet inside Form.js (which is responsible to give 
dojo back the information, that form validation worked correctly):

line 221 and following...

                cocoon.sendStatus(200);
                var httpResponse = 
objectModel.get(org.apache.cocoon.environment.http.HttpEnvironment.HTTP_RESPONSE_OBJECT);

                if (httpResponse) {
                    var text ="";
                    if (cocoon.request.getParameter("dojo.transport")==
"iframe") {
                        //MSIE accepts only HTML content when using the 
iframe
                        //dojo transport, so we have to wrap everything 
into
                        //html as demonstrated by 
IframeTransport-bu-styling.xsl
                        httpResponse.setContentType("text/html");
                        text = "<html><head><title>Browser Update 
Data-Island</title></head><body>"
                                + "<form id='browser-update'>"
                                + "<textarea name='continue'></textarea>"
                                + "</form>"
                                + "</body></html>";
                    } else {
                        httpResponse.setContentType("text/xml");
                            text = "<?xml version='1.0'?><bu:document 
xmlns:bu='" +
 org.apache.cocoon.ajax.BrowserUpdateTransformer.BU_NSURI +
                                "'><bu:continue/></bu:document>";
 
                    }
                    httpResponse.setContentLength(text.length);
                    httpResponse.writer.print(text);
                } else {
                    // Empty response
                    cocoon.response.setHeader("Content-Length", "0");
                }
....


After switching back to rev. 650170  submission of ajax forms works for me 
again. But I suspect there should be some more investigation by grek...
The main difference when comparing the working and broken version of this 
class in respect to the issues mentioned above is, that in the older 
(working) version outputstream and writer were retrieved from super().

cheers,

Gabriel

Mime
View raw message