Author: shane.bryzak(a)jboss.com
Date: 2010-01-03 18:01:06 -0500 (Sun, 03 Jan 2010)
New Revision: 11904
Modified:
modules/remoting/trunk/src/main/resources/org/jboss/seam/remoting/remote.js
Log:
fix apply request marshalling
Modified: modules/remoting/trunk/src/main/resources/org/jboss/seam/remoting/remote.js
===================================================================
--- modules/remoting/trunk/src/main/resources/org/jboss/seam/remoting/remote.js 2010-01-03
14:44:48 UTC (rev 11903)
+++ modules/remoting/trunk/src/main/resources/org/jboss/seam/remoting/remote.js 2010-01-03
23:01:06 UTC (rev 11904)
@@ -320,7 +320,7 @@
var meta = Seam.getBeanMetadata(obj);
for (var i=0; i<meta.length; i++) {
d += "<member name=\"" + meta[i].field + "\">" +
- Seam.serializeValue(obj[meta[i].field], meta[i].type, refs) +
"</member>\n";
+ Seam.serializeValue(obj[meta[i].field], meta[i].type, refs) +
"</member>";
}
d += "</bean>";
return d;
@@ -857,8 +857,8 @@
Seam.Delta.prototype.scanForChanges = function(obj) {
if (obj == null || this.refs.contains(obj)) return;
this.refs.put(obj, null);
+ var src = this.getSourceObject(obj);
if (Seam.getBeanType(obj)) {
- var src = this.getSourceObject(obj);
var m = Seam.getBeanMetadata(obj);
for (var i=0; i<m.length; i++) {
var f=m[i].field;
@@ -867,16 +867,14 @@
if (t == "bag" || t == "map" || t == "bean")
this.scanForChanges(obj[f]);
}
} else if (obj instanceof Array) {
- var src = this.getSourceObject(obj);
- if (!this.testEqual(obj, src)) this.refs.put(obj, true);
+ if (src && !this.testEqual(obj, src)) this.refs.put(obj, true);
for (var i=0; i<obj.length; i++) {
if (Seam.getBeanType(obj[i]) || obj[i] instanceof Array || obj[i] instanceof
Seam.Map) {
this.scanForChanges(obj[i]);
}
}
} else if (obj instanceof Seam.Map) {
- var src = this.getSourceObject(obj);
- if (!this.testEqual(obj, src)) this.refs.put(obj, true);
+ if (src && !this.testEqual(obj, src)) this.refs.put(obj, true);
for (var i=0; i<obj.elements.length; i++) {
var k = obj.elements[i].key;
var v = obj.elements[i].value;
Show replies by date