eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'Demos::WebDemoShop':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: WebDemoShop (in Demos)


Inheritance:

   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

Description:


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

copyright

COPYRIGHT (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.

Class protocol:

defaults
o  canChangeReplyPresenter

o  defaultAllowRobots

o  linkName
return the default linkName path (with slash)

image specs
o  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

o  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

o  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

o  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

o  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

o  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

o  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

o  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

o  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
o  settingsApplicationClass
a SettingsApplication class - or nil (used in the settings dialog if non-nil)


Instance protocol:

accessing
o  customers
return the value of the instance variable 'customers' (automatically generated)

o  customers: something
set the value of the instance variable 'customers' (automatically generated)

o  shopID
return the value of the instance variable 'shopID' (automatically generated)

o  shopID: something
set the value of the instance variable 'shopID' (automatically generated)

initialization
o  addRequiredForeignServicesTo: anHTTPServer
I need a file service for the bitmaps and icons

o  id
self new id

o  initStyle
pageParameters at:#bodyColor put:'"#f6feff"'.

o  initWarehouse

o  initialize

misc
o  cookieName

o  customerFromRequest: aRequest
|session cookies customer shopId custId|

misc-html
o  shopBodyEndFor: aRequest

o  shopBodyStart: aString for: aRequest
Write a body with a headline

o  shopFooterIn: aRequest
aRequest nextPutLine:'<CENTER>';

o  shopHeaderIn: aRequest

o  shopNavigationFor: aRequest

o  shopPageParameters

o  shopReply: aString for: aRequest

queries-service
o  allowedMessages

o  defaultMessage

serving
o  addItem: aRequest

o  customer: customer reentersShop: aRequest

o  enterShop: aRequest

o  noCookies: aRequest

o  orderItem: aRequest

o  orderItemSubmit: aRequest
already processed - repost

o  reenterShop: aRequest

o  showItems: aRequest

settings persistency
o  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.


Private classes:

    Article
    Customer
    Order
    Warehouse

Examples:


step1 - registration self new registerServiceAs:'Shop' step2 - open a browser (mozilla, netscape etc.) navigate to: /Shop
|aServer|

aServer := HTTPServer serverOnPort:8081.
self registerServiceOn:aServer.


ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Mon, 18 Nov 2024 06:51:59 GMT