Seaside2

Amb
An Amb is xxxxxxxxx.
Instance Variables
failureContinuation: <Object>
failureContinuation
- xxxxx
allValues:
assert:
Throw an assertion error if aBlock does not evaluates to true.
deny:
fail
initialize
Subclasses should redefine this method to perform initializations on instance creation
maybe
new
oneOf:
valueOf:or:
valueOf:or:or:
valueOfOneOf:
AmbTest
An AmbTest is xxxxxxxxx.
Instance Variables
amb: <Object>
amb
- xxxxx
pickANumber
pickANumberGreaterThan:
setUp
testAllValuesAboveFive
testMaybe
testPickANumber
testPickANumberAboveFive
testSicpLogicProblem
Baker, Cooper, Fletcher, Miller, and Smith live on different floors of an apartment house that contains only five floors. Baker does not live on the top floor. Cooper does not live on the bottom floor. Fletcher does not live on either the top or the bottom floor. Miller lives on a higher floor than does Cooper. Smith does not live on a floor adjacent to Fletcher's. Fletcher does not live on a floor adjacent to Cooper's. Where does everyone live?
testSicpLogicProblemFaster
Baker, Cooper, Fletcher, Miller, and Smith live on different floors of an apartment house that contains only five floors. Baker does not live on the top floor. Cooper does not live on the bottom floor. Fletcher does not live on either the top or the bottom floor. Miller lives on a higher floor than does Cooper. Smith does not live on a floor adjacent to Fletcher's. Fletcher does not live on a floor adjacent to Cooper's. Where does everyone live?
testSolveAnEquation
AnswerContinuation
An AnswerContinuation is xxxxxxxxx.
Instance Variables
Continuation
A Continuation is xxxxxxxxx.
Instance Variables
values: <Object>
values
- xxxxx
current
currentDo:
fromContext:
initializeFromContext:
numArgs
restoreValues
terminate:
value
value:
Invoke the continuation and answer anObject as return value.
valueWithArguments:
ContinuationTest
A ContinuationTest is xxxxxxxxx.
Instance Variables
tmp: <Object>
tmp2: <Object>
tmp
- xxxxx
tmp2
- xxxxx
callcc:
testBlockEscape
testBlockTemps
testBlockVars
testComprehension
What should this print out?
| yin yang |
yin := [ :x | Transcript cr. x ] value: Continuation current.
yang := [ :x | Transcript nextPut: $*. x ] value: Continuation current.
yin value: yang
testMethodTemps
testReentrant
testSimpleCallCC
testSimplestCallCC
EscapeContinuation
An EscapeContinuation is xxxxxxxxx.
Instance Variables
ResponseContinuation
A ResponseContinuation is xxxxxxxxx.
Instance Variables
Seaside2Info
A Seaside2Info is xxxxxxxxx.
Instance Variables
initialize
Subclasses should redefine this method to perform initializations on instance creation
packageName
systemCategoryPrefix
SeasideAddonVWInfo
A SeasideAddonVWInfo is xxxxxxxxx.
Instance Variables
ignoredCategories
name
Answer a name for the receiver. This is used generically in the title of certain inspectors, such as the referred-to inspector, and specificially by various subsystems. By default, we let the object just print itself out..
namespace
needsNamespace
SeasideDolphinInfo
A SeasideDolphinInfo is xxxxxxxxx.
Instance Variables
addonName
classes
Answer aCollection containing all the classes of receiver.
ignoredCategories
Answer a collection of the categories ignored by receiver.
ignoredClasses
Answer a collection of the receiver ignored classes.
methodCategoryPrefix
name
Answer the name of the receiver package.
needsNamespace
Answer whether receiver needs a namespace during fileout.
prerequisites
Answer a collection with the names of the prerrequisite packages.
SeasidePlatformSupport
A SeasidePlatformSupport is xxxxxxxxx.
Instance Variables
addToShutDownList:
addToStartUpList:
addToStartUpList:after:
asMethodReturningByteArray:named:
asMethodReturningByteArrayLiteral:named:
asMethodReturningByteArrayWithCache:named:
base64Decode:
commentCoverageFor:on:
compile:into:classified:
contentsOfFile:binary:
convertToSmalltalkNewlines:
defaultDispatcherName
defaultRSSGeneratorString
deliverMailFrom:to:text:
doTransaction:
emailAddressFor:
ensureAuthorInitials:
ensureExistenceOfFolder:
filesIn:
ifDefined:do:
imageName
isProxy:
isSqueak
localNameOf:
methodsOf:
mimeDocumentClass
mimeDocumentOfType:from:
openDebuggerOn:
randomClass
readWriteStream
recentChanges
reducedConflictDictionary
removeSelector:from:
request:
request:initialAnswer:
requestor
returns the focused window's requestor
semaphoreClass
shortImageName
smtpServer
tempsAndValuesIn:do:
terminateProcess:
useByteArrayLiterals
versionString
vmStatisticsReportString
walkbackStringsFor:
weakDictionaryOfSize:
withName:withPriority:fork:
write:toFile:inFolder:
SeasideVWInfo
A SeasideVWInfo is xxxxxxxxx.
Instance Variables
addonName
ignoredCategories
methodCategoryPrefix
name
Answer a name for the receiver. This is used generically in the title of certain inspectors, such as the referred-to inspector, and specificially by various subsystems. By default, we let the object just print itself out..
needsNamespace
WAAbstractTextAreaTag
An abstract class to describe the HTML elements that allow the user to enter text.
callback:
exampleText:
setCursorPosition:
setSelectionFrom:to:
Insert the javascript for setting the selection
WAActionCallback
A WAActionCallback is xxxxxxxxx.
Instance Variables
block: <Object>
block
- xxxxx
block:
evaluateWithArgument:
isEnabled
priority
signalRenderNotification
WAAllTests
If you want to see these examples:
/seaside/config app:
- add a new application named "tests"
- choose WAAllTests as the root component
canBeRoot
children
This method is really important. It should return a collection of all subcomponents of the current component that will be rendered in #renderContentOn:. Components that are displayed using #call: are *not* children.
If the contents returned by this method change over time make sure to return them in #states as well, otherwise the back button will fail.
description
initialize
Subclasses should redefine this method to perform initializations on instance creation
initializeTests
renderContentOn:
states
Answer a collection of states that should be backtracked.
WAAlphabeticBatchedList
WAAlphabeticBatchedList organizes a collection of items into pages for display. A page contains all items whose string representation (item displayString) starts with the same character. WAAlphabeticBatchedList only displays the navigation (alphabet with links) for the list. Your code needs to display the current page.
Use WAAlphabeticBatchedList>>items: to set the collections of items.
Use WAAlphabeticBatchedList>>batch to get the items to display on the current page
See WABatchTest for example of usage.
Select "Batch" tab of the Functional Seaside Test Suite to run an example (http://127.0.0.1:xxxx/seaside/tests/alltests)
Instance Variables:
currentPage <Character> the character of the curent page
items <(Collection of: (Object ))> collection of the items managed by WAAlphabeticBatchedList. Collection is sorted before items are displayed.
allPages
batch
currentPage
currentPage:
isOnFirstPage
isOnLastPage
items
items:
nextPage
previousPage
renderContentOn:
renderNextOn:
renderPagesOn:
renderPreviousOn:
states
Answer a collection of states that should be backtracked.
validPages
WAAnchorTag
I'm the class responsible for adding anchors (links) to your webpage. There are multiple ways of using me.
1. In the following case, the method #doSomethingOnClick will be sent to self when the user click on the anchor 'Click here to do something':
html anchor
callback: [ self doSomethingOnClick ];
with: 'Click here to do something'.

The following code is a shortcut to create an anchor. The executed action is #doSomethingOnClick and the text is 'Do Something On Click':
html anchor
on: #doSomethingOnClick of: self
2. In the following case, a link to an external resource will be generated:
html anchor
url: 'http://www.seaside.st';
with: 'Visit the Seaside'
callback:
canHaveShortcut
document:
document:mimeType:
document:mimeType:fileName:
extraParameters:
extraPath:
fragment:
ignoreURL
does nothing when clicked
mailto:
name:
navigation
Makes the receiving anchor a purely navigational link, this is it won't redirect after processing the callbacks but directly process with the render phase. Don't use this feature if you change your model in the callback'.
newTarget
on:of:
rel:
relationship:
resourceUrl:
submitFormNamed:
Submit the form with the id aString and evaluate the callback of the receiver. Note that this code might break, if custom URL parameters are introduced.
tag
target:
text:
url
url:
with:
Render anObject into the receiver. Make sure that you call #with: last in the cascade, as this method will serialize the tag onto the output document.
WAAnswerHandler
A WAAnswerHandler is xxxxxxxxx.
Instance Variables
block: <Object>
block
- xxxxx
block:
handleAnswer:continueWith:
WAApplication
WAApplication is the starting point for a Seaside application. When a WAComponent is registered as a top level component a WAApplication object is added to a WADispatcher. The dispatcher forwards all requests to the WAApplication, which in turn forwards them to the correct WASession object. WAApplication's parent class WARegistry maintains a list of all active sessions to the application.
"configuration" contains a chain of WAConfituration classes that define attributes of the application. The attribute "rootComponent", for example, defines the top level WAComponent class for the application. The configuration chain includes WAUserConfiguration, WAGlobalConfiguration, WARenderLoopConfiguration and WASessionConfiguration. Other configurations can be added to the chain when the top level application is registered with a dispatcher. (See below)
"libraries" is a collection of WALibrary classes, which are used to serve css, javascript and images used by the application. These may be in methods or in files. Sometimes these libraries are replaced by static files served by Apache. See WAFileLibrary class comment for more information.
Registering an Application.
An application can be registered with a dispatcher by using the Seaside configuration page or via code. Below MyComponent is a subclass of WAComponent. The following registers the component as an application, gives some values to attributes (or preferences) and adds a library and a configuration.
MyComponent class>>initialize
"self initialize"
| application |
application := self registerAsApplication: 'sample'.
application preferenceAt: #sessionClass put: Glorp.WAGlorpSession.
application addLibrary: SampleLibrary.
application configuration addAncestor: GlorpConfiguration new.
application preferenceAt: #glorpDatabasePlatform put: Glorp.PostgreSQLPlatform.
application preferenceAt: #databaseServer put: '127.0.0.1'.
application preferenceAt: #databaseConnectString put: 'glorptests'.
MyComponent>>someInstanceMethod
"example of how to access attributes (preferences)"
self session application preferenceAt: #glorpDatabasePlatform
addLibrary:
baseUrl
configuration
configurationComponent
Return an initialized component that can configure the receiver,
return nil if no configuration is supported
defaultAncestor
defaultLibraries
deploymentMode
description
Answer a descriptive text of the receiver.
handleDefaultRequest:
handleExpiredRequest:
handleRequest:
Handle aRequest and answer a response.
handlerCookieName
isApplication
isDeployed
libraries
login
password
postCopy
self is a shallow copy, subclasses should copy fields as necessary to complete the full copy
preferenceAt:
preferenceAt:put:
redirectHandler
removeLibrary:
resourceBaseUrl
rootComponent
serverHostname
serverPath
serverPort
serverProtocol
sessionClass
sessionExpirySeconds
updateRoot:
updateUrl:
useSessionCookie
writeLibrariesToDisk
Write to disk all the librares of the receiver in a subfolder of the Smalltalk image folder.
see WALibrary >> writeToDisk for more information.
WAApplicationEditor
A WAApplicationEditor is xxxxxxxxx.
Instance Variables
application: <Object>
library: <Object>
application
- xxxxx
library
- xxxxx
addLibrary
allLibraries
application:
libraryOptions
renderContentOn:
renderFormOn:
renderLibrariesOn:
WAAttributesTest
A WAAttributesTest is xxxxxxxxx.
Instance Variables
attributes: <Object>
attributes
- xxxxx
assert:gives:
setUp
testAddClass
testAddStyle
testAt
testAtAppend
testAtPut
testCaseSensititve
testOrder
testRemoveKey
WAAuthConfiguration
A WAAuthConfiguration is xxxxxxxxx.
Instance Variables
ancestors
attributes
mainClass
WAAuthMain
A WAAuthMain is xxxxxxxxx.
Instance Variables
createRoot
verifyPassword:forUser:
WABacktrackingTest
A WABacktrackingTest is xxxxxxxxx.
Instance Variables
testArray
testDictionary
testHolder
testOrderedCollection
testSet
WABaseElement
A WABaseElement is xxxxxxxxx.
Instance Variables
tag
target:
url:
WABasicAuthentication
WABasicAuthentication password protects its component using the standard Http basic authentication, which passes usernames & passwords in clear text. You must set the authenticator, which validates usernames and passwords.
Seaside has a number of ways to authenticate a user: WAComponent>>registerAsAuthenticatedApplication:, WAAuthMain, WAAuthConfiguration. One can also use a task or a session to authenticate. These methods can be used to authenicate a session or application rather than a single component.
Instance Variables:
authenticator <Authenticator> Any object that implements the method verifyPassword:forUser:
realm <String> An http realm is a string used to identify a set of pages that are convered by the same login
authenticator:
isGlobal
processChildCallbacks:
realm
realm:
respondWithChallenge
updateRoot:
This method allows you customize the <head> section of an HTML document. The API is very similar to the 'Canvas API' for rendering in the <body> section (where you 'draw' in #renderContentOn:).
anHtmlRoot is an instance of WAHtmlRoot
Whenever you override this method don't forget to send super
verifyRequest:
WABatchSelection
WABatchSelection displays a list of objects. The list is show N (currently 8) items per page, with links to navigate to other pages if needed. Objects in the list must implement one method that returns text description of the item and one method that returns a name or label used as the link users click to select the item. The text description is displayed below the link.
Example
items := OrderedCollection new.
1 to: 20 do: [:each | items add: (Contact new name: each; phoneNumber: '54321';yourself)].
selection := WABatchSelection items: items link: #name text: #phoneNumber.
result := self call: selection.
where the Contact class has methodsinstance vars "phoneNumber" and "name", with
setter & getter methods.
Instance Variables:
batcher <WABatchedList> description of batcher
linkSelector <Symbol> method sent to items in list for link text
textSelector <Symbol> method sent to items in list for text description
batchSize
batchSize:
children
This method is really important. It should return a collection of all subcomponents of the current component that will be rendered in #renderContentOn:. Components that are displayed using #call: are *not* children.
If the contents returned by this method change over time make sure to return them in #states as well, otherwise the back button will fail.
choose:
items:
items:link:text:
linkSelector:
renderContentOn:
textSelector:
WABatchTest
A WABatchTest is xxxxxxxxx.
Instance Variables
batcher: <Object>
batcher
- xxxxx
children
This method is really important. It should return a collection of all subcomponents of the current component that will be rendered in #renderContentOn:. Components that are displayed using #call: are *not* children.
If the contents returned by this method change over time make sure to return them in #states as well, otherwise the back button will fail.
initialize
Subclasses should redefine this method to perform initializations on instance creation
renderContentOn:
WABatchedList
WABatchedList helps display a collection of items across multiple pages. WABatchedList organizes a collection into pages (or batches) of batchSize items each and renders navigation links for a user to moved between pages. WABatchedList>>batch returns the items to display in the current page or batch. Your code has to display the items.
See WABatchSelection for example of usage.
Instance Variables:
batchSize <Integer> number of items to display on a single page
currentPage <Integer> index of current page, starts a 1
items <SequenceableCollection of Objects> objects organized into pages for display
batch
batchSize
batchSize:
currentPage
currentPage:
endIndex
example
initialize
Subclasses should redefine this method to perform initializations on instance creation
isOnFirstPage
isOnLastPage
items
items:
maxPages
nextPage
pageRange
pageRangeEnd
pageRangeStart
previousPage
renderContentOn:
renderNextOn:
renderPagesOn:
renderPreviousOn:
startIndex
states
Answer a collection of states that should be backtracked.
WABooleanAttribute
WABooleanAttribute represents a boolean attribute. It converts between text entered on the configuration page and boolean values.
accept:with:
valueFromString:
WABreakTag
The BR element forcibly breaks (ends) the current line of text. Authors are advised to use style sheets to control text flow around floating images and other objects.
Prohibiting a line break
Sometimes authors may want to prevent a line break from occurring between two words. The &nbsp; entity (&#160; or &#xA0;) acts as a space where user agents should not cause a line break.
isClosed
Answer true if this tag should be closed immediately, such as <br />.
tag
WABrowser
A WABrowser is xxxxxxxxx.
Instance Variables
contents: <Object>
message: <Object>
model: <Object>
contents
- xxxxx
message
- xxxxx
model
- xxxxx
accept
columns
contents
contents:
description
fullOnClass:
fullOnClass:selector:
initialRequest:
When a new session is started, all visible presenters (components or tasks) receive this message with the request as argument.
A common usage for this is to initialize their state depending on the URL of the request. This is one building block for bookmarkable URL. The other is updateUrl: where you can manipulate the anchor urls generated by Seaside.
You can not use #call: in here. Consider using a WATask instead and sending #call: in #go.
See WABrowser for examples.
initialize
Subclasses should redefine this method to perform initializations on instance creation
model
model:
notify:at:in:
renderColumnsOn:
renderContentOn:
renderContentPaneOn:
renderMessageOn:
renderModeButtonsOn:
select
selectFrom:to:
selectionInterval
showClass
showHelp
showInstance
states
Answer a collection of states that should be backtracked.
style
Returns a CSS stylesheet associated with this component. This stylesheet will be added to <head> section of the html document so it will be global and not scoped.
This is done for all visible components (see class comment of WAComponent for what visible means).
Nice for demos but consider using WAFileLibrary or exernal files instead.
text
update:
Receive a change notice from an object of whom the receiver is a
dependent. The default behavior is to do nothing; a subclass might want
to change itself in some way.
updateUrl:
WABrowserHaloPlugin
I open a browser on the component class.
execute
Execute the receiving plugin.
label
Answer the menu label of the plugin.
priority
Answer a number used to sort the receiver. A lower number means it appears earlier on.
tooltip
Answer a tooltip string that is displayed on the plugin link or button.
WABrush
I represent a brush to be used on a *WACanvas*.
Instance Variables
canvas: The canvas instance I am used with.
parent: The parent brush I am used within.
closed: Wether I have been closed/flushed yet.
close
Close and flush the receiver onto the canvas and its associated document.
initialize
Subclasses should redefine this method to perform initializations on instance creation
labelForSelector:of:
new
parent
setParent:canvas:
with:
WABug0073Test
http://code.google.com/p/seaside/issues/detail?id=73
testNoRootComponent
testWithRootComponent
WAButtonTag
Buttons created with the BUTTON element function just like buttons created with the INPUT element, but they offer richer rendering possibilities: the BUTTON element may have content. For example, a BUTTON element that contains an image functions like and may resemble an INPUT element whose type is set to "image", but the BUTTON element type allows content.
bePush
Creates a push button. Push buttons have no default behavior. Each push button may have client-side scripts associated with the element's event attributes. When an event occurs (e.g., the user presses the button, releases it, etc.), the associated script is triggered.
beReset
Creates a reset button. When activated it resets all controls to their initial values.
beSubmit
Creates a submit button. When activated, a submit button submits a form. A form may contain more than one submit button. This is the default.
callback:
canHaveShortcut
initialize
Subclasses should redefine this method to perform initializations on instance creation
isClosed
Answer true if this tag should be closed immediately, such as <br />.
on:of:
tag
type
value
value:
with:
Render anObject into the receiver. Make sure that you call #with: last in the cascade, as this method will serialize the tag onto the output document.
WAButtonTest
A WAButtonTest is xxxxxxxxx.
Instance Variables
input: <Object>
input
- xxxxx
initialize
Subclasses should redefine this method to perform initializations on instance creation
input
input:
renderContentOn:
renderInputOn:
renderPushOn:
renderResetOn:
renderSubmitOn:
WACacheTest
A WACacheTest is xxxxxxxxx.
Instance Variables
renderActionsOn:
renderContentOn:
renderStatisticsOn:
WACachedDocument
This class is for serving smallish files like PNG images etc using WADocumentHandler. Using the Canvas API for HTML generation you simply do this:
html image fileName: 'myimage.png'
or:
html image fileName: 'myimage.blurp' mimeType: 'blurp'
This will create a request handler in your WAApplication registry that is accessible on a unique URL and does not expire.
The actual contents of the file will only be read upon first access, we could augment this class with smarter caching, like checking the modification time on disk.
The class has a Cache class var holding a Dictionary of created instances so you can clear and preload files into the image using:
WACachedDocument
clearCache;
fileName: 'myimage.png';
fileName: 'another.gif'; "etc"
preloadCache
=
Currently we do not take file modification time on disk into account.
asMIMEDocument
asMIMEDocumentType:
Lazy caching.
clearCache
fileName:
fullFileName
fullFileName:
hash
Currently we do not take file modification time on disk into account.
Note that mimeType and mimeDocument are set lazily later, so we can't use
the mimeType in the hash.
initialize
Subclasses should redefine this method to perform initializations on instance creation
mimeType
mimeType:
preloadCache
WACallback
A WACallback is xxxxxxxxx.
Instance Variables
context: <Object>
key: <Object>
owner: <Object>
context
- xxxxx
key
- xxxxx
owner
- xxxxx
<=
context
convertKey:
evaluateWithArgument:
evaluateWithField:
isEnabled
key
owner
priority
session
setContext:owner:key:
valueForField:
WACallbackRegistry
A WACallbackRegistry is xxxxxxxxx.
Instance Variables
context: <Object>
owner: <Object>
context
- xxxxx
owner
- xxxxx
context:owner:
initializeWithContext:owner:
owner
registerActionCallback:
registerAjaxCallback:
registerCallback:
registerCancelActionCallback:
registerDefaultActionCallback:
registerDispatchCallback
registerImageCallback:
registerMultiDispatchCallback
storeCallback:
WACallbackStream
A WACallbackStream is xxxxxxxxx.
Instance Variables
callbacks: <Object>
request: <Object>
callbacks
- xxxxx
request
- xxxxx
atEnd
callbacks:request:
initializeWithCallbacks:request:
position
processCallbacksWithOwner:
upToEnd
WACallbackTest
A WACallbackTest is xxxxxxxxx.
Instance Variables
counter: <Object>
transcript: <Object>
counter
- xxxxx
transcript
- xxxxx
children
This method is really important. It should return a collection of all subcomponents of the current component that will be rendered in #renderContentOn:. Components that are displayed using #call: are *not* children.
If the contents returned by this method change over time make sure to return them in #states as well, otherwise the back button will fail.
initialize
Subclasses should redefine this method to perform initializations on instance creation
renderContentOn:
WACancelActionCallback
A WACancelActionCallback is xxxxxxxxx.
Instance Variables
priority
WACancelButtonTag
A WACancelButtonTag is xxxxxxxxx.
Instance Variables
callback:
WACanvas
This is the superclass of all canvas. It's a rendering interfact that generates brushes (see WABrush).
Subclass this class, if you want to generate an XML dialect.
brush:
builder
flush
insert:
nest:
render:
WACanvasBrushTest
A WACanvasBrushTest is xxxxxxxxx.
Instance Variables
assert:gives:
testAnchorTag
testAnchorTagWithUrl
testBasicNesting
testBreakTag
testButton
testCancelButton
testCanvasHtml
testCanvasNil
testCanvasText
testCanvasWithLineBreaks
testCanvasWithLineBreaksAndUrls
testCanvasWithUrls
testCheckboxTag
testClosingTimes
testComplexTable
testCoreAttributesClass
testCoreAttributesId
testCoreAttributesStyle
testCoreAttributesTitle
testEditTag
testEventAttributes
testExtendedNesting
testFieldSetTag
testHeadingTag
testHorizontalRuleTag
testImageButton
testKeyboardAttributes
testLabelTag
testMultiSelectTag
testOrderedListTag
testParagraphTag
testParameterTag
testPasswordInput
testScriptTag
testSelectTag
testSubmitButton
testSymbolRendering
testTextArea
testTextInput
testUnorderedListTag
WACanvasTableTest
A WACanvasTableTest is xxxxxxxxx.
Instance Variables
entities
exchangeRates
renderContentOn:
renderCurrencyTableBodyOn:
renderCurrencyTableHeadOn:
renderCurrencyTableOn:
renderEntityTableBodyOn:
renderEntityTableColumnGroupsOn:
renderEntityTableFootOn:
renderEntityTableHeadOn:
renderEntityTableOn:
style
Returns a CSS stylesheet associated with this component. This stylesheet will be added to <head> section of the html document so it will be global and not scoped.
This is done for all visible components (see class comment of WAComponent for what visible means).
Nice for demos but consider using WAFileLibrary or exernal files instead.
WACheckboxTag
A WACheckboxTag is xxxxxxxxx.
Instance Variables
callback: <Object>
value: <Object>
callback
- xxxxx
value
- xxxxx
after
This template method is called directly after rendering the content of the receiver.
callback:
canHaveShortcut
onTrue:onFalse:
type
value:
WAChoiceDialog
WAChoiceDialog produces a form with select tag (dropdown menu) on a collection of options and "Ok" and "Cancel" buttons. Options can be any object. Returns actual object selected or nil if user select "Cancel". WAChoiceDialog is used to implement the chooseFrom:caption: convenience method in WAComponent.
| selection |
selection := WAChoiceDialog options: #('Smalltalk' 'Perl' 'Python' 'Ruby' 9).
result := self call: selection.
self inform: result printString
Instance Variables:
options <Collection of Objects> objects in list
selection <Object> object selected by user or nil if user cancels
buttons
cancel
example
ok
options
options:
renderContentOn:
WAClassnameHaloPlugin
I display the class name of the component class.
priority
Answer a number used to sort the receiver. A lower number means it appears earlier on.
renderOn:
A default render method to display the interface of the receiving plugin. Might be overriden with specific behavior in subclasses.
WAClosingConditionalComment
A WAClosingConditionalComment is xxxxxxxxx.
Instance Variables
encodeOn:
WAClosingRevealedConditionalComment
A WAClosingRevealedConditionalComment is xxxxxxxxx.
Instance Variables
encodeOn:
WAClosureTest
A WAClosureTest is xxxxxxxxx.
Instance Variables
ensure
go
renderContentOn:
WACollectionTag
This element allows the use to select one (in single selection mode) or multiple (in single selection mode) elements. Multiple selection can be triggered with #beMultiple, single selection can be triggered with #beSingle .Default is single selection.
The general idea is that you pass the colletion of options to #list: and use #labels: to customize their rendering. The selected option(s) can be set with: #selected:.
This whole class is kind of an akward hack, but noone needs MI anyway. You can always get a way with composition and delegation
add:
addAll:
before
This template method is called directly before rendering the content of the receiver.
callback:
hasCallback
hasList
isSelected:
Test if anObject is currently selected.
labelForOption:
labels:
Allows to customize the rendering of list items by passing a one argument block that converts each option to a string. If you need to do custom html rendering for the options use #with: or override #renderOn: in your objects.
list
list:
Append aCollection of items to display. The rendering can be customized using #labels:.
on:of:
performCallback:
renderListItem:labelled:
selected:
Set anObject to be selected.
WAComponent
I am a class representing a graphical element of a seaside application. A component has state (instance variables, that might be backtracked using #states), behavior decorations, children and an appearance that is specified in #renderContentOn:. A component might chose to display another component with #call:.
Child Components:
It is common for a component to display instances of other components while rendering itself. It does this by passing them into the #render: method of WACanvas. For example, this #renderContentOn: method simply renders a heading and then displays a counter component
immediately below it:
renderContentOn: html
html heading level3; with: 'My Counter'.
html render: myCounter.
It's important that you use #render:, rather than directly calling the #renderContentOn: method of the subcomponent. The following is *not* correct:
renderContentOn: html
html heading level3; with: 'My Counter'.
myCounter renderContentOn: html. "DON'T DO THIS".
These subcomponents are usually instance variables of the component that is "embedding" them. They are commonly created as part of the components #initialize method:
initialize
myCounter := WACounter new.
They may also be stored in a collection. One fairly common pattern is to keep a lazily initialized dictionary of subcomponents that match a collection of model items. For example, if you wanted a BudgetItemRow subcomponent for each member of budgetItems, you might do something like this:
initialize
budgetRows := Dictionary new.
rowForItem: anItem
^budgetRows at: anItem ifAbsentPut: [ BudgetItemRow item: anItem ].
renderContentOn: html
self budgetItems
do: [ :each | html render: (self rowForItem: each) ]
separatedBy: [ html horizontalLine ].
Each parent component *must* implement a #children method that returns a collection of all of the subcomponents that it might display on the next render. For the above two examples, #children might look like this:
children
^Array with: myCounter
or this:
children
^self budgetItems collect: [ :each | self rowForItem: each ].

Call/Answer:
If a subcomponent makes a #call: to another component, that component will appear in place of the subcomponent. In the first example, if myCounter made a #call: to DateSelector, that DateSelector would appear in the context of the counter's parent, with the 'My Counter' heading
above it.
Since a subcomponent has not been #call:'d, in general #answer: is a no-op. However, the parent may attach an #onAnswer: block to the subcomponent to be notified if it sends #answer:. This allows one component to be used both from #call: and through embedding. For example:
initialize
dateSelector := WADateSelector new
onAnswer: [ :date | self dateChosen: date ].

Visibility:
A component is visible if
- it is the root component of an application
- a child of of a visible component (returned by #children) that has not been #call:'d
- passed as an argument to #call: on a visible component
activeComponent
addDecoration:
addMessage:
adds a decoration that renders a level 3 heading with <aString> around the receiver
returns this decoration so don't forget #yourself
allDecorationsDo:
answer
answer:
Give back control to the component from which the receiver was called from. When returning, a component can additionally return anObject to the caller.
applicationNamed:
asComponent
authenticateWith:during:
call:
Pass control from the receiver to aComponent. The receiver will be temporarily replaced with aComponent. Code can return from here later on by sending #answer: to aComponent.
canBeRoot
children
This method is really important. It should return a collection of all subcomponents of the current component that will be rendered in #renderContentOn:. Components that are displayed using #call: are *not* children.
If the contents returned by this method change over time make sure to return them in #states as well, otherwise the back button will fail.
childrenDo:
chooseFrom:
Choose an item from the given aCollection. Answer the selected item.
chooseFrom:caption:
Choose an item from the given aCollection with caption aString. Answer the selected item.
confirm:
Display a yes/no dialog with caption queryString. Answer true if the
response is yes, false if no. This is a modal question -- the user must
respond yes or no.
decorateWith:during:
decoration
decoration:
decoration:shouldWrap:
decorationChainDo:
delegations
description
handleAnswer:
headerForExampleBrowser
home
inform:
Display a dialog with aString to the user until he clicks 'OK'
initialize
Subclasses should redefine this method to perform initializations on instance creation
initializeDecoration
isDeployed
isolate:
lightbox:
nextPresentersDo:
onAnswer:
Adds an answer handler aBlock to the receiver.
registerAsApplication:
registerAsAuthenticatedApplication:
removeDecoration:
renderOn:
Do not override this methods on your component, override instead #renderContentOn: and in addition to not invoke directly renderContentOn: on subcomponent in such method but use instead html render: subcomponent.
request:
Display an input dialog whose question is queryString and answer the string the user accepts.
request:default:
request:label:
request:label:default:
show:
Pass control from the receiver to aComponent. The receiver will be temporarily replaced with aComponent. As opposed to #call: sending this message does not block and immediately returns.
show:onAnswer:
Pass control from the receiver to aComponent. The receiver will be temporarily replaced with aComponent. When #answer: is sent to aComponent, aBlock is evaluated. This can be used for continuation passing style programmation of a control flow. #show:onAnswer: does not block.
show:onAnswer:delegation:
updateStates:
This method allows to register objects for backtracking. Don't forget to send super in all cases.
validateWith:
visiblePresentersDo:
WAComponentsNotFoundError
A WAComponentsNotFoundError is xxxxxxxxx.
Instance Variables
possibleCauses
WACompound
I am the superclass for stuff that is not html element but you still want to access via the canvas API.
callback:
close
Close and flush the receiver onto the canvas and its associated document.
hasCallback
id
id:
initialize
Subclasses should redefine this method to perform initializations on instance creation
on:of:
value
value:
WAConditionalComment
A WAConditionalComment is an implementation of Downlevel-hidden Conditional Comments:
http://msdn2.microsoft.com/en-us/library/ms537512.aspx
These are only visible for the IE family of browsers.
addToCondition:
closingConditionClass
do:
equal
implicit of nothing else
greaterThan
ie
ie5
ie50
ie55
ie6
ie7
ie8
ie:
initializeWithRoot:
lessThan
not
openingConditionClass
orEqual
root:
WAConfiguration
A configuration for a Seaside application contains attributes which can be used by Seaside and the application. WAConfiguration hierarchy uses the composite pattern. Subclasses of WASystemConfiguration define related groups of attributes. A WASystemConfiguration subclass defines the name and optionally default values for attributes. See WASystemConfiguration class comment for information on defining your own group of attributes. WAUserConfiguration is a composite of configurations. The set of configurations contained in WAUserConfiguration is called the ancestors. Attribute values in a configuration override the attribute values in the ancestors. WAUserConfiguration also holds the non-default values of attributes.
Seaside applications start with a WAUserConfiguration (see WAApplication>>configuration) that start with three configurations (WARenderLoopConfiguration, WAGlobalConfiguration and WASessionConfiguration). Other configurations can be added to an application on the Seaside configuration page for the application or in your application. Values for the attributes can be given in either location.
See Seaside documentation (http://www.seaside.st/documentation) on configuration and preferences (http://www.seaside.st/documentation/Configuration%20and%20Preferences) for more information.
Example of setting attributes and adding configurations in code
ASubclassOfWAComponent class>>initialize
"self initialize"
| application |
application := self registerAsApplication: 'GlorpExample'.
"set a standard attribute"
application preferenceAt: #sessionClass put: Glorp.WAGlorpSession.
"add a configuration"
application configuration addAncestor: GlorpConfiguration new.
application preferenceAt: #databaseLogin put: 'foo'. "set attribute defined in GlorpConfiguration"
Subclasses must implement the following messages:
name
return the name of the configuration
localValueAt:ifAbsent:
return the value of the attribute given as first argument
addAncestorsTo:linearization:
allAncestors
allAncestorsDo:
allAttributes
allPotentialAncestors
ancestors
attributeNamed:
attributes
attributesAndValuesDo:
groupedAttributes
hasAttributeNamed:
hasLocalValueForAttribute:
hasMutableAncestry
inheritedValueAndSourceAt:do:
inheritsFrom:
initialize
Subclasses should redefine this method to perform initializations on instance creation
localValueAt:ifAbsent:
lookupValueAt:
name
Answer a name for the receiver. This is used generically in the title of certain inspectors, such as the referred-to inspector, and specificially by various subsystems. By default, we let the object just print itself out..
new
potentialAncestors
valueAt:
valueForAttribute:
withAllAncestorsDo:
WAConfigurationAttribute
WAConfigurationAttribute represents a value of a specified type in a Seaside application configuration. Some attributes are used are needed by Seaside for your application like deployment Mode and session timeout. Attributes like a database login may be used internally by the application.
Each subclass of WAConfigurationAttribute handles one type (Number, Boolean, etc) of attribute. The "group" of the attribute is used to place all attributes in the same group together on the Seaside configuration page. The "key" of the attribute identifies the attribute. See WAConfiguration for example of accessing a configuration attribute.
Subclasses must implement the following messages:
valueFromString: aString
convert "aString" into type represented by the class, return result of the conversion

accept: aVisitor with: anObject
Typical implementation is:
aVisitor visitXXXAttribute: self with: anObject
where XXX is the type of this attribute. The method visitXXXAttribute:with: must be implemented in all visitors, in particular WAConfigurationEditor which creates the configuration page for Seaside applications.
Instance Variables:
group <Symbol> name of the group the attribute belongs to
key <Symbol> key or name of the attribute, used to look up the attribute
accept:with:
group
initializeWithKey:group:
key
key:
key:group:
stringForValue:
valueFromString:
WAConfigurationEditor
A WAConfigurationEditor is xxxxxxxxx.
Instance Variables
configuration: <Object>
configuration
- xxxxx
close
configuration
configuration:
initialize
Subclasses should redefine this method to perform initializations on instance creation
renderAncestryListFor:seen:on:
renderAncestryOn:
renderAttribute:on:
renderAttributesOn:
renderButtonsOn:
renderContentOn:
renderFormButtonsOn:
renderFormOn:
renderInheritanceForAttribute:on:
renderInheritedAttribute:on:
renderInheritedValueForAttribute:on:
renderOverrideForAttribute:on:
renderOverridenAttribute:on:
renderParent:on:
renderParentSelectorOn:
renderRevertForAttribute:on:
renderUnspecifiedAttribute:on:
save
select:
trailName
visitBooleanAttribute:with:
visitListAttribute:with:
visitNumberAttribute:with:
visitPasswordAttribute:with:
visitStringAttribute:with:
WAConfigurationTest
A WAConfigurationTest is xxxxxxxxx.
Instance Variables
testLinearization
from http://www.webcom.com/haahr/dylan/linearization-oopsla96.html
WAConfigureDispatcherPlugin
I display the configuration dialog of an application. See WAApplication >> #configurationComponent
execute
Execute the receiving plugin.
isActive
Answer wheter the plugin is usable with the current target.
label
Answer the menu label of the plugin.
priority
Answer a number used to sort the receiver. A lower number means it appears earlier on.
WAConfigureToolPlugin
I display the configuration dialog for the currently active application
execute
Execute the receiving plugin.
label
Answer the menu label of the plugin.
priority
Answer a number used to sort the receiver. A lower number means it appears earlier on.
WAContentElement
A WAContentElement is xxxxxxxxx.
Instance Variables
contents:
document:
document:fileName:
document:mimeType:
document:mimeType:fileName:
isClosed
resourceUrl:
type:
typeOrNil
url:
WAConvenienceTest
A WAConvenienceTest is xxxxxxxxx.
Instance Variables
cheese: <Object>
cheese
- xxxxx
chooseCheese
confirmCheese
go
informCheese
WACookie
I represent a cookie, a piece of information that is stored on the client and read and writable by the server. I am basically a key/value pair of strings.
You can never trust information in a cookie, the client is free to edit it.
I model only a part of the full cookie specification.
For more information see RFC2965 (http://tools.ietf.org/html/rfc2965)
=
Answer whether the receiver and the argument represent the same
object. If = is redefined in any subclass, consider also redefining the
message hash.
expireIn:
expiry
expiry:
expiryString
hash
Answer a SmallInteger whose value is related to the receiver's identity.
May be overridden, and should be overridden in any classes that define =
key
key:
key:value:
path
path:
value
value:
valueWithExpiry
writeOn:
WACookieTest
A WACookieTest is xxxxxxxxx.
Instance Variables
key: <Object>
value: <Object>
key
- xxxxx
value
- xxxxx
add
cookies
remove:
renderContentOn:
WACopyDispatcherPlugin
I make a copy of an application.
execute
Execute the receiving plugin.
label
Answer the menu label of the plugin.
priority
Answer a number used to sort the receiver. A lower number means it appears earlier on.
WACounter
A WACounter is component that displays a number. Additionally it has two links that allow the user to increase or decrease this number by 1.
The lesson to learn here is how the Seaside callback mechanism is used, how anchors can be used to trigger actions.
Instance Variables
count: <Integer>
count
- the number to display, default 0
canBeRoot
count
count:
decrease
description
entryPointName
example
increase
initialize
Subclasses should redefine this method to perform initializations on instance creation
renderContentOn:
states
Answer a collection of states that should be backtracked.
WACurrentSession
A WACurrentSession is the dynamic variable for the current Seaside session. See superclass comment for what a dynamic variable is.
WADateInput
I am a composition of three input fields that allow the user to select year, month and day. #options: can be used to toggle them individually.
The argument for my callback blocks is an instance of Date.
See WADateTimeTest >> #renderDateTimeOn:
addCallback
addDayCallbackToBrush:
addMonthCallbackToBrush:
addYearCallbackToBrush:
day
day:
defaultOptions
month
month:
options
options:
Valid values in the array : #year #month #day
Can be used to control what is shown and in what order
Default #(month day year)
renderDay
renderMonth
renderYear
setValueWithNewDate
with:
year
year:
WADateSelector
WADateSelector displays dropdown menus (html select) allowing a user to delect a date within a range. "startYear" and "endYear" define the range of selectable dates. Date displayed in month, day, year format. WADateSelector>>date returns date user selected as a Date object.
See WADateSelectorTest for sample of usage.
Select "Date Selector" tab of the Functional Seaside Test Suite to run an example (http://127.0.0.1:xxxx/seaside/tests/alltests)
Instance Variables:
day <Integer 1-31> selected day
endYear <Integer> end of range of dates user is allowed to select, not required to use 4 digits
month <Integer 1-12> selected month
startYear <Integer> start of range of dates user is allowed to select, not required to use 4 digits
year <Integer> selected year
date
date:
dateClass
dateIsValid
day
day:
days
endYear
endYear:
initialize
Subclasses should redefine this method to perform initializations on instance creation
labelForDay:
labelForMonth:
labelForYear:
month
month:
months
privateIsValidDay:monthNumber:year:
renderContentOn:
renderValidationErrorOn:
startYear
startYear:
year
year:
yearRange
WADateSelectorTest
A WADateSelectorTest is xxxxxxxxx.
Instance Variables
beginDAT: <Object>
beginDate: <Object>
beginTime: <Object>
endDAT: <Object>
endDate: <Object>
endTime: <Object>
beginDAT
- xxxxx
beginDate
- xxxxx
beginTime
- xxxxx
endDAT
- xxxxx
endDate
- xxxxx
endTime
- xxxxx
children
This method is really important. It should return a collection of all subcomponents of the current component that will be rendered in #renderContentOn:. Components that are displayed using #call: are *not* children.
If the contents returned by this method change over time make sure to return them in #states as well, otherwise the back button will fail.
example
initialize
Subclasses should redefine this method to perform initializations on instance creation
renderContentOn:
renderDateSelectorsOn:
renderDateTimeSelectorsOn:
renderTimeSelectorsOn:
WADateTable
WADateTable renders a table containing dates from startDate to endDate. The table contains one column for each date from startDate to endDate. The top row of the table groups columns by month and labels each month (January 2008). The second row contains the date of each month (1-31) in the date range. The table also contains "rows size" rows. The first column of these rows contains the contents of the instance variable "rows". Rest of the cells are empty.
Basically this is an abstract superclass for WASelectionDateTable
Instance Variables:
datesCache <(SequenceableCollection of: Date> contains a date object for each date in the range startDate-endDate
endDate <Date> end date of the range displayed in the table
rows <SequenceableCollection> labels of the rows
startDate <Date> start date of the range displayed in the table
datesDo:separatedBy:
endDate:
monthsAndLengthsDo:
renderCellForDate:row:index:on:
renderContentOn:
renderDayHeadingsOn:
renderHeadingForRow:on:
renderHeadingSpacerOn:
renderMonthHeadingsOn:
renderRow:index:on:
rows:
startDate:
updateDatesCache
WADateTimeSelector
WADateTimeSelector allows the user to select a date and time in a given range dropdown menus (html select). Actual work done by WADateSelector and WATimeSelector. Date range is default range of WADateSelector.
See WADateSelectorTest for sample of usage.
Select "Date Selector" tab of the Functional Seaside Test Suite to run an example (http://127.0.0.1:xxxx/seaside/tests/alltests)
Instance Variables:
dateSelector <WADateSelector> presents date selection to user
timeSelector <WATimeSelector> presents time selection to user
children
This method is really important. It should return a collection of all subcomponents of the current component that will be rendered in #renderContentOn:. Components that are displayed using #call: are *not* children.
If the contents returned by this method change over time make sure to return them in #states as well, otherwise the back button will fail.
dateAndTime
dateAndTime:
initialize
Subclasses should redefine this method to perform initializations on instance creation
renderContentOn:
WADateTimeTest
A WADateTimeTest is xxxxxxxxx.
Instance Variables
data: <Object>
data1: <Object>
data2: <Object>
date: <Object>
message: <Object>
numericData: <Object>
time: <Object>
data
- xxxxx
data1
- xxxxx
data2
- xxxxx
date
- xxxxx
message
- xxxxx
numericData
- xxxxx
time
- xxxxx
data1
data1:
data2
data2:
date
date:
initialize
Subclasses should redefine this method to perform initializations on instance creation
numericData
numericData:
renderContentOn:
renderDateTimeOn:
renderDeadDateTimeOn:
renderSubmitFormOn:
time
time:
WADebugErrorHandler
I am like WAErrorHandler except that I open a debugger in the image for errors and warnings (not for internal errors).
handleError:
WADecoration
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.
asComponent
component
handleAnswer:
handleAnswer:continueWith:
initialize
Subclasses should redefine this method to perform initializations on instance creation
isDecoration
isDelegation
isGlobal
isLocal
nextPresentersDo:
owner
owner:
remove
renderOwnerOn:
showHalo
updateStates:
This method allows to register objects for backtracking. Don't forget to send super in all cases.
WADecorationTask
A WADecorationTask is xxxxxxxxx.
Instance Variables
component1: <Object>
component2: <Object>
component1
- xxxxx
component2
- xxxxx
go
initialize
Subclasses should redefine this method to perform initializations on instance creation
updateStates:
This method allows to register objects for backtracking. Don't forget to send super in all cases.
WADecorationTest
http://code.google.com/p/seaside/issues/detail?id=71
children
This method is really important. It should return a collection of all subcomponents of the current component that will be rendered in #renderContentOn:. Components that are displayed using #call: are *not* children.
If the contents returned by this method change over time make sure to return them in #states as well, otherwise the back button will fail.
initialize
Subclasses should redefine this method to perform initializations on instance creation
renderContentOn:
WADefaultActionCallback
A WADefaultActionCallback is xxxxxxxxx.
Instance Variables
priority
WADefaultFormTest
A WADefaultFormTest is xxxxxxxxx.
Instance Variables
value: <Object>
value
- xxxxx
renderContentOn:
WADelayTest
A WADelayTest is xxxxxxxxx.
Instance Variables
go
renderContentOn:
WADelayedAnswerDecoration
WADelayedAnswerDecoration adds a delay in displaying a component.
See WADelayTest for sample usage.
Select 'Delay" tab of the Functional Seaside Test Suite to run an example (http://127.0.0.1:xxxx/seaside/tests/alltests)
Instance Variables:
delay <Integer> delay length in seconds
delay
delay:
updateRoot:
This method allows you customize the <head> section of an HTML document. The API is very similar to the 'Canvas API' for rendering in the <body> section (where you 'draw' in #renderContentOn:).
anHtmlRoot is an instance of WAHtmlRoot
Whenever you override this method don't forget to send super
WADelegation
A WADelegation is xxxxxxxxx.
Instance Variables
delegate: <Object>
delegate
- xxxxx
delegate
delegate:
isDelegation
nextPresentersDo:
WADemoVariable
A WADemoVariable is xxxxxxxxx.
Instance Variables
defaultValue
WADeprecatedApi
WADeprecatedApi is a notification that gets signaled if someone used a deprecated Seaside method.
see #deprecatedApi
WADeprecationToolPlugin
I display deprecation warnings.
cssClass
Answer a CSS class that will be applied to an automatically rendered link. nil means no class
execute
Execute the receiving plugin.
isActive
Answer wheter the plugin is usable with the current target.
label
Answer the menu label of the plugin.
priority
Answer a number used to sort the receiver. A lower number means it appears earlier on.
WADictionaryTest
A WADictionaryTest is xxxxxxxxx.
Instance Variables
dictionary: <Object>
dictionary
- xxxxx
setUp
testAssociations
testAssociationsDo
testAt
testAtIfAbsent
testAtIfAbsentPut
testAtIfPresent
testAtPut
testIncludesKey
testIsEmpty
testKeys
testKeysAndValuesDo
testKeysDo
testRemoveKey
testRemoveKeyIfAbsent
testSize
testValues
testValuesDo
WADispatchCallback
A WADispatchCallback is xxxxxxxxx.
Instance Variables
evaluateWithArgument:
priority
WADispatcher
WADispatcher takes http requests and dispatches them to the correct handler (WAApplication, WAFileHandler, WANotFoundHandler, etc).
WADispatcher class>>default is the top level dispatcher. When a Seaside application is registered as "foo" the application is added to the top level dispatcher. The application is added to the entryPoints of the dispatcher at the key "foo". If a Seaside application is registered as "bar/foo" then the application isadded to a dispatcher's entryPoints at the key "foo". That dispatcher is in the top level dispatcher's entryPoints at the key "bar".

When a http request is received it is sent to WADispatcher class>>default to find the correct handler for the request. If a handler exists for the request is sent to that handler. Otherwise the request is sent to WANotFoundHandler.
The VW port maintains multiple copies of the tree of dispatchers rooted at WADispatcher class>>default. One copy is for each different URL that can reach Seaside (http://..../seaside/go/counter - normal, http://..../counter - SeasideShortPath, http://..../seaside/stream/counter - streaming).
Instance Variables:
defaultName <String>
entryPoints <(Dictionary of: (WAApplication | WADispatcher | WAFileHandler))> the keys are strings, which are the names and URL path segments for the handler at that key
lastUpdate <TimeStamp> Time the dispatcher was last changed
version <SmallInteger> Each time the dispatcher is changed the version is increased by 1
beAwareOfChangeOf:with:from:
configurationComponent
default
defaultName
defaultName:
description
Answer a descriptive text of the receiver.
entryPointAt:
entryPoints
handleRequest:
Handle aRequest and answer a response.
handlerForRequest:
handlerForRequest:relativeTo:
initialize
Subclasses should redefine this method to perform initializations on instance creation
isDeployed
isDispatcher
isRoot
lastUpdate
postCopy
self is a shallow copy, subclasses should copy fields as necessary to complete the full copy
register:
resetAll
trimForDeployment
removes all non-production applications
see: WAComponent class >> #isDeployed
unregister:
version
WADispatcherComponent
A WADispatcherComponent is xxxxxxxxx.
Instance Variables
dispatcher: <Object>
dispatcher
- xxxxx
addRssLinksToRoot:
dispatcher
dispatcher:
entryPoints
Answer a dictionary with the visible entry points of the dispatcher.
initialize
Subclasses should redefine this method to perform initializations on instance creation
on:
registerAsApplication:
renderContentOn:
renderDispatcherOn:
renderHeadingOn:
renderRow:named:on:
renderRowActions:named:on:
renderRowDescription:named:on:
renderRowName:named:on:
states
Answer a collection of states that should be backtracked.
title
upDirectory
updateRoot:
This method allows you customize the <head> section of an HTML document. The API is very similar to the 'Canvas API' for rendering in the <body> section (where you 'draw' in #renderContentOn:).
anHtmlRoot is an instance of WAHtmlRoot
Whenever you override this method don't forget to send super
WADispatcherEditor
A WADispatcherEditor is xxxxxxxxx.
Instance Variables
name: <Object>
type: <Object>
name
- xxxxx
type
- xxxxx
addEntryPoint
canBeRoot
clearCaches
description
entryPointClasses
initialize
Subclasses should redefine this method to perform initializations on instance creation
isDeployed
renderAddEntryPointOn:
renderContentOn:
renderDefaultEntryPointOn:
renderRowActions:named:on:
renderSettingsOn:
renderStatisticsOn:
WADispatcherFiles
A WADispatcherFiles is xxxxxxxxx.
Instance Variables
faviconIco
logoPng
mainCss
savePng
selectorsToInclude
The files represented by the selectors this method returns will be automatically added to the html <head> if the receiver is added to the respective Seaside application.
This makes only sense for CSS and JS files
WADispatcherPlugin
Abstract root class for all plugins that add an action for an application to the dispatcher editor.
WADispatcherTest
A WADispatcherTest is xxxxxxxxx.
Instance Variables
alternateDispatcher: <Object>
alternateName: <Object>
baseName: <Object>
defaultDispatcher: <Object>
lastUpdate: <Object>
shortDispatcher: <Object>
alternateDispatcher
- xxxxx
alternateName
- xxxxx
baseName
- xxxxx
defaultDispatcher
- xxxxx
lastUpdate
- xxxxx
shortDispatcher
- xxxxx
dispatcher:hasSameEntryPointsAs:
VW does not have Set >> #=
OMFG! SRSLY? wtf...?
setUp
The statement below makes sure that the 'files' entry is registered
into the default dispatcher before starting this test.
This may be needed after loading Seaside in a stock VW image
depending on the order the unit tests are executed.
Without it, the WADispatcher tests that need the 'files' entry may fail in VW
namely #testAlternateFiles and #testDefaultFiles
tearDown
testAlternateCloning
testAlternateConfig
testAlternateCounterDirect
testAlternateFiles
testAlternateRoot
testAlternateTests
testDefaultConfig
testDefaultCounterDirect
testDefaultCounterNavigate
testDefaultFiles
testDefaultRoot
testDefaultTests
testRootDispatcher
testRootDispatcherChange
testRootDispatcherDependency
testShortTests
update:
Receive a change notice from an object of whom the receiver is a
dependent. The default behavior is to do nothing; a subclass might want
to change itself in some way.
WADispatcherViewer
A WADispatcherViewer is xxxxxxxxx.
Instance Variables
canBeRoot
description
entryPoints
Answer a dictionary with the visible entry points of the dispatcher.
initialize
Subclasses should redefine this method to perform initializations on instance creation
isDeployed
WADivTag
A WADivTag is xxxxxxxxx.
Instance Variables
clear
tag
WADocumentHandler
WADocumentHandler handles requests for images, text documents and binary files (byte arrays). This class is not normally used directly. A number of WA*Tag classes implement document:mimeType:fileName: which use WADocumentHandler. Given a document document:mimeType:fileName: creates a WADocumentHandler on the document, registers the handler with a dispatcher, and adds the correct url in the tag for the document.
Instance Variables:
document <ByteArray | GIFImage | Image | String | WACachedDocument | any class that understands #asMIMEDocumentType:> contents of the document
fileName <String> file containing the document to be sent as an attachment, nil if no such file
mimeDocument <MIMEDocument> MIMEDocument object representing this document and mimeType, generates stream used to write document for the response.
mimeType <String> standard HTTP mime type
=
Answer whether the receiver and the argument represent the same
object. If = is redefined in any subclass, consider also redefining the
message hash.
document
document:mimeType:fileName:
handleRequest:
Handle aRequest and answer a response.
hash
Answer a SmallInteger whose value is related to the receiver's identity.
May be overridden, and should be overridden in any classes that define =
initializeWithDocument:mimeType:fileName:
mimeDocument
mimeType
response
WADocumentHandlerTest
A WADocumentHandlerTest is xxxxxxxxx.
Instance Variables
assertHttpResponseFrom:matches:
createAndVerifyBinaryDocumentNamed:hasAttachement:
createAndVerifyDocumentNamed:content:mimeType:hasAttachement:
createAndVerifyTextDocumentNamed:hasAttachement:
headerAt:forResponse:
testByteArray
testString
WADynamicVariable
A WADynamicVariable is a variable that is visible only in the stackframes outgoing from this one.
Example:
WADynamicVariable
use: 'Seaside'
during: [ self compilcatedCalculation ]

Whenever
WADynamicVariable value
gets evaluated somewhere inside [ self compilcatedCalculation ] or a method invoked directly or indirectly by it, its value will be 'Seaside'. If no #use:during: handler is around the current stack frame, then the value will be the return value of #defaultValue.
Do not use WADynamicVariable directly, instead create a subclass for each variable you want to use.
defaultAction
No action is taken. The value nil is returned as the value of the message that signaled the exception.
defaultValue
use:during:
value
WADynamicVariableTest
A WADynamicVariableTest is xxxxxxxxx.
Instance Variables
assertValue:
testWithValue
testWithoutValue
WAEditTag
INS and DEL are used to markup sections of the document that have been inserted or deleted with respect to a different version of a document (e.g., in draft legislation where lawmakers need to view the changes).
These two elements are unusual for HTML in that they may serve as either block-level or inline elements (but not both). They may contain one or more words within a paragraph or contain one or more block-level elements such as paragraphs, lists and tables.
This example could be from a bill to change the legislation for how many deputies a County Sheriff can employ from 3 to 5.
<P>
A Sheriff can employ <DEL>3</DEL><INS>5</INS> deputies.
</P>
The INS and DEL elements must not contain block-level content when these elements behave as inline elements.
cite:
The value of this attribute is a URI that designates a source document or message. This attribute is intended to point to information explaining why a document was changed.
datetime:
The value of this attribute specifies the date and time when the change was made.
ISO date format
WAEncoder
I encode everything that is written to myself using #nextPut: and #nextPutAll: onto the wrapped stream. To be efficient I use an encoding table to be able to transform the most used characters from the UTF Basic Multilingual Plane as efficiently as possible. The convertion of a single character is defined in #encode:on: on the class-side of my subclasses.
encode:on:
initializeBMP
initializeOn:table:
nextPut:
nextPutAll:
uses #to:do: for speed reasons (on Squeak)
this is not premature optimization, this is a hotspot method method
and #to:do: shows measurable speed improvements for rendering seaside pages
on:
on:table:
WAEncoderTest
A WAEncoderTest is xxxxxxxxx.
Instance Variables
assert:encoder:gives:
testEncodedHtml
testEncodedLatin1Url
testEncodedUnicode
this makes sure the encoder doesn't fall on the nose with unicode
testEncodedUrl
testEncodedUtf8Url
this tests url encoding of strings that are already utf8
WAEncodingTest
A WAEncodingTest test whether Seaside correctly handles non-ASCII strings. Unfortunately due to differences in server setup and source code encodings this test requires manual interaction.
initialize
Subclasses should redefine this method to perform initializations on instance creation
multipart
multipart:
renderContentOn:
renderExplanationOn:
renderMultipartOn:
renderUrlencodedOn:
urlencoded
urlencoded:
WAEntryPoint
WAEntryPoint represents a named entry point to a request handler.
Given a seaside application URL, http://localhost:8008/seaside/tests/alltests, the path parts of the url are mapped to WARequestHandlers. "seaside" & "tests" map to WADispatchers, "alltests" maps to a WAApplication. These individual path parts are used as the names of the WARequestHandlers. WAEntryPoint is an abstract class that handles the name of WARequestHandlers. WAEntryPoint constructs the proper url path for this handler.
Instance Variables:
name <String> the name or path part of this handler
announceChangeOf:with:
Short-circuit the dependency mechanics
basePath
baseUrl
concreteSubclasses
configurationComponent
description
Answer a descriptive text of the receiver.
isAbstract
isEntryPoint
isRoot
name
Answer a name for the receiver. This is used generically in the title of certain inspectors, such as the referred-to inspector, and specificially by various subsystems. By default, we let the object just print itself out..
named:
printOn:
Append to the argument, aStream, a sequence of characters that
identifies the receiver.
rootDispatcher
setName:
WAErrorHandler
Error handlers are invoked when an error in a Seaside application occurs. They handle
- errors
- warnings
- internal errors in the Seaside core
I am the base class for all error handlers and handle only internal errors which which I display a code 500 error with a short stackframe.
See WAWalkbackErrorHandler for examples of how to do rendering with the canvas API.
handleError:
handleWarning:
internalError:
WAErrorTest
A WAErrorTest is xxxxxxxxx.
Instance Variables
renderContentOn:
renderDeprecatedOn:
renderErrorOn:
renderHaltOn:
renderResumableErrorOn:
renderWarningOn:
WAExampleBrowser
I browse all the examples available in the system ie all the results of class methods beginning with #example...
point your browser to localhost:xxx/seaside/examples
If you want to see these examples
/seaside/config app:
- add a new application named "examples"
- choose WAExampleBrowser as the root component
allClasses
allSelectors
canBeRoot
children
This method is really important. It should return a collection of all subcomponents of the current component that will be rendered in #renderContentOn:. Components that are displayed using #call: are *not* children.
If the contents returned by this method change over time make sure to return them in #states as well, otherwise the back button will fail.
class:
component:
description
initialize
Subclasses should redefine this method to perform initializations on instance creation
renderChooserOn:
renderComponentOn:
renderContentOn:
selector:
selectorPrefix
style
Returns a CSS stylesheet associated with this component. This stylesheet will be added to <head> section of the html document so it will be global and not scoped.
This is done for all visible components (see class comment of WAComponent for what visible means).
Nice for demos but consider using WAFileLibrary or exernal files instead.
WAExceptionTest
A WAExceptionTest is xxxxxxxxx.
Instance Variables
go
WAExpiringHandler
WAExpiringHandler is an abstract class that times out when the time between requests is longer than the value of "timeout"
Subclasses must implement the following messages:
incomingRequest:
subclass handles the request in this method
Instance Variables:
expired <Boolean> True if handler has times out
lastAccess <Time> Time the handler was last accessed
timeout <Integer> Length of time in seconds handler will timeout without a request
defaultTimeoutSeconds
expire
expired
handleRequest:
Handle aRequest and answer a response.
incomingRequest:
initialize
Subclasses should redefine this method to perform initializations on instance creation
isActive
lastAccess
secondsSinceLastAccess
timeoutSeconds
timeoutSeconds:
WAExpirySession
A WAExpirySession is xxxxxxxxx.
Instance Variables
created
initialize
Subclasses should redefine this method to perform initializations on instance creation
resetCounters
unregistered
WAExpiryTest
A WAExpiryTest is xxxxxxxxx.
Instance Variables
renderActionsOn:
renderContentOn:
renderStatsOn:
WAExternalID
I am a session or conticuation key.
defaultSize
fromString:
initialize
Subclasses should redefine this method to perform initializations on instance creation
new
new:
printOn:
Append a sequence of characters that identify the receiver to aStream.
startUp
WAFieldSetTag
The FIELDSET element allows authors to group thematically related controls and labels. Grouping controls makes it easier for users to understand their purpose while simultaneously facilitating tabbing navigation for visual user agents and speech navigation for speech-oriented user agents. The proper use of this element makes documents more accessible.
The LEGEND element allows authors to assign a caption to a FIELDSET. The legend improves accessibility when the FIELDSET is rendered non-visually.
before
This template method is called directly before rendering the content of the receiver.
legend:
tag
WAFile
I represent a file that was uploaded by the user via #fileInput.
contentType
contentType:
contents
Answer a ByteArray
contents:
fileName
compensate for windows explorer behavior
fileName:
fromChunk:
initializeFromChunk:
isTemporary
this is not a temporary but an in memory file
isWindowsPath
'#:\*' match: fileName is broken on Squeak for WideString arguments
size
the file size in bytes
WAFileHandler
Seaside serves static files using WALibrary subclasses. WAFileHandler handles all requests for WALibrary files (or methods) for all applications on the Seaside server. WAFileHandler is registered with the default WADispatcher automatically.
configurationComponent
default
description
Answer a descriptive text of the receiver.
handleRequest:
Handle aRequest and answer a response.
initialize
Subclasses should redefine this method to perform initializations on instance creation
isDeployed
libraries
librariesDo:
libraryAt:ifAbsent:
libraryRootClasses
notFound:
registerAsHandler:
responseAt:ifAbsent:
WAFileHandlerEditor
A WAFileHandlerEditor is xxxxxxxxx.
Instance Variables
fileHandler: <Object>
fileHandler
- xxxxx
basePath
configureLibrary:
fileHandler
fileHandler:
libraries
renderContentOn:
updateRoot:
This method allows you customize the <head> section of an HTML document. The API is very similar to the 'Canvas API' for rendering in the <body> section (where you 'draw' in #renderContentOn:).
anHtmlRoot is an instance of WAHtmlRoot
Whenever you override this method don't forget to send super
WAFileLibrary
What does FileLibrary do
=============================
It allows to serve static files directly from seaside without the need for a standalone server like Apache or to configure Kom. These files can reference each other (say a CSS references an image) and can be distrubuted the same way as normal Smalltalk code (Monticello, SqueakMap, ...).
Each file in a file library is represented by a method. The method name is created from the file name, the dot is removed and the first letter of the suffix in capitalized. This puts certain limitations to the allowed filenames. Eg. 'main.css' becomes #mainCss.
Like Script- and StyleLibraries FileLibraries can be added to an application so that they automatically include themselves in the document root. Implement #selectorsToInclude and return the selectors you whish to be added to the document root.
How to create a FileLibrary
================================
- First create the static files and put them in some directory. From there they can reference the other files in the same directory normally with their filenames.
- Make sure you have a "Files" entry that serves your files. This is a normal entry point type that you can find in your /seaside/config application. If you don't already have one, you can create it if you select "Files" in the type field of the "add entry point" dialog. For the rest of this text we assume you chose "files" as the path.
- Create a subclass of WAFileLibrary, for the rest of this text I assume its name is MyFileLibrary.
- To add the files to your file library there are two ways.
1. Programmatically with MyFileLibrary class >> #addAllFilesIn: / #addFileNamed:. For example MyFileLibrary addAllFilesIn: '/path/to/directory/with/files' or MyFileLibrary addFileNamed: '/path/to/background.png'.
2. Via the web interface. Go to your /seaside/config application and there click configure for your "Files". Click "configure" behind MyFileLibrary. There you can add a file by uploading it (select the file, then click "Add")
Note that a "Files" can consist of several file libraries and can even have tradional script or style libraries.
How to integrate a FileLibrary into your application
=============================================================
Files from a FileLibrary are ingetrated the same way other static files are integrated. They have a constant path that is '/seaside/<Static File Library>/<FileLibrary class name>/<filename>' so for example '/seaside/files/MyFileLibrary/background.png'. These can be conveniently generated by 'MyFileLibrary / #aSelector' where #aSelector is the name of the method representing that file. For example 'MyFileLibrary / #backgroundPng'.
How to get back the files in a FileLibrary
=================================================
The contents of a file library can be written out to disk. Writing out a file library first makes a folder with the name of the file library in the folder of your Smallatlk image. Then a file for each file in the file library is created in this folder. Writing out to disk can happen in three ways
1. MyFileLibrary default deployFiles
2. Via the configuration interface of the file library. On the same page where you can add files to your file library there is also a button 'write to disk' which will write out all the files in this library.
3. Via the configuration interface of your application. In the section where you can add libraries to your application there is a a button 'write to disk' which will write out all the libraries of this application.
Examples:
==========
The following code uses WAFileLibrary to add a CSS file to a page.
updateRoot: anHtmlRoot
super updateRoot: anHtmlRoot.
anHtmlRoot stylesheet
url: WAFileLibraryDemo / #mainCss

The folllowing code uses WAFileLibrary to display an image.
renderContentOn: html
html image
url: WAFileLibraryDemo / #mainJpg
/
addAllFilesIn:
addFile:
adds a file to the receiver
aFile an instance of of WAFile
addFileAt:
addFileAt:contents:
addFileNamed:contents:
adjustForVisualWorks
asFilename:
asSelector:
compileBinary:selector:
compileMimeDatabaseString
compileText:selector:
configurationComponent
createMimeDatabaseString
defaultMimeType
defaultMimeTypes
fileSelectors
initialize
Subclasses should redefine this method to perform initializations on instance creation
isBinary:
isBinaryAt:
isFileSelector:
lastUpperCaseIndexIn:
methodCategory
mimetypeFor:
mimetypeForFile:
mimetypes
nonFileSelectors
readMimeDatabase
register
removeFile:
renameFile:to:
selectorsToInclude
The files represented by the selectors this method returns will be automatically added to the html <head> if the receiver is added to the respective Seaside application.
This makes only sense for CSS and JS files
unregister
updateRoot:
Only override if you want to automatically include new types of resources. The default implementation knows how to reference CSS, JS and FavIcons into aHtmlRoot.
urlOf:
WAFileLibraryDemo
A WAFileLibraryDemo is xxxxxxxxx.
Instance Variables
mainCss
mainJpg
WAFileLibraryEditor
A WAFileLibraryEditor is xxxxxxxxx.
Instance Variables
newName: <Object>
renamingFile: <Object>
newName
- xxxxx
renamingFile
- xxxxx
renderAddFileOn:
renderContentOn:
renderFile:on:
renderFilesOn:
renderRenameFormForFile:on:
updateRoot:
This method allows you customize the <head> section of an HTML document. The API is very similar to the 'Canvas API' for rendering in the <body> section (where you 'draw' in #renderContentOn:).
anHtmlRoot is an instance of WAHtmlRoot
Whenever you override this method don't forget to send super
WAFileLibraryTest
A WAFileLibraryTest is xxxxxxxxx.
Instance Variables
assertFile:contentType:handler:symbol:library:
testAsFileName
testAsSelector
testAsSelectorCapitalized
testAsSelectorFunky
testAsSelectorLeadingDigits
testCompileByteArray
testCompileString
testFileLibraryDemo
testFilenames
testIsBinary
testKalseyTabs
testKalseyTabsCascade
testLiveUpdate
testMainCss
testMainCssCascade
testMainJpg
testMainJs
testMimeType
testNoneStatisfy
testStandardFiles
testUrlOf
WAFileTest
A WAFileTest is xxxxxxxxx.
Instance Variables
file: <Object>
file
- xxxxx
setUp
testBorderline
testNonLatinWindowsPath
If the following assertion fails, your Smalltalk dialect most probably does not support non-latin characters. This is true for Squeak 3.7. If your Smalltalk dialect does support non-latin characters adjust the test.
testWindowsPath
WAFileUploadTag
I represent a file input element (<input type="file"). My callbacks will be evaluated with an instance of WAFile as an argument.
accept:
This attribute specifies a comma-separated list of content types that a server processing this form will handle correctly. User agents may use this information to filter out non-conforming files when prompting a user to select files to be sent to the server
callback:
on:of:
type
WAFlowTest
A WAFlowTest is xxxxxxxxx.
Instance Variables
depth:
goAnchors
goButtons
renderContentOn:
WAFormDecoration
A WAFormDecoration places its component inside an html form tag. The buttons inst var must be set. The component that a WAFormDecoration decorates must implement the method "defaultButton", which returns the string/symbol of the default button (one selected by default) of the form. Don't place any decorators between WAFormDecoration and its component otherwise "defaultButton" method fails. For each string/symbol in the buttons inst var the decorated component must implement a method of the same name, which is called when the button is selected.
Instance Variables
buttons: <Collection of strings or symbols>
buttons
- list of strings or symbols, each string/symbol is the label (first letter capitalized) for a button and the name of the callback method on component when button is pressed,
buttons
buttons:
defaultAction
renderButtonForSelector:on:
renderButtonsOn:
renderContentOn:
WAFormDialog
WAFormDialog is an empty html form. Used in WAComponent>>inform: to create a dialog component that displays text and an "Ok" button to close the component. See subclasses for sample usage & more functionality.
Instance Variables:
form <WAFormDecoration> Decorator that generates form tags
validationError <String> Text descriping invalid data entered by user. Displayed when not nil. Set to nil when user submits form.
addForm
addFormByDefault
buttons
defaultButton
divClass
initialize
Subclasses should redefine this method to perform initializations on instance creation
isValid
model
ok
removeForm
renderContentOn:
renderDialogOn:
renderSpacerRowOn:
renderValidationError:on:
validationError:
WAFormInputTag
A WAFormInputTag is xxxxxxxxx.
Instance Variables
callback:
isClosed
Answer true if this tag should be closed immediately, such as <br />.
name:
on:of:
readonly:
When set to true, this boolean attribute prohibits changes to the widget.
setFocus
Makes this element have the initial focus once the page is loaded aka autofocus.
submitOnClick
tag
text:
type
type:
value
value:
with:
Render anObject into the receiver. Make sure that you call #with: last in the cascade, as this method will serialize the tag onto the output document.
WAFormTag
The FORM element acts as a container for input elements and buttons.
Evaluation order:
The input fields callbacks will be evaluated in the order they
appear in the XHTML. Buttons will always be evaluated last, no matter
where they are positioned.
acceptCharset:
This attribute specifies the list of character encodings for input data that is accepted by the server processing this form. The value is a space- and/or comma-delimited list of charset values. The client must interpret this list as an exclusive-or list, i.e., the server is able to accept any single character encoding per entity received.
The default value for this attribute is the reserved string 'UNKNOWN'. User agents may interpret this value as the character encoding that was used to transmit the document containing this FORM element.
action:
This attribute specifies a form processing agent. User agent behavior for a value other than an HTTP URI is undefined.
after
This template method is called directly after rendering the content of the receiver.
before
Define the default action form buttons. Some implementation notes on this feature: (1) a tab-index of -1 is not valid XHTML, but most todays browser accept it and ignore the element in the tab-order. (2) Internet Explorer requires an additional text field (without other functionality) to make the default action work. Other browser should not include this text-field, as it prevents remembering form input.
defaultAction:
The default action gets evaluated whenever the user presses submits
the form by pressing enter without having the focus on a specific
submit-button.
initialize
Subclasses should redefine this method to perform initializations on instance creation
method:
This attribute specifies which HTTP method will be used to submit the form data set. Possible (case-insensitive) values are 'get' (the default) and 'post'.
multipart
Sets the content type used to submit the form to the server (when the value of method is 'post') to multipart/form-data instead the default application/x-www-form-urlencoded. This should be used in combination with a WAFileUploadTag.
multipart:
Sets the content type used to submit the form to the server.
true: sets the content type to multipart/form-data
false: leavess the content type to default application/x-www-form-urlencoded
name:
noAutocomplete
post
setParent:canvas:
tag
WAFunctionalTaskTest
A WAFunctionalTaskTest is xxxxxxxxx.
Instance Variables
WAFunctionalTest
A WAFunctionalTest is xxxxxxxxx.
Instance Variables
WAGenericTag
A WAGenericTag is xxxxxxxxx.
Instance Variables
tag: <Object>
tag
- xxxxx
initializeWithTag:
tag
tag:
WAGlobalConfiguration
WAGlobalConfiguration defines attributes (properties) about the Seaside server. It defines
server protocol (http, https)
host name
port number
server path (first part of URL path, default "seaside" in Squeak "seaside/go" in WV, maps to
top level WADispatcher, if you change value make sure WADispatcher is configured correctly)
deployment mode (false = development mode)
Note setting these attributes does not change the values the server using. Changing the first four changes how Seaside generates the URLs in pages returned to the client.
By default all applications contain this configuration.
attributes
deploymentMode
initialize
Subclasses should redefine this method to perform initializations on instance creation
serverPort
serverProtocol
setDeploymentMode
setDevelopmentMode
WAHalo
A WAHalo is xxxxxxxxx.
Instance Variables
mode: <Object>
plugins: <Object>
root: <Object>
mode
- xxxxx
plugins
- xxxxx
root
- xxxxx
for:
initialize
Subclasses should redefine this method to perform initializations on instance creation
initializeOn:
mode
mode:
modes
plugins
render:
renderContentOn:
root
source:
states
Answer a collection of states that should be backtracked.
WAHaloPlugin
Abstract root class for all halo tools. They add functionality to the halo toolbar.
cssClass
Answer a CSS class that will be applied to an automatically rendered link. nil means no class
initialize
Subclasses should redefine this method to perform initializations on instance creation
renderOn:
A default render method to display the interface of the receiving plugin. Might be overriden with specific behavior in subclasses.
WAHeadingTag
A heading element briefly describes the topic of the section it introduces. Heading information may be used by user agents, for example, to construct a table of contents for a document automatically.
There are six levels of headings in HTML with H1 as the most important and H6 as the least. Visual browsers usually render more important headings in larger fonts than less important ones.
initialize
Subclasses should redefine this method to perform initializations on instance creation
level
level1
level2
level3
level4
level5
level6
level:
tag
WAHiddenInputTag
Authors may create controls that are not rendered but whose values are submitted with a form. Authors generally use this control type to store information between client/server exchanges that would otherwise be lost due to the stateless nature of HTTP (see [RFC2616]). The INPUT element is used to create a hidden control.
type
WAHomeTest
A WAHomeTest is xxxxxxxxx.
Instance Variables
main: <Object>
main
- xxxxx
children
This method is really important. It should return a collection of all subcomponents of the current component that will be rendered in #renderContentOn:. Components that are displayed using #call: are *not* children.
If the contents returned by this method change over time make sure to return them in #states as well, otherwise the back button will fail.
initialize
Subclasses should redefine this method to perform initializations on instance creation
renderContentOn:
WAHorizontalRuleTag
The HR element causes a horizontal rule to be rendered by visual user agents.
The amount of vertical space inserted between a rule and the content that surrounds it depends on the user agent.
isClosed
Answer true if this tag should be closed immediately, such as <br />.
tag
WAHtmlAttributes
I represent the attributes of a XHTML tag. Compared to my superclass I ignore requests to add a nil-values. I also don't throw an exception when accessing a key that doesn't exist, but instead return nil.
addClass:
Add an additional CSS class aString to the receiver.
addStyle:
Add an additional CSS style definition aString to the receiver.
at:append:
Append aValue to the attribute aKey. If already present, concatenate it with a space. Ignore the request if aValue is nil.
at:append:separator:
Append aValue to the attribute aKey. If already present, concatenate it with aString. Ignore the request if aValue is nil.
encodeOn:
Encode the receivers attribute onto aDocument. Note that this implementation reqires those two checks for true and false exactly the way they are here, to reliable encode boolean attributes in an XHTML compliant way.
errorKeyNotFound
privateAt:put:
WAHtmlBuilder
A WAHtmlBuilder is a convenience class to render html. I am supposed to be used like this.
WARenderCanvas builder render: [ :html |
html anchor
url: 'htttp://www.seaside.st';
with: 'Seaside Homepage' ]
See WAHtmlBuilderTest for more examples.
Instance Variables
callbackOwner: <Object>
canvasClass: <WACanvas class>
documentRoot: <WARoot>
fullDocument: <Boolean>
rootBlock: <BlockContext>
callbackOwner
- optional, the owner of the callbacks
canvasClass
- the canvas class to use, on the class side it must implement #context:callbacks: as an object construction method
documentRoot
- for private use only, the instantiated root of the document
fullDocument
- whether a full html document including the head section should be rendered
rootBlock
- a one argement block to customize the document root. The argument of the block is the root
actionUrl
callbackOwner
callbackOwner:
canvasClass
canvasClass:
closeDocument:
createCallbacksFor:
fullDocument
fullDocument:
initialize
Subclasses should redefine this method to perform initializations on instance creation
new
on:
openDocumentDocument:context:
render:
rootBlock
rootBlock:
rootClass
rootClass:
WAHtmlBuilderTest
A WAHtmlBuilderTest is xxxxxxxxx.
Instance Variables
testBody
testFullDocument
testFullDocumentWithBlock
WAHtmlCanvas
This canvas knows about HTML but nothing about callbacks.
abbreviated
Defines an abbreviation, such as 'M.', 'Inc.', 'et al.', 'etc.'
abbreviated:
acronym
Defines an acronym, such as 'GmbH', 'NATO', and 'F.B.I.'
acronym:
address
Defines an address element.
address:
anchor
Defines an anchor.
anchor:
big
Defines big text.
big:
blockquote
Defines a long quotation.
blockquote:
break
Inserts a single line break.
citation
Defines a citation.
citation:
code
Defines computer code text.
code:
definition
Defines a definition term.
definition:
definitionData
Defines a definition description.
definitionData:
definitionList
Defines a definition list.
definitionList:
definitionTerm
Defines a definition term.
definitionTerm:
deleted
Defines deleted text.
deleted:
div
Defines a section in a document.
div:
document
emphasis
Defines emphasized text.
emphasis:
encodeCharacter:
fieldSet
Defines a fieldset.
fieldSet:
form
Defines a form.
form:
heading
Defines header 1 to header 6.
heading:
heading:level:
horizontalRule
Defines a horizontal rule.
html:
Emit aString unescaped onto the target document.
iframe
image
Defines an image.
image:
imageForm:
inserted
Defines inserted text.
inserted:
keyboard
Defines keyboard text.
keyboard:
keyboardInput
Keyboard, text to be entered by the user.
keyboardInput:
label
Defines a label for a form control.
label:
legend
Defines a title in a fieldset.
legend:
listItem
Defines a list item.
listItem:
map
Defines an anchor to be used around an image.
map:
object
Defines an embedded object.
object:
orderedList
Defines an ordered list.
orderedList:
paragraph
Defines a paragraph.
paragraph:
parameter
Defines a parameter for an object.
parameter:
popupAnchor
popupAnchor:
preformatted
Defines preformatted text.
preformatted:
quote
Defines a short quotation.
quote:
ruby
ruby:
rubyBase
rubyBase:
rubyBaseContainer
rubyBaseContainer:
rubyParentheses
rubyParentheses:
rubyText
rubyText:
rubyTextContainer
rubyTextContainer:
sample
Defines sample computer code.
sample:
sampleOutput
Sample output, from a program or script.
sampleOutput:
script
Defines a script.
script:
small
Defines small text.
small:
space
space:
spaceEntity
The HTML entity representing a space. To be subclassed as needed.
span
Defines a section in a document.
span:
strong
Defines strong text.
strong:
subscript
Defines subscripted text.
subscript:
superscript
Defines superscripted text.
superscript:
table
Defines a table.
table:
tableBody
Defines a table body.
tableBody:
tableCaption
Defines a table caption.
tableCaption:
tableColumn
Defines attributes for table columns.
tableColumn:
tableColumnGroup
Defines groups of table columns.
tableColumnGroup:
tableData
Defines a table cell.
tableData:
tableFoot
Defines a table footer.
tableFoot:
tableHead
Defines a table header.
tableHead:
tableHeading
Defines a table header.
tableHeading:
tableRow
Defines a table row.
tableRow:
tag:
Defines a generic tag with the name aString.
teletype
Defines teletype text.
teletype:
text:
Emit anObject onto the target document.
unorderedList
Defines an unordered list.
unorderedList:
variable
Defines a variable.
variable:
withLineBreaks:
Renders text preserving line breaks.
withLineBreaksAndUrls:
withUrls:
WAHtmlDocument
A WAHtmlDocument is xxxxxxxxx.
Instance Variables
closeTag:
initialize
Subclasses should redefine this method to perform initializations on instance creation
new
nextPut:
nextPutAll:
openTag:
openTag:attributes:
openTag:attributes:closed:
print:
WAHtmlElement
A WAHtmlElement is xxxxxxxxx.
Instance Variables
attributes: <Object>
children: <Object>
root: <Object>
attributes
- xxxxx
children
- xxxxx
root
- xxxxx
add:
attributeAt:
attributeAt:ifAbsent:
attributeAt:put:
attributes
childrenDo:
encodeOn:
initializeWithRoot:
isClosed
root:
tag
with:
WAHtmlEncoder
I encode XHTML text.
encode:on:
initialize
Subclasses should redefine this method to perform initializations on instance creation
WAHtmlRoot
A WAHtmlRoot is xxxxxxxxx.
Instance Variables
bodyAttrs: <Object>
context: <Object>
docType: <Object>
headAttrs: <Object>
headElements: <Object>
htmlAttrs: <Object>
scripts: <Object>
styles: <Object>
title: <Object>
bodyAttrs
- xxxxx
context
- xxxxx
docType
- xxxxx
headAttrs
- xxxxx
headElements
- xxxxx
htmlAttrs
- xxxxx
scripts
- xxxxx
styles
- xxxxx
title
- xxxxx
absoluteUrlForResource:
add:
Add a HTML head element to the receiver.
addScript:
Include the script aString into the receiver.
addStyle:
Include the style-sheet aString into the receiver.
base
beXhtml10Strict
beXhtml10Transitional
beXhtml11
bodyAttributes
close:
contentBase:
context
context:
docType
docType:
Set the document-type of the receiver. The table at http://www.w3.org/TR/2002/NOTE-xhtml-media-types-20020430/ summarizes the recommendation to content authors for labeling their XHTML documents:
Media type XHTML 1.0 (HTML compatible) XHTML 1.0 (other) XHTML Basic / 1.1 XHTML+MathML
text/html MAY SHOULD NOT SHOULD NOT SHOULD NOT
application/xhtml+xml SHOULD SHOULD SHOULD SHOULD
application/xml MAY MAY MAY MAY
text/xml MAY MAY MAY MAY
headAttributes
htmlAttributes
if
initialize
Subclasses should redefine this method to perform initializations on instance creation
javascript
link
meta
open:
redirectTo:delay:
revealedIf
rss
script
setContext:
stylesheet
title
title:
writeElementsOn:
writeFootOn:
writeHeadOn:
writeScriptsOn:
writeStylesOn:
WAHtmlRootTest
A WAHtmlRootTest is xxxxxxxxx.
Instance Variables
assert:gives:
assert:givesAny:
testConditionalComment
testLinkElement
testLinkElementWithContent
testRevealedConditionalComment
WAHtmlStreamDocument
A WAHtmlStreamDocument is xxxxxxxxx.
Instance Variables
htmlEncoder: <Object>
stream: <Object>
urlEncoder: <Object>
htmlEncoder
- xxxxx
stream
- xxxxx
urlEncoder
- xxxxx
close:
closeTag:
htmlEncoder
nextPut:
nextPutAll:
open:
openTag:attributes:closed:
print:
stream
stream:
urlEncoder
WAHtmlTest
A WAHtmlTest is xxxxxxxxx.
Instance Variables
booleanList: <Object>
message: <Object>
number: <Object>
booleanList
- xxxxx
message
- xxxxx
number
- xxxxx
allSelectors
initialMessage
initialize
Subclasses should redefine this method to perform initializations on instance creation
message
message:
number
number:
renderCheckboxesOn:
renderContentOn:
don't use pairsDo:, doesn't work for JPMorgan
renderRadioButtonsOn:
renderSelectsOn:
renderSubmitButtonsOn:
renderTextAreaOn:
renderTextInputOn:
renderVFieldSetOn:
renderZFieldSetOn:
style
Returns a CSS stylesheet associated with this component. This stylesheet will be added to <head> section of the html document so it will be global and not scoped.
This is done for all visible components (see class comment of WAComponent for what visible means).
Nice for demos but consider using WAFileLibrary or exernal files instead.
WAIframeTag
The IFRAME element allows authors to insert a frame within a block of text. Inserting an inline frame within a section of text is much like inserting an object via the OBJECT element: they both allow you to insert an HTML document in the middle of another, they may both be aligned with surrounding text, etc.
The information to be inserted inline is designated by the src attribute of this element. The contents of the IFRAME element, on the other hand, should only be displayed by user agents that do not support frames or are configured not to display frames.
Inline frames may not be resized.
callback:
contents:
document:
document:mimeType:
document:mimeType:fileName:
height:
The height of the inline frame.
name:
This attribute assigns a name to the current frame. This name may be used as the target of subsequent links.
performRendering:
src:
tag
url:
width:
The width of the inline frame.
WAIframeTest
A WAIframeTest is xxxxxxxxx.
Instance Variables
counter: <Object>
counter
- xxxxx
children
This method is really important. It should return a collection of all subcomponents of the current component that will be rendered in #renderContentOn:. Components that are displayed using #call: are *not* children.
If the contents returned by this method change over time make sure to return them in #states as well, otherwise the back button will fail.
initialize
Subclasses should redefine this method to perform initializations on instance creation
renderContentOn:
style
Returns a CSS stylesheet associated with this component. This stylesheet will be added to <head> section of the html document so it will be global and not scoped.
This is done for all visible components (see class comment of WAComponent for what visible means).
Nice for demos but consider using WAFileLibrary or exernal files instead.
WAImageButtonTag
Creates a graphical submit button. The value of the src attribute specifies the URI of the image that will decorate the button. For accessibility reasons, authors should provide alternate text for the image via the alt attribute.
When a pointing device is used to click on the image, the form is submitted and the click coordinates passed to the server. The x value is measured in pixels from the left of the image, and the y value in pixels from the top of the image. The submitted data includes name.x=x-value and name.y=y-value where "name" is the value of the name attribute, and x-value and y-value are the x and y coordinate values, respectively.
callback:
extent:
form:
height:
resourceUrl:
type
url:
width:
WAImageCallback
A WAImageCallback is xxxxxxxxx.
Instance Variables
convertKey:
WAImageMapTag
A WAImageMapTag is supposed to be used like this:
html map
callback: [ :point | self click: point ];
with: [ html image url: 'foo.gif' ]

An example can be found in WAScreenshot.
Technincal:
http://www.w3.org/TR/html4/struct/objects.html#include-maps
The location clicked is passed to the server as follows. The user agent derives a new URI from the URI specified by the href attribute of the A element, by appending `?' followed by the x and y coordinates, separated by a comma. The link is then followed using the new URI. For instance, in the given example, if the user clicks at the location x=10, y=27 then the derived URI is "http://www.acme.com/cgi-bin/competition?10,27".
callback:
The parameter for the image-map callback must be the last one, as the web-browser will use the same name and replace it with the coordinates.
parseImageMap:
WAImageMapTest
A WAImageMapTest is xxxxxxxxx.
Instance Variables
clickedAt:id:
renderContentOn:
WAImageTag
The IMG element embeds an image in the current document at the location of the element's definition. The IMG element has no content; it is usually replaced inline by the image designated by the src attribute, the exception being for left or right-aligned images that are "floated" out of line.
The alt attribute specifies alternate text that is rendered when the image cannot be displayed (see below for information on how to specify alternate text ). User agents must render alternate text when they cannot support images, they cannot support a certain image type or when they are configured not to display images.
Seaside per default sets the alternate text to an empty string. This helps validation of the page.
altText:
The alt attribute provides a short description of the image.
document:
document:mimeType:
document:mimeType:fileName:
form:
height:
initialize
Subclasses should redefine this method to perform initializations on instance creation
isClosed
Answer true if this tag should be closed immediately, such as <br />.
resourceUrl:
setParent:canvas:
src:
tag
url:
width:
WAImageTest
A WAImageTest is xxxxxxxxx.
Instance Variables
formClass
haloDebugForm
haloPaintForm
haloViewForm
isSupported
label
renderContentOn:
renderImagesOn:
renderNotSupportedOn:
WAInputDialog
WAInputDialog generates a simple form with a text input field and a submit button. The instance variable "value" is used for initial value of the text field and hold the text entered by user. WAInputDialog answers with text entered by user (value of "value"). See WAComponent>>request:label:default: for sample use and easy way to use WAInputDialog.
Instance Variables:
label <String> label of submit button
value <Object | String>
default:
label
label:
renderContentOn:
value
value:
WAInputElementContainer
A WAInputElementContainer is xxxxxxxxx.
Instance Variables
multiSelection: <Object>
nestedSelection: <Object>
singleSelection: <Object>
singleSelectionOptional: <Object>
textArea: <Object>
textAreaExample: <Object>
textInput: <Object>
textInputExample: <Object>
multiSelection
- xxxxx
nestedSelection
- xxxxx
singleSelection
- xxxxx
singleSelectionOptional
- xxxxx
textArea
- xxxxx
textAreaExample
- xxxxx
textInput
- xxxxx
textInputExample
- xxxxx
elements
exampleText
initialize
Subclasses should redefine this method to perform initializations on instance creation
nestedElements
renderContentOn:
renderHeadingOn:
renderLabel:input:output:on:
renderMultiSelectionOn:
renderNestedSelectionOn:
renderSingleSelectionOn:
renderSingleSelectionOptionalOn:
renderSingleSelectionWithoutCallbackOn:
renderTextAreaExampleOn:
renderTextAreaOn:
renderTextInputExampleOn:
renderTextInputOn:
WAInputTest
A WAInputTest is xxxxxxxxx.
Instance Variables
inputElements: <Object>
inputElements
- xxxxx
children
This method is really important. It should return a collection of all subcomponents of the current component that will be rendered in #renderContentOn:. Components that are displayed using #call: are *not* children.
If the contents returned by this method change over time make sure to return them in #states as well, otherwise the back button will fail.
description
example
initialize
Subclasses should redefine this method to perform initializations on instance creation
renderContentOn:
WAInspector
A WAInspector is xxxxxxxxx.
Instance Variables
input: <Object>
path: <Object>
selected: <Object>
input
- xxxxx
path
- xxxxx
selected
- xxxxx
children
This method is really important. It should return a collection of all subcomponents of the current component that will be rendered in #renderContentOn:. Components that are displayed using #call: are *not* children.
If the contents returned by this method change over time make sure to return them in #states as well, otherwise the back button will fail.
chooseObject:named:
doIt
evaluate
initialize
Subclasses should redefine this method to perform initializations on instance creation
inspectIt
isPrimitiveType:
object
object:
on:
renderContentOn:
renderEditAreaOn:
renderMembersOn:
renderRow:named:group:on:
style
Returns a CSS stylesheet associated with this component. This stylesheet will be added to <head> section of the html document so it will be global and not scoped.
This is done for all visible components (see class comment of WAComponent for what visible means).
Nice for demos but consider using WAFileLibrary or exernal files instead.
WAInspectorPlugin
I open an inspector on the component class.
execute
Execute the receiving plugin.
label
Answer the menu label of the plugin.
priority
Answer a number used to sort the receiver. A lower number means it appears earlier on.
tooltip
Answer a tooltip string that is displayed on the plugin link or button.
WAKom
I provide an adapter between Seaside and the Comanche web server. To start a new server on port 8080, evaluate
WAKom startOn: 8080.

and to stop it, evaluate
WAKom stop.
I don't do any input conversion at all in Squeak <= 3.8, you will get the input in whatever encoding the client sent and are expected to deliver it in the same.
I don't work on Squeak 3.9 for non-ASCII characters.

The state of the service (running or stopped) is automatically restored when quitting and reopening an image.
If you want to reset the password of the config application (reachable at /seaside/config) evaluate
WADispatcherEditor initialize.
collectionClass
contentsOfResponse:
convertFileName:
convertMultipartFileField:
convertRequest:
convertResponse:
createService
default
entryPoint:
fieldsOf:
fileClass
handleRequest:
initialize
Subclasses should redefine this method to perform initializations on instance creation
pause
port
process:
processHttp
processHttpRequest:
processMultipartFields:
register
setDebugMode
setDeploymentMode
setVerboseMode
shutDown
startOn:
startUp
stop
streamUploads
streamUploads:
enables or disables upload streaming
if set to true, then all file uploads will be written to a temparory file
validateForStack:
WAKomDocumentHandlerTest
A WAKomDocumentHandlerTest is xxxxxxxxx.
Instance Variables
assertHttpResponseFrom:matches:
WAKomEncoded
I provide an adapter between Seaside and the Comanche web server with response/request conversion from UTF-8 to WideString and back in Squeak 3.8 or later.
see WAKom
Use me if you have either Squeak 3.8 and an old version of KomHttpServer or Squeak 3.9 and a new version of KomHttpServer. Squeak 3.8 and an new version of KomHttpServer are likely to cause problems. If you use Squeak 3.9 or later and an earlier version of KomHttpServer se WAKomEncoded39.
definition of a new version of Kom:
- SqueakMap: KomHttpServer 7.0.5 or later
- Monticello: KomHttpServer KomHttpServer-RJT.23 or later, especially KomHttpServer-gc.27 or later
images in which you should use WAKomEncoded
- the Seaside One-Click image
- a recent squeak-web image from Damien
fieldsOf:
initialize
Subclasses should redefine this method to perform initializations on instance creation
WAKomEncoded39
I have the same resposibility like WAKomEncoded except that I'm for Squeak 3.9 and old version of KomHttpServer. See class comment of WAKomEncoded for more details. In general I should not be used anymore.
contentsOfResponse:
convertFileName:
initialize
Subclasses should redefine this method to perform initializations on instance creation
invalidUtf8
setUpConversionTables
squeakToUtf8:
squeakToUtf8Default:
squeakToUtf8Fast:
Convert the given string from UTF-8 using the fast path if converting to Latin-1
utf8ToSqueak:
Convert the given string from UTF-8 using the fast path if converting to Latin-1
WALRUCache
WALRUCache implements at Least Recently Used cache. Items are removed from the cache when they reach "max" age. The age of an item is the number of additions to the cache done since the item itself was added. WALRUCache does not worry about the size of the cache. The "capacity:" method is misleading, it sets how long items will remain in the cache.
Instance Variables:
ageTable <Dictionary> The age each time in the cache
max <SmallInteger> The age at which items are removed from the cache
table <Dictionary> Items in the cache, each item has key

WALRUCache is used to store the last n continutations of a session.
at:
Primitive. Assumes receiver is indexable. Answer the value of an
indexable element in the receiver. Fail if the argument index is not an
Integer or is out of bounds. Essential. See Object documentation
whatIsAPrimitive.
at:ifAbsent:
at:put:
Primitive. Assumes receiver is indexable. Store the argument value in
the indexable element of the receiver indicated by index. Fail if the
index is not an Integer or is out of bounds. Or fail if the value is not of
the right type for this kind of collection. Answer the value that was
stored. Essential. See Object documentation whatIsAPrimitive.
capacity:
initialize
Subclasses should redefine this method to perform initializations on instance creation
isEmpty
new
new:
nextKey
remove:
store:
WALabelTag
A WALabelTag is xxxxxxxxx.
Instance Variables
for:
tag
WALabelledFormDialog
WALabelledFormDialog is an abstract class for generating html forms. Given a data model WALabelledFormDialog displays a label and input field for each instance variable of interest. User supplied data is placed in the data model.
Subclasses need to implment the methods labelForSelector:, model, and rows. The "model" method just returns the object whose fields we wish to populate with date. The "rows" method returns a collections of symbols. One symbol for each row of data in the dialog. The symbol is used generate the accessor methods for the data in the model. The method "labelForSelector:" returns the labels for each row and each submit button in the form.
A standard text input field is used for each row of data. To use other html widgets for input for = a datum implement the method renderXXXOn: where XXX is the symbol for the row. See "renderNameOn:" in example below.
The default form has one button "Ok". Override the "buttons" method to change the text or number of submit buttons on the form. Override the "defaultButton" method to indicate which button is the default. For each button in the form the subclass needs a method with the same name as the button, which is called when the user clicks that button. See example below.
LabelledFormDialogExample subclass of WALabelledFormDialog instance methods
initialize
super initialize.
contact := Contact new. "contact is an inst var"
self addMessage: 'Please enter the followning information'.
model
^ contact
ok
self answer: contact
cancel
self answer
rows
^ #(name phoneNumber)
buttons
#(ok cancel)
labelForSelector: aSymbol
aSymbol == #name ifTrue: [^'Your Name'].
aSymbol == #phoneNumber ifTrue: [^'Phone Number'].
aSymbol == #ok ifTrue: [^'Ok'].
aSymbol == #cancel ifTrue: [^'Cancel'].
^ super labelForSelector: aSymbol
renderNameOn: html
"Show how to specily special input instead of using simple text field."
(html select)
list: #('Roger' 'Pete');
selected: 'Roger';
callback: [:v | contact name: v]
Contact Class used above has instance variables name, phoneNumber with standard getter and setter methods
renderDefaultFieldForSelector:on:
renderDialogOn:
renderFieldForSelector:on:
renderLabelForSelector:on:
renderRowForSelector:on:
renderTableRowsOn:
renderingSelectorFor:
rows
style
Returns a CSS stylesheet associated with this component. This stylesheet will be added to <head> section of the html document so it will be global and not scoped.
This is done for all visible components (see class comment of WAComponent for what visible means).
Nice for demos but consider using WAFileLibrary or exernal files instead.
WALibrary
I'm the common superclass of file and string libraries.
asFilename:
asSelector:
configurationComponent
default
deployFiles
Write to disk the files that the receiver use to serve as methods.
The files are stored in a subfolder named like the classname of the receiver in a subfolder of Smalltalk image folder.
documentAt:ifAbsent:
documentForFile:
fileSelectors
filenames
handlesFolder:
mimetypeForFile:
name
Answer a name for the receiver. This is used generically in the title of certain inspectors, such as the referred-to inspector, and specificially by various subsystems. By default, we let the object just print itself out..
updateRoot:
urlForFile:
urlOf:
urlOf:using:
WALinkElement
This element defines a link. Unlike A, it may only appear in the HEAD section of a document, although it may appear any number of times. Although LINK has no content, it conveys relationship information that may be rendered by user agents in a variety of ways (e.g., a tool-bar with a drop-down menu of links).
addAll
addAural
addBraille
addHandheld
addMedia:
addPrint
addProjection
addScreen
addTeletype
addTelevision
beAlternate
Gives alternate representations of the current document.
beAlternateStylesheet
beAppendix
beArchives
Provides a link to a collection of records, documents, or other materials of historical interest.
beAtom
beBookmark
beChapter
beClossary
beCopyright
beCss
beFirst
Indicates that the current document is a part of a series, and that the first document in the series is the referenced document.
beFontDefinition
beGlossary
beHelp
beIndex
beLast
beMicrosummary
http://wiki.mozilla.org/Microsummaries
beNext
Indicates that the current document is a part of a series, and that the next document in the series is the referenced document.
bePrevious
Indicates that the current document is a part of a series, and that the previous document in the series is the referenced document.
beRss
beSearch
Gives a link to a resource that can be used to search through the current document and its related pages.
beSection
beShortcutIcon
beStart
Refers to the first document in a collection of documents. This link type tells search engines which document is considered by the author to be the starting point of the collection.
beStylesheet
Imports a stylesheet.
beSubsection
beTableOfContents
beTop
beUp
Provides a link to a document giving the context for the current document.
isClosed
media:
This attribute specifies the intended destination medium for style information. It may be a single media descriptor or a comma-separated list. The default value for this attribute is 'screen'.
relationship:
This attribute describes the relationship from the current document to the anchor specified by the href(url) attribute. The value of this attribute is a space-separated list of link types.
reverse:
This attribute is used to describe a reverse link from the anchor specified by the href attribute to the current document. The value of this attribute is a space-separated list of link types.
tag
title:
url:
WALinkSubmitTest
A WALinkSubmitTest is xxxxxxxxx.
Instance Variables
count: <Object>
increment: <Object>
incrementList: <Object>
count
- xxxxx
increment
- xxxxx
incrementList
- xxxxx
count
count:
formId
increment
increment:
incrementList
incrementList:
initialize
Subclasses should redefine this method to perform initializations on instance creation
renderContentOn:
renderDescriptionOn:
renderInputOn:
renderLinksOn:
WAListAttribute
WAListAttribute is an attribute that is restricted to a list of values.
Instance Variables:
options <Collection of: (Object | String | Symbol)> list of possible values for the attribute
accept:with:
options
options:
valueFromString:
WAListTag
Abstract base class for ordered and unordered list tags.
Ordered and unordered lists are rendered in an identical manner except that visual user agents number ordered list items. User agents may present those numbers in a variety of ways. Unordered list items are not numbered.
Both types of lists are made up of sequences of list items defined by the LI element (whose end tag may be omitted).
Lists may also be nested.
renderListItem:labelled:
WAListener
I am a streaming server that directly writes the resulting data onto the socket. I use the request parsing of Kom, otherwise I am a web server on my own.
Note that the WAListener is not supposed to support redirects during the rendering phase, like it is done in WATask and WABasicAuthentication. It might work in the case the buffers of the socket stream haven't been flushed yet, but in most cases it doesn't. This is not a bug and will never be changed.
convertFileName:
convertMultipartFileField:
convertRequest:
default
dispatcher
dispatcher:
fieldsOf:
initialize
Subclasses should redefine this method to perform initializations on instance creation
initializeWithPort:
listenLoop
outputStreamFor:
port:
processConnection:
processMultipartFields:
shutDown
start
startOn:
startUp
stop
waitForConnectionOn:
writeResponseForRequest:on:
WALotsaLinksTest
A WALotsaLinksTest is xxxxxxxxx.
Instance Variables
renderContentOn:
WAMain
WAMain subclasses are used to initialize applications when a new session is started.
Subclasses must implement the following messages:
start:
Does the initializing
application
Answer the application to which this entry point is associated.
session
Answer the session to which this entry point is associated.
start:
The main entry point into a session.
WAMemory
A WAMemory is xxxxxxxxx.
Instance Variables
instances: <Object>
sizes: <Object>
table: <Object>
instances
- xxxxx
sizes
- xxxxx
table
- xxxxx
buildTable
children
This method is really important. It should return a collection of all subcomponents of the current component that will be rendered in #renderContentOn:. Components that are displayed using #call: are *not* children.
If the contents returned by this method change over time make sure to return them in #states as well, otherwise the back button will fail.
initialize
Subclasses should redefine this method to perform initializations on instance creation
renderContentOn:
totalInstances
totalSize
totalSizeString
WAMemoryToolPlugin
I display the memory usage tool.
execute
Execute the receiving plugin.
label
Answer the menu label of the plugin.
priority
Answer a number used to sort the receiver. A lower number means it appears earlier on.
WAMessageDecoration
I add a string message on top of the WAComponent I decorate. For example if change WACounter>>initialize as below the text "Counter Example" will appear on above the counter when rendered.
WACounter>>initialize
super initialize.
self count: 0.
self addMessage: 'Counter Example' "added line"
message:
renderContentOn:
WAMetaElement
A WAMetaElement is xxxxxxxxx.
Instance Variables
beLeftToRight
beRightToLeft
content:
contentType:
contentType:charset:
language:
name:
redirectAfter:to:
responseHeaderName:
scheme:
tag
textDirection:
WAMiniCalendar
WAMiniCalendar renders a monthly calendar. Users can navigate by month, year, or select a year and a month. Users can select a date in the calendar. Set canSelectBlock to control which dates a user can select. Use selectBlock to perform an action when a user selects a date. WAMiniCalendar>>date returns the selected date.
Select "Mini Calendar" tab of the Functional Seaside Test Suite to run an example (http://127.0.0.1:xxxx/seaside/tests/alltests)
Instance Variables:
canSelectBlock <BlockClosure with date argument> return true if date argument should be rendered with a link, ie user can select that date
date <WAValueHolder on a date> Selected date
month <WAValueHolder on a Month> Currently displayed month
selectBlock <BlockClosure with date argument> called when user selects a date
canBeRoot
canSelect:
canSelectBlock:
date
date:
example
initialize
Subclasses should redefine this method to perform initializations on instance creation
month
month:
monthHeading
months
renderCellForDate:on:
renderContentOn:
renderMonthHeadingOn:
renderMonthNavigationOn:
renderRowForWeek:on:
renderYearNavigationOn:
select:
selectBlock:
states
Answer a collection of states that should be backtracked.
weekDays
year
year:
WAMiniCalendarTest
A WAMiniCalendarTest is xxxxxxxxx.
Instance Variables
calendar: <Object>
calendar
- xxxxx
children
This method is really important. It should return a collection of all subcomponents of the current component that will be rendered in #renderContentOn:. Components that are displayed using #call: are *not* children.
If the contents returned by this method change over time make sure to return them in #states as well, otherwise the back button will fail.
initialize
Subclasses should redefine this method to perform initializations on instance creation
renderContentOn:
WAModeHaloPlugin
I control the rendering modes of the halo.
priority
Answer a number used to sort the receiver. A lower number means it appears earlier on.
renderOn:
A default render method to display the interface of the receiving plugin. Might be overriden with specific behavior in subclasses.
WAModelProxy
I am a fake object that can be interposed between the real model object and the client, so that the data can be validated or collected before commiting to the real model.
If you have a model instance like
model := WAStoreAddress new.
model street: 'Rathausgasse 34'.
create a model proxy by evaluating the following code:
proxy := WAModelProxy on: model.

Then use the accessors of the proxy as you would do with your model:
proxy country: 'Switzerland'.
proxy street -> 'Rathausgasse 34'
...

To propagate the values into your model send #commit :
proxy commit.
model country -> 'Switzerland'
commit
doesNotUnderstand:
Handle the fact that there was an attempt to send the given message to the receiver but the receiver does not understand this message (typically sent from the machine when a message is sent to the receiver and no method is defined for that selector).
model
name
Answer a name for the receiver. This is used generically in the title of certain inspectors, such as the referred-to inspector, and specificially by various subsystems. By default, we let the object just print itself out..
on:
performRead:
performRealWrite:with:
performWrite:with:
setModel:
value
WAModelTest
A WAModelTest is xxxxxxxxx.
Instance Variables
pass: <Object>
state: <Object>
test: <Object>
user: <Object>
pass
- xxxxx
state
- xxxxx
test
- xxxxx
user
- xxxxx
logoff
logon
pass
Answer the value of pass
pass:
Set the value of pass
renderButtonOn:
renderContentOn:
renderFeedbackOn:
renderPasswordOn:
renderUsernameOn:
test
Answer the value of test
test:
Set the value of test
user
Answer the value of user
user:
Set the value of user
WAMultiCounter
A WAMultiCounter is a component that consits of several instances of WACounter. Be sure to understand WACounter.
The lesson to learn here is how Seaside components can be composed of other components.
Instance Variables
counters: <Collection<WACounter>>
counters
- a Collection of components (instances of WACounter)
canBeRoot
children
This method is really important. It should return a collection of all subcomponents of the current component that will be rendered in #renderContentOn:. Components that are displayed using #call: are *not* children.
If the contents returned by this method change over time make sure to return them in #states as well, otherwise the back button will fail.
description
initialize
Subclasses should redefine this method to perform initializations on instance creation
renderContentOn:
WAMultiDispatchCallback
A WAMultiDispatchCallback is xxxxxxxxx.
Instance Variables
evaluateWithField:
WAMultiSelectTag
A WAMultiSelectTag is xxxxxxxxx.
Instance Variables
closeTag
Close the receiving tag onto the document.
dispatchCallback
isSelected:
Test if anObject is currently selected.
openTag
Open the receiving and all associated attributes onto the document.
performCallback:
WAMultipartInputTest
A WAMultipartInputTest is xxxxxxxxx.
Instance Variables
inputElements: <Object>
inputElements
- xxxxx
children
This method is really important. It should return a collection of all subcomponents of the current component that will be rendered in #renderContentOn:. Components that are displayed using #call: are *not* children.
If the contents returned by this method change over time make sure to return them in #states as well, otherwise the back button will fail.
description
example
initialize
Subclasses should redefine this method to perform initializations on instance creation
renderContentOn:
WANavigation
A WANavigation is xxxxxxxxx.
Instance Variables
selection: <Object>
selection
- xxxxx
initialize
Subclasses should redefine this method to perform initializations on instance creation
labelForOption:
options
renderContentOn:
renderOptionsOn:
renderSelectionOn:
select:
selection
selectionChanged
states
Answer a collection of states that should be backtracked.
WANavigationBar
A WANavigationBar is xxxxxxxxx.
Instance Variables
actionsSelector: <Object>
owner: <Object>
actionsSelector
- xxxxx
owner
- xxxxx
actions
actionsSelector:
initialize
Subclasses should redefine this method to perform initializations on instance creation
owner:
renderContentOn:
renderInput:on:
renderLink:on:
target
WANestedTransaction
A WANestedTransaction is a test that uses two nested #isolate: blocks
go
WANewSessionToolPlugin
I create a new session.
execute
Execute the receiving plugin.
label
Answer the menu label of the plugin.
priority
Answer a number used to sort the receiver. A lower number means it appears earlier on.
title
WANotFoundHandler
WANotFoundHandler handles requests whose urls don't map to a Seaside application.
handleRequest:
Handle aRequest and answer a response.
WANumberAttribute
WANumberAttribute represents a number attribute. It converts between text entered on the configuration page and numbers.
accept:with:
valueFromString:
WAObjectTag
A WAObjectTag is xxxxxxxxx.
Instance Variables
archive:
classId:
codebase:
codetype:
declare:
height:
standby:
tag
type:
url:
width:
WAOpeningConditionalComment
A WAOpeningConditionalComment is xxxxxxxxx.
Instance Variables
condition: <Object>
condition
- xxxxx
condition
condition:
encodeOn:
WAOpeningRevealedConditionalComment
A WAOpeningRevealedConditionalComment is xxxxxxxxx.
Instance Variables
encodeOn:
WAOptionGroupTag
The OPTGROUP element allows authors to group choices logically. This is particularly helpful when the user must choose from a long list of options; groups of related choices are easier to grasp and remember than a single long list of options.
It has crappy browser support and noone as ever used it. See WAInputTest >> #renderOptionGroupOn: for examples.
label:
This attribute specifies the label for the option group.
tag
WAOptionTag
A WAOptionTag is xxxxxxxxx.
Instance Variables
callback:
label:
This attribute allows authors to specify a shorter label for an option than the content of the OPTION element. When specified, user agents should use the value of this attribute rather than the content of the OPTION element as the option label.
selected:
tag
value:
WAOrderedListTag
See superclass comment.
tag
WAPackageInfo
A WAPackageInfo is xxxxxxxxx.
Instance Variables
addonName
externalName
Answer an external name by which the receiver is known. Generic implementation here is a transitional backstop. probably
fileOutUsing:suffix:
fileOutVW3
fileOutVW5
ignoredCategories
includesSystemCategory:
isYourClassExtension:
packageName
register
no nothing, we're for export only
versionString
WAPageExpired
A WAPageExpired is xxxxxxxxx.
Instance Variables
WAParameterTag
A WAParameterTag is xxxxxxxxx.
Instance Variables
name:
tag
type:
value:
WAParentChildTest
A WAParentChildTest is xxxxxxxxx.
Instance Variables
parent: <Object>
parent
- xxxxx
go
parent:
renderContentOn:
WAParentTest
A WAParentTest is xxxxxxxxx.
Instance Variables
child: <Object>
child
- xxxxx
children
This method is really important. It should return a collection of all subcomponents of the current component that will be rendered in #renderContentOn:. Components that are displayed using #call: are *not* children.
If the contents returned by this method change over time make sure to return them in #states as well, otherwise the back button will fail.
initialize
Subclasses should redefine this method to perform initializations on instance creation
renderContentOn:
WAPasswordAttribute
WAPasswordAttribute represents a password attribute. On the Seaside configuration page it displays the attribute differently than WAStringAttribute.
accept:with:
WAPasswordInputTag
I am a password input widget that does not display the entered text.
type
WAPath
WAPath represents a path navigation (breadcrumbs) for a web page and displays standard breadcrumbs(xxx >> yyy >> zzz). WAPath maintains a stack of associations, one for each "location" or "page" in the path. The association key is the text that is displayed in the breadcrimb. The association value is an object of your choosing, which your code uses to restore that "page".
To add to the path use the method WAPath>>pushSegment: anObject name: 'lulu'. The name: arguement is the association key, the segment: argument is the association value.
The method WAPath>>currentSegment returns object associated with the current "page". Your code is not notified when the user clicks on a link in the WAPath object. So when you render a page call WAPath>>currentSegment to get the current object, and generate the page accordingly.
See WAInspector for example use.
Use WATrail to handle breadcrumbs for sequences of call: and answers:.
Instance Variables:
stack <Array of associations(String->Object) > History of the page. Keys -> display string, values -> object used in helping generating page.
choose:
Install a new stack of navigation from the old one and the specified association.
currentSegment
example
initialize
Subclasses should redefine this method to perform initializations on instance creation
pushSegment:name:
renderContentOn:
states
Answer a collection of states that should be backtracked.
WAPathTest
A WAPathTest is xxxxxxxxx.
Instance Variables
counter: <Object>
counter
- xxxxx
children
This method is really important. It should return a collection of all subcomponents of the current component that will be rendered in #renderContentOn:. Components that are displayed using #call: are *not* children.
If the contents returned by this method change over time make sure to return them in #states as well, otherwise the back button will fail.
initialize
Subclasses should redefine this method to perform initializations on instance creation
renderContentOn:
updateUrl:
WAPhraseElementsTest
A WAPhraseElementsTest is xxxxxxxxx.
Instance Variables
renderAbbreviatedOn:
renderAcronymOn:
renderAddressOn:
renderCodeOn:
renderContentOn:
renderDefinitionOn:
renderHarryOn:
renderKeyboardInputOn:
renderModificationOn:
renderSampleOn:
renderVariableOn:
WAPlatformSpecificTest
A WAPlatformSpecificTest is xxxxxxxxx.
Instance Variables
compileUseNewCompiler
hasNewCompiler
testAddAllFilesIn
testCompileByteArrayLiteralSource
testCompileByteArrayWithCacheSource
testCompileIntoClassified
useCompileUseNewCompiler:during:
WAPlatformTest
A WAPlatformTest is a test to make sure the platform (= the Smalltalk dialect we are running on) implements the protocol we need for system classes like Collection. An example would be to make sure Collection implements #count: with the sementics we need.
testAddFirst
testAsNumber
testAsString
testAsUppercase
testBetweenAnd
testBlockContextWithPossibleArgument
testCharacterAsUnicode
test for:
Character >> #asUnicode
^self asInteger
testColorAsHtmlColor
test for:
Color >> #hex
| aStream |
aStream := (String new: 6) writeStream.
aStream nextPutAll: (((self red * 255) asInteger printStringBase: 16)
padded: #left to: 2 with: $0).
aStream nextPutAll: (((self green * 255) asInteger printStringBase: 16)
padded: #left to: 2 with: $0).
aStream nextPutAll: (((self blue * 255) asInteger printStringBase: 16)
padded: #left to: 2 with: $0).
^ aStream contents
Color >> #asHTMLColor
^ '#', self hex
testCount
testDaysInMonthForYear
testDisplayString
displayString for Symbols is undefined as far as Seaside is concerned
testEmptyOrNil
testFindTokens
testFixCallbackTemps
Make sure that #fixCallbackTemps is properly understood by block-contexts. Make sure that this is either a nop for Smalltalks with true block closures, or it properly fixes the context otherwise.
testGarbageCollect
if you miss this do a class extension
testMessageSendValueWithPossibleArgument
test for:
MessageSend >> #valueWithPossibleArgument: anArg
self numArgs = 0 ifTrue: [^self value].
self numArgs = 1 ifTrue: [^self value: anArg].
self numArgs > 1 ifTrue: [^self valueWithArguments: {anArg}, (Array new: self numArgs - 1)]
testStreamClosed
test for:
Stream >> #closed
^false
testSymbolAsMutator
test for:
Symbol >> #asMutator
^ (self copyWith: $:) asSymbol
testTotalSeconds
Answer the total seconds since the Squeak epoch: 1 January 1901.
WAPlugin
I am an abstract root class for all plugins. Plugins are an easy way to add or remove additional tools without changing the codebase. To add a new plugin make sure you choose the right superclass so that the tool can detect your code.
The appearance of all plugins, such as icons, has to be configured using CSS.
<=
allSubclassesOn:for:
cssClass
Answer a CSS class that will be applied to an automatically rendered link. nil means no class
execute
Execute the receiving plugin.
initializeTarget:requestor:
isActive
Answer wheter the plugin is usable with the current target.
label
Answer the menu label of the plugin.
on:for:
open:
Replace the current page with aComponent.
priority
Answer a number used to sort the receiver. A lower number means it appears earlier on.
renderOn:
A default render method to display the interface of the receiving plugin. Might be overriden with specific behavior in subclasses.
requestor
Answer the requestor component the plugin is working on.
target
Answer the target object the plugin is working on.
tooltip
Answer a tooltip string that is displayed on the plugin link or button.
WAPopupAnchorTag
I am used to create a link that opens in a new window. A name can be specified using #name: and many features can be configured. Note, that not all features are supported on all web browser platforms. If Javascript is disabled the link will behave like any other anchor.
Most of the time a popup-anchor is created like this:
html popupAnchor
callback: [ WARenderLoop new call: WACounter new ];
with: 'Open the counter within a new window'
This code creates a new render-loop and displays a new instance of WACounter within the new browser window.
beDependent
beResizable
dependent:
Specifies whether the new window is closed as well when the parent window gets closed.
extent:
Specifies the width and height of the new window.
featureString
height:
Specifies the height of the new window.
initialize
Subclasses should redefine this method to perform initializations on instance creation
left:
Specifies the x coordinate of the top left corner of the new window.
location:
Specifies whether to display the address line in the new window.
menubar:
Specifies whether to display the browser menu bar.
name
Answer a name for the receiver. This is used generically in the title of certain inspectors, such as the referred-to inspector, and specificially by various subsystems. By default, we let the object just print itself out..
name:
String specifying the name of the new window. If a window with this name already exists, then the new content will be displayed in that existing window, rather than creating a new one.
position:
Specifies the x and y coordinates of the top left corner of the new window.
resizable:
Specifies whether the new window is resizable.
scrollbars:
Specifies whether the new window should have scrollbars.
showScrollbars
showToolbar
status:
Specifies whether to display the browser status bar.
toolbar:
Specifies whether to display the toolbar in the new window.
top:
Specifies the y coordinate of the top left corner of the new window.
width:
Specifies the width of the new window.
with:
Render anObject into the receiver. Make sure that you call #with: last in the cascade, as this method will serialize the tag onto the output document.
WAPopupTest
A WAPopupTest is xxxxxxxxx.
Instance Variables
counterLoop
renderContentOn:
WAPresenter
A WAPresenter is xxxxxxxxx.
Instance Variables
application
fieldsAt:
Returns the string value associated to the key in the argument given to your webapplication. The argument can have been sent by a form or written at the end of the url (using ...?key=value construction). If key is not found, an error is sent.
fieldsAt:ifAbsent:
Returns the string value associated to the key in the argument given to your webapplication. The argument can have been sent by a form or written at the end of the url (using ...?key=value construction). If key is not found, aBlock is evaluated.
fieldsAt:ifPresent:
Returns the string value associated to the key in the argument given to your webapplication. The argument can have been sent by a form or written at the end of the url (using ...?key=value construction). If the key is present, execute the block and give it the value as a parameter. Otherwise, answer nil.
handleAnswer:
initialRequest:
When a new session is started, all visible presenters (components or tasks) receive this message with the request as argument.
A common usage for this is to initialize their state depending on the URL of the request. This is one building block for bookmarkable URL. The other is updateUrl: where you can manipulate the anchor urls generated by Seaside.
You can not use #call: in here. Consider using a WATask instead and sending #call: in #go.
See WABrowser for examples.
initialize
Subclasses should redefine this method to perform initializations on instance creation
isDecoration
new
nextPresentersDo:
preferenceAt:
preferenceAt:put:
processCallbackStream:
processChildCallbacks:
registerForBacktracking
renderContentOn:
renderWithContext:
rendererClass
Override this method if you want a custom renderer.
script
The same as #style except that it is for JavaScript. This is rarely used, consider using WAFileLibrary or exernal files instead.
session
showHalo
states
Answer a collection of states that should be backtracked.
style
Returns a CSS stylesheet associated with this component. This stylesheet will be added to <head> section of the html document so it will be global and not scoped.
This is done for all visible components (see class comment of WAComponent for what visible means).
Nice for demos but consider using WAFileLibrary or exernal files instead.
updateRoot:
This method allows you customize the <head> section of an HTML document. The API is very similar to the 'Canvas API' for rendering in the <body> section (where you 'draw' in #renderContentOn:).
anHtmlRoot is an instance of WAHtmlRoot
Whenever you override this method don't forget to send super
updateStates:
This method allows to register objects for backtracking. Don't forget to send super in all cases.
updateUrl:
withNextPresentersDo:
WAPrettyPrintedDocument
A WAPrettyPrintedDocument is xxxxxxxxx.
Instance Variables
firstLine: <Object>
html: <Object>
indentCloseTags: <Object>
indentLevel: <Object>
firstLine
- xxxxx
html
- xxxxx
indentCloseTags
- xxxxx
indentLevel
- xxxxx
attribute:with:
attributes:
closeTag:
cssClassFor:
cssClassForAttribute:
document
htmlEncoder
indent
initializeWithRenderer:
knownAttributes
knownEvents
knownRefs
knownTags
nextPut:
nextPutAll:
openTag:attributes:closed:
print:
renderer:
WAProcessMonitor
WAProcessMonitor executes a block in a new process. Ensures that only one such block is executed at a time. See method critical:ifError:
Instance Variables:
mutex <Semaphore> Used to sure that only one block is executed at a time
process <Process> New process used to execute block
semaphore <Semaphore> Used to signal when process is done
critical:ifError:
Evaluate aBlock as a mutual exclusive block within a new processes and wait for the process to finish. Evaluate anErrorBlock in case of a problem. Answer the result of evaluating the blocks. Note, that the semaphore needs to be an instance-variable, otherwise continuations might screw up the debugger.
initialize
Subclasses should redefine this method to perform initializations on instance creation
new
terminate
WAProfiler
A WAProfiler is xxxxxxxxx.
Instance Variables
children
This method is really important. It should return a collection of all subcomponents of the current component that will be rendered in #renderContentOn:. Components that are displayed using #call: are *not* children.
If the contents returned by this method change over time make sure to return them in #states as well, otherwise the back button will fail.
profileSendsDuring:
renderContentOn:
WAProfilerToolPlugin
I display the rendering profiler.
execute
Execute the receiving plugin.
label
Answer the menu label of the plugin.
priority
Answer a number used to sort the receiver. A lower number means it appears earlier on.
WAProxyTest
A WAProxyTest is xxxxxxxxx.
Instance Variables
test
WARadioButtonTag
A WARadioButtonTag is xxxxxxxxx.
Instance Variables
beChecked
beUnchecked
callback:
canHaveShortcut
group:
selected:
type
WARadioGroup
A WARadioGroup is xxxxxxxxx.
Instance Variables
canvas: <Object>
key: <Object>
canvas
- xxxxx
key
- xxxxx
canvas:
initializeWithCanvas:
key
radioButton
WARedirectContinuation
A WARedirectContinuation is xxxxxxxxx.
Instance Variables
handleRequest:
run
WARedirectHandler
A WARedirectHandler is xxxxxxxxx.
Instance Variables
redirectPageExpiredTo:
redirectTo:
WARegistry
WARegistry maintains sessions for a Seaside application. Each session has a key, which is the _s part of Seaside URLs and is embedded in links on pages generated by Seaside. WARegistry checks requests for session keys. If one exists, the request is sent to the proper session. If not the request is a new request so handleDefaultRequest: is called so subclasses can handle the request.
Subclasses must implement the following messages:
handleDefaultRequest:
Handle a request without a session key, ie a new request.
Instance Variables:
handlersByKey <Dictionary of <session key(string),WASession>> provides easy access to the session for a session key
keysByHandler <Dictionary of <WASession, session key(string)>> provides easy access to the session key of a session
mutex <Semaphore> Used to insure keysByHandler & handlersByKey are updated atomically
clearAllHandlers
clearHandlers
ensureKeyForHandler:
expiryPathFor:
handleDefaultRequest:
handleExpiredRequest:
handleKeyRequest:
Under some circumstances, HTTP fields are collections of values
handleRequest:
Handle aRequest and answer a response.
handlerField
initialize
Subclasses should redefine this method to perform initializations on instance creation
isSeasideField:
keyOrNilForHandler:
mutex
postCopy
self is a shallow copy, subclasses should copy fields as necessary to complete the full copy
redirectResponseFor:
registerRequestHandler:
shouldCollectHandlers
unregisterExpiredHandlers
Private - Unregisters the receiver expired handlers.
unregistered
urlForRequestHandler:
WARemoveDispatcherPlugin
I remove an application.
execute
Execute the receiving plugin.
label
Answer the menu label of the plugin.
priority
Answer a number used to sort the receiver. A lower number means it appears earlier on.
WARenderCanvas
This canvas knows about callbacks and is intertwined with the rest of the framework.
autocompleter
button
button:
callbacks
Answer the callback registry.
cancelButton
cancelButton:
checkbox
comet
context
Answer the rendering context.
context:callbacks:
dateInput
document
Answer the XHTML document.
draggable
droppable
effect
element
evaluator
fileUpload
form
Defines a form.
formElement
formElementObserver
formObserver
hiddenInput
imageButton
imageButton:
inPlaceEditor
initializeWithContext:callbacks:
insertion
javascript
logger
multiSelect
multiSelect:
nextId
option
option:
optionGroup
optionGroup:
painter
Answer the component that is supposed to paint this canvas.
passwordInput
passwordInput:
peekNextId
periodical
periodicalEvaluator
radioButton
radioButton:
radioGroup
radioGroup:
request
scriptaculous
Answer a Scriptaculous factory in the context of the receiver.
select
select:
selector
slider
sortable
submitButton
submitButton:
textArea
textArea:
textInput
textInput:
timeInput
updater
urlForAction:
Answer an action URL that will evaluate aBlock when beeing requested.
WARenderContinuation
A WARenderContinuation is xxxxxxxxx.
Instance Variables
context: <Object>
context
- xxxxx
componentsNotFound:
context
Answer the current context of this request.
handleRequest:
newContext
newDocumentOn:
newHtmlRoot
processCallbacks:
processRendering:
render
run
shouldRedirect:
unprocessedCallbacks:
withNotificationHandler:
writeOnLoadOn:
WARenderLoop
A WARenderLoop is xxxxxxxxx.
Instance Variables
root: <Object>
root
- xxxxx
application
Answer the application to which this entry point is associated.
call:
call:withToolFrame:
renderContinuationClass
root
root:
root:withToolFrame:
run
session
Answer the session to which this entry point is associated.
WARenderLoopConfiguration
A WARenderLoopConfiguration is xxxxxxxxx.
Instance Variables
ancestors
attributes
errorHandler
mainClass
rootComponents
WARenderLoopMain
When a new session on a WAApplication is started WARenderLoopMain initializes the application, that is it:

creates the top level component of the application,
informs each component(WAPresenter) of the application that the session started (via WAPresenter>>initialRequest:)
starts a WARenderLoop to handle the request
call:
createRoot
renderLoopClass
rootClass
start:
The main entry point into a session.
WARenderNotification
A WARenderNotification is xxxxxxxxx.
Instance Variables
WARenderingContext
A WARenderingContext is xxxxxxxxx.
Instance Variables
actionUrl: <Object>
callbacks: <Object>
count: <Object>
document: <Object>
mode: <Object>
properties: <Object>
session: <Object>
actionUrl
- xxxxx
callbacks
- xxxxx
count
- xxxxx
document
- xxxxx
mode
- xxxxx
properties
- xxxxx
session
- xxxxx
absoluteUrlForResource:
actionUrl
Answer the value of actionUrl
actionUrl:
advanceKey
callbackAt:
callbackStreamForRequest:
callbacks
callbacksFor:
clearMode
count
count:
debugMode
document
Answer the value of document
document:
Set the value of document
increaseKey
initialize
Subclasses should redefine this method to perform initializations on instance creation
isDebugMode
new
nextKey
properties
propertyAt:ifAbsent:
propertyAt:put:
registry
release
Remove references to objects that may refer to the receiver. This message
should be overridden by subclasses with any cycles, in which case the
subclass should also include the expression super release.
session
session:
storeCallback:
storePassenger:
urlForDocument:
urlForDocument:mimeType:
urlForDocument:mimeType:fileName:
WAReport
WAReport is an abstract super class for WATableReport. Just defines the rows for WATableReport. This class should be combined with WATableReport.
Instance Variables:
rows <SequenceableCollection> rows for the WATableReport
initialize
Subclasses should redefine this method to perform initializations on instance creation
rows:
WAReportColumn
A WAReportColumn is xxxxxxxxx.
Instance Variables
clickBlock: <Object>
formatBlock: <Object>
hasTotal: <Object>
sortBlock: <Object>
title: <Object>
valueBlock: <Object>
clickBlock
- xxxxx
formatBlock
- xxxxx
hasTotal
- xxxxx
sortBlock
- xxxxx
title
- xxxxx
valueBlock
- xxxxx
canChoose
canRender
canSort
chooseRow:
clickBlock:
columnClickBlock:
formatBlock:
hasTotal:
index:
initialize
Subclasses should redefine this method to perform initializations on instance creation
new
renderBlock:title:
renderValue:on:
selector:
selector:title:
selector:title:onClick:
sortBlock:
sortRows:
textForRow:
title
title:
totalForRows:
valueBlock:
valueForRow:
WARequest
I am a server independent http request object. Instance of me can be aquired through WASession >> #currentRequest
accept
acceptCharset
acceptEncoding
acceptLanguage
at:
Primitive. Assumes receiver is indexable. Answer the value of an
indexable element in the receiver. Fail if the argument index is not an
Integer or is out of bounds. Essential. See Object documentation
whatIsAPrimitive.
at:ifAbsent:
at:ifPresent:
authorization
blankRequest
cookieAt:
cookies
decodeAuthorization:
fields
headerAt:
headerAt:ifAbsent:
headers
host
includesKey:
isGet
isPrefetch
isXmlHttpRequest
method
method:url:headers:fields:cookies:
method:url:headers:fields:cookies:nativeRequest:
nativeRequest
nativeRequest:
password
printOn:
Append to the argument, aStream, a sequence of characters that
identifies the receiver.
referer
responseStream
responseStream:
setMethod:url:headers:fields:cookies:
url
user
userAgent
WARequestHandler
WARequestHandler is an abstract class whose subclasses handle http requests. Most of the methods are either empty or return a default value.
Subclasses must implement the following messages:
handleRequest: process the request
Instance Variables:
parent <WADispatcher | WAApplication | nil> What owns or manages the handler. WADispatchers manage WADispatchers & WAApplications, WAApplications own WASessions
description
Answer a descriptive text of the receiver.
handleRequest:
Handle aRequest and answer a response.
initialize
Subclasses should redefine this method to perform initializations on instance creation
isActive
isApplication
isDispatcher
isEntryPoint
isFeed
new
parent
Answer the parent request handler of the receiver.
postCopy
self is a shallow copy, subclasses should copy fields as necessary to complete the full copy
setParent:
unregistered
WAResponse
I am a server independent http response object. I am used in conjunction with WASession >> returnResponse:
addCookie:
attachmentWithFileName:
authenticationFailed
basicAuthWithRealm:
basicAuthenticationRealm:
beXML
cacheForever
contentType
contentType:
contents
contents:
cookieAt:put:
cookies
defaultHttpVersion
defaultValueForCharSet
defaultValueForContentType
defaultValueForMimeType
deleteCookieAt:
Delete the cookie in the browser
doNotCache
document:mimeType:
document:mimeType:fileName:
forbidden
forbidden:
headerAt:put:
headers
httpVersion
initialize
Subclasses should redefine this method to perform initializations on instance creation
internalError
internalError:
new
nextPut:
nextPutAll:
notFound
notFound:
printOn:
Append to the argument, aStream, a sequence of characters that
identifies the receiver.
redirect
redirectTo:
refreshWithMessage:location:delay:
release
Remove references to objects that may refer to the receiver. This message
should be overridden by subclasses with any cycles, in which case the
subclass should also include the expression super release.
root:render:
space
status
status:
stream
stream:
writeHeadersOn:
writeOn:
writeStatusOn:
WAResponseTest
A WAResponseTest is xxxxxxxxx.
Instance Variables
testForbidden
testInternalError
testNotFound
WARevealedConditionalComment
A WAConditionalComment is an implementation of Downlevel-revealed Conditional Comments:
http://msdn2.microsoft.com/en-us/library/ms537512.aspx
Non-IE family browsers see them always.
closingConditionClass
openingConditionClass
WARoot
A WARoot is xxxxxxxxx.
Instance Variables
close:
new
open:
WARubyTest
Examples taken directly from spec:
http://www.w3.org/TR/2001/REC-ruby-20010531/
renderComplexOn:
renderContentOn:
renderSimpleOn:
renderSimpleParenthesesOn:
WARubyTextTag
A WARubyTextTag is xxxxxxxxx.
Instance Variables
span:
tag
WAScreenshot
A WAScreenshot is xxxxxxxxx.
Instance Variables
button: <Object>
zoom: <Object>
button
- xxxxx
zoom
- xxxxx
buttonCode
canBeRoot
click:
description
form
initialize
Subclasses should redefine this method to perform initializations on instance creation
offset
renderContentOn:
renderMouseButtonOn:
renderMouseClickOn:
renderToggleUIProcessOn:
renderToggleZoomOn:
toggleUIProcess
toggleUIText
toggleZoom
toggleZoomText
topWindow
WAScriptElement
A WAScriptElement is xxxxxxxxx.
Instance Variables
beJavascript
defer
When set, this boolean attribute provides a hint to the user agent that the script is not going to generate any document content (e.g., no 'document.write' in javascript) and thus, the user agent can continue parsing and rendering.
tag
url:
WAScriptTag
A WAScriptTag is xxxxxxxxx.
Instance Variables
after
This template method is called directly after rendering the content of the receiver.
before
This template method is called directly before rendering the content of the receiver.
defer
When set, this boolean attribute provides a hint to the user agent that the script is not going to generate any document content (e.g., no 'document.write' in javascript) and thus, the user agent can continue parsing and rendering.
resourceUrl:
tag
url:
with:
Render anObject into the receiver. Make sure that you call #with: last in the cascade, as this method will serialize the tag onto the output document.
WASelectTag
This element allows the use to select one (in single selection mode) or multiple (in single selection mode) elements. Default is single selection. Multiple selection can be triggered with #beMultiple.
Single selection is in general a drop-down list, so make sure the list of options is not too big.
Multiple selection has in general crappy browser support and a list of checkboxes is in general the better option.
If in single selection mode and you want enable "no selection" see #beOptional.
If you absolutely need to you can render the options yourself with 'html option' inside #with:
Make sure to check the superclass for more methods.
See WAInputTest >> #renderSingleSelectionOn: and WAInputTest >> #renderMultiSelectionOn: for examples.
beMultiple
beOptional
This adds a nil item to #list: which has the semantic of no selection. #optionalLabel: is the label for nil. This only really makes sense in single selection mode.
beSingle
beSubmitOnChange
Submit the form in the user selects a value.
before
This template method is called directly before rendering the content of the receiver.
dispatchCallback
enabled:
Enable only those elements for selection for whom aBlock return true.
initialize
Subclasses should redefine this method to perform initializations on instance creation
isEnabled:
Test if anObject is enabled.
isOptional
name:
This attribute assigns the control name.
openTag
Open the receiving and all associated attributes onto the document.
optionalLabel:
The label for the nil element. See #beOptional.
renderListItem:labelled:
renderOptional
size:
If a SELECT element is presented as a scrolled list box, this attribute specifies the number of rows in the list that should be visible at the same time. Visual user agents are not required to present a SELECT element as a list box; they may use any other mechanism, such as a drop-down menu.
tag
titleForOption:
titles:
The given block will be used to generated title attributes for any of the options.
WASelection
WASelection creates a selectable list. Items can be any object. If optional labelBlock is not given the string versions of the items are displayed to user, otherwise labelBlock is used to generate the text to display for each item. Returns the item selected by user, (not the index nor the text shown the user).
| selection |
selection := WASelection new.
selection items: #(1 'cat' 'rat').
selection
labelBlock: [:item | item = 1 ifTrue: ['First'] ifFalse: [item asUppercase]].
result := self call: selection.
self inform: result printString
Instance Variables:
items <Array of Objects>
labelBlock <One arg Block>
initialize
Subclasses should redefine this method to perform initializations on instance creation
items
items:
labelBlock
labelBlock:
renderContentOn:
WASelectionDateTable
WASelectionDateTable renders a table containing dates and rows. A user can select a continuous block of cells in the table. The table contains one column for each date from startDate to endDate. The top row of the table groups columns by month and labels each month (January 2008). The second row contains the date of each month (1-30) in the date range. The table also contains "rows size" rows. The first column of these rows contains the contents of the instance variable "rows". Rest of the cells contents are given by "cellBlock".
Instance Variables:
cellBlock <BlockClosure [:rowIndex :date | ]> returns text for the cell in row "rowIndex" and column for "date"
dateSelectionEnd <Date> last selected date
dateSelectionStart <Date> first selected date
rowSelectionEnd <Integer> index of last selected row
rowSelectionStart <Integer> index of first selected row
clearSelection
colorForDate:rowIndex:
endDate:
endDateSelection
endRow
endRowSelection
hasSelection
renderCellForDate:row:index:on:
rows:
rowsAndDatesDisplay:
selectAll
selectDate:rowIndex:
selectedRows
selectionContainsDate:rowIndex:
startDate:
startDateSelection
startRow
startRowSelection
style
Returns a CSS stylesheet associated with this component. This stylesheet will be added to <head> section of the html document so it will be global and not scoped.
This is done for all visible components (see class comment of WAComponent for what visible means).
Nice for demos but consider using WAFileLibrary or exernal files instead.
WASession
I am a Seaside session. A new instance of me gets created when an user accesses an application for the first time and is persistent as long as the user is interacting with it.
This class is intended to be subclasses by applications that need global state, like a user. Custom state can be added by creating instance variables and storing it there. The session can be retrieved by #session if inside a component or task or by evaluating: WACurrentSession value
If the session has not been used for #defaultTimeoutSeconds, it is garbage collected by the system. To manually expire a session call #expire.
A good way to clear all sessions is the following code:
WARegistry clearAllHandlers.
Smalltalk garbageCollect
actionField
actionUrlForContinuation:
actionUrlForKey:
addLoadScript:
application
baseUrl
charSet
checkCookiesField
clearJumpTo
clearLoadScripts
closePopup
closePopupAndContinue
closePopupWithoutReloadingOpener
contentType
currentRequest
Returns the current http request, instance of WARequest
defaultTimeoutSeconds
effect
errorHandler
fieldsAt:
fieldsAt:ifAbsent:
fieldsAt:ifPresent:
incomingRequest:
initialize
Subclasses should redefine this method to perform initializations on instance creation
jumpToAnchor:
mainClass
mimeType
newSessionUrl
onLoadScripts
onRespond:
outputDocumentClass
To be subclassed as needed
pageExpired
pageIntentionallyLeftBlank
performRequest:
redirect
redirectResponseFor:
redirectTo:
redirectWithCookie:
redirectWithMessage:delay:
registerObjectForBacktracking:
rememberScripts:
respond:
respond:onAnswer:
responseForRequest:
returnResponse:
aborts all further processing and directly returns aResponse
aResponse instance of WAResponse
script:
sessionCookie
start:
unknownRequest:
unregistered
updateRoot:
updateStates:
updateUrl:
useSessionCookie
withErrorHandler:
withEscapeContinuation:
WASessionConfiguration
WASessionConfiguration defines attributes with default values about the Seaside session used by an application.
It defines
sessionClass (WASession or subclass)
mainClass (a subclass of WAMain)
errorHandler (a subclass of WAErrorHander)
renderContinuationClass (WARenderContinuation or subclass)
redirectContinuationClass (WARedirectContinuation or subclass)
useSessionCookie (
true:
put session id in cookie if client supports cookies
false:
put session id in all urls returned in the _s parameter
default:
false)
This configuration is added to all applications by default.
ancestors
attributes
errorHandler
errorHandlerClasses
mainClasses
redirectContinuationClass
redirectContinuationClasses
redirectHandler
redirectHandlerClasses
renderContinuationClass
renderContinuationClasses
sessionClass
sessionClasses
sessionExpirySeconds
useSessionCookie
WASessionContinuation
A WASessionContinuation is xxxxxxxxx.
Instance Variables
root: <Object>
states: <Object>
root
- xxxxx
states
- xxxxx
application
Answer the application to which this handler is associated.
handleRequest:
initializeWithRoot:
newRedirectContinuation
Answer a new redirect handler.
newRenderContinuation
Answer a new render continuation.
newResponse
Answer a new response object and assign the current request stream.
newStates
request
Answer the current request object.
respond:
root
Answer the root component instance. Usually this component is instantiated with the first reuqest.
root:
run
session
Answer the session to which this handler is associated.
states
updateRoot:
updateStates:
updateUrl:
url
value:
Resume processing of aRequest. To ensure valid application state restore all registered states.
WASessionProtector
I bind a session to an IP address.
The problem I solve is when you navigate from a Seaside "page" to a different page then this page will have enough information to hijack your old session. This can happen for example with blogs that display the referer.
I don't work for users that have the same IP. This is the case if they are NATed (universities, companies, ...). I can be circumvened if the application is not behind an Apache proxy.
An alternative to solve the same problem is to use a session cookie.
Usage:
In your root component class implement
initialize
super initialize.
self addDecoration: WASessionProtector new
isGlobal
processChildCallbacks:
remoteAddressFromRequest:
renderContentOn:
respondNotVerified
storedRemoteAddress
updateRoot:
This method allows you customize the <head> section of an HTML document. The API is very similar to the 'Canvas API' for rendering in the <body> section (where you 'draw' in #renderContentOn:).
anHtmlRoot is an instance of WAHtmlRoot
Whenever you override this method don't forget to send super
verifyRequest:
WASimpleErrorHandler
I am like WAErrorHandler except that I display the code 500 error with a short stackframe for errors and warnings too.
handleError:
WASimpleNavigation
I'm a simple tab panel, that can be styled with stylesheets. New tabs can be added using #add:label:
add:label:
children
This method is really important. It should return a collection of all subcomponents of the current component that will be rendered in #renderContentOn:. Components that are displayed using #call: are *not* children.
If the contents returned by this method change over time make sure to return them in #states as well, otherwise the back button will fail.
example
initialize
Subclasses should redefine this method to perform initializations on instance creation
labels
Return the tabs labels
options
renderSelectionOn:
selectedComponent
WASmallDictionary
I am an implementation of a dictionary. Compared to other dictionaries I am very efficient for small sizes, speed- and space-wise. I also remember the order in which elements are added, some of my users might depend on that. My implementation features some ideas from the RefactoringBrowser.
associations
Answer a Collection containing the receiver's associations.
associationsDo:
at:
Answer the value associated with aKey. Raise an exception, if no such key is defined.
at:ifAbsent:
Answer the value associated with aKey. Evaluate aBlock, if no such key is defined.
at:ifAbsentPut:
Answer the value associated with aKey. Evaluate aBlock, if no such key is defined and store the return value.
at:ifPresent:
Lookup aKey in the receiver. If it is present, answer the value of evaluating the given block with the value associated with the key. Otherwise, answer nil.
at:put:
Set the value of aKey to be aValue.
errorKeyNotFound
findIndexFor:
grow
includesKey:
Answer whether the receiver has a key equal to aKey.
initialize
Subclasses should redefine this method to perform initializations on instance creation
isEmpty
javascriptOn:
keys
keysAndValuesDo:
keysDo:
new
postCopy
self is a shallow copy, subclasses should copy fields as necessary to complete the full copy
privateAt:put:
removeKey:
Remove aKey from the receiver, raise an exception if the element is missing.
removeKey:ifAbsent:
Remove aKey from the receiver, evaluate aBlock if the element is missing.
size
Primitive. Answer the number of indexable variables in the receiver.
This value is the same as the largest legal subscript. Essential. See Object
documentation whatIsAPrimitive.
values
valuesDo:
WASnapshot
A WASnapshot is xxxxxxxxx.
Instance Variables
objects: <Object>
objects
- xxxxx
initialize
Subclasses should redefine this method to perform initializations on instance creation
new
register:
restore
Restore all the backtracked states.
snapshot
Snapshot all the states that have been registered for backtracking overriding existing snapshots.
WAStandardFiles
A collection of standard scripts, styles, and images. They are needed for the configuration application and some basic look-and-feel in Seaside. The icons are from the Tango Desktop Project (tango.freedesktop.org), they are licensed under the Creative Commons Attribution Share-Alike license.
codebrowserPng
configPng
externalAnchorsJs
haloCss
inspectorPng
kalseyTabsCss
this is from http://kalsey.com/tools/csstabs/ - would also be nice to do http://www.alistapart.com/articles/slidingdoors/
memoryPng
miscJs
profilerPng
selectorsToInclude
The files represented by the selectors this method returns will be automatically added to the html <head> if the receiver is added to the respective Seaside application.
This makes only sense for CSS and JS files
shortcutsJs
styleeditorPng
toolbarCss
updateRoot:
Only override if you want to automatically include new types of resources. The default implementation knows how to reference CSS, JS and FavIcons into aHtmlRoot.
windowCss
WAStandardScripts
Deprecated, replaced by WAStandardFiles.
externalAnchorsJs
miscJs
new
selectorsToInclude
The files represented by the selectors this method returns will be automatically added to the html <head> if the receiver is added to the respective Seaside application.
This makes only sense for CSS and JS files
shortcutsJs
updateRoot:
Only override if you want to automatically include new types of resources. The default implementation knows how to reference CSS, JS and FavIcons into aHtmlRoot.
WAStandardStyles
Deprecated, replaced by WAStandardFiles.
kalseyTabsCss
this is from http://kalsey.com/tools/csstabs/ - would also be nice to do http://www.alistapart.com/articles/slidingdoors/
new
selectorsToInclude
The files represented by the selectors this method returns will be automatically added to the html <head> if the receiver is added to the respective Seaside application.
This makes only sense for CSS and JS files
sourceStyleCss
WAStateHolder
I am only where for migration purposes. Don't use WAStateHolder anymore. Backtracking is now done using #states. If you need an object that wraps a single value use WAValueHolder.
new
WAStaticHtmlCanvas
This canvas can be used to generate static/RESTful HTML pages.
document
document:
initializeWithDocument:
root:
textArea
WAStreamResponse
A WAStreamResponse is xxxxxxxxx.
Instance Variables
writtenHeaders: <Object>
writtenHeaders
- xxxxx
hasWrittenHeaders
initialize
Subclasses should redefine this method to perform initializations on instance creation
on:
stream
writeOn:
WAStringAttribute
WAStringAttribute represents a string attribute. It does the trivial conversion between text entered on the Seaside configuration page and a string.
accept:with:
valueFromString:
WAStringLibraryEditor
A WAStringLibraryEditor is xxxxxxxxx.
Instance Variables
library: <Object>
library
- xxxxx
library
library:
renderContentOn:
renderDoneOn:
renderFilesOn:
renderHeadingsOn:
renderWriteToDiskOn:
urlFor:
WAStylesHaloPlugin
I open the style editor on the component class.
execute
Execute the receiving plugin.
label
Answer the menu label of the plugin.
priority
Answer a number used to sort the receiver. A lower number means it appears earlier on.
tooltip
Answer a tooltip string that is displayed on the plugin link or button.
WASubmitButtonTag
A WASubmitButtonTag is xxxxxxxxx.
Instance Variables
callback:
canHaveShortcut
on:of:
type
with:
Render anObject into the receiver. Make sure that you call #with: last in the cascade, as this method will serialize the tag onto the output document.
WASvgTest
A WASvgTest is xxxxxxxxx.
Instance Variables
renderContentOn:
WASystemConfiguration
Subclass WASystemConfiguration to define a group of attributes for a Seaside application. The method "attributes" returns a collection of attributes in this configuration. If a configuration requires other configurations then implement the method "ancestors", which returns a collection of configuration classes. Subclasses can define default values for attributes. If you define an attribute named "useSessionCookie" you can provide a default value by implementing a method "useSessionCookie" that returns the default value. See existing subclasses for examples. Non-default values for attributes are not stored in WASystemConfiguration subclasses, but are stored in WAUserConfiguration.
WAUserConfiguration is a singleton class to avoid implementing = and hash. Only need one instance of WAUserConfiguration and its subclasses.
Subclasses must implement the following messages:
attributes
return a collection of attribute objects
attributes
instance
localValueAt:ifAbsent:
name
Answer a name for the receiver. This is used generically in the title of certain inspectors, such as the referred-to inspector, and specificially by various subsystems. By default, we let the object just print itself out..
new
WATableCellTag
A WATableCellTag is xxxxxxxxx.
Instance Variables
align:
character:
characterOffset:
colSpan:
rowSpan:
scope:
verticalAlign:
WATableColumnGroupTag
A WATableColumnGroupTag is xxxxxxxxx.
Instance Variables
align:
character:
characterOffset:
span:
tag
verticalAlign:
width:
WATableColumnTag
A WATableColumnTag is xxxxxxxxx.
Instance Variables
isClosed
Answer true if this tag should be closed immediately, such as <br />.
tag
WATableDataTag
A WATableDataTag is xxxxxxxxx.
Instance Variables
tag
WATableHeadingTag
A WATableHeadingTag is xxxxxxxxx.
Instance Variables
tag
WATableReport
A WATableReport is xxxxxxxxx.
Instance Variables
columns: <Object>
isReversed: <Object>
rowColors: <Object>
rowPeriod: <Object>
sortColumn: <Object>
columns
- xxxxx
isReversed
- xxxxx
rowColors
- xxxxx
rowPeriod
- xxxxx
sortColumn
- xxxxx
chooseRow:column:
colorForRowNumber:
columns:
initialize
Subclasses should redefine this method to perform initializations on instance creation
isReversed
renderColumn:row:on:
renderContentOn:
renderFooterForColumn:on:
renderHeaderForColumn:on:
renderRowNumber:item:on:
renderRowsOn:
renderTableFooterOn:
renderTableHeaderOn:
reverse
rowColors:
rowPeriod:
rows
sortColumn
sortColumn:
states
Answer a collection of states that should be backtracked.
WATableReportTest
A WATableReportTest is xxxxxxxxx.
Instance Variables
report: <Object>
report
- xxxxx
children
This method is really important. It should return a collection of all subcomponents of the current component that will be rendered in #renderContentOn:. Components that are displayed using #call: are *not* children.
If the contents returned by this method change over time make sure to return them in #states as well, otherwise the back button will fail.
example
initialize
Subclasses should redefine this method to perform initializations on instance creation
WATableTag
A WATableTag is xxxxxxxxx.
Instance Variables
align:
border:
cellpadding:
cellspacing:
frame:
frame = void|above|below|hsides|lhs|rhs|vsides|box|border [CI]
This attribute specifies which sides of the frame surrounding a table will be visible. Possible values:
* void: No sides. This is the default value.
* above: The top side only.
* below: The bottom side only.
* hsides: The top and bottom sides only.
* vsides: The right and left sides only.
* lhs: The left-hand side only.
* rhs: The right-hand side only.
* box: All four sides.
* border: All four sides.
layout
rules:
rules = none|groups|rows|cols|all [CI]
This attribute specifies which rules will appear between cells within a table. The rendering of rules is user agent dependent. Possible values:
* none: No rules. This is the default value.
* groups: Rules will appear between row groups (see THEAD, TFOOT, and TBODY) and column groups (see COLGROUP and COL) only.
* rows: Rules will appear between rows only.
* cols: Rules will appear between columns only.
* all: Rules will appear between all rows and columns.
summary:
tag
WATagBrush
This is the superclass for all XML element classes. Its main addtions are
- element name (#tag)
- attributes (instance of WAHtmlAttributes)
- common events (onXXX), this is a hack and would better be solved with traits
accessKey:
Set a keyboard shortcut to access an element. An access key is a single character from the document character set.
Pressing an access key assigned to an element gives focus to the element. The action that occurs when an element receives focus depends on the element. For example, when a user activates a link defined by the A element, the user agent generally follows the link. When a user activates a radio button, the user agent changes the value of the radio button. When the user activates a text field, it allows input, etc.
The following elements support the accesskey attribute: A, AREA, BUTTON, INPUT, LABEL, and LEGEND, and TEXTAREA.
The invocation of access keys depends on the underlying system. For instance, on machines running MS Windows, one generally has to press the 'alt' key in addition to the access key. On Apple systems, one generally has to press the 'cmd' key in addition to the access key.
addShortcut:
after
This template method is called directly after rendering the content of the receiver.
attributeAt:
attributeAt:ifAbsent:
attributeAt:ifAbsentPut:
attributeAt:ifPresent:
attributeAt:put:
attributes
attributes:
before
This template method is called directly before rendering the content of the receiver.
canHaveShortcut
class:
This attribute assigns one or more class names to an element; the element may be said to belong to these classes. A class name may be shared by several element instances. Multiple classes might be added to one brush.
class:if:
Adds the class aString aString to this element if aBoolean is true,
Example
html div
class: 'important' if: self isImportant;
with: self message
closeTag
Close the receiving tag onto the document.
confirm:
Put up a yes/no menu with caption queryString. Answer true if the
response is yes, false if no. This is a modal question--the user must
respond yes or no.
direction:
Set the text direction ltr (left-to-right) or right-to-left (rtl).
Not supported on:
APPLET, BASE, BASEFONT, BR, FRAME, FRAMESET, IFRAME, PARAM, SCRIPT
disableEnter
pressing the 'enter' key in the form input element does not submit the form
disabled
disabled:
document
ensureId
Answer the id of the receiving attribute. In case the receiver doesn't have an id yet, generate a new one.
id
id:
The id attribute assigns a identifier to an element. The id of an element must be unique within a document.
isClosed
Answer true if this tag should be closed immediately, such as <br />.
language:
Set the language code.
onBlur:
The onblurs event occurs when the element that is in focus, loses that focus.
onChange:
The onchange event occurs when a select input element has a selection made or when a text input element has a change in the text.
onClick:
The onclick event occurs when the pointing device button is clicked over an element.
onDoubleClick:
The ondblclick event occurs when the pointing device button is double clicked over an element.
onEnter:
If 'enter' is pressed
onError:
onFocus:
The onfocus event occurs when an element receives focus either by the pointing device or by tabbing navigation.
onKeyDown:
The onkeydown event occurs when a key is pressed down over an element.
onKeyPress:
The onkeypress event occurs when a key is pressed and released over an element.
onKeyUp:
The onkeyup event occurs when a key is released over an element.
onLoad:
The onload event occurs when the user agent finishes loading a window.
onMouseDown:
The onmousedown event occurs when the pointing device button is pressed over an element.
onMouseMove:
The onmousemove event occurs when the pointing device is moved while it is over an element.
onMouseOut:
The onmouseout event occurs when the pointing device is moved away from an element.
onMouseOver:
The onmouseover event occurs when the pointing device is moved onto an element.
onMouseUp:
The onmouseup event occurs when the pointing device button is released over an element.
onReset:
The onreset event occurs when a form is reset.
onResize:
onScroll:
onSelect:
The onselect event occurs when a user selects some text in a text field.
onSubmit:
The onsubmit event occurs when a form is submitted.
onUnload:
The onunload event occurs when the user agent removes a document from a window.
openTag
Open the receiving and all associated attributes onto the document.
passenger:
script:
session
style:
This attribute offers optional CSS style information. The attribute is deprecated and should be avoided in favor of an external stylesheet. Multiple styles might be added to one brush.
submitFormNamed:
tabIndex:
This attribute specifies the position of the current element in the tabbing order for the current document. This value must be a number between 0 and 32767.
The tabbing order defines the order in which elements will receive focus when navigated by the user via the keyboard. The tabbing order may include elements nested within other elements.
The following elements support the tabindex attribute: A, AREA, BUTTON, INPUT, OBJECT, SELECT, and TEXTAREA.
tag
title:
This attribute offers advisory information about the element for which it is set. Visual browsers frequently display the title as a 'tool tip'.
with:
Render anObject into the receiver. Make sure that you call #with: last in the cascade, as this method will serialize the tag onto the output document.
withLineBreaks:
Renders text preserving line breaks.
WATask
I am a subclass of WAComponent, specialized for defining workflow. The difference between a task and a component is the following:
Both of them are reusable, embeddable, callable pieces of user interface. A component has state (instance variables), behavior (it may change its state, and it may also choose to display other components with #call:), and appearance (it renders HTML). A Task has only the first two - it doesn't render any HTML directly, but only through the components it calls. This is useful when what you want to encapsulate/embed/call is purely a process (show this component, then this one, then this one).
The key method for WATask is #go - as soon as a task is displayed, this method will get invoked, and will presumably #call: other components.
In terms of implementation, you can think of a WATask in the following way: it is a component which renders two things:
- a link whose callback invokes the #go method
- a header that immediately redirects to the URL of that link
Subclasses must not implement #renderContentOn:
An example can be found in WAConvenienceTest.
decoration:shouldWrap:
go
updateRoot:
This method allows you customize the <head> section of an HTML document. The API is very similar to the 'Canvas API' for rendering in the <body> section (where you 'draw' in #renderContentOn:).
anHtmlRoot is an instance of WAHtmlRoot
Whenever you override this method don't forget to send super
WATaskTest
A WATaskTest is xxxxxxxxx.
Instance Variables
renderContentOn:
WATemporaryFile
I represent a file that was uploaded by the user via #fileInput. Compared to WAFile my contents are not stored in memory on disk in a temporary file. I support the same protocol as WAFile.
Instance Variables
fileSize: <Integer>
temporaryFileName: <String>
fileSize
- the file size in bytes
temporaryFileName
- the name of the file in which my contents are stored on disk
contents
Reads the contents of the file into memory and returns them.
Keep in mind that the contents will be cached into an instance variable.
delete
deletes the uploaded file from the disk
initializeFromChunk:
This is where we actually read the file contents chunk wise
and save it to disk.
isTemporary
this is not an in memory but an in temporary file
readStreamDo:
Convenience method to access a read stream on the contents. The read stream will be passed to the block.
the stream will be in binary mode
the stream will be closed afterwards
size
the file size in bytes
temporaryDirectory
the directory in which the file is located in which my contents are stored on the server
temporaryFileName
the name of the file in which my contents are stored in the directory #temporaryDirectory
don't confuse this with #fileName which is the name of the file that the client sent
WATerminateToolPlugin
I try to terminate the process handling this session. This can work of you're at 100% CPU.
label
Answer the menu label of the plugin.
priority
Answer a number used to sort the receiver. A lower number means it appears earlier on.
renderOn:
A default render method to display the interface of the receiving plugin. Might be overriden with specific behavior in subclasses.
WATextAreaTag
I am a multi line text input widget. See WAInputTest >> #renderTextAreaWithExampleOn: for examples.
columns:
This attribute specifies the visible width in average character widths. User agents may wrap visible text lines to keep long lines visible without the need for scrolling.
isClosed
Answer true if this tag should be closed immediately, such as <br />.
rows:
This attribute specifies the number of visible text lines. If more are entered, the widget scrolls.
tag
value
value:
with:
Render anObject into the receiver. Make sure that you call #with: last in the cascade, as this method will serialize the tag onto the output document.
WATextInputTag
I am a single line text input widget. See WAInputTest >> #renderTextInputWithExampleOn: for examples.
maxLength:
This attribute specifies the maximum number of characters the user may enter. This number may exceed the specified #size:, in which case the user agent should offer a scrolling mechanism. The default value for this attribute is an unlimited number.
size:
This attribute tells the user agent the initial width of the widget. The width is given in number of characters.
type
with:
Render anObject into the receiver. Make sure that you call #with: last in the cascade, as this method will serialize the tag onto the output document.
WATimeInput
I am a composition of three input fields that allows the user to select hour, minute and optionally second.
#withSeconds and #withoutSeconds can be used to toggle seconds.
The argument for my callback blocks is an instance of Time.
See WADateTimeTest >> #renderDateTimeOn:
addCallback
addHoursCallbackToBrush:
addMinutesCallbackToBrush:
addSecondsCallbackToBrush:
hours
hours:
initialize
Subclasses should redefine this method to perform initializations on instance creation
minutes
minutes:
renderHours
renderMinutes
renderSeconds
seconds
seconds:
setValueWithNewTime
with:
withSeconds
withoutSeconds
WATimeSelector
WATimeSelector displays dropdown menus (html select) allowing a user to delect a time within a range. "startHour" and "endHour" define the range of selectable times. Time is displayed in 24 hour format. WATimeSelector>>time returns time user selected as a Time object.
See WADateSelectorTest for sample of usage.
Select "Date Selector" tab of the Functional Seaside Test Suite to run an example (http://127.0.0.1:xxxx/seaside/tests/alltests)
Instance Variables:
endHour <Integer 0-23> end of time interval for selectable times
hour <Integer 0-23> selected hour
minute <Integer 0-59> selected minute
second <Integer 0-59> selected second
startHour <Integer 0-23> start of time interval for selectable times
date:
days
endHour
endHour:
hour
hour:
initialize
Subclasses should redefine this method to perform initializations on instance creation
minute
minute:
privateIsValidSecond:hourNumber:minuteNumber:
renderContentOn:
renderValidationErrorOn:
second
second:
startHour
startHour:
time
time:
timeClass
timeIsValid
WATimeingToolPlugin
I display render and callback times.
priority
Answer a number used to sort the receiver. A lower number means it appears earlier on.
renderOn:
A default render method to display the interface of the receiving plugin. Might be overriden with specific behavior in subclasses.
WAToggleHalosToolPlugin
I toggle halos on and off.
execute
Execute the receiving plugin.
label
Answer the menu label of the plugin.
priority
Answer a number used to sort the receiver. A lower number means it appears earlier on.
WATool
A WATool is xxxxxxxxx.
Instance Variables
root: <Object>
root
- xxxxx
root
Answer the root component of the application.
root:
WAToolFrame
A WAToolFrame is xxxxxxxxx.
Instance Variables
deprecated: <Object>
plugins: <Object>
processTime: <Object>
renderTime: <Object>
root: <Object>
showHalos: <Object>
deprecated
- xxxxx
plugins
- xxxxx
processTime
- xxxxx
renderTime
- xxxxx
root
- xxxxx
showHalos
- xxxxx
children
This method is really important. It should return a collection of all subcomponents of the current component that will be rendered in #renderContentOn:. Components that are displayed using #call: are *not* children.
If the contents returned by this method change over time make sure to return them in #states as well, otherwise the back button will fail.
clearDeprecated
deprecated
initialize
Subclasses should redefine this method to perform initializations on instance creation
on:
plugins
processCallbackStream:
processTime
renderChildOn:
renderContentOn:
renderTime
renderToolbarOn:
root
root:
showHalos
states
Answer a collection of states that should be backtracked.
toggleHalos
withDeprecatedHandlerDo:
WAToolPlugin
Abstract root class for all development tool bar tools.
cssClass
Answer a CSS class that will be applied to an automatically rendered link. nil means no class
WATrail
WATrail implements breadcrumbs for pages generated using a sequence of WAComponent>>call: methods. Each component in the call sequence that is to appear in the breadcrumb must implement the method "trailName", which returns the text displayed in the breadcrumb.
Instantiate (WATrail on: rootComponent) an WATrail object on the first component (root) of the breadcrumb. When the root component, or subsequent component, transfers control via "self call:" the WATrail object is automatically updated and will display the correct call sequence in the breadcrumb. When a user clicks on a link in the breadcrumb the call sequence is automatically updated.
Uses CSS and lists to display the ">>" in breadcrumbs. As a result the breadcrumb starts with ">>" rather than the first element
Instance Variables:
root <WAComponent> first component in the breadcrumb and in the call sequence.
on:
renderContentOn:
root:
style
Returns a CSS stylesheet associated with this component. This stylesheet will be added to <head> section of the html document so it will be global and not scoped.
This is done for all visible components (see class comment of WAComponent for what visible means).
Nice for demos but consider using WAFileLibrary or exernal files instead.
WATransaction
WATransaction ensures that the component it decorates is not repeated once the "transaction" is completed. For example once a user has submitted an order you don't want them to use the web browser's back button to accidentally resubmit the order. WATransaction does not support rollbacks.
Normally you will not use this class directly. Instead use WAComponent>>isolate: in a task.
Instance Variables:
active <Boolean> false indicates the transaction is over.
close
initialize
Subclasses should redefine this method to perform initializations on instance creation
isGlobal
processChildCallbacks:
renderContentOn:
WATransactionTest
A WATransactionTest runs a WANestedTransaction with a description
children
This method is really important. It should return a collection of all subcomponents of the current component that will be rendered in #renderContentOn:. Components that are displayed using #call: are *not* children.
If the contents returned by this method change over time make sure to return them in #states as well, otherwise the back button will fail.
initialize
Subclasses should redefine this method to perform initializations on instance creation
renderContentOn:
renderExplanationOn:
WATree
WATree implements a tree menu, which supports nesting, collapsing and expanding. Prefixes items with "+/-" to indicate items that can be expanded/collapsed.
See class methods for simple example.
Instance Variables:
canSelectBlock <BlockClosure [:nodeInTree | ]> returns true if user can select the argument of the block, if true node is an anchor
childrenBlock <BlockClosure [:nodeInTree | ]> returns children (or subnodes) of the given node in the tree, sent to all nodes
expanded <IdentitySet> Collection of all nodes that are currently expanded
labelBlock <[:nodeInTree | ]> returns text to display for given node
root <Object> root or top level node in tree, childrenBlock is used to determine roots subnodes
selectBlock <BlockClosure [:selectedNode | ]> called when an node is selected, put a callback to your code here
selected <Object> currently selected node
canSelect:
canSelectBlock
canSelectBlock:
childrenBlock
childrenBlock:
childrenOf:
collapse:
exampleCollectionClasses
exampleObjectExplorer
expand:
expandAll:
hasChildren:
initialize
Subclasses should redefine this method to perform initializations on instance creation
isExpanded:
labelBlock
labelBlock:
labelOf:
renderContentOn:
renderNode:on:
renderNodeButton:on:
renderNodeButtonLink:action:text:on:
renderNodeChildren:on:
renderNodeLabel:on:
renderNodeLabelLink:action:text:on:
renderTreeOn:
root
root:
root:path:
select:
selectBlock
selectBlock:
selected
selected:
states
Answer a collection of states that should be backtracked.
WAUnorderedListTag
See superclass comment.
tag
WAUploadTest
A WAUploadTest is xxxxxxxxx.
Instance Variables
file: <Object>
file
- xxxxx
renderContentOn:
renderDownloadLinksOn:
renderFileContentsOn:
renderUploadOn:
WAUrl
I represent all portions of an URL as described by the RFC 1738. I include scheme, username, password, hostname, port, path, parameters, and fragment.
Portions of this code are based on code of Kazuki Yasumatsu and Paolo Bonzini.
Instance Variables
scheme: <String> or nil
username: <String> or nil
password: <String> or nil
hostname: <String> or nil
port: <Integer> or nil
path: <OrderedCollection> or nil
parameters: <Dictionary>
fragment: <String> or nil
addParameter:
addParameter:value:
addToPath:
encodeFragmentOn:
encodeOn:
encodeOn:usingHtmlEntities:
encodeParametersOn:usingHtmlEntities:
encodePathOn:
encodeServerOn:
fragment
Answer the fragment part of the URL.
fragment:
hostname
Answer the host part of the URL.
hostname:
initialize
Subclasses should redefine this method to perform initializations on instance creation
isSeasideField:
javascriptOn:
new
parameters
parameters:
password
Answer the password part of the URL.
password:
path
Answer the path part of the URL.
path:
Set the path part of the URL to aCollection.
port
Answer the port number part of the URL.
port:
postCopy
self is a shallow copy, subclasses should copy fields as necessary to complete the full copy
printOn:
Append to the argument, aStream, a sequence of characters that
identifies the receiver.
removeParameters
scheme
Answer the URL's scheme.
scheme:
we really expect a String here, Old versions (2.7) expected a Symbol you can still pass a Symbol and get away with it but don't expect this behavior to be supported in future versions.
#asString is the 'correct' way to convert a Symbol to a String since #displayString will add a hash on VW
takeServerParametersFromRequest:
username
Answer the username part of the URL.
username:
with:
withParameter:
withParameter:value:
withoutParameters
WAUrlEncoder
I encode path segments and arguments of an URL.
encode:on:
initialize
Subclasses should redefine this method to perform initializations on instance creation
WAUrlTest
A WAUrlTest is xxxxxxxxx.
Instance Variables
url: <Object>
url
- xxxxx
setUp
testAddParamter
testAddToPath
testFragment
testHostname
testParameters
testPassword
testPath
testPathEncoding
testPort
testQueryEncoding
testScheme
testUsername
WAUserConfiguration
WAUserConfiguration is a composite of configurations. This composite of configurations is stored in the field "ancestors". WAUserConfiguration also contains all the non-default values of attributes for an application. WAUserConfiguration inherits attribute values defined in its ancestors. If WAUserConfiguration does not have a value for an attribute it will search its ancestors for a value, stopping when it finds a value.
WAUserConfiguration is the first configuration added to a Seaside application (WAApplication). All other configurations added to the application are added as ancestors to WAUserConfiguration. When a value for an attribute is set either by the standard Seaside component configuration page or in code the value is added to the "values" dictionary in WAUserConfiguration.
Instance Variables:
ancestors <Collection of: WAConfiguration> hierarchy of configurations defining all attributes for this instance of WAUserConfiguration
values <Dictionary> the dictionary key is an attribute key, dictionary value is value of that attribute
addAncestor:
allPotentialAncestors
ancestors
clear
clearValueForAttribute:
hasMutableAncestry
initialize
Subclasses should redefine this method to perform initializations on instance creation
localValueAt:ifAbsent:
localValues
localValues:
overrideAttribute:
postCopy
self is a shallow copy, subclasses should copy fields as necessary to complete the full copy
removeAncestor:
takeValue:forAttribute:
valueAt:put:
WAUtf8EncodingStream
I wrap a SocketStream and encode the input to utf-8.
Unfortunately such hacks are needed because of the Squeak Stream hierarchy.
basicNextPut:
crlf
initialize
Subclasses should redefine this method to perform initializations on instance creation
isBinary
nextPut:
nextPutAll:
on:
setStream:
socket
WAVNCController
A WAVNCController is xxxxxxxxx.
Instance Variables
canBeRoot
currentDisplay
description
initialize
Subclasses should redefine this method to perform initializations on instance creation
isServerRunning
project
renderContentOn:
renderResumeOn:
renderStartOn:
renderStopOn:
renderSuspendOn:
resume
serverClass
serverInstance
startOn:
stop
suspend
WAValidateToolPlugin
I validate and XHTML page by sending it to the W3C validator. I only work if the website is publically available.
label
Answer the menu label of the plugin.
priority
Answer a number used to sort the receiver. A lower number means it appears earlier on.
renderOn:
A default render method to display the interface of the receiving plugin. Might be overriden with specific behavior in subclasses.
WAValidationDecoration
A WAValidationDecoration validates its component form data when the component returns using "answer" or "answer:". A WAValidationDecoration can be added to component via the method "validateWith:" as below.
SampleLoginComponent>>intialize
form := WAFormDecoration new buttons: self buttons.
self addDecoration: form.
self validateWith: [:answerArgOrSelf | answerArgOrSelf validate].
self addMessage: 'Please enter the following information'.
If component returns via "answer:" the answer: argument is passed to the validate block. If the component returns using "answer" the sender of "answer" is passed to the validate block.
Instance Variables
exceptionClass: <Notification>
message: <String>
validationBlock: <one arg block>
exceptionClass
- Type of notication that is raised by validation code when validation fails. Default value is WAValidationNotification
message
- String message displayed on validation failure. Obtained from the notification
validationBlock
- One arg block,
exceptionClass
exceptionClass:
handleAnswer:
handleAnswer:continueWith:
initialize
Subclasses should redefine this method to perform initializations on instance creation
renderContentOn:
states
Answer a collection of states that should be backtracked.
validate:
validateWith:
WAValidationNotification
I am signaled to indicate that a validation has occurred. See: Object>>validationError:, WAComponent>>validateWith: and WAValidationDecoration.
WAValueCallback
A WAValueCallback is xxxxxxxxx.
Instance Variables
block: <Object>
block
- xxxxx
block:
evaluateWithArgument:
priority
WAValueHolder
I wrap a single object. I am like value holder except that I am portable and don't include the Model cruft in Squeak.
contents
contents:
printOn:
Append to the argument, aStream, a sequence of characters that
identifies the receiver.
with:
WAVersionUploader
A WAVersionUploader is xxxxxxxxx.
Instance Variables
file: <Object>
url: <Object>
file
- xxxxx
url
- xxxxx
canBeRoot
description
initialize
Subclasses should redefine this method to perform initializations on instance creation
loadFile
loadURL
newVersion:
renderContentOn:
saveImage
sortedWorkingCopies
WAViewer
A WAViewer is xxxxxxxxx.
Instance Variables
presenter: <Object>
presenter
- xxxxx
buttons
compile:
model
on:
presenter:
renderContentOn:
renderCssOn:
rows
save
script
The same as #style except that it is for JavaScript. This is rarely used, consider using WAFileLibrary or exernal files instead.
WAWalkback
I am a component that renders an exeception stack with temporary variables. Per default I renders the top stack frames only, but I offers the option to render all. I also offers the option to open a debugger in the image or to proceed with the execution.
exception
exception:
frames
initializeWithException:
renderContentOn:
renderExceptionOn:
renderHeadingOn:
renderObject:labelled:on:
renderStackFrame:on:
renderStackOn:
renderToolsOn:
safePrintString:
updateRoot:
This method allows you customize the <head> section of an HTML document. The API is very similar to the 'Canvas API' for rendering in the <body> section (where you 'draw' in #renderContentOn:).
anHtmlRoot is an instance of WAHtmlRoot
Whenever you override this method don't forget to send super
WAWalkbackErrorHandler
I am the default development error handler that displays the stack frames and adds the option to display a debugger.
I delegate the rendering to WAWalkback.
handleError:
open:
WAWindowDecoration
WAWindowDecoration adds a simple title and close button in a bordered area at the top of the page. When closed button is selected nil is "answer"ed. Useful for a quick & dirty dialog window. Used by WAPlugin and SCTestRunner.
Instance Variables:
cssClass <String> String added to "window-title " to generate cssClass for the title
title <String> title of page
cssClass:
isGlobal
renderCloseButtonOn:
renderContentOn:
title:
WAYesOrNoDialog
WAYesOrNoDialog displays a yes/no dialog. Returns boolean indicating user selection. See WAComponent>>confirm: for sample usage and easy way to use WAYesOrNoDialog.
buttons
no
yes