You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2011/03/01 13:18:08 UTC

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

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);