ProtoObjectObjectWAHtmlAttributes
| associations |
| instance | class |
|---|---|
| accessing convenience dnu javascript printing private | no messages
|
| associations |
|---|
|
|
| accessing |
|---|
| at: keyString ifAbsentPut: errBlock |
^ self associations detect: [:ea | ea key = keyString] ifNone: [self associations add: keyString -> errBlock value] |
| at: keyString put: valueString |
self associations add: keyString -> valueString. |
| convenience |
|---|
| addClass: aString |
| assoc | assoc _ self associations detect: [:ea | ea key = 'class'] ifNone: [self associations add: 'class' -> aString. ^ self]. assoc value: (assoc value, ' ', aString) |
| alignBottom |
self at: 'valign' put: 'bottom' |
| alignCenter |
self at: 'align' put: 'center' |
| dnu |
|---|
| doesNotUnderstand: aMessage |
| argCount | argCount _ aMessage arguments size. argCount = 0 ifTrue: [^ self at: aMessage selector put: true]. argCount = 1 ifTrue: [^ self at: aMessage selector allButLast put: aMessage argument]. ^ super doesNotUnderstand: aMessage |
| javascript |
|---|
| submitOnChange |
self at: 'onChange' put: 'submit()' |
| submitOnClick |
self at: 'onClick' put: 'submit()' |
| printing |
|---|
| writeAttribute: assoc on: aStream |
assoc value = false ifFalse: [aStream nextPut: $ . aStream nextPutAll: assoc key asLowercase. aStream nextPutAll: '="'. assoc value = true ifFalse: [aStream nextPutAll: (WAAbstractHtmlBuilder encode: assoc value asString)] ifTrue: [aStream nextPutAll: assoc key asLowercase]. aStream nextPut: $"] |
| writeOn: aStream |
associations ifNotNil: [associations do: [:assoc | self writeAttribute: assoc on: aStream]]. |
| private |
|---|
| associations |
^ associations ifNil: [associations _ OrderedCollection new] |