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 2010/11/15 16:59:57 UTC

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

Author: werpu
Date: Mon Nov 15 15:59:57 2010
New Revision: 1035325

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

Modified:
    myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxRequest.js
    myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxResponse.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=1035325&r1=1035324&r2=1035325&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 Mon Nov 15 15:59:57 2010
@@ -96,7 +96,9 @@ myfaces._impl.core._Runtime.extendClass(
         this._xhr = myfaces._impl.core._Runtime.getXHRObject();
         this._postCreateXHR();
 
-        this._xhr.open(this._ajaxType, this._sourceForm.action, true);
+        this._xhr.open(this._ajaxType, this._sourceForm.action+
+                ((this._ajaxType == "GET")? "?"+this._requestParameters.makeFinal():"")
+                , true);
 
         var contentType = this._contentType;
         if (this._encoding) {
@@ -113,7 +115,7 @@ myfaces._impl.core._Runtime.extendClass(
         this._preSend();
 
         try {
-            this._xhr.send(this._requestParameters.makeFinal());
+            this._xhr.send((this._ajaxType != "GET")? this._requestParameters.makeFinal():null);
         } finally {
             this._postSend();
         }

Modified: myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxResponse.js
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxResponse.js?rev=1035325&r1=1035324&r2=1035325&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxResponse.js (original)
+++ myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxResponse.js Mon Nov 15 15:59:57 2010
@@ -518,7 +518,7 @@ myfaces._impl.core._Runtime.extendClass(
             var item = (!this._Lang.isString(itemIdToReplace)) ? itemIdToReplace :
                     this._Dom.byId(itemIdToReplace) /*used to call getElementFromForm*/;
             if (!item) {
-                throw Error(this._Lang.getMessage("ERR_ITEM_ID_NOTFOUND", null,"_AjaxResponse.replaceHtmlItem","itemIdToReplace.toString()"));
+                throw Error(this._Lang.getMessage("ERR_ITEM_ID_NOTFOUND", null,"_AjaxResponse.replaceHtmlItem",(itemIdToReplace)? itemIdToReplace.toString():"undefined"));
             }
             return this._Dom.outerHTML(item, markup);