summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/samples/store-gae/htdocs/store.html
diff options
context:
space:
mode:
Diffstat (limited to 'sca-cpp/trunk/samples/store-gae/htdocs/store.html')
-rw-r--r--sca-cpp/trunk/samples/store-gae/htdocs/store.html15
1 files changed, 8 insertions, 7 deletions
diff --git a/sca-cpp/trunk/samples/store-gae/htdocs/store.html b/sca-cpp/trunk/samples/store-gae/htdocs/store.html
index 21eabca7a7..4e2ee6795a 100644
--- a/sca-cpp/trunk/samples/store-gae/htdocs/store.html
+++ b/sca-cpp/trunk/samples/store-gae/htdocs/store.html
@@ -20,10 +20,12 @@
<head>
<title>Store</title>
-<script type="text/javascript" src="store.js"></script>
+<script type="text/javascript" src="/js/tuscany-ref.js"></script>
<script language="JavaScript">
+ var component = new tuscany.sca.Component("Store");
+
//@Reference
var catalog = new tuscany.sca.Reference("catalog");
@@ -35,7 +37,7 @@
var catalogItems;
- function catalog_getResponse(items,exception) {
+ function catalog_getcatalogResponse(items,exception) {
if(exception){
alert(exception.message);
return;
@@ -50,8 +52,7 @@
document.getElementById('catalog').innerHTML=catalog;
catalogItems = items;
- // TEMP
- shoppingTotal.gettotal(shoppingTotal_getTotalResponse);
+ shoppingTotal.apply("gettotal", shoppingTotal_gettotalResponse);
}
function shoppingCart_getResponse(feed) {
@@ -68,7 +69,7 @@
if (entries.length != 0) {
try {
- shoppingTotal.gettotal(shoppingTotal_getTotalResponse);
+ shoppingTotal.apply("gettotal", shoppingTotal_gettotalResponse);
}
catch(e){
alert(e);
@@ -77,7 +78,7 @@
}
}
- function shoppingTotal_getTotalResponse(total,exception) {
+ function shoppingTotal_gettotalResponse(total,exception) {
if(exception) {
alert(exception.message);
return;
@@ -130,7 +131,7 @@
function init() {
try {
- catalog.get(catalog_getResponse);
+ catalog.apply("getcatalog", catalog_getcatalogResponse);
shoppingCart.get("", shoppingCart_getResponse);
}
catch(e){