WAStoreItemView
Seaside-Examples-Store
Comment:
A component for viewing an individual WAStoreItem. The caller must provide #item: and also the current #cart:. Shows the description and price info for the item, and presents two buttons: "Add to Cart", which will add the item to the cart, once, and "Done", which will answer back to the caller. Used by WAStoreFillCart>>displayItem: and displayItems:.
Hierarchy:
ProtoObject
Object
WAPresenter
WAComponent
WAStoreItemView
Summary:
instance variables:
methods:
Detail:
instance variables:
instance methods:
| as yet unclassified |
| addToCart
|
cart add: item
|
| cart: aCart
|
cart _ aCart
|
| item: anItem
|
item _ anItem
|
| renderContentOn: html
|
html heading: item title.
html heading: item subtitle level: 3.
html paragraph: item description.
html italic: item price printStringAsCents.
html form: [
html submitButtonWithAction: [self addToCart] text: 'Add To Cart'.
html space.
html submitButtonWithAction: [self answer] text: 'Done'.
]
|
| updateUrl: aUrl
|
aUrl addToPath: item name
|
class methods:
^top
- made by Dandelion -