|
Class: WebDemoShop (in Demos)
Object
|
+--HTTPService
|
+--HTTPSelectorService
|
+--Demos::WebDemoShop
- Package:
- stx:goodies/webServer
- Category:
- Net-Communication-HTTP-Services-Demo-WebApplications
- Version:
- rev:
1.42
date: 2023/08/02 14:16:06
- user: stefan
- file: WebDemoShop.st directory: goodies/webServer
- module: stx stc-classLibrary: webServer
This is a very simple webShop demonstration.
Its main purpose is NOT to show a fancy WebInterface,
but instead:
how to maintain the concept of sessions (via cookies),
how to pass state via cookies, arguments, and form fields,
how to detect repost (try to repost an order)
[access with:]
http:<host>:<port>/Shop
copyrightCOPYRIGHT (c) 2003 by eXept Software AG
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
defaults
-
canChangeReplyPresenter
-
-
defaultAllowRobots
-
-
linkName
-
return the default linkName path (with slash)
image specs
-
addToCartImage
-
This resource specification was automatically generated
by the ImageEditor of ST/X.
Usage example(s):
self addToCartImage inspect
ImageEditor openOnClass:self andSelector:#addToCartImage
Icon flushCachedIcons
|
-
addToCartInImage
-
This resource specification was automatically generated
by the ImageEditor of ST/X.
Usage example(s):
self addToCartInImage inspect
ImageEditor openOnClass:self andSelector:#addToCartInImage
Icon flushCachedIcons
|
-
cartImage
-
This resource specification was automatically generated
by the ImageEditor of ST/X.
Usage example(s):
self cartImage inspect
ImageEditor openOnClass:self andSelector:#cartImage
Icon flushCachedIcons
|
-
cartInImage
-
This resource specification was automatically generated
by the ImageEditor of ST/X.
Usage example(s):
self cartInImage inspect
ImageEditor openOnClass:self andSelector:#cartInImage
Icon flushCachedIcons
|
-
inImage
-
This resource specification was automatically generated
by the ImageEditor of ST/X.
Usage example(s):
self inImage inspect
ImageEditor openOnClass:self andSelector:#inImage
Icon flushCachedIcons
|
-
removeFromCartImage
-
This resource specification was automatically generated
by the ImageEditor of ST/X.
Usage example(s):
self removeFromCartImage inspect
ImageEditor openOnClass:self andSelector:#removeFromCartImage
Icon flushCachedIcons
|
-
removeFromCartInImage
-
This resource specification was automatically generated
by the ImageEditor of ST/X.
Usage example(s):
self removeFromCartInImage inspect
ImageEditor openOnClass:self andSelector:#removeFromCartInImage
Icon flushCachedIcons
|
-
shopHomeImage
-
This resource specification was automatically generated
by the ImageEditor of ST/X.
Usage example(s):
self shopHomeImage inspect
ImageEditor openOnClass:self andSelector:#shopHomeImage
Icon flushCachedIcons
|
-
shopHomeInImage
-
This resource specification was automatically generated
by the ImageEditor of ST/X.
Usage example(s):
self shopHomeInImage inspect
ImageEditor openOnClass:self andSelector:#shopHomeInImage
Icon flushCachedIcons
|
queries-service
-
settingsApplicationClass
-
a SettingsApplication class - or nil (used in the settings dialog if non-nil)
accessing
-
customers
-
return the value of the instance variable 'customers' (automatically generated)
-
customers: something
-
set the value of the instance variable 'customers' (automatically generated)
-
shopID
-
return the value of the instance variable 'shopID' (automatically generated)
-
shopID: something
-
set the value of the instance variable 'shopID' (automatically generated)
initialization
-
addRequiredForeignServicesTo: anHTTPServer
-
I need a file service for the bitmaps and icons
-
id
-
self new id
-
initStyle
-
pageParameters at:#bodyColor put:'"#f6feff"'.
-
initWarehouse
-
-
initialize
-
misc
-
cookieName
-
-
customerFromRequest: aRequest
-
|session cookies customer shopId custId|
misc-html
-
shopBodyEndFor: aRequest
-
-
shopBodyStart: aString for: aRequest
-
Write a body with a headline
-
shopFooterIn: aRequest
-
aRequest nextPutLine:'<CENTER>';
-
shopHeaderIn: aRequest
-
-
shopNavigationFor: aRequest
-
-
shopPageParameters
-
-
shopReply: aString for: aRequest
-
queries-service
-
allowedMessages
-
-
defaultMessage
-
serving
-
addItem: aRequest
-
-
customer: customer reentersShop: aRequest
-
-
enterShop: aRequest
-
-
noCookies: aRequest
-
-
orderItem: aRequest
-
-
orderItemSubmit: aRequest
-
already processed - repost
-
reenterShop: aRequest
-
-
showItems: aRequest
-
settings persistency
-
settingSelectors
-
(comment from inherited method)
answer the selectors that are used to configure a service - i.e. those which are
saved in the webServer-settings file.
Article
Customer
Order
Warehouse
step1 - registration
self new registerServiceAs:'Shop'
step2 - open a browser (mozilla, netscape etc.)
navigate to:
/Shop
|aServer|
aServer := HTTPServer serverOnPort:8081.
self registerServiceOn:aServer.
|
|