Author: manaRH
Date: 2008-10-27 16:43:53 -0400 (Mon, 27 Oct 2008)
New Revision: 9452
Modified:
branches/enterprise/JBPAPP_4_3_FP01/src/remoting/org/jboss/seam/remoting/InterfaceGenerator.java
branches/enterprise/JBPAPP_4_3_FP01/src/remoting/org/jboss/seam/remoting/remote.js
Log:
JBPAPP-1321
Modified:
branches/enterprise/JBPAPP_4_3_FP01/src/remoting/org/jboss/seam/remoting/InterfaceGenerator.java
===================================================================
---
branches/enterprise/JBPAPP_4_3_FP01/src/remoting/org/jboss/seam/remoting/InterfaceGenerator.java 2008-10-27
19:55:01 UTC (rev 9451)
+++
branches/enterprise/JBPAPP_4_3_FP01/src/remoting/org/jboss/seam/remoting/InterfaceGenerator.java 2008-10-27
20:43:53 UTC (rev 9452)
@@ -309,6 +309,13 @@
return;
types.add(type);
+
+ if (component.getName().contains("."))
+ {
+ componentSrc.append("Seam.Remoting.createNamespace('");
+ componentSrc.append(component.getName().substring(0,
component.getName().lastIndexOf('.')));
+ componentSrc.append("');\n");
+ }
componentSrc.append("Seam.Remoting.type.");
componentSrc.append(component.getName());
Modified:
branches/enterprise/JBPAPP_4_3_FP01/src/remoting/org/jboss/seam/remoting/remote.js
===================================================================
---
branches/enterprise/JBPAPP_4_3_FP01/src/remoting/org/jboss/seam/remoting/remote.js 2008-10-27
19:55:01 UTC (rev 9451)
+++
branches/enterprise/JBPAPP_4_3_FP01/src/remoting/org/jboss/seam/remoting/remote.js 2008-10-27
20:43:53 UTC (rev 9452)
@@ -139,6 +139,19 @@
}
}
+Seam.Remoting.createNamespace = function(namespace)
+{
+ var parts = namespace.split(".");
+ var base = Seam.Remoting.type;
+
+ for(var i = 0; i < parts.length; i++)
+ {
+ if (typeof base[parts[i]] == "undefined")
+ base[parts[i]] = new Object();
+ base = base[parts[i]];
+ }
+}
+
Seam.Remoting.__Context = function() {
this.conversationId = null;