|
Class: WebDemoShop (in Demos)
Object
|
+--HTTPService
|
+--HTTPSelectorService
|
+--Demos::WebDemoShop
- Package:
- stx:goodies/webServer
- Category:
- Net-Communication-HTTP-Services-Demo-WebApplications
- Version:
- rev:
1.38
date: 2019/03/07 09:26:21
- user: stefan
- file: WebDemoShop.st directory: goodies/webServer
- module: stx stc-classLibrary: webServer
- Author:
- Claus Gittinger
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
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
-
Article
Customer
Order
Warehouse
Demos::HTTPDemoShop registerServiceIn:(HTTPServer runningServers first) as:'TestShop'
step1 - registration
self new registerServiceAs:'Shop'
step2 - open a browser (mozilla, netscape etc.)
navigate to:
/Shop
|aServer|
aServer := HTTPServer serverOnPort:8081.
self registerServiceIn:aServer.
|
|