cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject svn commit: r559614 - in /cocoon/branches/BRANCH_2_1_X: src/blocks/forms/resources/org/apache/cocoon/forms/flow/javascript/Form.js status.xml
Date Wed, 25 Jul 2007 21:19:48 GMT
Author: antonio
Date: Wed Jul 25 14:19:47 2007
New Revision: 559614

URL: http://svn.apache.org/viewvc?view=rev&rev=559614
Log:

<action dev="AG" type="fix" fixes-bug="COCOON-2027" due-to="Jan Oberst" due-to-email="mail@janoberst.com">
  CForms: Handling of empty responses in AJAX Forms with IFrame transport.
</action>

Modified:
    cocoon/branches/BRANCH_2_1_X/src/blocks/forms/resources/org/apache/cocoon/forms/flow/javascript/Form.js
    cocoon/branches/BRANCH_2_1_X/status.xml

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/resources/org/apache/cocoon/forms/flow/javascript/Form.js
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/blocks/forms/resources/org/apache/cocoon/forms/flow/javascript/Form.js?view=diff&rev=559614&r1=559613&r2=559614
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/forms/resources/org/apache/cocoon/forms/flow/javascript/Form.js
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/forms/resources/org/apache/cocoon/forms/flow/javascript/Form.js
Wed Jul 25 14:19:47 2007
@@ -220,10 +220,23 @@
                 var httpResponse = objectModel.get(org.apache.cocoon.environment.http.HttpEnvironment.HTTP_RESPONSE_OBJECT);
 
                 if (httpResponse) {
-                    httpResponse.setContentType("text/xml");
-                    var text = "<?xml version='1.0'?><bu:document xmlns:bu='" +
-                        org.apache.cocoon.ajax.BrowserUpdateTransformer.BU_NSURI +
-                        "'><bu:continue/></bu:document>";
+                    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 {

Modified: cocoon/branches/BRANCH_2_1_X/status.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/status.xml?view=diff&rev=559614&r1=559613&r2=559614
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/status.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/status.xml Wed Jul 25 14:19:47 2007
@@ -182,13 +182,16 @@
 
   <changes>
   <release version="2.1.11" date="TBD">
+    <action dev="AG" type="fix" fixes-bug="COCOON-2027" due-to="Jan Oberst" due-to-email="mail@janoberst.com">
+      CForms: Handling of empty responses in AJAX Forms with IFrame transport.
+    </action>
     <action dev="AG" type="fix" fixes-bug="COCOON-2059" due-to="Alexander Klimetschek"
due-to-email="alexander.klimetschek@mindquarry.com">
-      AJAX: ajax/common.js makes use of deprecated dojo.animation.Timer
+      Ajax: ajax/common.js makes use of deprecated dojo.animation.Timer
     </action>
     <action dev="AN" type="update">
       XSP block: Upgrade Eclipse compiler to version 3.1.0 to allow the use of Java5 syntax
in XSPs.
       (Latest released Eclipse version is 3.2.2 but use 3.1.0 to be consistent with the version
-      picked up by the Maven build in trunk.)
+      picked up by the Maven build in trunk).
     </action>
     <action dev="JH" type="fix" fixes-bug="COCOON-2077" due-to="Ellis Pritchard">
       Core, QDox: Fixed getInputStream() in XModuleSource and QDoxSource:



Mime
View raw message