Author: adrianc
Date: Tue May 20 15:35:52 2008
New Revision: 658467
URL:
http://svn.apache.org/viewvc?rev=658467&view=revLog:
Some Ajax fixups.
Modified:
ofbiz/trunk/framework/images/webapp/images/selectall.js
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java
Modified: ofbiz/trunk/framework/images/webapp/images/selectall.js
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/selectall.js?rev=658467&r1=658466&r2=658467&view=diff==============================================================================
--- ofbiz/trunk/framework/images/webapp/images/selectall.js (original)
+++ ofbiz/trunk/framework/images/webapp/images/selectall.js Tue May 20 15:35:52 2008
@@ -224,10 +224,15 @@
* form of: areaId, target, target parameters [, areaId, target, target parameters...].
*/
function ajaxUpdateAreas(areaCsvString) {
+ responseFunction = function(transport) {
+ // Uncomment the next two lines to see the HTTP responses
+ //var response = transport.responseText || "no response text";
+ //alert("Response: \n\n" + response);
+ }
var areaArray = areaCsvString.split(",");
var numAreas = parseInt(areaArray.length / 3);
for (var i = 0; i < numAreas * 3; i = i + 3) {
- new Ajax.Updater(areaArray[i], areaArray[i + 1], {parameters: areaArray[i + 2]});
+ new Ajax.Updater(areaArray[i], areaArray[i + 1], {parameters: areaArray[i + 2], onComplete: responseFunction});
}
}
@@ -248,7 +253,7 @@
* form of: areaId, target, target parameters [, areaId, target, target parameters...].
*/
function ajaxSubmitRequestUpdateAreas(target, targetParams, areaCsvString) {
- updateFunction = function() {
+ updateFunction = function(transport) {
ajaxUpdateAreas(areaCsvString);
}
new Ajax.Request(target, {
Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java?rev=658467&r1=658466&r2=658467&view=diff==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java Tue May 20 15:35:52 2008
@@ -943,6 +943,8 @@
String targetString = updateArea.getAreaTarget(context);
String target = UtilHttp.removeQueryStringFromTarget(targetString);
String targetParams = UtilHttp.getQueryStringFromTarget(targetString);
+ targetParams = targetParams.replace("?", "");
+ targetParams = targetParams.replace("&", "&");
buffer.append(updateArea.getAreaId() + "," + target + "," + targetParams);
}
}