diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2010-07-01 06:04:47 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2010-07-01 06:04:47 +0000 |
commit | 69c5921fb2472f5cafa050dae088120ad17ed23a (patch) | |
tree | db2bbd8dc4439139b6278408c82cec495b06d0d9 /sca-cpp/trunk/samples/store-gae/htdocs/store.html | |
parent | 8e35575af73a89217bc5f9dc14dd59428f5ee39a (diff) |
Support user and email properties in WSGI integration.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@959523 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/samples/store-gae/htdocs/store.html')
-rw-r--r-- | sca-cpp/trunk/samples/store-gae/htdocs/store.html | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/sca-cpp/trunk/samples/store-gae/htdocs/store.html b/sca-cpp/trunk/samples/store-gae/htdocs/store.html index 4e2ee6795a..d52dd1adaf 100644 --- a/sca-cpp/trunk/samples/store-gae/htdocs/store.html +++ b/sca-cpp/trunk/samples/store-gae/htdocs/store.html @@ -51,8 +51,14 @@ }
document.getElementById('catalog').innerHTML=catalog;
catalogItems = items;
-
- shoppingTotal.apply("gettotal", shoppingTotal_gettotalResponse);
+ }
+
+ function shoppingCart_getemailResponse(email, exception) {
+ if(exception) {
+ alert(exception.message);
+ return;
+ }
+ document.getElementById('email').innerHTML = email;
}
function shoppingCart_getResponse(feed) {
@@ -76,6 +82,8 @@ }
}
}
+
+ shoppingTotal.apply("gettotal", shoppingTotal_gettotalResponse);
}
function shoppingTotal_gettotalResponse(total,exception) {
@@ -132,6 +140,7 @@ try {
catalog.apply("getcatalog", catalog_getcatalogResponse);
+ shoppingCart.apply("getemail", shoppingCart_getemailResponse);
shoppingCart.get("", shoppingCart_getResponse);
}
catch(e){
@@ -145,6 +154,7 @@ <body onload="init()">
<h1>Store</h1>
+<p>You're signed in as: <span id="email"></span><br/><a href="/_ah/login?continue=/store.html&action=Logout">Sign out</a></p>
<div id="store">
<h2>Catalog</h2>
<form name="catalogForm">
@@ -155,7 +165,7 @@ <br>
- <h2>Your Shopping Cart</h2>
+ <h2>Your Shopping Cart</h2>
<form name="shoppingCartForm">
<div id="shoppingCart"></div>
<br>
|