summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/samples/store-nosql/htdocs/store.html
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-07-01 06:04:35 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-07-01 06:04:35 +0000
commitac8bb2ddecac09d60760ef83319b627548d0fd77 (patch)
treeb15d73262f02989d8dfe554e127e82e70b5aebe4 /sca-cpp/trunk/samples/store-nosql/htdocs/store.html
parent54561e00c9714c9230dc1ed39f3bb548a59adeed (diff)
Minimal support for implementation.widget, using simplified (and generic) JSONRPC and ATOMPub Javascript proxies. Minor changes to the server runtime to serve reference requests from widgets. Adjust and simplified samples using the widget support.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@959521 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--sca-cpp/trunk/samples/store-nosql/htdocs/store.html15
1 files changed, 8 insertions, 7 deletions
diff --git a/sca-cpp/trunk/samples/store-nosql/htdocs/store.html b/sca-cpp/trunk/samples/store-nosql/htdocs/store.html
index 21eabca7a7..4e2ee6795a 100644
--- a/sca-cpp/trunk/samples/store-nosql/htdocs/store.html
+++ b/sca-cpp/trunk/samples/store-nosql/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){