WASimpleNavigation


Seaside-Components-Frames

Comment:

I'm a simple tab panel, that can be styled with stylesheets. New tabs can be added using #add:label:

Hierarchy:

ProtoObject
Object
WAPresenter
WAComponent
WANavigation
WASimpleNavigation

Summary:

instance variables:

components

methods:

instance class
accessing behavior initialize rendering example

Detail:

instance variables:

components

instance methods:

accessing
children

	^Array with: self selectedComponent.
labels

	"Return the tabs labels"

	^ self options
options

	^ components collect: [:ea | ea key]
selectedComponent

	^ (components detect: [:ea | ea key = self selection] ifNone: [^ nil]) value

behavior
add: aComponent label: aString

	components add: aString -> aComponent

initialize
initialize

	super initialize.
	components _ OrderedCollection new

rendering
renderSelectionOn: html

	html render: self selectedComponent

class methods:

example
example

	^self new
		add: WACounter example label: 'Counter'; 
		add: WAPath example label: 'Path';
		select: 'Counter';
		yourself.

^top


- made by Dandelion -