WAHtmlTest


Seaside-Examples-Test

Comment:



Hierarchy:

ProtoObject
Object
WAPresenter
WAComponent
WAHtmlTest

Summary:

instance variables:

booleanList message number

methods:

instance class
*SeasideTesting *SeasideTesting-override as yet unclassified no messages

Detail:

instance variables:

booleanList
message
number

instance methods:

*SeasideTesting
booleanList

	^booleanList
message

	^message
number

	^number

*SeasideTesting-override
renderCheckboxesOn: html
 
	html text: booleanList.
	html paragraph.
	html cssId: 'checkbox-form'.
	html
		form: [booleanList
				do: [:assoc | 
					html text: assoc key;
						 space.
					html cssId: 'cb-' , assoc key asString.
					html
						checkboxWithValue: assoc value
						callback: [:b | assoc value: b].
					html break].
			html submitButton]
renderRadioButtonsOn: html
 
	html text: booleanList.
	html paragraph.
	html cssId: 'radio-form'.
	html
		form: [booleanList
				do: [:assoc | 
					| group | 
					group _ html radioGroup.
					html text: assoc key;
						 space.
					html cssId: assoc key asString , '-on'.
					html
						radioButtonInGroup: group
						selected: assoc value
						callback: [assoc value: true].
					html cssId: assoc key asString , '-off'.
					html
						radioButtonInGroup: group
						selected: assoc value not
						callback: [assoc value: false].
					html break].
			html submitButton]
renderSelectsOn: html
 
	html text: number.
	html paragraph.
	html cssId: 'select-form'.
	html
		form: [html cssId: 'select-list'.
			html
				selectFromList: (1 to: 10)
				selected: number
				callback: [:i | number _ i].
			html submitButton]
renderSubmitButtonsOn: html
 
	html text: number.
	html paragraph.
	html cssId: 'button-form'.
	html
		form: [(1 to: 10)
				do: [:i | 
					html
						submitButtonWithAction: [number _ i]
						text: i.
					html space]]
renderTextAreaOn: html
 
	html cssId: 'textarea-form'.
	html
		form: [html cssId: 'textarea-banner'.
			html span: [html text: message].
			html paragraph.
			html cssId: 'textarea-message'.
			html
				textAreaWithValue: message
				callback: [:v | message _ v].
			html break; submitButton]
renderTextInputOn: html
 
	html cssId: 'textInput-form'.
	html
		form: [html cssId: 'textInput-banner'.
			html span: [html text: message].
			html paragraph.
			html cssId: 'text-message'.
			html
				textInputWithValue: message
				callback: [:v | message _ v].
			html submitButton]

as yet unclassified
allSelectors

	^ (self class selectors asSortedCollection select: [:s | s beginsWith: 'render'])
		remove: #renderContentOn:;
		yourself
initialize

	message _ 'Hello world!'.
	booleanList _ #(a b c d) collect: [:k | k -> ((Array with: true with: false) atRandom)].
	number _ 10 atRandom.
renderContentOn: html

	self allSelectors pairsDo:
		[:selA :selB |
		html divClass: 'row' with: [
			html divClass: 'left' with: [self perform: selA with: html].
			html divClass: 'left' with: [self perform: selB with: html]
		]]
renderZ: html

	html space
style

^ '
	div.row {clear: both}
	div.left {float: left; width: 45%; margin: 1%}
'

class methods:

^top


- made by Dandelion -