diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2011-03-21 07:42:09 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2011-03-21 07:42:09 +0000 |
commit | 96c58efd10432c163c51d72780cece7dce4b05a9 (patch) | |
tree | 49c4c70895fa5096ff8ff312b01a5887002cadcb /sca-cpp/trunk/modules/js/htdocs/component.js | |
parent | a7e5a4216489dda5466eb4b0b83911e36a8f5520 (diff) |
Refactor and cleanup edit module, add text components, store page and app run page.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1083694 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | sca-cpp/trunk/modules/js/htdocs/component.js | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/sca-cpp/trunk/modules/js/htdocs/component.js b/sca-cpp/trunk/modules/js/htdocs/component.js index 8e25292018..beef9357e5 100644 --- a/sca-cpp/trunk/modules/js/htdocs/component.js +++ b/sca-cpp/trunk/modules/js/htdocs/component.js @@ -102,9 +102,9 @@ JSONClient.toJSON = function(o) { /** * Construct an HTTPBindingClient. */ -function HTTPBindingClient(cname, uri, objectID) { - this.uri = "/references/" + cname + "/" + uri; - this.objectID = objectID; +function HTTPBindingClient(name, uri) { + this.name = name; + this.uri = uri; this.apply = this.createApplyMethod(); } @@ -407,21 +407,17 @@ HTTPBindingClient.getHTTPRequest = function() { var sca = {}; /** - * Return a component. + * Return a component proxy. */ sca.component = function(name) { - function ClientComponent(name) { - this.name = name; - } - - return new ClientComponent(name); + return new HTTPBindingClient(name, '/components/' + name); }; /** * Return a reference proxy. */ -sca.reference = function(comp, name) { - return new HTTPBindingClient(comp.name, name); +sca.reference = function(comp, rname) { + return new HTTPBindingClient(comp.name + '/' + rname, "/references/" + comp.name + "/" + rname); }; /** |