myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From we...@apache.org
Subject svn commit: r1075788 - /myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxRequest.js
Date Tue, 01 Mar 2011 12:18:08 GMT
Author: werpu
Date: Tue Mar  1 12:18:07 2011
New Revision: 1075788

URL: http://svn.apache.org/viewvc?rev=1075788&view=rev
Log:
https://issues.apache.org/jira/browse/MYFACES-3045

Modified:
    myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxRequest.js

Modified: myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxRequest.js
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxRequest.js?rev=1075788&r1=1075787&r2=1075788&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxRequest.js
(original)
+++ myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxRequest.js
Tue Mar  1 12:18:07 2011
@@ -96,7 +96,14 @@ myfaces._impl.core._Runtime.extendClass(
         this._xhr = myfaces._impl.core._Runtime.getXHRObject();
         this._postCreateXHR();
 
-        this._xhr.open(this._ajaxType, this._sourceForm.action+
+        var targetURL;
+        if (typeof this._sourceForm.elements["javax.faces.encodedURL"] == 'undefined') {
+              targetURL = this._sourceForm.action;
+        } else {
+              targetURL = this._sourceForm.elements["javax.faces.encodedURL"].value;
+        }
+        
+        this._xhr.open(this._ajaxType, targetURL +
                 ((this._ajaxType == "GET")? "?"+this._requestParameters.makeFinal():"")
                 , true);
 



Mime
View raw message