I am an abstract decoration around instances of WAComponent. I can be added to aComponent by calling #addDecoration: and I change the basic behaviour or look of a component. There are several methods that can be overriden to archive this: - #renderContentOn: to emit xhtml around the decorated component. Call #renderOwnerOn: to let the owner emit its output. - #processChildCallbacks: to intercept the callback processing of the owner. - #handleAnswer: to intercept the answer processing.
ProtoObjectObjectWAPresenterWADecoration
| next |
| instance | class |
|---|---|
as yet unclassified
|
no messages
|
| next |
|---|
|
| as yet unclassified |
|---|
| component |
^ self owner isDecoration ifTrue: [self owner component] ifFalse: [self owner] |
| handleAnswer: anObject |
(self owner handleAnswer: anObject) ifFalse: [self handleAnswer: anObject continueWith: [^ false]]. ^ true |
| handleAnswer: anObject continueWith: aBlock |
aBlock value |
| isDecoration |
^ true |
| isDelegation |
^ false |
| isGlobal |
^ false |
| isLocal |
^ (self isGlobal or: [self isDelegation]) not |
| nextPresentersDo: aBlock |
aBlock value: self owner |
| owner |
^ next ifNotNil: [next contents] |
| owner: aPresenter |
next ifNil: [next _ WAStateHolder new]. next contents: aPresenter |
| remove |
self component removeDecoration: self |
| rendering |
|---|
| renderOwnerOn: html |
self owner ifNotNilDo: [:owner | owner renderWithContext: html context] |