WABrowser


Seaside-Components-Tools

Comment:



Hierarchy:

ProtoObject
Object
WAPresenter
WAComponent
WABrowser

Summary:

instance variables:

contents message model

methods:

instance class
accessing actions notifying rendering as yet unclassified

Detail:

instance variables:

contents
message
model

instance methods:

accessing
contents

	^contents
contents: aString

	contents _ aString
initialize

	self model: Browser new.
model

	^model 
model: aBrowserModel

	model _ aBrowserModel.
	model addDependent: self.
	self session registerObjectForBacktracking: model.
	contents _ model contents.
renderContentOn: html

	self
		renderColumnsOn: html;
		renderModeButtonsOn: html;
		renderMessageOn: html;
		renderContentPaneOn: html
	
renderContentPaneOn: html

	html form: [
		html
			textAreaOn: #contents of: self;
			break;
			submitButtonOn: #accept of: self.
	]
showClass

	self model indicateClassMessages
showHelp

	self model plusButtonHit
showInstance

	self model indicateInstanceMessages

actions
accept

	|save|
	SeasidePlatformSupport ensureAuthorInitials: [self request: 'Please enter your initials:'].
	message _ nil.
	save _ contents.
	model contents: contents notifying: self.
	contents _ save.
update: aSymbol

	contents _ model contents

notifying
notify: aString at: location in: sourceStream

	message _ aString allButLast: 3
select

selectFrom: aPos to: anotherPos

selectionInterval

	^ 1 to: 1
text

	^ Text fromString: ''

rendering
columnView: columnName

	^WAPluggableSelectBox
		on: model
		list: (columnName, 'List') asSymbol
		selected: (columnName, 'ListIndex') asSymbol
		changeSelected: (columnName, 'ListIndex:') asSymbol
renderColumnsOn: html

	|cols|
	cols _ #(systemCategory class messageCategory message)
				collect: [:sel | self columnView: sel].

	html table: [
		html tableRow: [
			cols do: [:ea | html tableData: [html render: ea]].
		]
	]
renderMessageOn: html

	message ifNotNil: [html bold: message]
renderModeButtonsOn: html

	html form: [
		html
			submitButtonWithAction: [ self showInstance ] text: 'instance';
			submitButtonWithAction: [ self showHelp ] text: 'help';
			submitButtonWithAction: [ self showClass ] text: 'class' ]
style


	^ '

	#contents {width: 80%; height: 200px; font-family: serif; font-size: 12pt}

	'

class methods:

as yet unclassified
fullOnClass: aClass

	^ self new model: (Browser new setClass: aClass selector: nil)

^top


- made by Dandelion -