Author: ate
Date: Thu Nov 29 02:40:50 2007
New Revision: 599369

URL: http://svn.apache.org/viewvc?rev=599369&view=rev
Log:
Fix for WICKET-1132: Liferay portlet support
Patch provided by Thijs Vonk adding the "Accept" "text/xml" header from 
wicket-ajax.js
Tested both as "plain" webapp and as portlet apps deployed on Jetspeed and (as 
expected) without any issues.
See: https://issues.apache.org/jira/browse/WICKET-1132#action_12546444 

Modified:
    
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js?rev=599369&r1=599368&r2=599369&view=diff
==============================================================================
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js 
(original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js 
Thu Nov 29 02:40:50 2007
@@ -806,6 +806,7 @@
                                t.onreadystatechange = 
this.stateChangeCallback.bind(this);
                                // set a special flag to allow server 
distinguish between ajax and non-ajax requests
                                t.setRequestHeader("Wicket-Ajax", "true");
+                               t.setRequestHeader("Accept", "text/xml");
                                t.send(null);
                                return true;
                        } else {
@@ -851,6 +852,7 @@
                                t.setRequestHeader("Content-Type", 
"application/x-www-form-urlencoded");
                                // set a special flag to allow server 
distinguish between ajax and non-ajax requests
                                t.setRequestHeader("Wicket-Ajax", "true");
+                               t.setRequestHeader("Accept", "text/xml");
                                t.send(body);
                                return true;
                        } else {


Reply via email to