summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/samples/store-python/htdocs/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'sca-cpp/trunk/samples/store-python/htdocs/index.html')
-rw-r--r--sca-cpp/trunk/samples/store-python/htdocs/index.html20
1 files changed, 7 insertions, 13 deletions
diff --git a/sca-cpp/trunk/samples/store-python/htdocs/index.html b/sca-cpp/trunk/samples/store-python/htdocs/index.html
index 7de17d92e3..27007eb09d 100644
--- a/sca-cpp/trunk/samples/store-python/htdocs/index.html
+++ b/sca-cpp/trunk/samples/store-python/htdocs/index.html
@@ -20,19 +20,13 @@
<head>
<title>Store</title>
-<script type="text/javascript" src="/js/tuscany-ref.js"></script>
+<script type="text/javascript" src="/js/ref.js"></script>
<script type="text/javascript">
-var component = new tuscany.sca.Component("Store");
-
-//@Reference
-var catalog = new tuscany.sca.Reference("catalog");
-
-//@Reference
-var shoppingCart = new tuscany.sca.Reference("shoppingCart");
-
-//@Reference
-var shoppingTotal = new tuscany.sca.Reference("shoppingTotal");
+var store = component("Store");
+var catalog = defun(reference(store, "catalog"), "items");
+var shoppingCart = reference(store, "shoppingCart");
+var shoppingTotal = defun(reference(store, "shoppingTotal"), "total");
var catalogItems;
@@ -64,7 +58,7 @@ function shoppingCart_getResponse(feed) {
}
document.getElementById("shoppingCart").innerHTML = list;
- shoppingTotal.apply("total", shoppingTotal_totalResponse);
+ shoppingTotal.total(shoppingTotal_totalResponse);
}
}
@@ -119,7 +113,7 @@ function deleteCart() {
function init() {
try {
- catalog.apply("items", catalog_itemsResponse);
+ catalog.items(catalog_itemsResponse);
shoppingCart.get("", shoppingCart_getResponse);
} catch(e){
alert(e);