[seam-commits] Seam SVN: r11785 - in modules/remoting/trunk/src/main: resources/org/jboss/seam/remoting and 1 other directory.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Mon Dec 7 09:17:26 EST 2009
Author: shane.bryzak at jboss.com
Date: 2009-12-07 09:17:26 -0500 (Mon, 07 Dec 2009)
New Revision: 11785
Modified:
modules/remoting/trunk/src/main/java/org/jboss/seam/remoting/Remoting.java
modules/remoting/trunk/src/main/resources/org/jboss/seam/remoting/remote.js
Log:
fixed compiler error, more js stuff
Modified: modules/remoting/trunk/src/main/java/org/jboss/seam/remoting/Remoting.java
===================================================================
--- modules/remoting/trunk/src/main/java/org/jboss/seam/remoting/Remoting.java 2009-12-07 12:21:48 UTC (rev 11784)
+++ modules/remoting/trunk/src/main/java/org/jboss/seam/remoting/Remoting.java 2009-12-07 14:17:26 UTC (rev 11785)
@@ -16,6 +16,7 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import org.jboss.seam.remoting.model.ModelHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
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 2009-12-07 12:21:48 UTC (rev 11784)
+++ modules/remoting/trunk/src/main/resources/org/jboss/seam/remoting/remote.js 2009-12-07 14:17:26 UTC (rev 11785)
@@ -791,6 +791,50 @@
}
}
+Seam.Remoting.processModelResponse = function(doc) {
+ var headerNode;
+ var bodyNode;
+ var inScope = typeof(Seam) == "undefined" ? false : true;
+ if (!inScope) return;
+
+ var context = new Seam.Remoting.__Context;
+
+ if (doc.documentElement) {
+ for (var i = 0; i < doc.documentElement.childNodes.length; i++) {
+ var node = doc.documentElement.childNodes.item(i);
+ if (node.tagName == "header")
+ headerNode = node;
+ else if (node.tagName == "body")
+ bodyNode = node;
+ }
+ }
+ if (headerNode) {
+ var contextNode;
+ for (var i = 0; i < headerNode.childNodes.length; i++) {
+ var node = headerNode.childNodes.item(i);
+ if (node.tagName == "context") {
+ contextNode = node;
+ break;
+ }
+ }
+ if (contextNode && context) {
+ Seam.Remoting.unmarshalContext(contextNode, context);
+ if (context.getConversationId() && Seam.Remoting.getContext().getConversationId() == null)
+ Seam.Remoting.getContext().setConversationId(context.getConversationId());
+ }
+ }
+ if (bodyNode) {
+ for (var i = 0; i < bodyNode.childNodes.length; i++) {
+ var n = bodyNode.childNodes.item(i);
+ if (n.tagName == "model") Seam.Remoting.processModel(n, context);
+ }
+ }
+}
+
+Seam.Remoting.processModel = function(n, ctx) {
+
+}
+
Seam.Remoting.Model = function() {
this.expressions = new Array();
this.beans = new Array();
@@ -814,7 +858,7 @@
var r = this.createFetchRequest(action);
var env = Seam.Remoting.createEnvelope(Seam.Remoting.createHeader(), r.data);
Seam.Remoting.pendingCalls.put(r.id, r);
- Seam.Remoting.sendAjaxRequest(env, Seam.Remoting.PATH_MODEL, this.processFetchResponse, false);
+ Seam.Remoting.sendAjaxRequest(env, Seam.Remoting.PATH_MODEL, Seam.Remoting.processModelResponse, false);
}
Seam.Remoting.Model.prototype.createFetchRequest = function(a) { // a = action
More information about the seam-commits
mailing list