summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/samples/store-gae/htdocs/index.html
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-07-17 22:44:52 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-07-17 22:44:52 +0000
commitc59c7ef6db1f5c6458109f0627a8853c7f162f80 (patch)
treeb2f9af2724b28f09746e9143ad12496206f8f838 /sca-cpp/trunk/samples/store-gae/htdocs/index.html
parentc8dd567ff6ea5b0fa2296b3819fb138e8ccc2b93 (diff)
Support the host property and a /logout URL on WSGI servers.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@965145 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/samples/store-gae/htdocs/index.html')
-rw-r--r--sca-cpp/trunk/samples/store-gae/htdocs/index.html11
1 files changed, 10 insertions, 1 deletions
diff --git a/sca-cpp/trunk/samples/store-gae/htdocs/index.html b/sca-cpp/trunk/samples/store-gae/htdocs/index.html
index e880285f23..2f61b1f946 100644
--- a/sca-cpp/trunk/samples/store-gae/htdocs/index.html
+++ b/sca-cpp/trunk/samples/store-gae/htdocs/index.html
@@ -51,6 +51,14 @@ function catalog_getcatalogResponse(items, exception) {
catalogItems = items;
}
+function shoppingCart_gethostResponse(host, exception) {
+ if (exception) {
+ alert(exception.message);
+ return;
+ }
+ document.getElementById('host').innerHTML = host;
+}
+
function shoppingCart_getemailResponse(email, exception) {
if (exception) {
alert(exception.message);
@@ -131,6 +139,7 @@ function init() {
try {
catalog.apply("getcatalog", catalog_getcatalogResponse);
shoppingCart.apply("getemail", shoppingCart_getemailResponse);
+ shoppingCart.apply("gethost", shoppingCart_gethostResponse);
shoppingCart.get("", shoppingCart_getResponse);
} catch(e){
alert(e);
@@ -141,7 +150,7 @@ function init() {
<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>
+<p>Welcome to: <span id="host"></span>, you're signed in as: <span id="email"></span><br/><a href="/logout">Sign out</a></p>
<div id="store">
<h2>Catalog</h2>
<form name="catalogForm">