From Squeak3.9 on 16 October 2007 at 11:39:07 pm <version>Seaside2.7b1-mb.23.mcz 1 October 2007 7:48:45 am</version> <name>Seaside</name> <environment>Smalltalk</environment> <private>false</private> <imports> private Squeak.* private Smalltalk.* </imports> <category>Seaside</category> <attributes> <package>Seaside</package> </attributes> <class> <name>Amb</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none failureContinuation <imports></imports> <category>Seaside-Continuations</category> <attributes> <package>Seaside-Continuations</package> </attributes> </class> <class> <name>AmbTest</name> <environment>Seaside</environment> <super>XProgramming.SUnit.TestCase</super> <private>false</private> none amb <imports></imports> <category>Seaside-Continuations</category> <attributes> <package>Seaside-Continuations</package> </attributes> </class> <class> <name>Continuation</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none values <imports></imports> <category>Seaside-Continuations</category> <attributes> <package>Seaside-Continuations</package> </attributes> </class> <class> <name>AnswerContinuation</name> <environment>Seaside</environment> <super>Seaside.Continuation</super> <private>false</private> none <imports></imports> <category>Seaside-Continuations</category> <attributes> <package>Seaside-Continuations</package> </attributes> </class> <class> <name>ContinuationTest</name> <environment>Seaside</environment> <super>XProgramming.SUnit.TestCase</super> <private>false</private> none tmp tmp2 <imports></imports> <category>Seaside-Continuations</category> <attributes> <package>Seaside-Continuations</package> </attributes> </class> <class> <name>EscapeContinuation</name> <environment>Seaside</environment> <super>Seaside.Continuation</super> <private>false</private> none <imports></imports> <category>Seaside-Continuations</category> <attributes> <package>Seaside-Continuations</package> </attributes> </class> <class> <name>ResponseContinuation</name> <environment>Seaside</environment> <super>Seaside.Continuation</super> <private>false</private> none <imports></imports> <category>Seaside-Continuations</category> <attributes> <package>Seaside-Continuations</package> </attributes> </class> <class> <name>WAAbstractHtmlBuilder</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none attributeBuffer <imports></imports> <category>Seaside-Builder</category> <attributes> <package>Seaside-Builder</package> </attributes> </class> <name>HtmlCharacters</name> <environment>Seaside.WAAbstractHtmlBuilder</environment> <private>false</private> <constant>false</constant> <category>class variables</category> <initializer>nil</initializer> <attributes> <package>Seaside-Builder</package> </attributes> <comment> Seaside.WAAbstractHtmlBuilder
I am abstract class providing methods to build xhtml. My most commonly used subclass is WAHtmlRenderer.
</comment> <class> <name>WABacktrackingTest</name> <environment>Seaside</environment> <super>XProgramming.SUnit.TestCase</super> <private>false</private> none <imports></imports> <category>Seaside-StateRegistry</category> <attributes> <package>Seaside-StateRegistry</package> </attributes> </class> <class> <name>WABrush</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none parent canvas isClosed <imports></imports> <category>Seaside-Canvas</category> <attributes> <package>Seaside-Canvas</package> </attributes> </class> <comment> Seaside.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.
</comment> <class> <name>WACachedDocument</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none fullFileName mimeDocument mimeType <imports></imports> <category>Seaside-Document</category> <attributes> <package>Seaside-Document</package> </attributes> </class> <name>Cache</name> <environment>Seaside.WACachedDocument</environment> <private>false</private> <constant>false</constant> <category>class variables</category> <initializer>nil</initializer> <attributes> <package>Seaside-Document</package> </attributes> <comment> Seaside.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
</comment> <class> <name>WACallback</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none context owner key <imports></imports> <category>Seaside-Rendering</category> <attributes> <package>Seaside-Rendering</package> </attributes> </class> <class> <name>WAActionCallback</name> <environment>Seaside</environment> <super>Seaside.WACallback</super> <private>false</private> none block <imports></imports> <category>Seaside-Rendering</category> <attributes> <package>Seaside-Rendering</package> </attributes> </class> <class> <name>WACallbackRegistry</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none context owner <imports></imports> <category>Seaside-Rendering</category> <attributes> <package>Seaside-Rendering</package> </attributes> </class> <class> <name>WACallbackStream</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none callbacks request <imports></imports> <category>Seaside-Rendering</category> <attributes> <package>Seaside-Rendering</package> </attributes> </class> <class> <name>WACancelActionCallback</name> <environment>Seaside</environment> <super>Seaside.WAActionCallback</super> <private>false</private> none <imports></imports> <category>Seaside-Rendering</category> <attributes> <package>Seaside-Rendering</package> </attributes> </class> <class> <name>WACanvas</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none currentBrush parentBrush painter <imports></imports> <category>Seaside-Canvas</category> <attributes> <package>Seaside-Canvas</package> </attributes> </class> <comment> Seaside.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.
</comment> <class> <name>WAClosingConditionalComment</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none <imports></imports> <category>Seaside-Document-Elements</category> <attributes> <package>Seaside-Document-Elements</package> </attributes> </class> <class> <name>WAConditionalComment</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none condition root <imports></imports> <category>Seaside-Document-Elements</category> <attributes> <package>Seaside-Document-Elements</package> </attributes> </class> <class> <name>WAConfiguration</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none <imports></imports> <category>Seaside-Configuration</category> <attributes> <package>Seaside-Configuration</package> </attributes> </class> <class> <name>WAConfigurationAttribute</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none key group <imports></imports> <category>Seaside-Configuration</category> <attributes> <package>Seaside-Configuration</package> </attributes> </class> <class> <name>WABooleanAttribute</name> <environment>Seaside</environment> <super>Seaside.WAConfigurationAttribute</super> <private>false</private> none <imports></imports> <category>Seaside-Configuration</category> <attributes> <package>Seaside-Configuration</package> </attributes> </class> <class> <name>WAConfigurationTest</name> <environment>Seaside</environment> <super>XProgramming.SUnit.TestCase</super> <private>false</private> none <imports></imports> <category>Seaside-Configuration</category> <attributes> <package>Seaside-Configuration</package> </attributes> </class> <class> <name>WACookie</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none key value path expiry <imports></imports> <category>Seaside-HTTP</category> <attributes> <package>Seaside-HTTP</package> </attributes> </class> <comment> Seaside.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)
</comment> <class> <name>WADefaultActionCallback</name> <environment>Seaside</environment> <super>Seaside.WAActionCallback</super> <private>false</private> none <imports></imports> <category>Seaside-Rendering</category> <attributes> <package>Seaside-Rendering</package> </attributes> </class> <class> <name>WADeprecatedApi</name> <environment>Seaside</environment> <super>Notification</super> <private>false</private> none <imports></imports> <category>Seaside-Utilities</category> <attributes> <package>Seaside-Utilities</package> </attributes> </class> <comment> Seaside.WADeprecatedApi
WADeprecatedApi is a notification that gets signaled if someone used a deprecated Seaside method. see #deprecatedApi
</comment> <class> <name>WADispatchCallback</name> <environment>Seaside</environment> <super>Seaside.WACallback</super> <private>false</private> none <imports></imports> <category>Seaside-Rendering</category> <attributes> <package>Seaside-Rendering</package> </attributes> </class> <class> <name>WADispatcherTest</name> <environment>Seaside</environment> <super>XProgramming.SUnit.TestCase</super> <private>false</private> none defaultDispatcher alternateDispatcher shortDispatcher baseName alternateName lastUpdate <imports></imports> <category>Seaside-Tests-Previous</category> <attributes> <package>Seaside-Tests-Previous</package> </attributes> </class> <class> <name>WADynamicVariable</name> <environment>Seaside</environment> <super>Notification</super> <private>false</private> none <imports></imports> <category>Seaside-Utilities</category> <attributes> <package>Seaside-Utilities</package> </attributes> </class> <comment> Seaside.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.
</comment> <class> <name>WACurrentSession</name> <environment>Seaside</environment> <super>Seaside.WADynamicVariable</super> <private>false</private> none <imports></imports> <category>Seaside-Session</category> <attributes> <package>Seaside-Session</package> </attributes> </class> <comment> Seaside.WACurrentSession
A WACurrentSession is the dynamic variable for the current Seaside session. See superclass comment for what a dynamic variable is.
</comment> <class> <name>WAErrorHandler</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none <imports></imports> <category>Seaside-Session</category> <attributes> <package>Seaside-Session</package> </attributes> </class> <comment> Seaside.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.
</comment> <class> <name>WADebugErrorHandler</name> <environment>Seaside</environment> <super>Seaside.WAErrorHandler</super> <private>false</private> none <imports></imports> <category>Seaside-Session</category> <attributes> <package>Seaside-Session</package> </attributes> </class> <comment> Seaside.WADebugErrorHandler
I am like WAErrorHandler except that I open a debugger in the image for errors and warnings (not for internal errors).
</comment> <class> <name>WAExternalID</name> <environment>Seaside</environment> <super>ByteArray</super> <private>false</private> bytes <imports></imports> <category>Seaside-Utilities</category> <attributes> <package>Seaside-Utilities</package> </attributes> </class> <name>Generator</name> <environment>Seaside.WAExternalID</environment> <private>false</private> <constant>false</constant> <category>class variables</category> <initializer>nil</initializer> <attributes> <package>Seaside-Utilities</package> </attributes> <name>GeneratorMutex</name> <environment>Seaside.WAExternalID</environment> <private>false</private> <constant>false</constant> <category>class variables</category> <initializer>nil</initializer> <attributes> <package>Seaside-Utilities</package> </attributes> <comment> Seaside.WAExternalID
I am a session or conticuation key.
</comment> <class> <name>WAFile</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none contents contentType fileName <imports></imports> <category>Seaside-HTTP</category> <attributes> <package>Seaside-HTTP</package> </attributes> </class> <comment> Seaside.WAFile
I represent a file that was uploaded by the user via #fileInput.
</comment> <class> <name>WAFileLibraryTest</name> <environment>Seaside</environment> <super>XProgramming.SUnit.TestCase</super> <private>false</private> none <imports></imports> <category>Seaside-Tests-Previous</category> <attributes> <package>Seaside-Tests-Previous</package> </attributes> </class> <class> <name>WAHtmlAttributes</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none attributes <imports></imports> <category>Seaside-Document</category> <attributes> <package>Seaside-Document</package> </attributes> </class> <comment> Seaside.WAHtmlAttributes
I represent the attributes of a XHTML tag. I am essentially a dictionary, but I provide some conveniance methods related to attribute addition and rendering.
</comment> <class> <name>WAHtmlBuilder</name> <environment>Seaside</environment> <super>Seaside.WAAbstractHtmlBuilder</super> <private>false</private> none document <imports></imports> <category>Seaside-Builder</category> <attributes> <package>Seaside-Builder</package> </attributes> </class> <class> <name>WAHtmlCanvas</name> <environment>Seaside</environment> <super>Seaside.WACanvas</super> <private>false</private> none <imports></imports> <category>Seaside-Canvas</category> <attributes> <package>Seaside-Canvas</package> </attributes> </class> <comment> Seaside.WAHtmlCanvas
This canvas knows about HTML but nothing about callbacks.
</comment> <class> <name>WAHtmlDocument</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none root <imports></imports> <category>Seaside-Document</category> <attributes> <package>Seaside-Document</package> </attributes> </class> <class> <name>WAHtmlElement</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none children name attributes isClosed <imports></imports> <category>Seaside-Document-Elements</category> <attributes> <package>Seaside-Document-Elements</package> </attributes> </class> <class> <name>WABaseElement</name> <environment>Seaside</environment> <super>Seaside.WAHtmlElement</super> <private>false</private> none <imports></imports> <category>Seaside-Document-Elements</category> <attributes> <package>Seaside-Document-Elements</package> </attributes> </class> <class> <name>WAHtmlRenderer</name> <environment>Seaside</environment> <super>Seaside.WAAbstractHtmlBuilder</super> <private>false</private> none context callbacks shortcutBuffer <imports></imports> <category>Seaside-Builder</category> <attributes> <package>Seaside-Builder</package> </attributes> </class> <comment> Seaside.WAHtmlRenderer
I am passed to the method #renderContentOn: of components unless #rendererClass has been redefined. On top of the basic XHTML construction methods inherited from WAAbstractHtmlBuilder, I provide an interface to attach event handlers to anchors and to form-elements. To render any kind of squeak object call the message #render: It will do a double dispatch and call #renderOn: on this object. For example: html render: 'Some text'. html render: 123. " will print the child " html render: nil. " will do nothing " html render: #( 'a' 'b' 'c' ). " will print every element " html render: businessObject. " will print the #displayString of your object " html render: childComponent. " will render the child component " This kind of double dispatch can be used with any xhtml-generating method: html divNamed: 'child' with: childComponent. html bold: #( 1 'First' ).
</comment> <class> <name>WAHtmlRoot</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none docType title htmlAttrs headAttrs bodyAttrs headElements scripts styles resourceBaseUrl <imports></imports> <category>Seaside-Document</category> <attributes> <package>Seaside-Document</package> </attributes> </class> <class> <name>WAHtmlStreamDocument</name> <environment>Seaside</environment> <super>Seaside.WAHtmlDocument</super> <private>false</private> none state stream <imports></imports> <category>Seaside-Document</category> <attributes> <package>Seaside-Document</package> </attributes> </class> <class> <name>WAHtmlTestDocument</name> <environment>Seaside</environment> <super>Seaside.WAHtmlStreamDocument</super> <private>false</private> none <imports></imports> <category>Seaside-Document</category> <attributes> <package>Seaside-Document</package> </attributes> </class> <comment> Seaside.WAHtmlTestDocument
This class is intended to be used by unit tests. The instances of this class are created and used by WARenderCanvasForTest. It allows the production of an html fragments that can be verified for correctness. See subclasses of WARenderCanvasTestCase for examples of unit tests.
</comment> <class> <name>WAImageCallback</name> <environment>Seaside</environment> <super>Seaside.WAActionCallback</super> <private>false</private> none <imports></imports> <category>Seaside-Rendering</category> <attributes> <package>Seaside-Rendering</package> </attributes> </class> <class> <name>WALRUCache</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none table ageTable max <imports></imports> <category>Seaside-Utilities</category> <attributes> <package>Seaside-Utilities</package> </attributes> </class> <class> <name>WALibrary</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none <imports></imports> <category>Seaside-Libraries</category> <attributes> <package>Seaside-Libraries</package> </attributes> </class> <comment> Seaside.WALibrary
I'm the common superclass of file and string libraries.
</comment> <class> <name>WAFileLibrary</name> <environment>Seaside</environment> <super>Seaside.WALibrary</super> <private>false</private> none default <imports></imports> <category>Seaside-Libraries</category> <attributes> <package>Seaside-Libraries</package> </attributes> </class> <name>MimeTypes</name> <environment>Seaside.WAFileLibrary</environment> <private>false</private> <constant>false</constant> <category>class variables</category> <initializer>nil</initializer> <attributes> <package>Seaside-Libraries</package> </attributes> <comment> Seaside.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 use FileLibrary = 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 existing 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'. == Examples: = Including a css manually updateRoot: anHtmlRoot super updateRoot: anHtmlRoot. anHtmlRoot stylesheet url: WAFileLibraryDemo / #mainCss = Displaying an Image renderContentOn: html html image url: WAFileLibraryDemo / #mainJpg
</comment> <class> <name>WADispatcherFiles</name> <environment>Seaside</environment> <super>Seaside.WAFileLibrary</super> <private>false</private> none <imports></imports> <category>Seaside-Components-Tools</category> <attributes> <package>Seaside-Components-Tools</package> </attributes> </class> <class> <name>WAFileLibraryDemo</name> <environment>Seaside</environment> <super>Seaside.WAFileLibrary</super> <private>false</private> none <imports></imports> <category>Seaside-Tests-Previous</category> <attributes> <package>Seaside-Tests-Previous</package> </attributes> </class> <class> <name>WAListAttribute</name> <environment>Seaside</environment> <super>Seaside.WAConfigurationAttribute</super> <private>false</private> none options <imports></imports> <category>Seaside-Configuration</category> <attributes> <package>Seaside-Configuration</package> </attributes> </class> <class> <name>WAMain</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none <imports></imports> <category>Seaside-Session</category> <attributes> <package>Seaside-Session</package> </attributes> </class> <class> <name>WAMetaElement</name> <environment>Seaside</environment> <super>Seaside.WAHtmlElement</super> <private>false</private> none <imports></imports> <category>Seaside-Document-Elements</category> <attributes> <package>Seaside-Document-Elements</package> </attributes> </class> <class> <name>WAModelProxy</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none cache model <imports></imports> <category>Seaside-Utilities</category> <attributes> <package>Seaside-Utilities</package> </attributes> </class> <comment> Seaside.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'
</comment> <class> <name>WAMultiDispatchCallback</name> <environment>Seaside</environment> <super>Seaside.WADispatchCallback</super> <private>false</private> none <imports></imports> <category>Seaside-Rendering</category> <attributes> <package>Seaside-Rendering</package> </attributes> </class> <class> <name>WANumberAttribute</name> <environment>Seaside</environment> <super>Seaside.WAConfigurationAttribute</super> <private>false</private> none <imports></imports> <category>Seaside-Configuration</category> <attributes> <package>Seaside-Configuration</package> </attributes> </class> <class> <name>WAOpeningConditionalComment</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none condition <imports></imports> <category>Seaside-Document-Elements</category> <attributes> <package>Seaside-Document-Elements</package> </attributes> </class> <class> <name>WAPageExpired</name> <environment>Seaside</environment> <super>Notification</super> <private>false</private> none <imports></imports> <category>Seaside-Session</category> <attributes> <package>Seaside-Session</package> </attributes> </class> <class> <name>WAPluggableSelectBox</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none changeSelected model selected size list <imports></imports> <category>Seaside-Components-Tools</category> <attributes> <package>Seaside-Components-Tools</package> </attributes> </class> <class> <name>WAPresenter</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none <imports></imports> <category>Seaside-Component</category> <attributes> <package>Seaside-Component</package> </attributes> </class> <class> <name>WAComponent</name> <environment>Seaside</environment> <super>Seaside.WAPresenter</super> <private>false</private> none decoration <imports></imports> <category>Seaside-Component</category> <attributes> <package>Seaside-Component</package> </attributes> </class> <comment> Seaside.WAComponent
I am a class representing a graphical element of a seaside application. A component has state (instance variables, that might be backtracked using #registerObjectForBacktracking:), 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
</comment> <class> <name>WAAlphabeticBatchedList</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none items currentPage <imports></imports> <category>Seaside-Components-Widgets</category> <attributes> <package>Seaside-Components-Widgets</package> </attributes> </class> <class> <name>WABatchSelection</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none batcher linkSelector textSelector <imports></imports> <category>Seaside-Components-Dialogs</category> <attributes> <package>Seaside-Components-Dialogs</package> </attributes> </class> <class> <name>WABatchTest</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none batcher <imports></imports> <category>Seaside-Tests-Previous</category> <attributes> <package>Seaside-Tests-Previous</package> </attributes> </class> <class> <name>WABatchedList</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none items batchSize currentPage <imports></imports> <category>Seaside-Components-Widgets</category> <attributes> <package>Seaside-Components-Widgets</package> </attributes> </class> <class> <name>WABrowser</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none contents model message <imports></imports> <category>Seaside-Components-Tools</category> <attributes> <package>Seaside-Components-Tools</package> </attributes> </class> <class> <name>WACacheTest</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none <imports></imports> <category>Seaside-Tests-Previous</category> <attributes> <package>Seaside-Tests-Previous</package> </attributes> </class> <class> <name>WACallbackTest</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none transcript counter <imports></imports> <category>Seaside-Tests-Previous</category> <attributes> <package>Seaside-Tests-Previous</package> </attributes> </class> <class> <name>WACanvasDateTimeTest</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none data numericData date time data1 data2 msg <imports></imports> <category>Seaside-Tests-Canvas</category> <attributes> <package>Seaside-Tests-Canvas</package> </attributes> </class> <class> <name>WACanvasDefaultFormTest</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none value <imports></imports> <category>Seaside-Tests-Canvas</category> <attributes> <package>Seaside-Tests-Canvas</package> </attributes> </class> <class> <name>WACanvasHtmlTest</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none booleanList message number <imports></imports> <category>Seaside-Tests-Canvas</category> <attributes> <package>Seaside-Tests-Canvas</package> </attributes> </class> <class> <name>WACanvasImageTest</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none <imports></imports> <category>Seaside-Tests-Canvas</category> <attributes> <package>Seaside-Tests-Canvas</package> </attributes> </class> <class> <name>WACanvasInputTest</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none nilString emptyString integer fraction lastName address selection multiSelection <imports></imports> <category>Seaside-Tests-Canvas</category> <attributes> <package>Seaside-Tests-Canvas</package> </attributes> </class> <class> <name>WACanvasLinkSubmitTest</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none count <imports></imports> <category>Seaside-Tests-Canvas</category> <attributes> <package>Seaside-Tests-Canvas</package> </attributes> </class> <class> <name>WACanvasModelTest</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none state user pass test <imports></imports> <category>Seaside-Tests-Canvas</category> <attributes> <package>Seaside-Tests-Canvas</package> </attributes> </class> <class> <name>WACanvasTest</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none count selected <imports></imports> <category>Seaside-Tests-Canvas</category> <attributes> <package>Seaside-Tests-Canvas</package> </attributes> </class> <class> <name>WACanvasUploadTest</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none file <imports></imports> <category>Seaside-Tests-Canvas</category> <attributes> <package>Seaside-Tests-Canvas</package> </attributes> </class> <class> <name>WAChangePassword</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none username password confirmation authenticator <imports></imports> <category>Seaside-Components-Dialogs</category> <attributes> <package>Seaside-Components-Dialogs</package> </attributes> </class> <class> <name>WAClosureTest</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none <imports></imports> <category>Seaside-Tests-Previous</category> <attributes> <package>Seaside-Tests-Previous</package> </attributes> </class> <class> <name>WAConfigurationEditor</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none configuration <imports></imports> <category>Seaside-Components-Tools</category> <attributes> <package>Seaside-Components-Tools</package> </attributes> </class> <class> <name>WAApplicationEditor</name> <environment>Seaside</environment> <super>Seaside.WAConfigurationEditor</super> <private>false</private> none application library <imports></imports> <category>Seaside-Components-Tools</category> <attributes> <package>Seaside-Components-Tools</package> </attributes> </class> <class> <name>WACounter</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none count <imports></imports> <category>Seaside-Tests-Previous</category> <attributes> <package>Seaside-Tests-Previous</package> </attributes> </class> <comment> Seaside.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
</comment> <class> <name>WADateSelector</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none day month year startYear endYear <imports></imports> <category>Seaside-Components-Widgets</category> <attributes> <package>Seaside-Components-Widgets</package> </attributes> </class> <class> <name>WADateSelectorTest</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none beginDate endDate beginTime endTime beginDAT endDAT <imports></imports> <category>Seaside-Tests-Previous</category> <attributes> <package>Seaside-Tests-Previous</package> </attributes> </class> <class> <name>WADateTable</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none rows startDate endDate datesCache <imports></imports> <category>Seaside-Components-Widgets</category> <attributes> <package>Seaside-Components-Widgets</package> </attributes> </class> <class> <name>WADateTimeSelector</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none dateSelector timeSelector <imports></imports> <category>Seaside-Components-Widgets</category> <attributes> <package>Seaside-Components-Widgets</package> </attributes> </class> <class> <name>WADecoration</name> <environment>Seaside</environment> <super>Seaside.WAPresenter</super> <private>false</private> none next <imports></imports> <category>Seaside-Component</category> <attributes> <package>Seaside-Component</package> </attributes> </class> <comment> Seaside.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.
</comment> <class> <name>WAAnswerHandler</name> <environment>Seaside</environment> <super>Seaside.WADecoration</super> <private>false</private> none block <imports></imports> <category>Seaside-Component</category> <attributes> <package>Seaside-Component</package> </attributes> </class> <class> <name>WABasicAuthentication</name> <environment>Seaside</environment> <super>Seaside.WADecoration</super> <private>false</private> none authenticator realm <imports></imports> <category>Seaside-Components-Decorations</category> <attributes> <package>Seaside-Components-Decorations</package> </attributes> </class> <class> <name>WADefaultFormTest</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none value <imports></imports> <category>Seaside-Tests-Previous</category> <attributes> <package>Seaside-Tests-Previous</package> </attributes> </class> <class> <name>WADelayTest</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none <imports></imports> <category>Seaside-Tests-Previous</category> <attributes> <package>Seaside-Tests-Previous</package> </attributes> </class> <class> <name>WADelayedAnswerDecoration</name> <environment>Seaside</environment> <super>Seaside.WADecoration</super> <private>false</private> none delay <imports></imports> <category>Seaside-Components-Widgets</category> <attributes> <package>Seaside-Components-Widgets</package> </attributes> </class> <class> <name>WADelegation</name> <environment>Seaside</environment> <super>Seaside.WADecoration</super> <private>false</private> none delegate <imports></imports> <category>Seaside-Component</category> <attributes> <package>Seaside-Component</package> </attributes> </class> <class> <name>WADispatcherComponent</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none dispatcher <imports></imports> <category>Seaside-Components-Tools</category> <attributes> <package>Seaside-Components-Tools</package> </attributes> </class> <class> <name>WADispatcherEditor</name> <environment>Seaside</environment> <super>Seaside.WADispatcherComponent</super> <private>false</private> none name type plugins <imports></imports> <category>Seaside-Components-Tools</category> <attributes> <package>Seaside-Components-Tools</package> </attributes> </class> <class> <name>WADispatcherEditorPlugin</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none application psuedoAppSession <imports></imports> <category>Seaside-Components-Tools</category> <attributes> <package>Seaside-Components-Tools</package> </attributes> </class> <class> <name>WADispatcherViewer</name> <environment>Seaside</environment> <super>Seaside.WADispatcherComponent</super> <private>false</private> none <imports></imports> <category>Seaside-Components-Tools</category> <attributes> <package>Seaside-Components-Tools</package> </attributes> </class> <class> <name>WAEmailConfirmation</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none from to subject body notice <imports></imports> <category>Seaside-Components-Dialogs</category> <attributes> <package>Seaside-Components-Dialogs</package> </attributes> </class> <class> <name>WAEmailTest</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none state to <imports></imports> <category>Seaside-Tests-Canvas</category> <attributes> <package>Seaside-Tests-Canvas</package> </attributes> </class> <class> <name>WAEncodingTest</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none <imports></imports> <category>Seaside-Tests-Previous</category> <attributes> <package>Seaside-Tests-Previous</package> </attributes> </class> <class> <name>WAErrorTest</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none <imports></imports> <category>Seaside-Tests-Previous</category> <attributes> <package>Seaside-Tests-Previous</package> </attributes> </class> <class> <name>WAExampleBrowser</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none class selector component hasAnswer answer <imports></imports> <category>Seaside-Tests-Canvas</category> <attributes> <package>Seaside-Tests-Canvas</package> </attributes> </class> <comment> Seaside.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
</comment> <class> <name>WAExpiryTest</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none <imports></imports> <category>Seaside-Tests-Previous</category> <attributes> <package>Seaside-Tests-Previous</package> </attributes> </class> <class> <name>WAFileHandlerEditor</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none fileHandler <imports></imports> <category>Seaside-Components-Tools</category> <attributes> <package>Seaside-Components-Tools</package> </attributes> </class> <class> <name>WAFileLibraryExample</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none <imports></imports> <category>Seaside-Tests-Previous</category> <attributes> <package>Seaside-Tests-Previous</package> </attributes> </class> <class> <name>WAFormDecoration</name> <environment>Seaside</environment> <super>Seaside.WADecoration</super> <private>false</private> none buttons <imports></imports> <category>Seaside-Components-Decorations</category> <attributes> <package>Seaside-Components-Decorations</package> </attributes> </class> <class> <name>WAFormDialog</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none validationError form <imports></imports> <category>Seaside-Components-Dialogs</category> <attributes> <package>Seaside-Components-Dialogs</package> </attributes> </class> <class> <name>WAChoiceDialog</name> <environment>Seaside</environment> <super>Seaside.WAFormDialog</super> <private>false</private> none options selection <imports></imports> <category>Seaside-Components-Dialogs</category> <attributes> <package>Seaside-Components-Dialogs</package> </attributes> </class> <class> <name>WAFrameComponent</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none contents <imports></imports> <category>Seaside-Components-Frames</category> <attributes> <package>Seaside-Components-Frames</package> </attributes> </class> <class> <name>WAAllCanvasTests</name> <environment>Seaside</environment> <super>Seaside.WAFrameComponent</super> <private>false</private> none <imports></imports> <category>Seaside-Tests-Canvas</category> <attributes> <package>Seaside-Tests-Canvas</package> </attributes> </class> <class> <name>WAAllTests</name> <environment>Seaside</environment> <super>Seaside.WAFrameComponent</super> <private>false</private> none <imports></imports> <category>Seaside-Tests-Previous</category> <attributes> <package>Seaside-Tests-Previous</package> </attributes> </class> <comment> Seaside.WAAllTests
If you want to see these examples: /seaside/config app: - add a new application named "tests" - choose WAAllTests as the root component
</comment> <class> <name>WAGridDialog</name> <environment>Seaside</environment> <super>Seaside.WAFormDialog</super> <private>false</private> none <imports></imports> <category>Seaside-Components-Dialogs</category> <attributes> <package>Seaside-Components-Dialogs</package> </attributes> </class> <class> <name>WAHalo</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none target mode plugins <imports></imports> <category>Seaside-Components-Tools</category> <attributes> <package>Seaside-Components-Tools</package> </attributes> </class> <name>Halos</name> <environment>Seaside.WAHalo</environment> <private>false</private> <constant>false</constant> <category>class variables</category> <initializer>nil</initializer> <attributes> <package>Seaside-Components-Tools</package> </attributes> <class> <name>WAHomeTest</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none main <imports></imports> <category>Seaside-Tests-Previous</category> <attributes> <package>Seaside-Tests-Previous</package> </attributes> </class> <class> <name>WAIframeTest</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none counter <imports></imports> <category>Seaside-Tests-Previous</category> <attributes> <package>Seaside-Tests-Previous</package> </attributes> </class> <class> <name>WAImageTest</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none <imports></imports> <category>Seaside-Tests-Previous</category> <attributes> <package>Seaside-Tests-Previous</package> </attributes> </class> <class> <name>WAInputDialog</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none label value <imports></imports> <category>Seaside-Components-Dialogs</category> <attributes> <package>Seaside-Components-Dialogs</package> </attributes> </class> <class> <name>WAInputTest</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none nilString emptyString integer fraction lastName address selection multiSelection option <imports></imports> <category>Seaside-Tests-Canvas</category> <attributes> <package>Seaside-Tests-Canvas</package> </attributes> </class> <class> <name>WAInspector</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none path <imports></imports> <category>Seaside-Components-Tools</category> <attributes> <package>Seaside-Components-Tools</package> </attributes> </class> <class> <name>WAJavascriptTest</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none value <imports></imports> <category>Seaside-Tests-Previous</category> <attributes> <package>Seaside-Tests-Previous</package> </attributes> </class> <class> <name>WALabelledFormDialog</name> <environment>Seaside</environment> <super>Seaside.WAFormDialog</super> <private>false</private> none <imports></imports> <category>Seaside-Components-Dialogs</category> <attributes> <package>Seaside-Components-Dialogs</package> </attributes> </class> <class> <name>WAEditDialog</name> <environment>Seaside</environment> <super>Seaside.WALabelledFormDialog</super> <private>false</private> none model snapshot <imports></imports> <category>Seaside-Components-Dialogs</category> <attributes> <package>Seaside-Components-Dialogs</package> </attributes> </class> <class> <name>WALibraryBrowser</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none selector library hits search <imports></imports> <category>Seaside-Components-Tools</category> <attributes> <package>Seaside-Components-Tools</package> </attributes> </class> <class> <name>WALinkSubmitTest</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none count <imports></imports> <category>Seaside-Tests-Previous</category> <attributes> <package>Seaside-Tests-Previous</package> </attributes> </class> <class> <name>WALoginDialog</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none username password authenticator <imports></imports> <category>Seaside-Components-Dialogs</category> <attributes> <package>Seaside-Components-Dialogs</package> </attributes> </class> <class> <name>WALotsaLinks</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none <imports></imports> <category>Seaside-Tests-Previous</category> <attributes> <package>Seaside-Tests-Previous</package> </attributes> </class> <class> <name>WAMessageDecoration</name> <environment>Seaside</environment> <super>Seaside.WADecoration</super> <private>false</private> none message <imports></imports> <category>Seaside-Components-Decorations</category> <attributes> <package>Seaside-Components-Decorations</package> </attributes> </class> <class> <name>WAMiniCalendar</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none month date canSelectBlock selectBlock <imports></imports> <category>Seaside-Components-Widgets</category> <attributes> <package>Seaside-Components-Widgets</package> </attributes> </class> <class> <name>WAMultiCounter</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none counters <imports></imports> <category>Seaside-Tests-Previous</category> <attributes> <package>Seaside-Tests-Previous</package> </attributes> </class> <comment> Seaside.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)
</comment> <class> <name>WANavigation</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none selection <imports></imports> <category>Seaside-Components-Frames</category> <attributes> <package>Seaside-Components-Frames</package> </attributes> </class> <class> <name>WANavigationBar</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none actionsSelector owner <imports></imports> <category>Seaside-Components-Widgets</category> <attributes> <package>Seaside-Components-Widgets</package> </attributes> </class> <class> <name>WANoteDialog</name> <environment>Seaside</environment> <super>Seaside.WAFormDialog</super> <private>false</private> none note <imports></imports> <category>Seaside-Components-Dialogs</category> <attributes> <package>Seaside-Components-Dialogs</package> </attributes> </class> <class> <name>WAOldApiHtmlTest</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none booleanList message number <imports></imports> <category>Seaside-Tests-Previous</category> <attributes> <package>Seaside-Tests-Previous</package> </attributes> </class> <class> <name>WAOldApiInputTest</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none nilString integer emptyString fraction selected mSelected <imports></imports> <category>Seaside-Tests-Previous</category> <attributes> <package>Seaside-Tests-Previous</package> </attributes> </class> <class> <name>WAParentTest</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none parent <imports></imports> <category>Seaside-Tests-Previous</category> <attributes> <package>Seaside-Tests-Previous</package> </attributes> </class> <class> <name>WAPath</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none stack <imports></imports> <category>Seaside-Components-Widgets</category> <attributes> <package>Seaside-Components-Widgets</package> </attributes> </class> <comment> Seaside.WAPath
I represent a path navigation such as the one that is displayed on the top of the web inspector when you toggle on the halos. Here is an example of path: xxx >> yyy >> zzz Useful methods are - #currentSegment returns zzz - pushSegment: anObject name: 'lulu'
</comment> <class> <name>WAPathTest</name> <environment>Seaside</environment> <super>Seaside.WAFrameComponent</super> <private>false</private> none <imports></imports> <category>Seaside-Tests-Previous</category> <attributes> <package>Seaside-Tests-Previous</package> </attributes> </class> <class> <name>WAPhraseElementsTest</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none <imports></imports> <category>Seaside-Tests-Previous</category> <attributes> <package>Seaside-Tests-Previous</package> </attributes> </class> <class> <name>WAPopupTest</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none url <imports></imports> <category>Seaside-Tests-Previous</category> <attributes> <package>Seaside-Tests-Previous</package> </attributes> </class> <class> <name>WAPrettyPrintedDocument</name> <environment>Seaside</environment> <super>Seaside.WAHtmlDocument</super> <private>false</private> none html indentLevel indentCloseTags firstLine <imports></imports> <category>Seaside-Components-Tools</category> <attributes> <package>Seaside-Components-Tools</package> </attributes> </class> <class> <name>WAProcessMonitor</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none mutex process responseSem <imports></imports> <category>Seaside-Utilities</category> <attributes> <package>Seaside-Utilities</package> </attributes> </class> <class> <name>WAProfiledDocument</name> <environment>Seaside</environment> <super>Seaside.WAHtmlDocument</super> <private>false</private> none tags attributes names classes <imports></imports> <category>Seaside-Components-Tools</category> <attributes> <package>Seaside-Components-Tools</package> </attributes> </class> <class> <name>WAProxyTest</name> <environment>Seaside</environment> <super>XProgramming.SUnit.TestCase</super> <private>false</private> none <imports></imports> <category>Seaside-Tests-Previous</category> <attributes> <package>Seaside-Tests-Previous</package> </attributes> </class> <class> <name>WARadioGroup</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none canvas key <imports></imports> <category>Seaside-Canvas</category> <attributes> <package>Seaside-Canvas</package> </attributes> </class> <class> <name>WARender</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none root context request url <imports></imports> <category>Seaside-RenderLoop</category> <attributes> <package>Seaside-RenderLoop</package> </attributes> </class> <class> <name>WARenderCanvas</name> <environment>Seaside</environment> <super>Seaside.WAHtmlCanvas</super> <private>false</private> none context callbacks <imports></imports> <category>Seaside-Canvas</category> <attributes> <package>Seaside-Canvas</package> </attributes> </class> <comment> Seaside.WARenderCanvas
This canvas knows about callbacks and is intertwined with the rest of the framework.
</comment> <class> <name>WARenderCanvasForTest</name> <environment>Seaside</environment> <super>Seaside.WARenderCanvas</super> <private>false</private> none <imports></imports> <category>Seaside-Canvas</category> <attributes> <package>Seaside-Canvas</package> </attributes> </class> <comment> Seaside.WARenderCanvasForTest
This class is intended to be used during unit tests, typically subclasses of WARenderCanvasTestCase. It allows the production of an html fragments that can be verified for correctness. See subclasses of WARenderCanvasTestCase for examples of unit tests.
</comment> <class> <name>WARenderCanvasTestCase</name> <environment>Seaside</environment> <super>XProgramming.SUnit.TestCase</super> <private>false</private> none html <imports></imports> <category>Seaside-Tests-Canvas</category> <attributes> <package>Seaside-Tests-Canvas</package> </attributes> </class> <comment> Seaside.WARenderCanvasTestCase
This class is intended to be used as an abstract superclass for unit tests. See subclasses for examples of unit tests.
</comment> <class> <name>WARenderCanvasCompoundTests</name> <environment>Seaside</environment> <super>Seaside.WARenderCanvasTestCase</super> <private>false</private> none <imports></imports> <category>Seaside-Tests-Canvas</category> <attributes> <package>Seaside-Tests-Canvas</package> </attributes> </class> <class> <name>WARenderCanvasTests</name> <environment>Seaside</environment> <super>Seaside.WARenderCanvasTestCase</super> <private>false</private> none <imports></imports> <category>Seaside-Tests-Canvas</category> <attributes> <package>Seaside-Tests-Canvas</package> </attributes> </class> <class> <name>WARenderLoop</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none root <imports></imports> <category>Seaside-RenderLoop</category> <attributes> <package>Seaside-RenderLoop</package> </attributes> </class> <class> <name>WARenderLoopMain</name> <environment>Seaside</environment> <super>Seaside.WAMain</super> <private>false</private> none <imports></imports> <category>Seaside-RenderLoop</category> <attributes> <package>Seaside-RenderLoop</package> </attributes> </class> <class> <name>WAAuthMain</name> <environment>Seaside</environment> <super>Seaside.WARenderLoopMain</super> <private>false</private> none <imports></imports> <category>Seaside-Components-Tools</category> <attributes> <package>Seaside-Components-Tools</package> </attributes> </class> <class> <name>WARenderNotification</name> <environment>Seaside</environment> <super>Notification</super> <private>false</private> none <imports></imports> <category>Seaside-Rendering</category> <attributes> <package>Seaside-Rendering</package> </attributes> </class> <class> <name>WARenderedHtmlRoot</name> <environment>Seaside</environment> <super>Seaside.WAHtmlRoot</super> <private>false</private> none context <imports></imports> <category>Seaside-Rendering</category> <attributes> <package>Seaside-Rendering</package> </attributes> </class> <class> <name>WARenderingContext</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none session actionUrl count callbacks document mode request response properties <imports></imports> <category>Seaside-Rendering</category> <attributes> <package>Seaside-Rendering</package> </attributes> </class> <class> <name>WAReport</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none rows <imports></imports> <category>Seaside-Components-Widgets</category> <attributes> <package>Seaside-Components-Widgets</package> </attributes> </class> <class> <name>WAReportColumn</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none clickBlock formatBlock hasTotal title sortBlock valueBlock <imports></imports> <category>Seaside-Components-Widgets</category> <attributes> <package>Seaside-Components-Widgets</package> </attributes> </class> <class> <name>WARequest</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none url fields headers cookies method nativeRequest responseStream <imports></imports> <category>Seaside-HTTP</category> <attributes> <package>Seaside-HTTP</package> </attributes> </class> <comment> Seaside.WARequest
I am a server independent http request object. Instance of me can be aquired through WASession >> #currentRequest
</comment> <class> <name>WARequestHandler</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none parent <imports></imports> <category>Seaside-RequestHandler</category> <attributes> <package>Seaside-RequestHandler</package> </attributes> </class> <class> <name>WADocumentHandler</name> <environment>Seaside</environment> <super>Seaside.WARequestHandler</super> <private>false</private> none document mimeDocument mimeType fileName <imports></imports> <category>Seaside-RequestHandler</category> <attributes> <package>Seaside-RequestHandler</package> </attributes> </class> <class> <name>WAEntryPoint</name> <environment>Seaside</environment> <super>Seaside.WARequestHandler</super> <private>false</private> none name <imports></imports> <category>Seaside-RequestHandler</category> <attributes> <package>Seaside-RequestHandler</package> </attributes> </class> <class> <name>WADispatcher</name> <environment>Seaside</environment> <super>Seaside.WAEntryPoint</super> <private>false</private> none entryPoints defaultName lastUpdate version default <imports></imports> <category>Seaside-RequestHandler</category> <attributes> <package>Seaside-RequestHandler</package> </attributes> </class> <class> <name>WAExpiringHandler</name> <environment>Seaside</environment> <super>Seaside.WARequestHandler</super> <private>false</private> none lastAccess expired timeout <imports></imports> <category>Seaside-RequestHandler</category> <attributes> <package>Seaside-RequestHandler</package> </attributes> </class> <class> <name>WAFileHandler</name> <environment>Seaside</environment> <super>Seaside.WAEntryPoint</super> <private>false</private> none default <imports></imports> <category>Seaside-RequestHandler</category> <attributes> <package>Seaside-RequestHandler</package> </attributes> </class> <class> <name>WANotFoundHandler</name> <environment>Seaside</environment> <super>Seaside.WARequestHandler</super> <private>false</private> none <imports></imports> <category>Seaside-RequestHandler</category> <attributes> <package>Seaside-RequestHandler</package> </attributes> </class> <class> <name>WARegistry</name> <environment>Seaside</environment> <super>Seaside.WAEntryPoint</super> <private>false</private> none keysByHandler handlersByKey mutex <imports></imports> <category>Seaside-RequestHandler</category> <attributes> <package>Seaside-RequestHandler</package> </attributes> </class> <class> <name>WAApplication</name> <environment>Seaside</environment> <super>Seaside.WARegistry</super> <private>false</private> none configuration libraries <imports></imports> <category>Seaside-Session</category> <attributes> <package>Seaside-Session</package> </attributes> </class> <class> <name>WAResponse</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none contentType headers cookies status stream <imports></imports> <category>Seaside-HTTP</category> <attributes> <package>Seaside-HTTP</package> </attributes> </class> <comment> Seaside.WAResponse
I am a server independent http response object. I am used in conjunction with WASession >> returnResponse:
</comment> <class> <name>WARootedElement</name> <environment>Seaside</environment> <super>Seaside.WAHtmlElement</super> <private>false</private> none root <imports></imports> <category>Seaside-Document-Elements</category> <attributes> <package>Seaside-Document-Elements</package> </attributes> </class> <class> <name>WALinkElement</name> <environment>Seaside</environment> <super>Seaside.WARootedElement</super> <private>false</private> none <imports></imports> <category>Seaside-Document-Elements</category> <attributes> <package>Seaside-Document-Elements</package> </attributes> </class> <comment> Seaside.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).
</comment> <class> <name>WARubyTest</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none <imports></imports> <category>Seaside-Tests-Previous</category> <attributes> <package>Seaside-Tests-Previous</package> </attributes> </class> <comment> Seaside.WARubyTest
Examples taken directly from spec: http://www.w3.org/TR/2001/REC-ruby-20010531/
</comment> <class> <name>WAScriptElement</name> <environment>Seaside</environment> <super>Seaside.WARootedElement</super> <private>false</private> none <imports></imports> <category>Seaside-Document-Elements</category> <attributes> <package>Seaside-Document-Elements</package> </attributes> </class> <class> <name>WASelection</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none items labelBlock <imports></imports> <category>Seaside-Components-Dialogs</category> <attributes> <package>Seaside-Components-Dialogs</package> </attributes> </class> <class> <name>WASelectionDateTable</name> <environment>Seaside</environment> <super>Seaside.WADateTable</super> <private>false</private> none cellBlock dateSelectionStart dateSelectionEnd rowSelectionStart rowSelectionEnd <imports></imports> <category>Seaside-Components-Widgets</category> <attributes> <package>Seaside-Components-Widgets</package> </attributes> </class> <class> <name>WASession</name> <environment>Seaside</environment> <super>Seaside.WAExpiringHandler</super> <private>false</private> none continuations escapeContinuation monitor state currentRequest scripts jumpTo internalError cookiesEnabled <imports></imports> <category>Seaside-Session</category> <attributes> <package>Seaside-Session</package> </attributes> </class> <comment> Seaside.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
</comment> <class> <name>WAExpirySession</name> <environment>Seaside</environment> <super>Seaside.WASession</super> <private>false</private> none <imports></imports> <category>Seaside-Tests-Previous</category> <attributes> <package>Seaside-Tests-Previous</package> </attributes> </class> <name>Created</name> <environment>Seaside.WAExpirySession</environment> <private>false</private> <constant>false</constant> <category>class variables</category> <initializer>nil</initializer> <attributes> <package>Seaside-Tests-Previous</package> </attributes> <name>Unregistered</name> <environment>Seaside.WAExpirySession</environment> <private>false</private> <constant>false</constant> <category>class variables</category> <initializer>nil</initializer> <attributes> <package>Seaside-Tests-Previous</package> </attributes> <class> <name>WASessionProtector</name> <environment>Seaside</environment> <super>Seaside.WADecoration</super> <private>false</private> none remoteAddress <imports></imports> <category>Seaside-Components-Decorations</category> <attributes> <package>Seaside-Components-Decorations</package> </attributes> </class> <comment> Seaside.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
</comment> <class> <name>WASimpleErrorHandler</name> <environment>Seaside</environment> <super>Seaside.WAErrorHandler</super> <private>false</private> none <imports></imports> <category>Seaside-Session</category> <attributes> <package>Seaside-Session</package> </attributes> </class> <comment> Seaside.WASimpleErrorHandler
I am like WAErrorHandler except that I display the code 500 error with a short stackframe for errors and warnings too.
</comment> <class> <name>WASimpleNavigation</name> <environment>Seaside</environment> <super>Seaside.WANavigation</super> <private>false</private> none components <imports></imports> <category>Seaside-Components-Frames</category> <attributes> <package>Seaside-Components-Frames</package> </attributes> </class> <comment> Seaside.WASimpleNavigation
I'm a simple tab panel, that can be styled with stylesheets. New tabs can be added using #add:label:
</comment> <class> <name>WAStandardFiles</name> <environment>Seaside</environment> <super>Seaside.WAFileLibrary</super> <private>false</private> none <imports></imports> <category>Seaside-Libraries</category> <attributes> <package>Seaside-Libraries</package> </attributes> </class> <comment> Seaside.WAStandardFiles
A collection of standard scripts, styles, and images. Images are hostly needed for halos. Scripts are mostly needed for convenience and shortcuts. Styles are mostly needed for halos and WASimpleNavigation.
</comment> <class> <name>WAStateHolder</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none hash contents <imports></imports> <category>Seaside-StateRegistry</category> <attributes> <package>Seaside-StateRegistry</package> </attributes> </class> <comment> Seaside.WAStateHolder
I am a ValueHolder whose contents will properly track the user's use of the back button. Use me to wrap any values that you wish to backtrack when the back button is used. Sometimes it might be more convenient to register your business object directly: WACurrentSession value registerObjectForBacktracking: businessObject. or even to register a component for backtracking, as seen in WACounter: WACounter>>initialize self session registerObjectForBacktracking: self.
</comment> <class> <name>WAStateRegistry</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none lastSnapshot objects <imports></imports> <category>Seaside-StateRegistry</category> <attributes> <package>Seaside-StateRegistry</package> </attributes> </class> <class> <name>WAStateRegistryTest</name> <environment>Seaside</environment> <super>XProgramming.SUnit.TestCase</super> <private>false</private> none registry <imports></imports> <category>Seaside-StateRegistry</category> <attributes> <package>Seaside-StateRegistry</package> </attributes> </class> <class> <name>WAStaticHtmlCanvas</name> <environment>Seaside</environment> <super>Seaside.WAHtmlCanvas</super> <private>false</private> none document <imports></imports> <category>Seaside-Canvas</category> <attributes> <package>Seaside-Canvas</package> </attributes> </class> <comment> Seaside.WAStaticHtmlCanvas
This canvas can be used to generate static/RESTful HTML pages.
</comment> <class> <name>WAStore</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none task <imports></imports> <category>Seaside-Examples-Store</category> <attributes> <package>Seaside-Examples-Store</package> </attributes> </class> <comment> Seaside.WAStore
This component is the entry point for the store example. It provides the main stylesheet in its #style method, renders a simple banner at the top, and then embeds an instance of WAStoreTask, which is where the real action happens.
</comment> <class> <name>WAStoreAddress</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none name street city country <imports></imports> <category>Seaside-Examples-Store-Model</category> <attributes> <package>Seaside-Examples-Store-Model</package> </attributes> </class> <comment> Seaside.WAStoreAddress
A simple model of a billing or shipping address. Stores strings for a person's name, street, city, and country. Apart from accessors for these, the only behavior this provides is a #validate method which will throw errors if street, city, or country is nil.
</comment> <class> <name>WAStoreAddressEditor</name> <environment>Seaside</environment> <super>Seaside.WALabelledFormDialog</super> <private>false</private> none address <imports></imports> <category>Seaside-Examples-Store</category> <attributes> <package>Seaside-Examples-Store</package> </attributes> </class> <comment> Seaside.WAStoreAddressEditor
A component for editing WAStoreAddress instances. When called, it will create a new address instance, present a form for the user to modify it, and then answer the instance on submit. Used by WAStoreTask>>getBillingAddress and getShippingAddress.
</comment> <class> <name>WAStoreCart</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none items <imports></imports> <category>Seaside-Examples-Store-Model</category> <attributes> <package>Seaside-Examples-Store-Model</package> </attributes> </class> <comment> Seaside.WAStoreCart
A shopping cart. This is essentially a specialized Bag: you can #add: or #remove: WAStoreItems to it, and calculate their #totalPrice. You can also use #countsAndItems to get a collection of associations between the items and the number of times they appear in the cart, useful for summary displays.
</comment> <class> <name>WAStoreCartConfirmation</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none cart <imports></imports> <category>Seaside-Examples-Store</category> <attributes> <package>Seaside-Examples-Store</package> </attributes> </class> <comment> Seaside.WAStoreCartConfirmation
A component for confirming the contents of a WAStoreCart. The caller must provide a cart instance with #cart: . When called, it will display a summary of the items in the cart, along with two buttons: "Proceed with checkout" and "Modify cart". Answers true if the user presses the first button, false if the user presses the seecond. Used by WAStoreTask>>confirmContentsOfCart.
</comment> <class> <name>WAStoreCartView</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none cart <imports></imports> <category>Seaside-Examples-Store</category> <attributes> <package>Seaside-Examples-Store</package> </attributes> </class> <comment> Seaside.WAStoreCartView
A component for displaying and modifying a WAStoreCart. Intended to be embedded rather than called. The parent must provide a cart instance with #cart:. Displays a list of items in the cart, and allows individual items to be removed. Used by WAStoreFillCart.
</comment> <class> <name>WAStoreCreditCard</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none name number expiry <imports></imports> <category>Seaside-Examples-Store-Model</category> <attributes> <package>Seaside-Examples-Store-Model</package> </attributes> </class> <comment> Seaside.WAStoreCreditCard
Models credit card information - it has accessors for #name and #number (both strings), and #expiry date. #validate throws an error if anything is missing, or if the expiry date is in the past. This is intended to be an abstract class - the subclasses WAStoreMasterCard and WAStoreVisaCard provide further validation.
</comment> <class> <name>WAStoreFillCart</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none cart cartView main <imports></imports> <category>Seaside-Examples-Store</category> <attributes> <package>Seaside-Examples-Store</package> </attributes> </class> <comment> Seaside.WAStoreFillCart
This component provides the main UI for browsing the store inventory and filling the cart. The caller must provide a shopping cart instance with #cart:. The component presents a navigation bar with options to browse and search on the left, and embeds a WACartView showing the cart contents on the right. In the middle is initially embedded a WAStoreInfo. Browsing and searching will replace this with a stock WABatchSelection component for listing items (see #displatItems:), or a WAStoreItemView for displaying individual items. This answers back to the caller when the user chooses "checkout" from the nav bar.
</comment> <class> <name>WAStoreInfo</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none <imports></imports> <category>Seaside-Examples-Store</category> <attributes> <package>Seaside-Examples-Store</package> </attributes> </class> <comment> Seaside.WAStoreInfo
A component that displays simple informative text about this example. Used by WAStoreFillCart.
</comment> <class> <name>WAStoreInventory</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none items default <imports></imports> <category>Seaside-Examples-Store-Model</category> <attributes> <package>Seaside-Examples-Store-Model</package> </attributes> </class> <comment> Seaside.WAStoreInventory
The list of inventory items. In a real application, this would probably have to deal with persistence, maintaining inventory counts, etc. In this example, it just builds a collection of WAStoreItems from a hardcoded data set, and provides #allItems and #findItem: for accessing these.
</comment> <class> <name>WAStoreItem</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none title subtitle description price <imports></imports> <category>Seaside-Examples-Store-Model</category> <attributes> <package>Seaside-Examples-Store-Model</package> </attributes> </class> <comment> Seaside.WAStoreItem
Models a single item of inventory - stores a title, subtitle, fill description, and price. The only real behavior is #matches:, which is used for search.
</comment> <class> <name>WAStoreItemView</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none item cart <imports></imports> <category>Seaside-Examples-Store</category> <attributes> <package>Seaside-Examples-Store</package> </attributes> </class> <comment> Seaside.WAStoreItemView
A component for viewing an individual WAStoreItem. The caller must provide #item: and also the current #cart:. Shows the description and price info for the item, and presents two buttons: "Add to Cart", which will add the item to the cart, once, and "Done", which will answer back to the caller. Used by WAStoreFillCart>>displayItem: and displayItems:.
</comment> <class> <name>WAStoreMasterCard</name> <environment>Seaside</environment> <super>Seaside.WAStoreCreditCard</super> <private>false</private> none <imports></imports> <category>Seaside-Examples-Store-Model</category> <attributes> <package>Seaside-Examples-Store-Model</package> </attributes> </class> <comment> Seaside.WAStoreMasterCard
Adds MasterCard-specific validation to WAStoreCreditCard.
</comment> <class> <name>WAStorePaymentEditor</name> <environment>Seaside</environment> <super>Seaside.WALabelledFormDialog</super> <private>false</private> none name cardType cardNumber month year <imports></imports> <category>Seaside-Examples-Store</category> <attributes> <package>Seaside-Examples-Store</package> </attributes> </class> <comment> Seaside.WAStorePaymentEditor
A component for editing WAStoreCreditCard instances. When called, it presents a form for the user to choose credit card type, and enter name, number, and expiry date. On submit, it will create and answer an instance of the appropiate credit card subclass. Note the difference with WAStoreAddressEditor, where the form modifies the address instance directly. Used by WAStoreTask>>getPaymentInfo.
</comment> <class> <name>WAStoreVisaCard</name> <environment>Seaside</environment> <super>Seaside.WAStoreCreditCard</super> <private>false</private> none <imports></imports> <category>Seaside-Examples-Store-Model</category> <attributes> <package>Seaside-Examples-Store-Model</package> </attributes> </class> <comment> Seaside.WAStoreVisaCard
Adds VISA-specific validation to WAStoreCreditCard.
</comment> <class> <name>WAStreamResponse</name> <environment>Seaside</environment> <super>Seaside.WAResponse</super> <private>false</private> none writtenHeaders <imports></imports> <category>Seaside-HTTP</category> <attributes> <package>Seaside-HTTP</package> </attributes> </class> <class> <name>WAStringAttribute</name> <environment>Seaside</environment> <super>Seaside.WAConfigurationAttribute</super> <private>false</private> none <imports></imports> <category>Seaside-Configuration</category> <attributes> <package>Seaside-Configuration</package> </attributes> </class> <class> <name>WAPasswordAttribute</name> <environment>Seaside</environment> <super>Seaside.WAStringAttribute</super> <private>false</private> none <imports></imports> <category>Seaside-Configuration</category> <attributes> <package>Seaside-Configuration</package> </attributes> </class> <class> <name>WAStringLibrary</name> <environment>Seaside</environment> <super>Seaside.WALibrary</super> <private>false</private> none default <imports></imports> <category>Seaside-Libraries</category> <attributes> <package>Seaside-Libraries</package> </attributes> </class> <comment> Seaside.WAStringLibrary
Deprecated, pleas use WAFileLibrary instead.
</comment> <class> <name>WAScriptLibrary</name> <environment>Seaside</environment> <super>Seaside.WAStringLibrary</super> <private>false</private> none <imports></imports> <category>Seaside-Libraries</category> <attributes> <package>Seaside-Libraries</package> </attributes> </class> <comment> Seaside.WAScriptLibrary
Deprecated, pleas use WAFileLibrary instead.
</comment> <class> <name>WAStandardScripts</name> <environment>Seaside</environment> <super>Seaside.WAScriptLibrary</super> <private>false</private> none <imports></imports> <category>Seaside-Libraries</category> <attributes> <package>Seaside-Libraries</package> </attributes> </class> <comment> Seaside.WAStandardScripts
Deprecated, replaced by WAStandardFiles.
</comment> <class> <name>WAStringLibraryEditor</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none library <imports></imports> <category>Seaside-Components-Tools</category> <attributes> <package>Seaside-Components-Tools</package> </attributes> </class> <class> <name>WAFileLibraryEditor</name> <environment>Seaside</environment> <super>Seaside.WAStringLibraryEditor</super> <private>false</private> none renamingFile newName <imports></imports> <category>Seaside-Components-Tools</category> <attributes> <package>Seaside-Components-Tools</package> </attributes> </class> <class> <name>WAStyleLibrary</name> <environment>Seaside</environment> <super>Seaside.WAStringLibrary</super> <private>false</private> none <imports></imports> <category>Seaside-Libraries</category> <attributes> <package>Seaside-Libraries</package> </attributes> </class> <comment> Seaside.WAStyleLibrary
Deprecated, pleas use WAFileLibrary instead.
</comment> <class> <name>WAStandardStyles</name> <environment>Seaside</environment> <super>Seaside.WAStyleLibrary</super> <private>false</private> none <imports></imports> <category>Seaside-Libraries</category> <attributes> <package>Seaside-Libraries</package> </attributes> </class> <comment> Seaside.WAStandardStyles
Deprecated, replaced by WAStandardFiles.
</comment> <class> <name>WASvgTest</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none <imports></imports> <category>Seaside-Tests-Canvas</category> <attributes> <package>Seaside-Tests-Canvas</package> </attributes> </class> <class> <name>WASystemConfiguration</name> <environment>Seaside</environment> <super>Seaside.WAConfiguration</super> <private>false</private> none instance <imports></imports> <category>Seaside-Configuration</category> <attributes> <package>Seaside-Configuration</package> </attributes> </class> <class> <name>WAAuthConfiguration</name> <environment>Seaside</environment> <super>Seaside.WASystemConfiguration</super> <private>false</private> none <imports></imports> <category>Seaside-Components-Tools</category> <attributes> <package>Seaside-Components-Tools</package> </attributes> </class> <class> <name>WAGlobalConfiguration</name> <environment>Seaside</environment> <super>Seaside.WASystemConfiguration</super> <private>false</private> none <imports></imports> <category>Seaside-Session</category> <attributes> <package>Seaside-Session</package> </attributes> </class> <name>DeploymentMode</name> <environment>Seaside.WAGlobalConfiguration</environment> <private>false</private> <constant>false</constant> <category>class variables</category> <initializer>nil</initializer> <attributes> <package>Seaside-Session</package> </attributes> <class> <name>WARenderLoopConfiguration</name> <environment>Seaside</environment> <super>Seaside.WASystemConfiguration</super> <private>false</private> none <imports></imports> <category>Seaside-RenderLoop</category> <attributes> <package>Seaside-RenderLoop</package> </attributes> </class> <class> <name>WASessionConfiguration</name> <environment>Seaside</environment> <super>Seaside.WASystemConfiguration</super> <private>false</private> none <imports></imports> <category>Seaside-Session</category> <attributes> <package>Seaside-Session</package> </attributes> </class> <class> <name>WATableReport</name> <environment>Seaside</environment> <super>Seaside.WAReport</super> <private>false</private> none sortColumn isReversed columns rowPeriod rowColors <imports></imports> <category>Seaside-Components-Widgets</category> <attributes> <package>Seaside-Components-Widgets</package> </attributes> </class> <class> <name>WACanvasTableReport</name> <environment>Seaside</environment> <super>Seaside.WATableReport</super> <private>false</private> none <imports></imports> <category>Seaside-Components-Widgets</category> <attributes> <package>Seaside-Components-Widgets</package> </attributes> </class> <class> <name>WATableReportTest</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none widget <imports></imports> <category>Seaside-Tests-Canvas</category> <attributes> <package>Seaside-Tests-Canvas</package> </attributes> </class> <class> <name>WACanvasTableTest</name> <environment>Seaside</environment> <super>Seaside.WATableReportTest</super> <private>false</private> none <imports></imports> <category>Seaside-Tests-Canvas</category> <attributes> <package>Seaside-Tests-Canvas</package> </attributes> </class> <class> <name>WATagBrush</name> <environment>Seaside</environment> <super>Seaside.WABrush</super> <private>false</private> none attributes <imports></imports> <category>Seaside-Canvas</category> <attributes> <package>Seaside-Canvas</package> </attributes> </class> <comment> Seaside.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
</comment> <class> <name>WAAnchorTag</name> <environment>Seaside</environment> <super>Seaside.WATagBrush</super> <private>false</private> none url isNavigation callbackKey extraParameters extraPath promptString fragment <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <comment> Seaside.WAAnchorTag
I'm the class responsible for adding anchors (links) to your webpage. There are multiple ways of using me. 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]; text: 'Click here to do something'. In fact, you are not obliged to render simple text for your anchors, a block can be executed instead: html anchor callback: [self doSomethingIfUserClickMe]; with: [put here some code to render things for the anchor text]. Following code is a shortcut to create an anchor: html anchor on: #aSelector of: anObject The text will be 'a Selector' (this is a special transformation of symbols to make them more readable) The action will be the call of #aSelector on anObject.
</comment> <class> <name>WACanvasTag</name> <environment>Seaside</environment> <super>Seaside.WATagBrush</super> <private>false</private> none <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <class> <name>WACollectionTag</name> <environment>Seaside</environment> <super>Seaside.WATagBrush</super> <private>false</private> none list selected callbackBlock labelsBlock multiple <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <comment> Seaside.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
</comment> <class> <name>WACompound</name> <environment>Seaside</environment> <super>Seaside.WATagBrush</super> <private>false</private> none callbackBlock value properties <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <comment> Seaside.WACompound
This is the superclass for stuff that is not html elements but you still want to access via the canvas API.
</comment> <class> <name>WADateInput</name> <environment>Seaside</environment> <super>Seaside.WACompound</super> <private>false</private> none options month day year <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <comment> Seaside.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:
</comment> <class> <name>WADivTag</name> <environment>Seaside</environment> <super>Seaside.WATagBrush</super> <private>false</private> none <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <class> <name>WAFieldSetTag</name> <environment>Seaside</environment> <super>Seaside.WATagBrush</super> <private>false</private> none legend <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <comment> Seaside.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.
</comment> <class> <name>WAFormInputTag</name> <environment>Seaside</environment> <super>Seaside.WATagBrush</super> <private>false</private> none <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <class> <name>WAAbstractTextAreaTag</name> <environment>Seaside</environment> <super>Seaside.WAFormInputTag</super> <private>false</private> none <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <comment> Seaside.WAAbstractTextAreaTag
An abstract class to describe the HTML elements that allow the user to enter text.
</comment> <class> <name>WACheckboxTag</name> <environment>Seaside</environment> <super>Seaside.WAFormInputTag</super> <private>false</private> none value callback <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <class> <name>WAFileUploadTag</name> <environment>Seaside</environment> <super>Seaside.WAFormInputTag</super> <private>false</private> none <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <comment> Seaside.WAFileUploadTag
I represent a file input element (<input type="file"). My callbacks will be evaluated with an instance of WAFile as an argument.
</comment> <class> <name>WAFormTag</name> <environment>Seaside</environment> <super>Seaside.WATagBrush</super> <private>false</private> none defaultAction <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <class> <name>WAGenericTag</name> <environment>Seaside</environment> <super>Seaside.WATagBrush</super> <private>false</private> none tag <imports></imports> <category>Seaside-Canvas</category> <attributes> <package>Seaside-Canvas</package> </attributes> </class> <class> <name>WAEditTag</name> <environment>Seaside</environment> <super>Seaside.WAGenericTag</super> <private>false</private> none <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <comment> Seaside.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.
</comment> <class> <name>WAHeadingTag</name> <environment>Seaside</environment> <super>Seaside.WATagBrush</super> <private>false</private> none level <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <class> <name>WAHiddenInputTag</name> <environment>Seaside</environment> <super>Seaside.WAFormInputTag</super> <private>false</private> none <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <class> <name>WAIframeTag</name> <environment>Seaside</environment> <super>Seaside.WATagBrush</super> <private>false</private> none <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <class> <name>WAImageMapTag</name> <environment>Seaside</environment> <super>Seaside.WAAnchorTag</super> <private>false</private> none <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <comment> Seaside.WAImageMapTag
A WAImageMapTag is supposed to be used like this: html map id: #pictureMap; title: 'Click here'; callback: [ :point | self click: point + self offset]; with: [ html image form: self form ] Examples can be found in WAScreenshot
</comment> <class> <name>WAImageTag</name> <environment>Seaside</environment> <super>Seaside.WACanvasTag</super> <private>false</private> none url fileName mimeType document <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <class> <name>WALabelTag</name> <environment>Seaside</environment> <super>Seaside.WATagBrush</super> <private>false</private> none <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <class> <name>WAListTag</name> <environment>Seaside</environment> <super>Seaside.WACollectionTag</super> <private>false</private> none tag <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <class> <name>WAObjectTag</name> <environment>Seaside</environment> <super>Seaside.WATagBrush</super> <private>false</private> none <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <class> <name>WAOptionGroupTag</name> <environment>Seaside</environment> <super>Seaside.WATagBrush</super> <private>false</private> none <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <comment> Seaside.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.
</comment> <class> <name>WAOptionTag</name> <environment>Seaside</environment> <super>Seaside.WATagBrush</super> <private>false</private> none <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <class> <name>WAParameterTag</name> <environment>Seaside</environment> <super>Seaside.WATagBrush</super> <private>false</private> none <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <class> <name>WAPopupAnchorTag</name> <environment>Seaside</environment> <super>Seaside.WAAnchorTag</super> <private>false</private> none name extent dependent showToolbar resizable showScrollbars <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <class> <name>WARadioButtonTag</name> <environment>Seaside</environment> <super>Seaside.WAFormInputTag</super> <private>false</private> none <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <class> <name>WARubyTextTag</name> <environment>Seaside</environment> <super>Seaside.WATagBrush</super> <private>false</private> none <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <class> <name>WAScriptTag</name> <environment>Seaside</environment> <super>Seaside.WATagBrush</super> <private>false</private> none <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <class> <name>WASelectTag</name> <environment>Seaside</environment> <super>Seaside.WACollectionTag</super> <private>false</private> none otherLabel otherCallbackBlock isOptional promptString isSubmitOnChange optionalLabel enablementBlock <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <comment> Seaside.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.
</comment> <class> <name>WASubmitButtonTag</name> <environment>Seaside</environment> <super>Seaside.WAFormInputTag</super> <private>false</private> none <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <class> <name>WAButtonTag</name> <environment>Seaside</environment> <super>Seaside.WASubmitButtonTag</super> <private>false</private> none type <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <class> <name>WACancelButtonTag</name> <environment>Seaside</environment> <super>Seaside.WASubmitButtonTag</super> <private>false</private> none <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <class> <name>WAImageButtonTag</name> <environment>Seaside</environment> <super>Seaside.WASubmitButtonTag</super> <private>false</private> none <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <class> <name>WATableCellTag</name> <environment>Seaside</environment> <super>Seaside.WATagBrush</super> <private>false</private> none <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <class> <name>WATableColumnGroupTag</name> <environment>Seaside</environment> <super>Seaside.WATagBrush</super> <private>false</private> none <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <class> <name>WATableColumnTag</name> <environment>Seaside</environment> <super>Seaside.WATableColumnGroupTag</super> <private>false</private> none <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <class> <name>WATableDataTag</name> <environment>Seaside</environment> <super>Seaside.WATableCellTag</super> <private>false</private> none <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <class> <name>WATableHeadingTag</name> <environment>Seaside</environment> <super>Seaside.WATableCellTag</super> <private>false</private> none <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <class> <name>WATableTag</name> <environment>Seaside</environment> <super>Seaside.WATagBrush</super> <private>false</private> none <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <class> <name>WATask</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none <imports></imports> <category>Seaside-Component</category> <attributes> <package>Seaside-Component</package> </attributes> </class> <comment> Seaside.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:
</comment> <class> <name>WACookieTest</name> <environment>Seaside</environment> <super>Seaside.WATask</super> <private>false</private> none <imports></imports> <category>Seaside-Tests-Previous</category> <attributes> <package>Seaside-Tests-Previous</package> </attributes> </class> <class> <name>WAExceptionTest</name> <environment>Seaside</environment> <super>Seaside.WATask</super> <private>false</private> none <imports></imports> <category>Seaside-Tests-Previous</category> <attributes> <package>Seaside-Tests-Previous</package> </attributes> </class> <class> <name>WAStoreTask</name> <environment>Seaside</environment> <super>Seaside.WATask</super> <private>false</private> none cart <imports></imports> <category>Seaside-Examples-Store</category> <attributes> <package>Seaside-Examples-Store</package> </attributes> </class> <comment> Seaside.WAStoreTask
This task models the main application flow of the store example. Most of the other components in the example are called from here. The flow is defined by the #go method. After creating a WAStoreCart instance, this calls WAStoreFillCart to allow the user to add items to it. It then calls WAStoreCartConfirmation, WAStoreAddressEditor, and WAStorePaymentEditor in succession for the checkout process. Many of the components it calls are wrapped with informative messages (#withMessage:) and validation (#validateWith:). It also makes use of WASession>>isolate: to ensure that once the checkout process starts, backtracking to modify the cart is forbidden. Used by WAStore.
</comment> <class> <name>WATaskTest</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none <imports></imports> <category>Seaside-Tests-Previous</category> <attributes> <package>Seaside-Tests-Previous</package> </attributes> </class> <class> <name>WATextAreaTag</name> <environment>Seaside</environment> <super>Seaside.WAAbstractTextAreaTag</super> <private>false</private> none value <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <comment> Seaside.WATextAreaTag
I am a multi line text input widget. See WAInputTest >> #renderTextAreaWithExampleOn: for examples.
</comment> <class> <name>WATextInputTag</name> <environment>Seaside</environment> <super>Seaside.WAAbstractTextAreaTag</super> <private>false</private> none <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <comment> Seaside.WATextInputTag
I am a single line text input widget. See WAInputTest >> #renderTextInputWithExampleOn: for examples.
</comment> <class> <name>WAPasswordInputTag</name> <environment>Seaside</environment> <super>Seaside.WATextInputTag</super> <private>false</private> none <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <comment> Seaside.WAPasswordInputTag
I am a password input widget that does not display the entered text.
</comment> <class> <name>WATimeInput</name> <environment>Seaside</environment> <super>Seaside.WACompound</super> <private>false</private> none withSeconds hours minutes seconds <imports></imports> <category>Seaside-Canvas-Tags</category> <attributes> <package>Seaside-Canvas-Tags</package> </attributes> </class> <comment> Seaside.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:
</comment> <class> <name>WATimeSelector</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none second hour minute startHour endHour <imports></imports> <category>Seaside-Components-Widgets</category> <attributes> <package>Seaside-Components-Widgets</package> </attributes> </class> <class> <name>WATool</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none root <imports></imports> <category>Seaside-Components-Tools</category> <attributes> <package>Seaside-Components-Tools</package> </attributes> </class> <class> <name>WAProfiler</name> <environment>Seaside</environment> <super>Seaside.WATool</super> <private>false</private> none <imports></imports> <category>Seaside-Components-Tools</category> <attributes> <package>Seaside-Components-Tools</package> </attributes> </class> <class> <name>WAToolFrame</name> <environment>Seaside</environment> <super>Seaside.WAFrameComponent</super> <private>false</private> none showHalos processTime renderTime deprecated <imports></imports> <category>Seaside-Components-Tools</category> <attributes> <package>Seaside-Components-Tools</package> </attributes> </class> <class> <name>WATrail</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none root <imports></imports> <category>Seaside-Components-Widgets</category> <attributes> <package>Seaside-Components-Widgets</package> </attributes> </class> <class> <name>WATransaction</name> <environment>Seaside</environment> <super>Seaside.WADecoration</super> <private>false</private> none active <imports></imports> <category>Seaside-Components-Decorations</category> <attributes> <package>Seaside-Components-Decorations</package> </attributes> </class> <class> <name>WATransactionTest</name> <environment>Seaside</environment> <super>Seaside.WATask</super> <private>false</private> none <imports></imports> <category>Seaside-Tests-Previous</category> <attributes> <package>Seaside-Tests-Previous</package> </attributes> </class> <class> <name>WATree</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none root selected expanded childrenBlock labelBlock canSelectBlock selectBlock <imports></imports> <category>Seaside-Components-Widgets</category> <attributes> <package>Seaside-Components-Widgets</package> </attributes> </class> <class> <name>WAUploadTest</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none file <imports></imports> <category>Seaside-Tests-Previous</category> <attributes> <package>Seaside-Tests-Previous</package> </attributes> </class> <class> <name>WAUrl</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none host port scheme path params fragment parameterString <imports></imports> <category>Seaside-HTTP</category> <attributes> <package>Seaside-HTTP</package> </attributes> </class> <class> <name>WAUserConfiguration</name> <environment>Seaside</environment> <super>Seaside.WAConfiguration</super> <private>false</private> none values ancestors <imports></imports> <category>Seaside-Configuration</category> <attributes> <package>Seaside-Configuration</package> </attributes> </class> <class> <name>WAValidationDecoration</name> <environment>Seaside</environment> <super>Seaside.WADecoration</super> <private>false</private> none message validationBlock exceptionClass <imports></imports> <category>Seaside-Components-Decorations</category> <attributes> <package>Seaside-Components-Decorations</package> </attributes> </class> <class> <name>WAValidationNotification</name> <environment>Seaside</environment> <super>Notification</super> <private>false</private> none <imports></imports> <category>Seaside-Components-Decorations</category> <attributes> <package>Seaside-Components-Decorations</package> </attributes> </class> <comment> Seaside.WAValidationNotification
I am signaled to indicate that a validation has occurred. See: Object>>validationError:, WAComponent>>validateWith: and WAValidationDecoration.
</comment> <class> <name>WAValueCallback</name> <environment>Seaside</environment> <super>Seaside.WACallback</super> <private>false</private> none block <imports></imports> <category>Seaside-Rendering</category> <attributes> <package>Seaside-Rendering</package> </attributes> </class> <class> <name>WAValueTest</name> <environment>Seaside</environment> <super>XProgramming.SUnit.TestCase</super> <private>false</private> none <imports></imports> <category>Seaside-Tests-Previous</category> <attributes> <package>Seaside-Tests-Previous</package> </attributes> </class> <comment> Seaside.WAValueTest
To test the refactorings from Yar Hwee Boon [hboon@motionobj.com]
</comment> <class> <name>WAViewer</name> <environment>Seaside</environment> <super>Seaside.WALabelledFormDialog</super> <private>false</private> none presenter <imports></imports> <category>Seaside-Components-Tools</category> <attributes> <package>Seaside-Components-Tools</package> </attributes> </class> <class> <name>WAWalkback</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none exception fullstack <imports></imports> <category>Seaside-Components-Tools</category> <attributes> <package>Seaside-Components-Tools</package> </attributes> </class> <comment> Seaside.WAWalkback
A WAWalkback is a component that renders an exeception stack track with the instance and temporary variables. Per default it renders only the top stack frames but it offers the option to render all. It also offers the option to open a debugger in the image. Instance Variables exception: <Exception> fullstack: <Boolean> exception - the exception to render fullstack - true if all the stack frames shall be rendered, false if only the first #defaultStackFrames shall be rendered, default: false
</comment> <class> <name>WAWalkbackErrorHandler</name> <environment>Seaside</environment> <super>Seaside.WAErrorHandler</super> <private>false</private> none <imports></imports> <category>Seaside-RenderLoop</category> <attributes> <package>Seaside-RenderLoop</package> </attributes> </class> <comment> Seaside.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.
</comment> <class> <name>WAWindowDecoration</name> <environment>Seaside</environment> <super>Seaside.WADecoration</super> <private>false</private> none title <imports></imports> <category>Seaside-Components-Decorations</category> <attributes> <package>Seaside-Components-Decorations</package> </attributes> </class> <class> <name>WAYesOrNoDialog</name> <environment>Seaside</environment> <super>Seaside.WAFormDialog</super> <private>false</private> none <imports></imports> <category>Seaside-Components-Dialogs</category> <attributes> <package>Seaside-Components-Dialogs</package> </attributes> </class> <methods> Core.Object <category>*seaside2</category>
asSeasideString ^ self displayString
</methods> <methods> Core.Object <category>*seaside2</category>
convertSeasideString: aString ^ aString
</methods> <methods> Core.Object <category>*seaside2</category>
deprecatedApi Seaside.WADeprecatedApi raiseSignal: thisContext sender displayString
</methods> <methods> Core.Object <category>*seaside2</category>
inspectorFields | members | members := self class allInstVarNames collect: [:ivar | ivar -> (self instVarNamed: ivar)]. self class isVariable ifTrue: [members := members , ((1 to: self size) collect: [:i | i -> (self at: i)])]. ^ members
</methods> <methods> Core.Object <category>*seaside2</category>
isIdenticalToSnapshot: anObject 1 to: self class instSize do: [:i | (anObject instVarAt: i) == (self instVarAt: i) ifFalse: [^ false]]. self class isVariable ifTrue: [1 to: self size do: [:i | (anObject at: i) == (self at: i) ifFalse: [^ false]]]. ^ true
</methods> <methods> Core.Object <category>*seaside2</category>
labelForSelector: aSymbol ^ aSymbol asCapitalizedPhrase
</methods> <methods> Core.Object <category>*seaside2</category>
renderOn: aRenderer "Override this method to customize how objects (not components) are rendered when passed as an argument to #render:. The default is the return value of #displayString. Just remember that you can not use #callback:, #on:of:, or #call:" aRenderer text: self
</methods> <methods> Core.Object <category>*seaside2</category>
snapshotCopy ^ self shallowCopy
</methods> <methods> Core.Object <category>*seaside2</category>
validationError: message ^Seaside.WAValidationNotification raiseSignal: message
</methods> <methods> UndefinedObject <category>*seaside2</category>
asSeasideString ^ ''
</methods> <methods> UndefinedObject <category>*seaside2</category>
convertSeasideString: aString ^ aString = '' ifTrue: [nil] ifFalse: [aString]
</methods> <methods> UndefinedObject <category>*seaside2</category>
renderOn: html
</methods> <methods> True <category>*seaside2</category>
yesNoString ^ 'Yes'
</methods> <methods> False <category>*seaside2</category>
yesNoString ^ 'No'
</methods> <methods> Number <category>*seaside2</category>
convertSeasideString: aString ^ aString asNumber
</methods> <methods> Number <category>*seaside2</category>
em ^ self printString , 'em'
</methods> <methods> Number <category>*seaside2</category>
px ^ self printString , 'px'
</methods> <methods> Fraction <category>*seaside2</category>
asSeasideString ^ self asFloat displayString
</methods> <methods> Fraction <category>*seaside2</category>
convertSeasideString: aString ^ aString = self asSeasideString ifTrue: [self] ifFalse:[ aString asNumber]
</methods> <methods> Integer <category>*seaside2</category>
printStringAsCents ^ '$', (self // 100) displayString, '.', (self \\ 100) asTwoCharacterString
</methods> <methods> Color <category>*seaside2</category>
asHTMLColor ^ '#', self hex
</methods> <methods> Color <category>*seaside2</category>
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
</methods> <methods> Collection <category>*seaside2</category>
inspectorFields | i | i := 0. ^ self asArray collect: [:each | i := i + 1. i -> each]
</methods> <methods> Collection <category>*seaside2</category>
renderOn: html self do: [ :each | each renderOn: html ]
</methods> <methods> ByteArray <category>*seaside2</category>
asMIMEDocument ^self asMIMEDocumentType: 'application/octet-stream'
</methods> <methods> ByteArray <category>*seaside2</category>
asMIMEDocumentType: mimeType ^SeasidePlatformSupport mimeDocumentClass contentType: mimeType content: self
</methods> <methods> ByteArray <category>*seaside2</category>
renderOn: aRenderer aRenderer text: self
</methods> <methods> String <category>*seaside2</category>
asCapitalizedPhrase | read words currentWord capitalizedWord | (self noneSatisfy: [:ea | ea isLowercase]) ifTrue: [^ self]. words := WriteStream on: String new. read := ReadStream on: self. [read atEnd] whileFalse: [currentWord := WriteStream on: String new. currentWord nextPut: read next. [| x | x := read peek. x isNil or: [x isUppercase]] whileFalse: [currentWord nextPut: read next]. capitalizedWord := currentWord contents capitalized. (#(#Of #In #At #A #Or #To #By ) includes: capitalizedWord) ifTrue: [capitalizedWord := capitalizedWord asLowercase]. words nextPutAll: capitalizedWord. words nextPutAll: ' ']. words skip: -1. ^ words contents
</methods> <methods> String <category>*seaside2</category>
asMIMEDocument ^self asMIMEDocumentType: 'text/plain'
</methods> <methods> String <category>*seaside2</category>
asMIMEDocumentType: mimeType ^SeasidePlatformSupport mimeDocumentClass contentType: mimeType content: self
</methods> <methods> String <category>*seaside2</category>
isSameXmlAs: anotherString " Make sure you enclose your strings in some container (a div element for instance) to ensure xml well-formedness thus avoiding parse errors " | selfXml anotherXml | selfXml := SeasidePlatformSupport parseDocumentFrom: self readStream. anotherXml := SeasidePlatformSupport parseDocumentFrom: anotherString readStream. ^ selfXml printString = anotherXml printString
</methods> <methods> String <category>*seaside2</category>
prettyPrintHtmlOn: aStream indentLevel: aNumber aStream nextPutAll: self
</methods> <methods> String <category>*seaside2</category>
printHtmlOn: aStream aStream nextPutAll: self
</methods> <methods> String <category>*seaside2</category>
renderOn: aRenderer aRenderer text: self
</methods> <methods> String <category>*seaside2</category>
renderOn: html indentLevel: level html text: self
</methods> <methods> Set <category>*seaside2</category>
restoreFromSnapshot: aSet super restoreFromSnapshot: aSet snapshotCopy
</methods> <methods> Set <category>*seaside2</category>
snapshotCopy ^ self copy
</methods> <methods> Dictionary <category>*seaside2</category>
inspectorFields ^ self
</methods> <methods> Dictionary <category>*seaside2</category>
valuesCollect: aBlock | result | result := self species new: self size. self keysAndValuesDo: [ :key :value | result at: key put: (aBlock value: value) ]. ^ result
</methods> <methods> BlockContext <category>*seaside2</category>
handleRequest: aRequest ^ self value: aRequest
</methods> <methods> BlockContext <category>*seaside2</category>
renderOn: aRenderer self numArgs = 0 ifTrue: [self value] ifFalse: [self value: aRenderer]
</methods> <methods> MessageSend <category>*seaside2</category>
fixCallbackTemps "for polymorphism with BlockContext >> #fixCallbackTemps"
</methods> <methods> MessageSend <category>*seaside2</category>
numArgs ^ selector numArgs
</methods> <methods> MessageSend <category>*seaside2</category>
renderOn: html self value: html
</methods> <methods> MessageSend <category>*seaside2</category>
value: anObject ^ self evaluateWithArguments: (Array with: anObject)
</methods> <methods> Seaside.Amb <category>initialize-release</category>
initialize failureContinuation := [:v | self error: 'Amb tree exhausted'].
</methods> <methods> Seaside.Amb <category>error handling</category>
fail ^ failureContinuation value: nil
</methods> <methods> Seaside.Amb <category>evaluation</category>
valueOfOneOf: blockCollection |kPrev| kPrev := failureContinuation. ^ Continuation currentDo: [:kEntry | blockCollection do: [:ea | Continuation currentDo: [:kNext | failureContinuation := [:v | failureContinuation := kPrev. kNext value: v] fixTemps. kEntry value: ea value]]. kPrev value: nil]
</methods> <methods> Seaside.Amb <category>error handling</category>
deny: aBoolean self assert: aBoolean not
</methods> <methods> Seaside.Amb <category>evaluation</category>
allValues: aBlock |kPrev results| kPrev := failureContinuation. results := OrderedCollection new. (Continuation currentDo: [:kRetry | failureContinuation := [:v | kRetry value: false]. results add: aBlock value. kRetry value: true]) ifTrue: [self fail]. failureContinuation := kPrev. ^ results asArray
</methods> <methods> Seaside.Amb <category>evaluation</category>
oneOf: aCollection ^ self valueOfOneOf: (aCollection collect: [:ea | [ea] fixTemps])
</methods> <methods> Seaside.Amb <category>evaluation</category>
valueOf: blockOne or: blockTwo ^ self valueOfOneOf: (Array with: blockOne with: blockTwo)
</methods> <methods> Seaside.Amb <category>evaluation</category>
valueOf: blockOne or: blockTwo or: blockThree ^ self valueOfOneOf: (Array with: blockOne with: blockTwo with: blockThree)
</methods> <methods> Seaside.Amb <category>error handling</category>
assert: aBoolean aBoolean ifFalse: [self fail]
</methods> <methods> Seaside.Amb <category>evaluation</category>
maybe ^ self oneOf: (Array with: true with: false)
</methods> <methods> Seaside.AmbTest <category>testing</category>
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?" |baker cooper fletcher miller smith| fletcher := amb oneOf: (1 to: 5). amb deny: fletcher = 5. amb deny: fletcher = 1. smith := amb oneOf: (1 to: 5). amb deny: (smith - fletcher) abs = 1. cooper := amb oneOf: (1 to: 5). amb deny: cooper = 1. amb deny: (fletcher - cooper) abs = 1. miller := amb oneOf: (1 to: 5). amb assert: miller > cooper. baker := amb oneOf: (1 to: 5). amb deny: baker = 5. amb assert: (Set new add: baker; add: cooper; add: fletcher; add: miller; add: smith; size) = 5. self assert: baker = 3. self assert: cooper = 2. self assert: fletcher = 4. self assert: miller = 5. self assert: smith = 1.
</methods> <methods> Seaside.AmbTest <category>utilities</category>
pickANumberGreaterThan: aNumber ^ amb valueOf: [aNumber + 1] or: [self pickANumberGreaterThan: aNumber + 1]
</methods> <methods> Seaside.AmbTest <category>testing</category>
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?" "This implementation is too slow - uncomment to actually run it." " |baker cooper fletcher miller smith| baker := amb oneOf: (1 to: 5). cooper := amb oneOf: (1 to: 5). fletcher := amb oneOf: (1 to: 5). miller := amb oneOf: (1 to: 5). smith := amb oneOf: (1 to: 5). amb assert: (Set new add: baker; add: cooper; add: fletcher; add: miller; add: smith; size) = 5. amb deny: baker = 5. amb deny: cooper = 1. amb deny: fletcher = 5. amb deny: fletcher = 1. amb assert: miller > cooper. amb deny: (smith - fletcher) abs = 1. amb deny: (fletcher - cooper) abs = 1. self assert: baker = 3. self assert: cooper = 2. self assert: fletcher = 4. self assert: miller = 5. self assert: smith = 1. "
</methods> <methods> Seaside.AmbTest <category>testing</category>
testMaybe |x y z| x := amb maybe. y := amb maybe. z := amb maybe not. amb deny: x = y. amb deny: x = z. self assert: x. self deny: y. self deny: z.
</methods> <methods> Seaside.AmbTest <category>utilities</category>
pickANumber ^ self pickANumberGreaterThan: 0
</methods> <methods> Seaside.AmbTest <category>testing</category>
testPickANumber self assert: self pickANumber = 1.
</methods> <methods> Seaside.AmbTest <category>testing</category>
testPickANumberAboveFive |x| x := self pickANumber. amb assert: (x > 5). self assert: x = 6.
</methods> <methods> Seaside.AmbTest <category>running</category>
setUp amb := Amb new
</methods> <methods> Seaside.AmbTest <category>testing</category>
testAllValuesAboveFive |x results| results := amb allValues: [x := amb oneOf: (1 to: 10). amb assert: (x > 5). x]. self assert: results = #(6 7 8 9 10).
</methods> <methods> Seaside.AmbTest <category>testing</category>
testSolveAnEquation |x y| x := amb oneOf: (1 to: 10). y := amb oneOf: (1 to: 10). amb assert: (y * x) = 42. self assert: x = 6. self assert: y = 7.
</methods> <methods> Seaside.Continuation <category>private</category>
restoreValues | valueStream context | valueStream := values readStream. [valueStream atEnd] whileFalse: [context := valueStream next. 1 to: context class instSize do: [:i | context instVarAt: i put: valueStream next]. 1 to: context localSize do: [:i | context localAt: i put: valueStream next]]
</methods> <methods> Seaside.Continuation <category>private</category>
initializeFromContext: aContext | valueStream context | valueStream := WriteStream on: (Array new: 20). context := aContext. [context notNil] whileTrue: [valueStream nextPut: context. 1 to: context class instSize do: [:i | valueStream nextPut: (context instVarAt: i)]. 1 to: context localSize do: [:i | valueStream nextPut: (context localAt: i)]. context := context sender]. values := valueStream contents
</methods> <methods> Seaside.Continuation <category>private</category>
terminate: aContext | context | context := aContext. [context notNil] whileTrue: [context := context swapSender: nil]
</methods> <methods> Seaside.Continuation <category>evaluating</category>
value self value: nil
</methods> <methods> Seaside.Continuation <category>evaluating</category>
invoke: aBlock "Invoke the continuation and evaluates aBlock within the captured execution context." | activation | aBlock fixTemps. self terminate: thisContext. self restoreValues. activation := aBlock asContext. activation swapSender: values first. thisContext swapSender: activation
</methods> <methods> Seaside.Continuation <category>evaluating</category>
valueWithArguments: anArray anArray size = 1 ifFalse: [ ^ self error: 'continuations can only be resumed with one argument' ]. self value: anArray first
</methods> <methods> Seaside.Continuation <category>evaluating</category>
value: anObject "Invoke the continuation and answer anObject as return value." self terminate: thisContext. self restoreValues. thisContext swapSender: values first. ^ anObject
</methods> <methods> Seaside.Continuation <category>accessing</category>
numArgs ^ 1
</methods> <methods> Seaside.ContinuationTest <category>tests</category>
testBlockTemps | y | #(1 2 3) do: [ :i | | x | x := i. tmp ifNil: [ tmp2 := (self callcc: [ :cc | tmp := cc. [ :q ] ]) ]. tmp2 value: x. x := 17 ]. y := (self callcc: [ :cc | tmp value: cc. 42 ]). self assert: y = 1
</methods> <methods> Seaside.ContinuationTest <category>tests</category>
testReentrant | assoc | assoc := self callcc: [ :cc | cc -> 0 ]. assoc value: assoc value + 1. self assert: assoc value ~= 5. assoc value = 4 ifFalse: [ assoc key value: assoc ]
</methods> <methods> Seaside.ContinuationTest <category>tests</category>
testMethodTemps | i continuation | i := 0. i := i + (self callcc: [:cc | continuation := cc. 1]). self assert: i ~= 3. i = 2 ifFalse: [ continuation value: 2 ]
</methods> <methods> Seaside.ContinuationTest <category>tests</category>
testSimplestCallCC | x | x := self callcc: [ :cc | cc value: true ]. self assert: x
</methods> <methods> Seaside.ContinuationTest <category>tests</category>
testSimpleCallCC | x continuation | x := self callcc: [ :cc | continuation := cc. false ]. x ifFalse: [ continuation value: true ]. self assert: x
</methods> <methods> Seaside.ContinuationTest <category>utilities</category>
callcc: aBlock ^ Continuation currentDo: aBlock
</methods> <methods> Seaside.ContinuationTest <category>tests</category>
testInvokeSimple | x continuation | x := self callcc: [ :cc | continuation := cc. false ]. x ifFalse: [ continuation invoke: [ true & true ] ]. "Must have a least one message send in this block for VW" self assert: x
</methods> <methods> Seaside.ContinuationTest <category>tests</category>
testBlockVars | continuation | tmp := 0. tmp := (self callcc: [ :cc | continuation := cc. 0 ]) + tmp. tmp2 ifNotNil: [ tmp2 value ] ifNil: [ #(1 2 3) do: [ :i | self callcc: [ :cc | tmp2 := cc. continuation value: i ] ] ]. self assert: tmp = 6
</methods> <methods> Seaside.ContinuationTest <category>tests</category>
testInvokeMultiple | assoc | assoc := self callcc: [ :cc | cc -> 0 ]. assoc value: assoc value + 1. self assert: assoc value ~= 5. assoc value = 4 ifFalse: [ assoc key invoke: [ assoc ] ]
</methods> <methods> Seaside.ContinuationTest <category>tests</category>
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"
</methods> <methods> Seaside.ContinuationTest <category>tests</category>
testBlockEscape | x | tmp := 0. x := [ tmp := tmp + 1. tmp2 value ]. self callcc: [ :cc | tmp2 := cc. x value ]. tmp2 := [ ]. x value. self assert: tmp = 2
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
image: urlString self image: urlString altText: ''
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>javascript</category>
anchorWithPopupUrl: urlString extent: aPoint text: aString self anchorWithPopupUrl: urlString extent: aPoint do: aString
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>javascript</category>
toggleStringFor: aCollection ^ String streamContents: [:stream | aCollection do: [:ea | stream nextPutAll: ea displayString; nextPutAll: '=yes'] separatedBy: [stream nextPutAll: ',']]
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>basic markup</category>
attributeAt: aString ^self attributes at: aString
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
emphasis: aBlock self tag: 'em' do: aBlock.
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>tables</category>
tableRowWithLabel: anObject column: aBlock column: anotherBlock self tableRow: [self cssClass: 'label'; tableData: anObject; tableData: aBlock; tableData: anotherBlock]
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>forms</category>
inputWithType: type self inputWithType: type named: nil
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
image: urlString width: width altText: altString self attributes at: 'width' put: width. self image: urlString altText: altString
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>basic markup</category>
openTag: aString self document openTag: aString attributes: self attributes. attributeBuffer := nil.
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>basic markup</category>
text: anObject self html: (self class encode: anObject)
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
script: aString self tag: 'script' do: [self html: aString]
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>css</category>
spanNamed: aString with: anObject self cssId: aString; span: anObject
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>basic markup</category>
attributes ^ attributeBuffer ifNil: [attributeBuffer := WAHtmlAttributes new]
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
listItem: aBlock self tag: #li do: aBlock
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
underline: aBlock self tag: 'u' do: aBlock.
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>tables</category>
tableRowWith: aBlock span: aNumber self tableRow: [ self tableData: aBlock span: aNumber]
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
div: aBlock self tag: 'div' do: aBlock.
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
preformatted: anObject self tag: 'pre' do: anObject
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>css</category>
cssClass: aString self attributeAt: 'class' put: aString
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>tables</category>
tableRowWithLabel: anObject column: aBlock self tableRow: [self cssClass: 'label'; tableData: anObject; tableData: aBlock]
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
paragraph: aBlock self tag: 'p' do: aBlock
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>javascript</category>
popupStringWithUrl: urlString name: nameString extent: aPoint toggles: aCollection ^ String streamContents: [:stream | stream nextPutAll: 'window.open('; nextPut: $'; nextPutAll: urlString; nextPut: $'; nextPut: $,; nextPut: $'; nextPutAll: nameString; nextPut: $'; nextPut:$,; nextPut: $'; nextPutAll: 'width='; nextPutAll: aPoint x displayString; nextPutAll: ',height='; nextPutAll: aPoint y displayString; nextPut: $,; nextPutAll: (self toggleStringFor: aCollection); nextPut: $'; nextPutAll: ')']
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>basic markup</category>
closeTag: aString self document closeTag: aString
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>forms</category>
buttonForUrl: urlString withText: labelString self buttonForUrl: urlString withText: labelString data: #()
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>basic markup</category>
withLineBreaks: aString | stream | stream := aString readStream. [stream atEnd] whileFalse: [self text: stream nextLine. stream atEnd ifFalse: [self break]]
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>forms</category>
inputWithType: type named: name value: value name ifNotNil: [self attributes at: 'name' put: name]. value ifNotNil: [self attributes value: value displayString]. self attributes type: type; addClass: type. self tag: 'input'.
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
italic: aBlock self tag: 'i' do: aBlock.
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
image: urlString height: height self attributes at: 'height' put: height. self image: urlString
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
anchorWithUrl: urlString do: aBlock self attributes at: 'href' put: urlString. self tag: 'a' do: aBlock.
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>css</category>
ensureCssId: aString self attributes at: 'id' ifAbsentPut: [aString]
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>basic markup</category>
attributeAt: aString put: anObject self attributes at: aString put: anObject
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
acronym: titleString do: aBlock self attributes at: 'title' put: titleString. self tag: 'acronym' do: aBlock
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>css</category>
divClass: aString with: anObject self cssClass: aString; div: anObject
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
list: aCollection do: aBlock self unorderedList: [aCollection do: [:item | self listItem: [aBlock value: item]]]
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>head</category>
scriptWithUrl: urlString self attributes at: 'type' put: 'text/javascript'; at: 'src' put: urlString. self tag: 'script'
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
horizontalRule self tag: 'hr'
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>forms</category>
buttonWithType: typeString named: nameString value: valueString do: aBlock nameString ifNotNil: [self attributes at: 'name' put: nameString; at: 'id' ifAbsentPut: [nameString]]. valueString ifNotNil: [self attributes value: valueString displayString]. self attributes type: typeString. self tag: 'button' do: aBlock.
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
legend: aBlock self tag: 'legend' do: aBlock
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
label: aBlock self tag: 'label' do: aBlock
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>forms</category>
buttonForUrl: urlString withText: labelString data: assocCollection self formWithMethod: 'GET' action: urlString do: [assocCollection do: [:each | self inputWithType: 'hidden' named: each key displayString value: each value]. self submitButtonWithText: labelString]
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>basic markup</category>
textWithLFs: anObject "Replace all LFs with breaks" | aStream | aStream := anObject displayString readStream. [aStream atEnd] whileFalse: [self text: (aStream upTo: Character lf). aStream atEnd ifFalse: [self break]].
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
image: urlString altText: altString self attributeAt: 'alt' put: altString. self attributeAt: 'src' put: urlString. self tag: #img.
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>tables</category>
tableRow: aBlock self tag: 'tr' do: aBlock
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
orderedList: aCollection do: aBlock self orderedList: [aCollection do: [:item | self listItem: [aBlock value: item]]]
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>css</category>
ensureCssClass: aString self attributes at: 'class' ifAbsentPut: [aString]
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>tables</category>
spacerRow self tableRowWith: [self space]
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
fieldset: aBlock self tag: 'fieldset' do: aBlock
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
orderedList: aBlock self tag: 'ol' do: aBlock
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
anchorWithMailto: emailString self anchorWithUrl: 'mailto:', emailString do: emailString
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
bold: aBlock self tag: 'b' do: aBlock.
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>basic markup</category>
attributes: aCollection aCollection associationsDo: [:x | self attributeAt: x key put: x value]
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>basic markup</category>
html: aString self document text: aString.
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>forms</category>
textAreaNamed: name value: value name ifNotNil: [self attributes at: 'name' put: name]. self attributes at: 'rows' ifAbsentPut: [3]; at: 'cols' ifAbsentPut: [25]. self tag: 'textarea' do: value.
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
space self html: self spaceEntity
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
break self tag: 'br'
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>basic markup</category>
textWithCRs: anObject "Replace all CRs with breaks" | aStream | aStream := anObject displayString readStream. [aStream atEnd] whileFalse: [self text: (aStream upTo: Character cr). aStream atEnd ifFalse: [self break]].
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
image: urlString width: width height: height self attributes at: 'width' put: width; at: 'height' put: height. self image: urlString
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
list: aCollection self list: aCollection do: [:x | self text: x]
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>tables</category>
tableData: aBlock self tag: 'td' do: aBlock
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>accessing</category>
document self subclassResponsibility
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>forms</category>
submitButtonWithText: aString self attributes at: 'value' put: aString. self inputWithType: 'submit'
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
submitButton self inputWithType: 'submit'
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>tables</category>
layoutTableOfWidth: width do: aBlock self attributes at: 'width' put: width. self layoutTable: aBlock
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>css</category>
cssId: aString self attributeAt: 'id' put: aString
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>tables</category>
tableHeading: aBlock self tag: 'th' do: aBlock
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
strong: aBlock self tag: 'strong' do: aBlock.
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>tables</category>
tableRowWith: x with: y with: z self tableRow: [ self tableData: x; tableData: y; tableData: z]
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>basic markup</category>
tag: aString self openTag: aString. self closeTag: aString.
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>tables</category>
table: aBlock self tag: 'table' do: aBlock
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
span: aBlock self tag: 'span' do: aBlock.
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>basic markup</category>
render: anObject anObject renderOn: self
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
anchorWithPopupUrl: urlString extent: aPoint do: anObject self anchorWithPopupUrl: urlString name: '' extent: aPoint toggles: #(menubar resizable scrollbars) do: anObject
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>css</category>
divNamed: aString with: anObject self cssId: aString; div: anObject
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>tables</category>
tableHeadings: aCollection self tableRow: [aCollection do: [:ea | self tableHeading: ea]]
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
heading: anObject level: aNumber self tag: 'h', aNumber displayString do: anObject
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
space: aNumber aNumber timesRepeat: [self space]
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
spaceEntity "To be subclassed as needed" ^'&nbsp;'
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
image: urlString height: height altText: altString self attributes at: 'height' put: height. self image: urlString altText: altString
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
heading: aString self heading: aString level: 1
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>javascript</category>
anchorWithPopupUrl: urlString name: nameString extent: aPoint toggles: aCollection do: anObject self attributes at: 'onClick' put: (self popupStringWithUrl: urlString name: nameString extent: aPoint toggles: aCollection), '; return false'. self anchorWithUrl: urlString do: anObject.
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
anchorWithMailto: emailString subject: subjectString self anchorWithUrl: 'mailto:', emailString, '?subject=', subjectString do: emailString
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
anchorWithUrl: urlString title: titleString do: aBlock self attributes at: 'title' put: titleString. self anchorWithUrl: urlString do: aBlock.
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
image: urlString width: width self attributes at: 'width' put: width. self image: urlString
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
anchorWithName: aString self attributes at: 'name' put: aString. self tag: #a
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>tables</category>
tableData: aBlock span: aNumber aNumber > 0 ifTrue: [self attributes at: 'colspan' put: aNumber. self tableData: aBlock]
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>css</category>
spanClass: aString with: anObject self cssClass: aString; span: anObject
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
paragraph self tag: 'p'
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>forms</category>
fieldsetWithLegend: aString do: aBlock self fieldset: [ self legend: aString. aBlock value. ]
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>tables</category>
tableRowWith: aBlock with: anotherBlock self tableRow: [ self tableData: aBlock; tableData: anotherBlock]
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>tables</category>
layoutTable: aBlock self attributes at: 'border'put: 0; at: 'cellspacing' put: 0; at: 'cellpadding' put: 0. self table: aBlock
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
unorderedList: aBlock self tag: 'ul' do: aBlock
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>basic markup</category>
tag: aString do: anObject self openTag: aString. self render: anObject. self closeTag: aString.
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>dnu</category>
doesNotUnderstand: aMessage | argCount | argCount := aMessage arguments size. argCount = 0 ifTrue: [^ self tag: aMessage selector]. argCount = 1 ifTrue: [^ self tag: aMessage selector allButLast do: aMessage argument]. ^ super doesNotUnderstand: aMessage
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>basic markup</category>
encodeCharacter: aCharacter self html: ('&#', aCharacter asInteger displayString, ';').
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>tables</category>
tableRowWith: aBlock self tableRow: [ self tableData: aBlock ]
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
image: urlString width: width height: height altText: altString self attributes at: 'width' put: width; at: 'height' put: height. self image: urlString altText: altString
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>basic markup</category>
encodeText: anObject "deprecated" self text: anObject
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
formWithMethod: methodString action: actionUrl do: aBlock self attributes at: 'method' put: methodString; at: 'action' put: actionUrl. self tag: 'form' do: aBlock
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
labelFor: idString do: aBlock self attributes at: 'for' put: idString. self label: aBlock
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>forms</category>
inputWithType: type named: name self inputWithType: type named: name value: nil.
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>css</category>
style: aString self attributeAt: 'style' put: aString
</methods> <methods> Seaside.WAAbstractHtmlBuilder <category>html</category>
formWithAction: actionUrl do: aBlock self formWithMethod: 'post' action: actionUrl do: aBlock
</methods> <methods> Seaside.WAAbstractTextAreaTag <category>javascript</category>
exampleText: aString (self value isNil or: [self value = aString]) ifTrue: [self onFocus: 'if(value == ', aString printString, '){value=''''; style.color=''black''}'; style: 'color: #aaa'; value: aString]
</methods> <methods> Seaside.WAAbstractTextAreaTag <category>javascript</category>
setCursorPosition: anInteger self setSelectionFrom: anInteger to: anInteger
</methods> <methods> Seaside.WAAbstractTextAreaTag <category>callbacks</category>
callback: aBlock self name: (canvas callbacks registerCallback: aBlock). self value: self value asSeasideString
</methods> <methods> Seaside.WAAbstractTextAreaTag <category>javascript</category>
setSelectionFrom: start to: stop "Insert the javascript for setting the selection" | aStream | self ensureId. aStream := (String new: 30) writeStream. #setCursor. aStream nextPutAll: 'setSelection('; nextPutAll: self id printString. start isNumber ifTrue: [aStream nextPutAll: ',' , start asString] ifFalse: [aStream nextPutAll: ',1']. stop isNumber ifTrue: [aStream nextPutAll: ',' , stop asString]. aStream nextPut: $). self session addLoadScript: aStream contents
</methods> <methods> Seaside.WAActionCallback <category>accessing</category>
block: aZeroArgBlock block := aZeroArgBlock fixCallbackTemps.
</methods> <methods> Seaside.WAActionCallback <category>testing</category>
isEnabled ^ self session currentRequest isXmlHttpRequest not
</methods> <methods> Seaside.WAActionCallback <category>accessing</category>
priority ^ 8
</methods> <methods> Seaside.WAActionCallback <category>evaluation</category>
evaluateWithArgument: anObject block value. self signalRenderNotification
</methods> <methods> Seaside.WAActionCallback <category>evaluation</category>
signalRenderNotification WARenderNotification raiseSignal
</methods> <methods> Seaside.WAAllCanvasTests <category>rendering</category>
renderContentOn: html html div id: 'all-tests'; with: [ html heading: 'Test Canvas Components'. html space. html render: contents]
</methods> <methods> Seaside.WAAllCanvasTests <category>initialization</category>
initialize super initialize. self contents: (WASimpleNavigation new add: WACanvasInputTest new label: 'Input'; add: WAInputTest new label: 'Input(2)'; add: WAEmailTest new label: 'Email'; add: WACanvasHtmlTest new label: 'Html'; add: WACanvasTest new label: 'Canvas'; add: WACanvasLinkSubmitTest new label: 'Submit'; add: WACanvasDateTimeTest new label: 'More tests'; add: WACanvasModelTest new label: 'Model'; add: WACanvasUploadTest new label: 'Upload'; add: WACanvasDefaultFormTest new label: 'Default Form'; add: WACanvasImageTest new label: 'Image'; add: WAIframeTest new label: 'Iframe'; add: WARubyTest new label: 'Ruby'; add: WAPhraseElementsTest new label: 'Phrase'; add: WACanvasTableTest new label: 'Table'; add: WATableReportTest new label: 'Table Report'; add: WASvgTest new label: 'SVG'; yourself)
</methods> <methods> Seaside.WAAllCanvasTests <category>path</category>
updateRoot: anHtmlRoot super updateRoot: anHtmlRoot. anHtmlRoot title: 'Seaside Canvas Tests: ', contents selection displayString. " anHtmlRoot linkToStyle: 'http://www.netstyle.ch/include/seaside/include/style.css'." anHtmlRoot linkWithStyle: 'h1 {color: #efb321} body {font-family: tahoma, arial, helvetica; font-size: 80%}'. " anHtmlRoot linkToScript: 'http://www.xxxx.yyy/scripts.js'." anHtmlRoot linkWithScript: 'var example = "abc";'.
</methods> <methods> Seaside.WAAllTests <category>updating</category>
rendererClass "Intentionally using the classic API" ^WAHtmlRenderer
</methods> <methods> Seaside.WAAllTests <category>initialize-release</category>
initialize super initialize. self contents: (WASimpleNavigation new add: WAOldApiInputTest new label: 'Input'; add: WAOldApiHtmlTest new label: 'Html'; add: WAEncodingTest new label: 'Encoding'; add: WAErrorTest new label: 'Error'; add: WAExceptionTest new label: 'Exception'; add: WAClosureTest new label: 'Closure'; add: WATransactionTest new label: 'Transaction'; add: WAUploadTest new label: 'Upload'; add: (WAParentTest new parent: self) label: 'Parent'; add: WAPathTest new label: 'Path'; add: WATaskTest new label: 'Task'; add: WACookieTest new label: 'Cookies'; add: WACallbackTest new label: 'Callbacks'; add: WAImageTest new label: 'Images'; add: WAHomeTest new label: 'Home'; add: WACacheTest new label: 'Cache'; add: WADefaultFormTest new label: 'Default Form'; add: WALinkSubmitTest new label: 'Submit'; add: WAJavascriptTest new label: 'Javascript'; add: WADelayTest new label: 'Delay'; add: WALotsaLinks new label: 'Lot of links'; add: WAPopupTest new label: 'Popup'; yourself)
</methods> <methods> Seaside.WAAllTests <category>updating</category>
updateRoot: anHtmlRoot super updateRoot: anHtmlRoot. anHtmlRoot title: 'Seaside Tests: ', contents selection displayString. " anHtmlRoot linkToStyle: 'http://www.netstyle.ch/include/seaside/include/style.css'." anHtmlRoot linkWithStyle: 'h1 {color: #efb321} body {font-family: tahoma, arial, helvetica; font-size: 80%}'. " anHtmlRoot linkToScript: 'http://www.xxxx.yyy/scripts.js'." anHtmlRoot linkWithScript: 'var example = "abc";'.
</methods> <methods> Seaside.WAAllTests <category>rendering</category>
renderContentOn: html html divNamed: 'all-tests' with: [ html heading: 'Test Components'. html space. html render: contents]
</methods> <methods> Seaside.WAAlphabeticBatchedList <category>initialization</category>
initialize super initialize. self session registerObjectForBacktracking: self.
</methods> <methods> Seaside.WAAlphabeticBatchedList <category>testing</category>
isOnLastPage ^ self validPages last = self currentPage
</methods> <methods> Seaside.WAAlphabeticBatchedList <category>accessing-calculated</category>
validPages ^ (items collect: [:ea | ea displayString asUppercase first]) asSet asSortedCollection
</methods> <methods> Seaside.WAAlphabeticBatchedList <category>rendering</category>
renderNextOn: html html space. self isOnLastPage ifFalse: [ html anchor callback: [ self nextPage ]; with: '>>' ] ifTrue: [ html text: '>>' ]
</methods> <methods> Seaside.WAAlphabeticBatchedList <category>testing</category>
isOnFirstPage ^ self validPages first = self currentPage
</methods> <methods> Seaside.WAAlphabeticBatchedList <category>accessing</category>
items ^ items
</methods> <methods> Seaside.WAAlphabeticBatchedList <category>rendering</category>
renderPreviousOn: html self isOnFirstPage ifFalse: [ html anchor callback: [ self previousPage ]; with: '<<' ] ifTrue: [ html text: '<<' ]. html space.
</methods> <methods> Seaside.WAAlphabeticBatchedList <category>rendering</category>
renderContentOn: html items isEmpty ifFalse: [ html div id: 'batch'; with: [ self renderPreviousOn: html. self renderPagesOn: html. self renderNextOn: html ] ]
</methods> <methods> Seaside.WAAlphabeticBatchedList <category>actions</category>
nextPage self isOnLastPage ifFalse: [currentPage := self validPages after: currentPage]
</methods> <methods> Seaside.WAAlphabeticBatchedList <category>accessing-calculated</category>
batch ^ items select: [:ea | ea displayString asUppercase first = self currentPage]
</methods> <methods> Seaside.WAAlphabeticBatchedList <category>actions</category>
previousPage self isOnFirstPage ifFalse: [currentPage := self validPages before: currentPage]
</methods> <methods> Seaside.WAAlphabeticBatchedList <category>rendering</category>
renderPagesOn: html self allPages do: [ :char | currentPage = char ifFalse: [ (self validPages includes: char) ifTrue: [ html anchor callback: [self currentPage: char]; with: char] ifFalse: [ html text: char ] ] ifTrue: [ html strong: char ] ] separatedBy: [ html space ]
</methods> <methods> Seaside.WAAlphabeticBatchedList <category>accessing</category>
currentPage ^ currentPage ifNil: [currentPage := self validPages first]
</methods> <methods> Seaside.WAAlphabeticBatchedList <category>accessing</category>
currentPage: aCharacter currentPage := aCharacter
</methods> <methods> Seaside.WAAlphabeticBatchedList <category>accessing</category>
items: aCollection items := aCollection
</methods> <methods> Seaside.WAAlphabeticBatchedList <category>accessing-calculated</category>
allPages ^ $A to: $Z
</methods> <methods> Seaside.WAAnchorTag <category>public api</category>
navigation isNavigation := true
</methods> <methods> Seaside.WAAnchorTag <category>initialize-release</category>
initialize super initialize. isNavigation := false
</methods> <methods> Seaside.WAAnchorTag <category>public api</category>
url: aString url := aString
</methods> <methods> Seaside.WAAnchorTag <category>attributes</category>
relationship: aString self attributeAt: 'rel' put: aString
</methods> <methods> Seaside.WAAnchorTag <category>attributes</category>
name: aString self attributeAt: 'name' put: aString
</methods> <methods> Seaside.WAAnchorTag <category>deprecated</category>
toggleStringFor: aCollection self deprecatedApi. ^ String streamContents: [:stream | aCollection do: [:ea | stream nextPutAll: ea displayString; nextPutAll: '=yes'] separatedBy: [stream nextPutAll: ',']]
</methods> <methods> Seaside.WAAnchorTag <category>accessing</category>
tag ^ 'a'
</methods> <methods> Seaside.WAAnchorTag <category>accessing</category>
fragment ^fragment
</methods> <methods> Seaside.WAAnchorTag <category>accessing</category>
fragment: aString fragment := aString
</methods> <methods> Seaside.WAAnchorTag <category>deprecated</category>
text: aString self deprecatedApi. self with: aString
</methods> <methods> Seaside.WAAnchorTag <category>public api</category>
extraPath: aString extraPath := aString
</methods> <methods> Seaside.WAAnchorTag <category>attributes</category>
submitFormNamed: aString self onClick: (self handlerForForm: aString)
</methods> <methods> Seaside.WAAnchorTag <category>attributes</category>
rel: aString self deprecatedApi. self relationship: aString
</methods> <methods> Seaside.WAAnchorTag <category>private</category>
actionUrl | actionUrl | ^ callbackKey ifNotNil: [actionUrl := canvas context actionUrl withParameter: callbackKey. self isNavigation ifTrue: [actionUrl := actionUrl withParameter: '_n']. extraParameters ifNotNil: [extraParameters associationsDo: [:assoc | actionUrl addParameter: assoc key value: assoc value]]. actionUrl fragment: fragment. extraPath ifNil: [actionUrl queryString] ifNotNil: [actionUrl addToPath: extraPath; asString]]
</methods> <methods> Seaside.WAAnchorTag <category>public api</category>
document: aDocument self document: aDocument mimeType: nil
</methods> <methods> Seaside.WAAnchorTag <category>callbacks</category>
prompt: aString callback: aBlock callbackKey := canvas callbacks registerCallback: aBlock. promptString := aString
</methods> <methods> Seaside.WAAnchorTag <category>private</category>
handlerForForm: formName ^ promptString ifNil: ['submitFormTriggeringCallback(' , formName asString printString , ', ' , callbackKey displayString printString , ', "href" ); return false;'] ifNotNil: ['if(x = prompt(' , promptString printString , ')) submitFormTriggeringCallback(' , formName asString printString , ', ' , callbackKey displayString printString , ', x); return false;']
</methods> <methods> Seaside.WAAnchorTag <category>events</category>
onMouseOver: aString super onMouseOver: aString. self attributes at: 'href' ifAbsentPut: [ 'javascript:void(0)' ]
</methods> <methods> Seaside.WAAnchorTag <category>public api</category>
with: aBlock | newUrl | newUrl := url ifNil: [self actionUrl]. newUrl ifNotNil: [self attributes at: 'href' put: newUrl]. ^ super with: aBlock
</methods> <methods> Seaside.WAAnchorTag <category>events</category>
onMouseOut: aString super onMouseOut: aString. self attributes at: 'href' ifAbsentPut: [ 'javascript:void(0)' ]
</methods> <methods> Seaside.WAAnchorTag <category>deprecated</category>
newTarget self deprecatedApi. self target: '_new'
</methods> <methods> Seaside.WAAnchorTag <category>public api</category>
on: aSymbol of: anObject self callback: [ anObject perform: aSymbol ]. self with: (self labelForSelector: aSymbol of: anObject).
</methods> <methods> Seaside.WAAnchorTag <category>testing</category>
isNavigation ^ isNavigation ifNil: [false]
</methods> <methods> Seaside.WAAnchorTag <category>public api</category>
document: aDocument mimeType: mimeType self document: aDocument mimeType: mimeType fileName: nil
</methods> <methods> Seaside.WAAnchorTag <category>callbacks</category>
callback: aBlock callbackKey := canvas callbacks registerActionCallback: aBlock
</methods> <methods> Seaside.WAAnchorTag <category>public api</category>
mailto: aString self url: 'mailto:' , aString; with: aString
</methods> <methods> Seaside.WAAnchorTag <category>public api</category>
extraParameters: aCollection extraParameters := aCollection
</methods> <methods> Seaside.WAAnchorTag <category>public api</category>
document: aDocument mimeType: mimeType fileName: fileName self url: (canvas context urlForDocument: aDocument mimeType: mimeType fileName: fileName)
</methods> <methods> Seaside.WAAnchorTag <category>events</category>
onClick: aString super onClick: aString. self attributes at: 'href' ifAbsentPut: [ 'javascript:void(0)' ]
</methods> <methods> Seaside.WAAnchorTag <category>javascript</category>
canHaveShortcut ^true
</methods> <methods> Seaside.WAAnchorTag <category>public api</category>
resourceUrl: aString self url: (canvas document root absoluteUrlForResource: aString)
</methods> <methods> Seaside.WAAnchorTag <category>deprecated</category>
target: aString self deprecatedApi. self attributeAt: 'target' put: aString
</methods> <methods> Seaside.WAAnswerHandler <category>accessing</category>
block: aBlock block := aBlock
</methods> <methods> Seaside.WAAnswerHandler <category>processing</category>
handleAnswer: anObject continueWith: aBlock block value: anObject
</methods> <methods> Seaside.WAApplication <category>configuration</category>
serverPort ^ self preferenceAt: #serverPort
</methods> <methods> Seaside.WAApplication <category>request handling</category>
handleDefaultRequest: aRequest ^ (self sessionClass new setParent: self) handleRequest: aRequest
</methods> <methods> Seaside.WAApplication <category>configuration</category>
useSessionCookie ^ self preferenceAt: #useSessionCookie
</methods> <methods> Seaside.WAApplication <category>configuration</category>
errorHandler ^ self preferenceAt: #errorHandler
</methods> <methods> Seaside.WAApplication <category>configuration</category>
serverProtocol ^ self preferenceAt: #serverProtocol
</methods> <methods> Seaside.WAApplication <category>configuration</category>
resourceBaseUrl ^ self preferenceAt: #resourceBaseUrl
</methods> <methods> Seaside.WAApplication <category>accessing</category>
libraries ^ libraries ifNil: [libraries := OrderedCollection withAll: self defaultLibraries]
</methods> <methods> Seaside.WAApplication <category>configuration</category>
sessionClass ^ self preferenceAt: #sessionClass
</methods> <methods> Seaside.WAApplication <category>preferences</category>
hasPreferenceGroup: aSymbol ^ self configuration hasGroupNamed: aSymbol
</methods> <methods> Seaside.WAApplication <category>removing</category>
removeLibrary: aClass self libraries remove: aClass ifAbsent: [^aClass]. self announceChangeOf: #library with: #remove->aClass. ^aClass
</methods> <methods> Seaside.WAApplication <category>testing</category>
isDeployed ^ self rootComponent isDeployed
</methods> <methods> Seaside.WAApplication <category>preferences</category>
configuration ^ configuration ifNil: [configuration := WAUserConfiguration new addAncestor: self defaultAncestor]
</methods> <methods> Seaside.WAApplication <category>configuration</category>
password ^ self preferenceAt: #password
</methods> <methods> Seaside.WAApplication <category>request handling</category>
updateRoot: anHtmlRoot anHtmlRoot title isEmpty ifTrue: [ anHtmlRoot title: self basePath ]. self libraries do: [ :each | each default updateRoot: anHtmlRoot ]
</methods> <methods> Seaside.WAApplication <category>configuration</category>
serverPath ^ self preferenceAt: #serverPath
</methods> <methods> Seaside.WAApplication <category>accessing</category>
description ^ self rootComponent description
</methods> <methods> Seaside.WAApplication <category>request handling</category>
handleExpiredRequest: aRequest | response | response := super handleExpiredRequest: aRequest. self useSessionCookie ifTrue: [ response deleteCookieAt: self name ]. ^ response
</methods> <methods> Seaside.WAApplication <category>testing</category>
isApplication ^true
</methods> <methods> Seaside.WAApplication <category>accessing</category>
defaultLibraries ^ Array with: WAStandardFiles
</methods> <methods> Seaside.WAApplication <category>request handling</category>
handleRequest: aRequest self useSessionCookie ifTrue: [ aRequest cookies at: self name ifPresent: [ :value | aRequest fields at: self handlerField ifAbsentPut: [ value ] ] ]. ^ super handleRequest: aRequest
</methods> <methods> Seaside.WAApplication <category>configuration</category>
sessionExpirySeconds ^ self preferenceAt: #sessionExpirySeconds
</methods> <methods> Seaside.WAApplication <category>preferences</category>
preferenceAt: aSymbol put: anObject self configuration valueAt: aSymbol put: anObject. self announceChangeOf: #preference with: aSymbol->anObject. ^anObject
</methods> <methods> Seaside.WAApplication <category>adding</category>
addLibrary: aClass aClass isNil ifTrue: [^aClass]. self libraries add: aClass. self announceChangeOf: #library with: #add->aClass. ^aClass
</methods> <methods> Seaside.WAApplication <category>configuration</category>
login ^ self preferenceAt: #login
</methods> <methods> Seaside.WAApplication <category>preferences</category>
preferenceAt: aSymbol ^ self configuration valueAt: aSymbol
</methods> <methods> Seaside.WAApplication <category>accessing</category>
baseUrl | serverPath | serverPath := self serverPath. ^ (serverPath isNil ifTrue: [ super baseUrl ] ifFalse: [ WAUrl new addToPath: serverPath ]) scheme: self serverProtocol; hostname: self serverHostname; port: self serverPort; yourself
</methods> <methods> Seaside.WAApplication <category>preferences</category>
defaultAncestor "yes, breaking layering" ^ WARenderLoopConfiguration new
</methods> <methods> Seaside.WAApplication <category>configuration</category>
deploymentMode ^ self preferenceAt: #deploymentMode
</methods> <methods> Seaside.WAApplication <category>copying</category>
postCopy super postCopy. configuration := configuration copy. libraries := libraries copy
</methods> <methods> Seaside.WAApplication <category>configuration</category>
serverHostname ^ self preferenceAt: #serverHostname
</methods> <methods> Seaside.WAApplication <category>accessing</category>
configurationComponent ^ WAApplicationEditor new application: self
</methods> <methods> Seaside.WAApplication <category>configuration</category>
mainClass ^ self preferenceAt: #mainClass
</methods> <methods> Seaside.WAApplication <category>configuration</category>
rootComponent ^ self preferenceAt: #rootComponent
</methods> <methods> Seaside.WAApplicationEditor <category>actions</category>
addLibrary application addLibrary: library
</methods> <methods> Seaside.WAApplicationEditor <category>accessing</category>
allLibraries ^ (WAStyleLibrary subclasses, WAScriptLibrary subclasses, WAFileLibrary allSubclasses asArray) asSortedCollection: [ :a :b | a name <= b name ]
</methods> <methods> Seaside.WAApplicationEditor <category>accessing</category>
application: anApplication application := anApplication. configuration := application configuration.
</methods> <methods> Seaside.WAApplicationEditor <category>rendering</category>
renderFormOn: html self renderLibrariesOn: html. super renderFormOn: html
</methods> <methods> Seaside.WAApplicationEditor <category>rendering</category>
renderContentOn: html html heading level1; with: 'Application: ' , application name. super renderContentOn: html
</methods> <methods> Seaside.WAApplicationEditor <category>rendering</category>
renderLibrariesOn: html html heading level2 with: 'Libraries'. self libraryOptions isEmpty ifFalse: [ html text: 'Add Library: '. html select list: self libraryOptions; selected: nil; callback: [ :value | library := value ]. html space. html submitButton callback: [ self addLibrary ]; text: 'Add' ]. html unorderedList: [ application libraries do: [ :each | html listItem: [ html text: each. html space. html anchor callback: [ application removeLibrary: each ]; with: '(remove)' ] ] ]
</methods> <methods> Seaside.WAApplicationEditor <category>accessing</category>
libraryOptions ^ self allLibraries difference: application libraries
</methods> <methods> Seaside.WAAuthConfiguration <category>attributes</category>
attributes ^ Array with: (WAStringAttribute key: #login group: #authentication) with: (WAStringAttribute key: #password group: #authentication)
</methods> <methods> Seaside.WAAuthConfiguration <category>ancestry</category>
ancestors ^ Array with: (WARenderLoopConfiguration new)
</methods> <methods> Seaside.WAAuthConfiguration <category>accessing</category>
mainClass ^ WAAuthMain
</methods> <methods> Seaside.WAAuthMain <category>as yet unclassified</category>
createRoot | root | root := super createRoot. root addDecoration: (WABasicAuthentication new authenticator: self). ^ root
</methods> <methods> Seaside.WAAuthMain <category>password verification</category>
verifyPassword: password forUser: username ^self application login = username and: [ self application password = password ]
</methods> <methods> Seaside.WABacktrackingTest <category>testing</category>
testArray | original snapshot1 snapshot2 snapshot3 | original := #( 1 2 3 ) copy. snapshot1 := original snapshotCopy. original at: 1 put: #a. snapshot2 := original snapshotCopy. original at: 2 put: #b. snapshot3 := original snapshotCopy. original restoreFromSnapshot: snapshot1. self assert: original = #( 1 2 3 ). original restoreFromSnapshot: snapshot2. self assert: original = #( a 2 3 ). original restoreFromSnapshot: snapshot3. self assert: original = #( a b 3 )
</methods> <methods> Seaside.WABacktrackingTest <category>testing</category>
testSet | original snapshot1 snapshot2 snapshot3 | original := Set with: 1 with: 2. snapshot1 := original snapshotCopy. original add: 3. snapshot2 := original snapshotCopy. original remove: 1. snapshot3 := original snapshotCopy. original restoreFromSnapshot: snapshot1. self assert: original size = 2. self assert: (original includes: 1). self assert: (original includes: 2). self deny: (original includes: 3). original restoreFromSnapshot: snapshot2. self assert: original size = 3. self assert: (original includes: 1). self assert: (original includes: 2). self assert: (original includes: 3). original restoreFromSnapshot: snapshot3. self assert: original size = 2. self deny: (original includes: 1). self assert: (original includes: 2). self assert: (original includes: 3). original add: 4. original restoreFromSnapshot: snapshot3. self assert: original size = 2. self deny: (original includes: 1). self assert: (original includes: 2). self assert: (original includes: 3). self deny: (original includes: 4).
</methods> <methods> Seaside.WABacktrackingTest <category>testing</category>
testDictionary | original snapshot1 snapshot2 snapshot3 snapshot4 | original := Dictionary new. original at: 1 put: #a; at: 2 put: #b. snapshot1 := original snapshotCopy. original at: 3 put: #c. snapshot2 := original snapshotCopy. original at: 3 put: #d. snapshot3 := original snapshotCopy. original removeKey: 1. snapshot4 := original snapshotCopy. original restoreFromSnapshot: snapshot1. self assert: original size = 2. self assert: (original at: 1 ifAbsent: []) = #a. self assert: (original at: 2 ifAbsent: []) = #b. self assert: (original at: 3 ifAbsent: []) = nil. self assert: (original at: 4 ifAbsent: []) = nil. original restoreFromSnapshot: snapshot2. self assert: (original at: 1 ifAbsent: []) = #a. self assert: (original at: 2 ifAbsent: []) = #b. self assert: (original at: 3 ifAbsent: []) = #c. self assert: (original at: 4 ifAbsent: []) = nil. original restoreFromSnapshot: snapshot3. self assert: (original at: 1 ifAbsent: []) = #a. self assert: (original at: 2 ifAbsent: []) = #b. self assert: (original at: 3 ifAbsent: []) = #d. self assert: (original at: 4 ifAbsent: []) = nil. original restoreFromSnapshot: snapshot4. self assert: (original at: 1 ifAbsent: []) = nil. self assert: (original at: 2 ifAbsent: []) = #b. self assert: (original at: 3 ifAbsent: []) = #d. self assert: (original at: 4 ifAbsent: []) = nil. original at: 2 put: #!. original restoreFromSnapshot: snapshot4. self assert: (original at: 1 ifAbsent: []) = nil. self assert: (original at: 2 ifAbsent: []) = #b. self assert: (original at: 3 ifAbsent: []) = #d. self assert: (original at: 4 ifAbsent: []) = nil
</methods> <methods> Seaside.WABacktrackingTest <category>testing</category>
testHolder | original snapshot1 snapshot2 snapshot3 | WACurrentSession use: WASession new during: [original := WAStateHolder new. snapshot1 := original snapshotCopy. original contents: 1. snapshot2 := original snapshotCopy. original contents: 2. snapshot3 := original snapshotCopy. original restoreFromSnapshot: snapshot1. self assert: original contents = nil. original restoreFromSnapshot: snapshot2. self assert: original contents = 1. original restoreFromSnapshot: snapshot3. self assert: original contents = 2]
</methods> <methods> Seaside.WABaseElement <category>attributes</category>
url: aString self attributeAt: 'href' put: aString
</methods> <methods> Seaside.WABaseElement <category>attributes</category>
target: aString self attributeAt: 'target' put: aString
</methods> <methods> Seaside.WABasicAuthentication <category>accessing</category>
authenticator: anAuthenticator authenticator := anAuthenticator
</methods> <methods> Seaside.WABasicAuthentication <category>testing</category>
isGlobal ^ true
</methods> <methods> Seaside.WABasicAuthentication <category>processing</category>
updateRoot: aStream (self verifyRequest: self session currentRequest) ifTrue: [ super updateRoot: aStream ] ifFalse: [ self respondWithChallenge ]
</methods> <methods> Seaside.WABasicAuthentication <category>processing</category>
verifyRequest: aRequest ^ authenticator verifyPassword: aRequest password forUser: aRequest user
</methods> <methods> Seaside.WABasicAuthentication <category>accessing</category>
realm: aString realm := aString
</methods> <methods> Seaside.WABasicAuthentication <category>accessing</category>
realm ^ realm ifNil: [self session application basePath]
</methods> <methods> Seaside.WABasicAuthentication <category>processing</category>
respondWithChallenge self session returnResponse: (WAResponse basicAuthWithRealm: self realm)
</methods> <methods> Seaside.WABasicAuthentication <category>processing</category>
processChildCallbacks: aStream (self verifyRequest: self session currentRequest) ifTrue: [ super processChildCallbacks: aStream ] ifFalse: [ self respondWithChallenge ]
</methods> <methods> Seaside.WABatchSelection <category>commands</category>
choose: anItem self answer: anItem
</methods> <methods> Seaside.WABatchSelection <category>accessing</category>
linkSelector: aSymbol linkSelector := aSymbol
</methods> <methods> Seaside.WABatchSelection <category>accessing</category>
items: aCollection batcher := WABatchedList new items: aCollection; batchSize: 8; yourself
</methods> <methods> Seaside.WABatchSelection <category>accessing</category>
batchSize: aSize batcher batchSize: aSize
</methods> <methods> Seaside.WABatchSelection <category>rendering</category>
renderContentOn: html html unorderedList: [ batcher batch do: [ :each | html anchor callback: [ self choose: each ]; with: (each perform: linkSelector). html break. html text: (each perform: textSelector). html paragraph ] ]. html div style: 'text-align: center'; with: batcher.
</methods> <methods> Seaside.WABatchSelection <category>accessing</category>
textSelector: aSymbol textSelector := aSymbol
</methods> <methods> Seaside.WABatchSelection <category>accessing</category>
children ^ Array with: batcher
</methods> <methods> Seaside.WABatchSelection <category>accessing</category>
batchSize ^batcher batchSize
</methods> <methods> Seaside.WABatchTest <category>accessing</category>
children ^ Array with: batcher
</methods> <methods> Seaside.WABatchTest <category>initialization</category>
initialize super initialize. batcher := WAAlphabeticBatchedList new items: Collection allSubclasses
</methods> <methods> Seaside.WABatchTest <category>rendering</category>
renderContentOn: html html render: batcher. html unorderedList list: batcher batch
</methods> <methods> Seaside.WABatchedList <category>initialization</category>
initialize super initialize. self batchSize: 10. self currentPage: 1. self session registerObjectForBacktracking: self.
</methods> <methods> Seaside.WABatchedList <category>testing</category>
isOnLastPage ^ self currentPage = self maxPages
</methods> <methods> Seaside.WABatchedList <category>accessing</category>
batchSize ^ batchSize
</methods> <methods> Seaside.WABatchedList <category>accessing-calculated</category>
pageRange ^ self pageRangeStart to: self pageRangeEnd
</methods> <methods> Seaside.WABatchedList <category>rendering</category>
renderNextOn: html html space. self isOnLastPage ifFalse: [ html anchor callback: [ self nextPage ]; with: '>>' ] ifTrue: [ html text: '>>' ]
</methods> <methods> Seaside.WABatchedList <category>testing</category>
isOnFirstPage ^ self currentPage = 1
</methods> <methods> Seaside.WABatchedList <category>accessing-calculated</category>
startIndex ^ (self currentPage - 1) * self batchSize + 1
</methods> <methods> Seaside.WABatchedList <category>accessing-calculated</category>
pageRangeEnd ^ self maxPages min: self currentPage + 9
</methods> <methods> Seaside.WABatchedList <category>rendering</category>
renderContentOn: html self maxPages > 0 ifTrue: [ html div id: 'batch'; with: [ self renderPreviousOn: html. self renderPagesOn: html. self renderNextOn: html ] ]
</methods> <methods> Seaside.WABatchedList <category>rendering</category>
renderPreviousOn: html self isOnFirstPage ifFalse: [ html anchor callback: [ self previousPage ]; with: '<<' ] ifTrue: [ html text: '<<' ]. html space.
</methods> <methods> Seaside.WABatchedList <category>accessing</category>
items ^ items
</methods> <methods> Seaside.WABatchedList <category>actions</category>
nextPage self isOnLastPage ifFalse: [self currentPage: self currentPage + 1]
</methods> <methods> Seaside.WABatchedList <category>accessing-calculated</category>
batch ^ self items copyFrom: self startIndex to: self endIndex
</methods> <methods> Seaside.WABatchedList <category>actions</category>
previousPage self isOnFirstPage ifFalse: [self currentPage: self currentPage - 1]
</methods> <methods> Seaside.WABatchedList <category>accessing-calculated</category>
maxPages ^ (self items size / self batchSize) ceiling
</methods> <methods> Seaside.WABatchedList <category>rendering</category>
renderPagesOn: html self pageRange do: [ :index | self currentPage = index ifFalse: [html anchor callback: [self currentPage: index]; with: index] ifTrue: [html strong: index ] ] separatedBy: [ html space ]
</methods> <methods> Seaside.WABatchedList <category>accessing</category>
currentPage ^ currentPage
</methods> <methods> Seaside.WABatchedList <category>accessing</category>
currentPage: aNumber currentPage := aNumber
</methods> <methods> Seaside.WABatchedList <category>accessing-calculated</category>
endIndex ^ self currentPage * self batchSize min: self items size
</methods> <methods> Seaside.WABatchedList <category>accessing-calculated</category>
pageRangeStart ^ 1 max: self currentPage - 9
</methods> <methods> Seaside.WABatchedList <category>accessing</category>
items: aCollection items := aCollection
</methods> <methods> Seaside.WABatchedList <category>accessing</category>
batchSize: aNumber batchSize := aNumber
</methods> <methods> Seaside.WABooleanAttribute <category>as yet unclassified</category>
valueFromString: aString ^ aString = 'true' ifTrue: [true] ifFalse: [aString = 'false' ifTrue: [false] ifFalse: [self error: 'Invalid value for boolean attribute']]
</methods> <methods> Seaside.WABooleanAttribute <category>as yet unclassified</category>
accept: aVisitor with: anObject ^ aVisitor visitBooleanAttribute: self with: anObject
</methods> <methods> Seaside.WABrowser <category>rendering</category>
renderModeButtonsOn: html html form: [ html submitButton callback: [ self showInstance ]; value: 'instance'. html submitButton callback: [ self showHelp ]; value: 'help'. html submitButton callback: [ self showClass ]; value: 'class' ]
</methods> <methods> Seaside.WABrowser <category>initialization</category>
initialize super initialize. self model: Browser new.
</methods> <methods> Seaside.WABrowser <category>actions</category>
showHelp self model plusButtonHit
</methods> <methods> Seaside.WABrowser <category>notifying</category>
update: aSymbol contents := model contents
</methods> <methods> Seaside.WABrowser <category>accessing</category>
selectionInterval ^ 1 to: 1
</methods> <methods> Seaside.WABrowser <category>notifying</category>
notify: aString at: location in: sourceStream message := aString allButLast: 3
</methods> <methods> Seaside.WABrowser <category>actions</category>
accept |save| SeasidePlatformSupport ensureAuthorInitials: [self request: 'Please enter your initials:']. message := nil. save := contents. model contents: contents notifying: self. contents := save.
</methods> <methods> Seaside.WABrowser <category>accessing</category>
columnView: columnName ^WAPluggableSelectBox on: model list: (columnName, 'List') asSymbol selected: (columnName, 'ListIndex') asSymbol changeSelected: (columnName, 'ListIndex:') asSymbol
</methods> <methods> Seaside.WABrowser <category>accessing</category>
contents ^contents
</methods> <methods> Seaside.WABrowser <category>rendering</category>
renderContentOn: html self renderColumnsOn: html; renderModeButtonsOn: html; renderMessageOn: html; renderContentPaneOn: html
</methods> <methods> Seaside.WABrowser <category>rendering</category>
renderMessageOn: html message ifNotNil: [ html strong: message ]
</methods> <methods> Seaside.WABrowser <category>actions</category>
showInstance self model indicateInstanceMessages
</methods> <methods> Seaside.WABrowser <category>notifying</category>
select
</methods> <methods> Seaside.WABrowser <category>rendering</category>
renderColumnsOn: html |cols| cols := #(systemCategory class messageCategory message) collect: [:sel | self columnView: sel]. html table: [ html tableRow: [ cols do: [:ea | html tableData: [html render: ea]]. ] ]
</methods> <methods> Seaside.WABrowser <category>accessing</category>
contents: aString contents := aString
</methods> <methods> Seaside.WABrowser <category>rendering</category>
renderContentPaneOn: html html form: [ html textArea id: 'contents'; columns: 80; rows: 12; on: #contents of: self. html break. html submitButton on: #accept of: self ]
</methods> <methods> Seaside.WABrowser <category>accessing</category>
model ^model
</methods> <methods> Seaside.WABrowser <category>processing</category>
updateUrl: aUrl super updateUrl: aUrl. self model selectedClass ifNotNilDo: [ :class | aUrl addParameter: 'class' value: class fullName. self model metaClassIndicated ifTrue: [ aUrl addParameter: 'meta' ] ]. self model selectedMessageName ifNotNilDo: [ :method | aUrl addParameter: 'method' value: method ]
</methods> <methods> Seaside.WABrowser <category>accessing</category>
text ^ Text fromString: ''
</methods> <methods> Seaside.WABrowser <category>actions</category>
showClass self model indicateClassMessages
</methods> <methods> Seaside.WABrowser <category>accessing</category>
style ^ '#contents {width: 65em; height: 20em; font-family: Tahoma, Arial, Helvetica, Sans;} .column-choice select {width: 15em;; font-size: 90%}'
</methods> <methods> Seaside.WABrowser <category>accessing</category>
model: aBrowserModel model := aBrowserModel. model addDependent: self. self session registerObjectForBacktracking: model. contents := model contents.
</methods> <methods> Seaside.WABrowser <category>processing</category>
initialRequest: aRequest | theClass | super initialRequest: aRequest. aRequest fields at: 'class' ifPresent: [:className | Smalltalk at: className asSymbol ifPresent: [:class | theClass := (aRequest fields includesKey: 'meta') ifTrue: [class class] ifFalse: [class]. self model setClass: theClass selector: nil. aRequest fields at: 'method' ifPresent: [:selector | self model setClass: theClass selector: selector asSymbol]]]
</methods> <methods> Seaside.WABrowser <category>actions</category>
selectFrom: aPos to: anotherPos
</methods> <methods> Seaside.WABrush <category>public api</category>
with: aBlock canvas nest: aBlock. isClosed := true.
</methods> <methods> Seaside.WABrush <category>initialize-release</category>
initialize isClosed := false
</methods> <methods> Seaside.WABrush <category>private</category>
labelForSelector: aSymbol of: anObject ^ anObject labelForSelector: aSymbol.
</methods> <methods> Seaside.WABrush <category>testing</category>
isClosed ^ isClosed
</methods> <methods> Seaside.WABrush <category>initialize-release</category>
setParent: aBrush canvas: aCanvas parent := aBrush. canvas := aCanvas
</methods> <methods> Seaside.WABrush <category>convenience</category>
session ^ WACurrentSession value
</methods> <methods> Seaside.WABrush <category>private</category>
close "Close and flush the receiver onto the canvas and its associated document." self isClosed ifFalse: [self with: []]
</methods> <methods> Seaside.WABrush <category>accessing</category>
parent ^ parent
</methods> <methods> Seaside.WAButtonTag <category>accessing</category>
beReset "Creates a reset button. When activated it resets all controls to their initial values." type := 'reset'
</methods> <methods> Seaside.WAButtonTag <category>initialize-release</category>
initialize super initialize. self beSubmit
</methods> <methods> Seaside.WAButtonTag <category>accessing</category>
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." type := 'submit'
</methods> <methods> Seaside.WAButtonTag <category>accessing</category>
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." type := 'button'
</methods> <methods> Seaside.WAButtonTag <category>accessing</category>
type ^ type
</methods> <methods> Seaside.WAButtonTag <category>accessing</category>
tag ^ 'button'
</methods> <methods> Seaside.WAButtonTag <category>testing</category>
isClosed ^ false
</methods> <methods> Seaside.WACacheTest <category>rendering</category>
rendererClass "Intentionally using the classic API" ^WAHtmlRenderer
</methods> <methods> Seaside.WACacheTest <category>rendering</category>
renderContentOn: html Smalltalk garbageCollect. html heading: ResponseContinuation allInstances size. html heading: AnswerContinuation allInstances size. html heading: EscapeContinuation allInstances size. html anchorWithAction: [self inform: 'answer'] text: 'call'. html break. html anchorWithAction: [self call: self class new] text: 'keep calling'.
</methods> <methods> Seaside.WACachedDocument <category>public</category>
asMIMEDocument ^self asMIMEDocumentType: mimeType
</methods> <methods> Seaside.WACachedDocument <category>initialize-release</category>
fullFileName: aFileName fullFileName := aFileName
</methods> <methods> Seaside.WACachedDocument <category>comparing</category>
= other "Currently we do not take file modification time on disk into account." ^other species = self species and: [other fullFileName = fullFileName]
</methods> <methods> Seaside.WACachedDocument <category>public</category>
asMIMEDocumentType: type "Lazy caching." ^mimeDocument ifNil: [ mimeType := type. mimeDocument := SeasidePlatformSupport mimeDocumentOfType: mimeType from: fullFileName].
</methods> <methods> Seaside.WACachedDocument <category>accessing</category>
fullFileName ^fullFileName
</methods> <methods> Seaside.WACachedDocument <category>accessing</category>
mimeType: anObject ^mimeType := anObject
</methods> <methods> Seaside.WACachedDocument <category>comparing</category>
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." ^fullFileName hash
</methods> <methods> Seaside.WACachedDocument <category>accessing</category>
mimeType ^mimeType
</methods> <methods> Seaside.WACallback <category>accessing</category>
key ^ self convertKey: key
</methods> <methods> Seaside.WACallback <category>converting</category>
valueForField: anObject ^ anObject ifNil: [''] ifNotNil: [(anObject isCollection and: [anObject isString not]) ifTrue: [anObject isEmpty ifTrue: [''] ifFalse: [anObject first]] ifFalse: [anObject]]
</methods> <methods> Seaside.WACallback <category>converting</category>
convertKey: aString ^ aString
</methods> <methods> Seaside.WACallback <category>accessing</category>
session ^ context session
</methods> <methods> Seaside.WACallback <category>evaluation</category>
evaluateWithArgument: anObject self subclassResponsibility
</methods> <methods> Seaside.WACallback <category>testing</category>
isEnabled ^ true
</methods> <methods> Seaside.WACallback <category>initialization</category>
setContext: aRenderingContext owner: anObject key: aString context := aRenderingContext. owner := anObject. key := aString
</methods> <methods> Seaside.WACallback <category>comparing</category>
<= other ^ self priority < other priority or: [self priority = other priority and: [self key asNumber <= other key asNumber]]
</methods> <methods> Seaside.WACallback <category>evaluation</category>
evaluateWithField: anObject self isEnabled ifFalse: [ ^ self ]. self evaluateWithArgument: (self valueForField: anObject)
</methods> <methods> Seaside.WACallback <category>accessing</category>
context ^ context
</methods> <methods> Seaside.WACallback <category>accessing</category>
priority self subclassResponsibility
</methods> <methods> Seaside.WACallback <category>accessing</category>
owner ^ owner
</methods> <methods> Seaside.WACallbackRegistry <category>registration</category>
registerDefaultActionCallback: aBlock ^ self storeCallback: (WADefaultActionCallback new block: aBlock)
</methods> <methods> Seaside.WACallbackRegistry <category>registration</category>
registerCancelActionCallback: aBlock ^ self storeCallback: (WACancelActionCallback new block: aBlock)
</methods> <methods> Seaside.WACallbackRegistry <category>callbacks</category>
storeCallback: aCallback | key | key := context storeCallback: aCallback. aCallback setContext: context owner: owner key: key. ^ key
</methods> <methods> Seaside.WACallbackRegistry <category>registration</category>
registerActionCallback: aBlock ^ self storeCallback: (WAActionCallback new block: aBlock)
</methods> <methods> Seaside.WACallbackRegistry <category>registration</category>
registerDispatchCallback ^ self storeCallback: WADispatchCallback new
</methods> <methods> Seaside.WACallbackRegistry <category>registration</category>
registerImageCallback: aBlock ^ self storeCallback: (WAImageCallback new block: aBlock)
</methods> <methods> Seaside.WACallbackRegistry <category>registration</category>
registerCallback: aBlock ^ self storeCallback: (WAValueCallback new block: aBlock)
</methods> <methods> Seaside.WACallbackRegistry <category>registration</category>
registerMultiDispatchCallback ^ self storeCallback: WAMultiDispatchCallback new
</methods> <methods> Seaside.WACallbackRegistry <category>initialization</category>
initializeWithContext: aContext owner: anObject context := aContext. owner := anObject
</methods> <methods> Seaside.WACallbackStream <category>testing</category>
atEnd ^ callbacks atEnd
</methods> <methods> Seaside.WACallbackStream <category>initialization</category>
initializeWithCallbacks: aDictionary request: aRequest | collection | collection := SortedCollection new. aRequest fields keys do: [:ea | aDictionary at: ea ifPresent: [:callback | collection add: callback]]. callbacks := ReadStream on: collection asArray. request := aRequest
</methods> <methods> Seaside.WACallbackStream <category>processing</category>
processCallbacksWithOwner: anObject | callback | [callbacks atEnd not and: [callbacks peek owner == anObject]] whileTrue: [callback := callbacks next. callback evaluateWithField: (request fields at: callback key)]
</methods> <methods> Seaside.WACallbackStream <category>accessing</category>
position ^ callbacks position
</methods> <methods> Seaside.WACallbackStream <category>accessing</category>
upToEnd ^ callbacks upToEnd
</methods> <methods> Seaside.WACallbackTest <category>rendering</category>
renderContentOn: html html anchorWithCallback: [] do: 'Idempotent'. html space. html anchorWithAction: [] do: 'Side Effect'. html form: [ html defaultAction: [transcript cr; nextPutAll: 'default action']. html textInputWithValue: '' callback: [:v | transcript cr; nextPutAll: 'text: ', v printString]. html textInputWithValue: '' callback: [:v | transcript cr; nextPutAll: 'text2: ', v printString]. html break. html submitButton. html space. html submitButtonWithAction: [transcript cr; nextPutAll: 'go'] text: 'Go'. html space. html cancelButtonWithAction: [transcript cr; nextPutAll: 'cancel']. ]. html preformatted: transcript contents. html horizontalRule. html render: counter.
</methods> <methods> Seaside.WACallbackTest <category>initialization</category>
initialize super initialize. transcript := String new writeStream. counter := WACounter new.
</methods> <methods> Seaside.WACallbackTest <category>rendering</category>
rendererClass "Intentionally using the classic API" ^WAHtmlRenderer
</methods> <methods> Seaside.WACallbackTest <category>accessing</category>
children ^ Array with: counter.
</methods> <methods> Seaside.WACancelActionCallback <category>accessing</category>
priority ^ 3
</methods> <methods> Seaside.WACancelButtonTag <category>callbacks</category>
callback: aBlock self name: (canvas callbacks registerCancelActionCallback: aBlock)
</methods> <methods> Seaside.WACanvas <category>private</category>
forgetCurrentBrush currentBrush := nil.
</methods> <methods> Seaside.WACanvas <category>accessing</category>
painter: anObject painter := anObject
</methods> <methods> Seaside.WACanvas <category>private</category>
insert: aBlock | oldBrush | oldBrush := currentBrush. currentBrush := nil. aBlock value. currentBrush := oldBrush
</methods> <methods> Seaside.WACanvas <category>accessing</category>
painter ^ painter
</methods> <methods> Seaside.WACanvas <category>private</category>
nest: aBlock parentBrush := currentBrush. currentBrush := nil. aBlock renderOn: self. self flush. parentBrush := parentBrush parent.
</methods> <methods> Seaside.WACanvas <category>private</category>
flush currentBrush ifNotNil: [currentBrush close. currentBrush := nil]
</methods> <methods> Seaside.WACanvas <category>public api</category>
render: anObject self flush. anObject renderOn: self
</methods> <methods> Seaside.WACanvas <category>public api</category>
brush: aBrush self flush. currentBrush := aBrush. aBrush setParent: parentBrush canvas: self. ^ aBrush
</methods> <methods> Seaside.WACanvasDateTimeTest <category>accessing</category>
data2: aString data2 := aString
</methods> <methods> Seaside.WACanvasDateTimeTest <category>rendering</category>
renderDateTimeOn: html html heading: 'Form with #dateInput and #timeInput'. html form style: 'border: 1px green solid; width: 50%'; id: 'f2'; defaultAction: [msg := 'Default action: ' , date displayString , ' ' , time displayString]; with: [ html dateInput id: 'date-input'; on: #date of: self. html space: 10. html timeInput id: 'time-input'; value: time; withSeconds; on: #time of: self. html break; text: msg; break. html submitButton callback: [msg := 'Button action: ' , date displayString , ' ' , time displayString]].
</methods> <methods> Seaside.WACanvasDateTimeTest <category>initialize-release</category>
initialize super initialize. data1 := 'Harry'. data2 := 'Covert'. data := String new. msg := String new. numericData := 12.
</methods> <methods> Seaside.WACanvasDateTimeTest <category>accessing</category>
date: aDate date := aDate
</methods> <methods> Seaside.WACanvasDateTimeTest <category>accessing</category>
time ^time
</methods> <methods> Seaside.WACanvasDateTimeTest <category>rendering</category>
renderSubmitFormOn: html html heading: 'Form with #submitFormNamed:'. (html form) style: 'border: 1px red solid; width: 50%'; id: 'f1'; defaultAction: [data := 'Default action : ' , data1 printString , ' ' , data2 printString , ' ' , numericData printString]; with: [ html textInput on: #data1 of: self. html textInput on: #data2 of: self. html textInput on: #numericData of: self. html break. html text: data. html break. html anchor callback: [data := 'Anchor action : ' , data1 printString , ' ' , data2 printString , ' ' , numericData printString]; submitFormNamed: 'f1'; with: 'Click me'].
</methods> <methods> Seaside.WACanvasDateTimeTest <category>accessing</category>
data1: aString data1 := aString
</methods> <methods> Seaside.WACanvasDateTimeTest <category>accessing</category>
data2 ^data2
</methods> <methods> Seaside.WACanvasDateTimeTest <category>accessing</category>
date ^date
</methods> <methods> Seaside.WACanvasDateTimeTest <category>accessing</category>
data1 ^data1
</methods> <methods> Seaside.WACanvasDateTimeTest <category>rendering</category>
renderContentOn: html self renderSubmitFormOn: html. self renderDateTimeOn: html.
</methods> <methods> Seaside.WACanvasDateTimeTest <category>accessing</category>
time: aTime time := aTime
</methods> <methods> Seaside.WACanvasDateTimeTest <category>accessing</category>
numericData: aString numericData := aString
</methods> <methods> Seaside.WACanvasDateTimeTest <category>accessing</category>
numericData ^numericData
</methods> <methods> Seaside.WACanvasDefaultFormTest <category>rendering</category>
renderContentOn: html html form defaultAction: [self inform: 'Default: ', value displayString]; with: [ html submitButton callback: [self inform: 'Before: ', value displayString]; text: 'Before'. html break. html textInput value: ''; callback: [:v | value := v]. html submitButton callback: [self inform: 'Go: ', value displayString]; text: 'Go'. html break. html submitButton callback: [self inform: 'After: ', value displayString]; text: 'After']
</methods> <methods> Seaside.WACanvasHtmlTest <category>accessing</category>
message ^message
</methods> <methods> Seaside.WACanvasHtmlTest <category>initialize-release</category>
initialize super initialize. message := self initialMessage. booleanList := #(a b c d) collect: [:key | key -> ((Array with: true with: false) atRandom)]. number := 10 atRandom.
</methods> <methods> Seaside.WACanvasHtmlTest <category>rendering</category>
renderCheckboxesOn: html html text: booleanList. html paragraph. html form: [ booleanList do: [:association | html text: association key; space. html checkbox addShortcut: 'Ctrl-' , association key asUppercase; on: #value of: association. html break]. html submitButton]
</methods> <methods> Seaside.WACanvasHtmlTest <category>accessing</category>
message: aString message := aString
</methods> <methods> Seaside.WACanvasHtmlTest <category>accessing</category>
allSelectors ^ (self class selectors asSortedCollection select: [:s | s beginsWith: 'render']) remove: #renderContentOn:; yourself
</methods> <methods> Seaside.WACanvasHtmlTest <category>accessing</category>
number: anInteger number := anInteger
</methods> <methods> Seaside.WACanvasHtmlTest <category>rendering</category>
renderSubmitButtonsOn: html html text: number. html paragraph. html form: [ 1 to: 10 do: [ :index | html submitButton addShortcut: 'F' , index asString; callback: [number := index]; text: index. html space]]
</methods> <methods> Seaside.WACanvasHtmlTest <category>rendering</category>
renderContentOn: html self allSelectors pairsDo: [:selA :selB | (html div) class: 'row'; with: [(html div) class: 'left'; with: [self perform: selA with: html]. (html div) class: 'left'; with: [self perform: selB with: html]] ]
</methods> <methods> Seaside.WACanvasHtmlTest <category>rendering</category>
renderTextInputOn: html html form: [ html text: message. html paragraph. html textInput on: #message of: self. html submitButton]
</methods> <methods> Seaside.WACanvasHtmlTest <category>rendering</category>
renderTextAreaOn: html | position | position := message = self initialMessage ifTrue: [6] ifFalse: ['End']. html form: [html text: message. html paragraph. html textArea setSelectionFrom: position to: position; on: #message of: self. html break. html submitButton]
</methods> <methods> Seaside.WACanvasHtmlTest <category>rendering</category>
renderZFieldSetOn: html | url1 | url1 := html context urlForDocument: (ScriptingSystem formAtKey: 'Halo-Debug') mimeType: 'image/jpg' fileName: 'Debug.jpg'. (html fieldSet) legend: 'Various images in a fieldset'; with: [html image url: url1; altText: 'Halo-Debug'. html space. html image form: (ScriptingSystem formAtKey: 'Halo-View'); altText: 'Halo-View'. html space. html image fileName: 'Paint.png'; mimeType: 'image/png'; document: (ScriptingSystem formAtKey: 'Halo-Paint'); altText: 'Halo-Paint'. html break. html image border: 1; url: 'http://www.netstyle.ch/include/seaside/pics/top.jpg'; width: '80%'; altText: 'Seaside'. html break. html image border: 2; url: 'http://www.netstyle.ch/include/seaside/pics/top.jpg'; height: '50px'; altText: 'Seaside'. html break. html image border: 0; url: 'http://www.netstyle.ch/include/seaside/pics/top.jpg'; width: '250px'; height: '60px'; altText: 'Seaside'. ]
</methods> <methods> Seaside.WACanvasHtmlTest <category>rendering</category>
renderVFieldSetOn: html (html fieldSet) legend: 'Various text rendering in a fieldset'; with: [html strong: 'Bold'; break; emphasis: 'Italic'; break; underline: 'Underline'; break. (html acronym) title: 'United States of America'; with: 'USA'. html break; emphasis: 'Emphasis'; break. (html div) addStyle: 'color: red'; addStyle: 'background-color: lightgreen'; addStyle: 'padding: 1em'; addStyle: 'border: solid 2px black'; addStyle: 'font-weight: bold'; addStyle: 'font-size: 150%'; addStyle: 'height: 3em'; addStyle: 'text-align: center'; with: 'Large bold red in a green div'. html break]
</methods> <methods> Seaside.WACanvasHtmlTest <category>rendering</category>
renderRadioButtonsOn: html html text: booleanList. html paragraph. html form: [ booleanList do: [ :association | | group | group := html radioGroup. html text: association key; space. html radioButton addShortcut: 'Ctrl-' , association key; group: group; selected: association value; callback: [association value: true]. html radioButton addShortcut: 'Alt-' , association key; group: group; selected: association value not; callback: [association value: false]. html break]. html submitButton]
</methods> <methods> Seaside.WACanvasHtmlTest <category>accessing</category>
style ^ ' div.row {clear: both} div.left {float: left; width: 45%; margin: 1%} '
</methods> <methods> Seaside.WACanvasHtmlTest <category>rendering</category>
renderSelectsOn: html html text: number. html paragraph. html form: [ html select list: (1 to: 10); on: #number of: self. html submitButton]
</methods> <methods> Seaside.WACanvasHtmlTest <category>accessing</category>
initialMessage ^'Hello world!'.
</methods> <methods> Seaside.WACanvasHtmlTest <category>accessing</category>
number ^number
</methods> <methods> Seaside.WACanvasImageTest <category>rendering</category>
renderContentOn: html html form: [ html imageButton callback: [self inform: 'ok']; form: (ScriptingSystem formAtKey: 'Halo-Debug')]
</methods> <methods> Seaside.WACanvasInputTest <category>initialize-release</category>
initialize super initialize. nilString := nil. emptyString := ''. integer := 42. fraction := 1/3. selection := nil. multiSelection := Set new.
</methods> <methods> Seaside.WACanvasInputTest <category>accessing</category>
address "Answer the value of address" ^ address
</methods> <methods> Seaside.WACanvasInputTest <category>accessing</category>
integer: anObject "Set the value of integer" integer := anObject
</methods> <methods> Seaside.WACanvasInputTest <category>accessing</category>
lastName "Answer the value of lastName" ^ lastName
</methods> <methods> Seaside.WACanvasInputTest <category>accessing</category>
multiSelection ^ multiSelection
</methods> <methods> Seaside.WACanvasInputTest <category>accessing</category>
selection ^ selection
</methods> <methods> Seaside.WACanvasInputTest <category>accessing</category>
multiSelection: anObject multiSelection := anObject
</methods> <methods> Seaside.WACanvasInputTest <category>rendering</category>
renderContentOn: html html form: [html table: [html tableRow: [html tableHeading: 'Name'. html tableHeading: 'Value'. html tableHeading: 'PrintString']. html tableRow: [html tableData: 'Nil String'. html tableData: [html textInput on: #nilString of: self]. html tableData: [html text: nilString printString]]. html tableRow: [html tableData: 'Empty String'. html tableData: [html textInput on: #emptyString of: self]. html tableData: [html text: emptyString printString]]. html tableRow: [html tableData: 'Integer'. html tableData: [html textInput setFocus; on: #integer of: self]. html tableData: [html text: integer printString]]. html tableRow: [html tableData: 'Fraction'. html tableData: [html textInput on: #fraction of: self]. html tableData: [html text: fraction printString]]. html tableRow: [html tableData: 'Text input with example'. html tableData: [html textInput value: self lastName; exampleText: 'Your name'; callback: [:v | self lastName: v]]. html tableData: '']. html tableRow: [html tableData: 'Text area with example'. html tableData: [html textArea value: self address; exampleText: 'Your address'; callback: [:v | self address: v]]. html tableData: '']. html tableRow: [html tableData: 'Selection'. html tableData: [html select list: #(#London #Paris '---' #Bamako #Dakar #London #Paris #Quito #Sydney ); enablementBlock: [:v | v ~= #'---']; on: #selection of: self]. html tableData: [html text: selection]]. html tableRow: [html tableData: 'Multi Selection'. html tableData: [html select beMultiple; list: #(#Lunch '---' #Breakfast #Dinner ); enablementBlock: [:v | v ~= #'---']; on: #multiSelection of: self]. html tableData: [html text: multiSelection]]. html tableRow with: [html tableData: 'Input elements with no callback'. html tableData with: [html select size: 10; list: Collection subclasses]. html tableData with: [html unorderedList beMultiple; selected: #(); list: Collection subclasses]]]. html submitButton]
</methods> <methods> Seaside.WACanvasInputTest <category>accessing</category>
integer "Answer the value of integer" ^ integer
</methods> <methods> Seaside.WACanvasInputTest <category>accessing</category>
fraction "Answer the value of fraction" ^ fraction
</methods> <methods> Seaside.WACanvasInputTest <category>accessing</category>
lastName: anObject "Set the value of lastName" lastName := anObject
</methods> <methods> Seaside.WACanvasInputTest <category>accessing</category>
selection: anObject selection := anObject
</methods> <methods> Seaside.WACanvasInputTest <category>accessing</category>
emptyString "Answer the value of emptyString" ^ emptyString
</methods> <methods> Seaside.WACanvasInputTest <category>accessing</category>
emptyString: anObject "Set the value of emptyString" emptyString := anObject
</methods> <methods> Seaside.WACanvasInputTest <category>accessing</category>
nilString: anObject "Set the value of nilString" nilString := anObject
</methods> <methods> Seaside.WACanvasInputTest <category>accessing</category>
fraction: anObject "Set the value of fraction" fraction := anObject
</methods> <methods> Seaside.WACanvasInputTest <category>accessing</category>
nilString "Answer the value of nilString" ^ nilString
</methods> <methods> Seaside.WACanvasInputTest <category>accessing</category>
address: anObject "Set the value of address" address := anObject
</methods> <methods> Seaside.WACanvasLinkSubmitTest <category>accessing</category>
count: anInteger count := anInteger
</methods> <methods> Seaside.WACanvasLinkSubmitTest <category>initialize-release</category>
initialize super initialize. count := 0
</methods> <methods> Seaside.WACanvasLinkSubmitTest <category>rendering</category>
renderContentOn: html | formId | formId := #myform. html form id: formId; with: [ html textInput on: #count of: self. html break. html anchor id: #decreaseLink; addShortcut: 'Ctrl-Down'; callback: [count := count - 1]; submitFormNamed: formId; with: '--'. html space. html anchor id: #increaseLink; addShortcut: 'Ctrl-Up'; callback: [count := count + 1]; submitFormNamed: formId; with: '++'. html break; break. count = 0 ifFalse: [(html checkbox) addShortcut: 'Ctrl-Z'; addShortcut: 'Ctrl-z'; value: (count = 0); callback: [ :value | value ifTrue: [count := 0]]; submitFormNamed: formId. html space. html text: 'Reset']]. html emphasis: 'Handy shortcuts : Ctrl-Up, Ctrl-Down and Ctrl-Z'
</methods> <methods> Seaside.WACanvasLinkSubmitTest <category>accessing</category>
count ^count
</methods> <methods> Seaside.WACanvasModelTest <category>accessing</category>
user: anObject "Set the value of user" user := anObject
</methods> <methods> Seaside.WACanvasModelTest <category>accessing</category>
user "Answer the value of user" ^ user
</methods> <methods> Seaside.WACanvasModelTest <category>accessing</category>
pass: anObject "Set the value of pass" pass := anObject
</methods> <methods> Seaside.WACanvasModelTest <category>actions</category>
logon user isEmptyOrNil ifTrue: [self inform: 'Nope !'] ifFalse: [state := #ON. test ifTrue: [self inform: 'Logged on']]
</methods> <methods> Seaside.WACanvasModelTest <category>actions</category>
logoff state := #OFF. test ifTrue: [self inform: 'Logged off']
</methods> <methods> Seaside.WACanvasModelTest <category>accessing</category>
pass "Answer the value of pass" ^ pass
</methods> <methods> Seaside.WACanvasModelTest <category>accessing</category>
test: anObject "Set the value of test" test := anObject
</methods> <methods> Seaside.WACanvasModelTest <category>rendering</category>
renderContentOn: html | formId | formId := 'myform'. (html form) id: formId; with: [(html label) for: #userid; with: [html text: 'User name'; space. (html textInput) id: #userid; on: #user of: self]. html break. (html label) for: #pass; with: [html text: 'Password'; space. (html passwordInput) on: #pass of: self]. html break. (html label) for: #test; with: [html text: 'With feedback'; space. (html checkbox) on: #test of: self]. html break. state == #ON ifFalse: [(html submitButton) callback: [self logon]; text: 'Logon'] ifTrue: [(html submitButton) callback: [self logoff]; text: 'Logoff']].
</methods> <methods> Seaside.WACanvasModelTest <category>accessing</category>
test "Answer the value of test" ^ test
</methods> <methods> Seaside.WACanvasTableTest <category>samples</category>
exchangeRates ^#( ('EUR' 1.70) ('USD' 1.30) ('DKK' 23.36) ('SEK' 19.32) )
</methods> <methods> Seaside.WACanvasTableTest <category>rendering</category>
renderCurrencyTableHeadOn: html html tableHead title: 'Table header'; with: [ html tableRow: [ html tableHeading: 'Currency'. html tableHeading: 'Rate']].
</methods> <methods> Seaside.WACanvasTableTest <category>samples</category>
entities ^#( ('non-breaking space' ('&nbsp;' '&#160;' '&#xA0;')) ('ampersand' ('&amp;' '&#38;' '&#x26;')) ('less than sign' ('&lt;' '&#60;' '&#x3C;')) ('greater than sign' ('&gt;' '&#62;' '&#x3E;')) ('euro sign' ('&euro;' '&#8364;' '&#x20AC;')) )
</methods> <methods> Seaside.WACanvasTableTest <category>rendering</category>
renderCurrencyTableOn: html html table align: 'center'; border: 1; summary: 'This table shows exchange rates against the Swiss Franc'; with: [ html tableCaption: 'Currencies against Swiss Franc (CHF)'. html tableColumnGroup. html tableColumnGroup width: 100 px; align: 'char'; character: $.. self renderCurrencyTableHeadOn: html. self renderCurrencyTableBodyOn: html].
</methods> <methods> Seaside.WACanvasTableTest <category>rendering</category>
renderEntityTableOn: html html table align: 'center'; border: 1; summary: 'This table gives the character entity reference, decimal character reference, and hexadecimal character reference for 8-bit Latin-1 characters, as well as the rendering of each in your browser.'; with: [ html tableCaption: 'HTML 4.0 entities'. self renderEntityTableColumnGroupsOn: html. self renderEntityTableHeadOn: html. self renderEntityTableFootOn: html. self renderEntityTableBodyOn: html].
</methods> <methods> Seaside.WACanvasTableTest <category>rendering</category>
renderCurrencyTableBodyOn: html html tableBody title: 'Table body'; with: [ self exchangeRates do: [:each | html tableRow: [ html tableHeading: each first. html tableData align: 'char'; character: $.; with: each second]]].
</methods> <methods> Seaside.WACanvasTableTest <category>rendering</category>
renderEntityTableColumnGroupsOn: html html tableColumnGroup. html tableColumnGroup span: 3. html tableColumnGroup span: 3; align: 'center'.
</methods> <methods> Seaside.WACanvasTableTest <category>rendering</category>
renderEntityTableBodyOn: html html tableBody: [ self entities do: [:eachEntity | html tableRow: [ html tableData scope: 'row'; with: eachEntity first. eachEntity second do: [:ea | html tableData: ea]. eachEntity second do: [:ea | html tableData align: 'center'; with: [html html: ea]]. ]. ]. ].
</methods> <methods> Seaside.WACanvasTableTest <category>rendering</category>
renderEntityTableFootOn: html html tableFoot: [ html tableRow: [ html tableData align: 'center'; colSpan: 7; with: '5 entities shown']]
</methods> <methods> Seaside.WACanvasTableTest <category>rendering</category>
renderEntityTableHeadOn: html html tableHead: [ html tableRow: [ #('Character' 'Entity' 'Decimal' 'Hex') do: [:each | html tableHeading scope: 'col'; rowSpan: 2; with: each]. html tableHeading scope: 'colgroup'; colSpan: 3; with: 'Rendering in Your Browser' ]. html tableRow: [ #('Entity' 'Decimal' 'Hex') do: [:each | html tableHeading scope: 'col'; with: each] ]. ].
</methods> <methods> Seaside.WACanvasTableTest <category>rendering</category>
style ^' table { border-collapse: collapse; } caption { font-weight: bold; padding: 0.5em 0 1em 0; } td, th { padding: 3px; } '
</methods> <methods> Seaside.WACanvasTableTest <category>rendering</category>
renderContentOn: html self renderEntityTableOn: html. self renderCurrencyTableOn: html
</methods> <methods> Seaside.WACanvasTag <category>attributes</category>
width: aNumber self attributeAt: 'width' put: aNumber displayString
</methods> <methods> Seaside.WACanvasTag <category>accessing</category>
tag ^ 'canvas'
</methods> <methods> Seaside.WACanvasTag <category>attributes</category>
height: aNumber self attributeAt: 'height' put: aNumber displayString
</methods> <methods> Seaside.WACanvasTag <category>attributes</category>
extent: aPoint self width: aPoint x; height: aPoint y
</methods> <methods> Seaside.WACanvasTest <category>initialize-release</category>
initialize super initialize. count := 0. selected := Array new.
</methods> <methods> Seaside.WACanvasTest <category>accessing</category>
selected ^selected
</methods> <methods> Seaside.WACanvasTest <category>actions</category>
decrease count := count - 1
</methods> <methods> Seaside.WACanvasTest <category>rendering</category>
renderContentOn: html html div style: 'background-color: lightblue'; with: [ html text: count; break. html anchor callback: [self increase]; with: '++'. html space. html anchor callback: [self decrease]; with: '--'. ]. html table with: [ html tableRow with: [ html tableData with: [ html form: [ html select size: 10; beMultiple; beSubmitOnChange; list: Collection subclasses; on: #selected of: self ] ]. html tableData with: [ html unorderedList beMultiple; list: Collection subclasses; on: #selected of: self ] ] ].
</methods> <methods> Seaside.WACanvasTest <category>actions</category>
increase count := count + 1
</methods> <methods> Seaside.WACanvasTest <category>accessing</category>
selected: aClass selected := aClass
</methods> <methods> Seaside.WACanvasUploadTest <category>rendering</category>
renderContentOn: html html heading: 'Upload File'. html form multipart; with: [ html fileUpload callback: [ :f | file := f]. html submitButton text: 'Load']. file ifNotNil: [ html anchor document: file contents mimeType: file contentType fileName: file fileName; with: file fileName , ' (' , file contentType , ')'. html break. html anchor document: file contents; with: file fileName. html preformatted: file contents ]
</methods> <methods> Seaside.WAChangePassword <category>actions</category>
changePassword password = confirmation ifFalse: [^ self inform: 'Sorry, the password and confirmation did not match.']. authenticator setPassword: password forUser: username. self answer: true
</methods> <methods> Seaside.WAChangePassword <category>rendering</category>
renderContentOn: html html form: [ html table: [ html tableRowWithLabel: 'Username' column: username. html tableRowWithLabel: 'Password' column: [html passwordInputWithCallback: [:v | password := v]]. html tableRowWithLabel: 'Confirm Password' column: [html passwordInputWithCallback: [:v | confirmation := v]]. html spacerRow. html attributes alignCenter. html tableRowWith: [ html submitButtonOn: #changePassword of: self. html space. html submitButtonOn: #cancel of: self ] span: 2. ] ]
</methods> <methods> Seaside.WAChangePassword <category>accessing</category>
username: aString username := aString
</methods> <methods> Seaside.WAChangePassword <category>accessing</category>
authenticator: anAuthenticator authenticator := anAuthenticator
</methods> <methods> Seaside.WAChangePassword <category>actions</category>
cancel self answer: false
</methods> <methods> Seaside.WACheckboxTag <category>private</category>
after canvas hiddenInput callback: [callback value: value. value := false]
</methods> <methods> Seaside.WACheckboxTag <category>attributes</category>
submitFormNamed: formName self onClick: 'submitForm(' , formName asString printString , '); return false;'.
</methods> <methods> Seaside.WACheckboxTag <category>accessing</category>
type ^ 'checkbox'
</methods> <methods> Seaside.WACheckboxTag <category>attributes</category>
value: aBoolean self attributeAt: 'checked' put: aBoolean.
</methods> <methods> Seaside.WACheckboxTag <category>callbacks</category>
callback: aBlock value := false. callback := aBlock fixCallbackTemps. super callback: [value := true]
</methods> <methods> Seaside.WACheckboxTag <category>javascript</category>
canHaveShortcut ^true
</methods> <methods> Seaside.WACheckboxTag <category>attributes</category>
onTrue: trueBlock onFalse: falseBlock trueBlock fixCallbackTemps. falseBlock fixCallbackTemps. self callback: [ :v | v ifTrue: [ trueBlock value ] ifFalse: [ falseBlock value ] ].
</methods> <methods> Seaside.WAChoiceDialog <category>accessing</category>
buttons ^ #(ok cancel)
</methods> <methods> Seaside.WAChoiceDialog <category>actions</category>
ok self answer: selection
</methods> <methods> Seaside.WAChoiceDialog <category>accessing</category>
options: aCollection options := aCollection
</methods> <methods> Seaside.WAChoiceDialog <category>rendering</category>
renderContentOn: html html select list: options; selected: nil; callback: [ :value | selection := value ]
</methods> <methods> Seaside.WAChoiceDialog <category>accessing</category>
options ^ options
</methods> <methods> Seaside.WAChoiceDialog <category>actions</category>
cancel self answer: nil
</methods> <methods> Seaside.WAClosingConditionalComment <category>writing</category>
writeOn: aStream aStream nextPutAll: '<![endif]-->'.
</methods> <methods> Seaside.WAClosureTest <category>rendering</category>
rendererClass "Intentionally using the classic API" ^WAHtmlRenderer
</methods> <methods> Seaside.WAClosureTest <category>actions</category>
ensure [self go] ensure: [self inform: 'ensure']
</methods> <methods> Seaside.WAClosureTest <category>rendering</category>
renderContentOn: html html anchorWithAction: [self go] text: 'go'. html space. html anchorWithAction: [self ensure] text: 'go with ensure'.
</methods> <methods> Seaside.WAClosureTest <category>actions</category>
go #(a b c) keysAndValuesDo: [:i :each | self inform: each displayString, ' ', i displayString]
</methods> <methods> Seaside.WACollectionTag <category>attributes</category>
beSingle multiple := false.
</methods> <methods> Seaside.WACollectionTag <category>initialization</category>
initialize super initialize. list := OrderedCollection new. labelsBlock := [ :value | value ]. multiple := false.
</methods> <methods> Seaside.WACollectionTag <category>accessing</category>
list: aCollection "the list of options to render, their rendering can be customized with #labels:" self addAll: aCollection.
</methods> <methods> Seaside.WACollectionTag <category>attributes</category>
beMultiple multiple := true.
</methods> <methods> Seaside.WACollectionTag <category>callbacks</category>
callback: aBlock callbackBlock := aBlock fixCallbackTemps.
</methods> <methods> Seaside.WACollectionTag <category>private</category>
labelForOption: anObject ^ labelsBlock value: anObject.
</methods> <methods> Seaside.WACollectionTag <category>testing</category>
isSelected: anObject ^ self isMultiple ifTrue: [(selected ifNil: [#()]) includes: anObject] ifFalse: [selected = anObject]
</methods> <methods> Seaside.WACollectionTag <category>testing</category>
isMultiple ^ multiple.
</methods> <methods> Seaside.WACollectionTag <category>adding</category>
addAll: aCollection ^ list addAll: aCollection.
</methods> <methods> Seaside.WACollectionTag <category>adding</category>
add: anObject ^ list add: anObject.
</methods> <methods> Seaside.WACollectionTag <category>callbacks</category>
labels: aBlock "Allows to customize the rendering of options by passing a block that converts each option to a string. aOneArgumentBlock should do no html rendering at all. If you need to do custom html rendering for the options use #with:" labelsBlock := aBlock fixCallbackTemps.
</methods> <methods> Seaside.WACollectionTag <category>attributes</category>
on: selector of: anObject "copy pasted from WASelectTag, we need a traitified version of seaside" self selected: (anObject perform: selector). self callback: [ :value | anObject perform: selector asMutator with: value ].
</methods> <methods> Seaside.WACollectionTag <category>testing</category>
hasCallback ^callbackBlock notNil
</methods> <methods> Seaside.WACollectionTag <category>accessing</category>
selected: anObject "sets the selected option one object in the case of single selection a collection of objects in the case of multiple selection" selected := anObject
</methods> <methods> Seaside.WAComponent <category>accessing</category>
delegations | delegations | delegations := OrderedCollection new. self allDecorationsDo: [:ea | ea isDelegation ifTrue: [delegations add: ea]]. ^ delegations
</methods> <methods> Seaside.WAComponent <category>accessing</category>
home self delegations do: [:ea | self removeDecoration: ea]
</methods> <methods> Seaside.WAComponent <category>convenience</category>
isolate: aBlock |txn val | txn := WATransaction new. val := self decorateWith: txn during: aBlock. txn close. ^ val
</methods> <methods> Seaside.WAComponent <category>call/answer</category>
onAnswer: aBlock "adds an answer handler" ^ self addDecoration: (WAAnswerHandler new block: aBlock)
</methods> <methods> Seaside.WAComponent <category>initialization</category>
initializeDecoration decoration := WAStateHolder new contents: self
</methods> <methods> Seaside.WAComponent <category>convenience</category>
asComponent ^ self
</methods> <methods> Seaside.WAComponent <category>accessing</category>
decoration: aDecoration decoration contents: aDecoration
</methods> <methods> Seaside.WAComponent <category>iterating</category>
nextPresentersDo: aBlock self childrenDo: [:ea | ea decorationChainDo: aBlock]
</methods> <methods> Seaside.WAComponent <category>call/answer</category>
handleAnswer: anObject ^ false
</methods> <methods> Seaside.WAComponent <category>call/answer</category>
call: aComponent "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." ^ AnswerContinuation currentDo: [:cc | self show: aComponent onAnswer: cc. WARenderNotification raiseSignal]
</methods> <methods> Seaside.WAComponent <category>convenience</category>
request: aString default: initialString ^ self request: aString label: nil default: initialString
</methods> <methods> Seaside.WAComponent <category>decorations</category>
addDecoration: newDecoration | prev dec | prev := nil. dec := self decoration. [dec ~~ self and: [self decoration: dec shouldWrap: newDecoration]] whileTrue: [prev := dec. dec := dec owner]. newDecoration owner: dec. prev ifNil: [self decoration: newDecoration] ifNotNil: [prev owner: newDecoration]. ^ newDecoration
</methods> <methods> Seaside.WAComponent <category>accessing</category>
decoration decoration ifNil: [decoration := WAStateHolder new contents: self]. ^ decoration contents
</methods> <methods> Seaside.WAComponent <category>accessing</category>
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 register the receiver for backtracking by sending #registerForBacktracking (preferably in the #initialize method), otherwise the back button will fail." ^ #()
</methods> <methods> Seaside.WAComponent <category>convenience</category>
inform: aString "Display a dialog with aString to the user until he clicks 'OK'" self call: (WAFormDialog new addMessage: aString; yourself)
</methods> <methods> Seaside.WAComponent <category>iterating</category>
visiblePresentersDo: aBlock self decorationChainDo: [:ea | ea withNextPresentersDo: aBlock]
</methods> <methods> Seaside.WAComponent <category>decorations</category>
removeDecoration: aDecoration | dec | dec := self decoration. dec = aDecoration ifTrue: [self decoration: dec owner. ^ self]. [dec notNil] whileTrue: [dec owner = aDecoration ifTrue: [dec owner: aDecoration owner. ^ self] ifFalse: [dec := dec owner]]
</methods> <methods> Seaside.WAComponent <category>decorations</category>
decorateWith: aDecoration during: aBlock | val | self addDecoration: aDecoration. val := aBlock value. self removeDecoration: aDecoration. ^ val
</methods> <methods> Seaside.WAComponent <category>convenience</category>
activeComponent self visiblePresentersDo: [:ea | ea isDecoration ifFalse: [^ ea]]
</methods> <methods> Seaside.WAComponent <category>convenience</category>
validateWith: aBlock ^self addDecoration: (WAValidationDecoration new validateWith: aBlock)
</methods> <methods> Seaside.WAComponent <category>iterating</category>
allDecorationsDo: aBlock | ea | ea := self decoration. [ea notNil and: [ea ~~ self]] whileTrue: [aBlock value: ea. ea := ea owner]
</methods> <methods> Seaside.WAComponent <category>decorations</category>
authenticateWith: anAuthenticator during: aBlock ^ self decorateWith: (WABasicAuthentication new authenticator: anAuthenticator) during: aBlock
</methods> <methods> Seaside.WAComponent <category>convenience</category>
addMessage: aString "adds a decoration that renders a level 3 heading with <aString> around the receiver returns this decoration so don't forget #yourself" ^self addDecoration: (WAMessageDecoration new message: aString)
</methods> <methods> Seaside.WAComponent <category>call/answer</category>
show: aComponent "displays a component on this component like #call: but not blocking" self show: aComponent onAnswer: [:value | ]
</methods> <methods> Seaside.WAComponent <category>call/answer</category>
show: aComponent onAnswer: aBlock "displays a component on this component like #call: but not blocking and with continuation passing style where the continuation is aBlock." self show: aComponent onAnswer: aBlock delegation: (WADelegation new delegate: aComponent; yourself)
</methods> <methods> Seaside.WAComponent <category>convenience</category>
request: requestString label: labelString ^ self request: requestString label: labelString default: ''
</methods> <methods> Seaside.WAComponent <category>decorations</category>
decoration: oldDecoration shouldWrap: newDecoration ^ (oldDecoration isGlobal and: [newDecoration isGlobal not]) or: [oldDecoration isDelegation and: [newDecoration isLocal]]
</methods> <methods> Seaside.WAComponent <category>iterating</category>
childrenDo: aBlock self children do: [:ea | ea ifNotNil: [aBlock value: ea]]
</methods> <methods> Seaside.WAComponent <category>convenience</category>
confirm: aString "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." ^ self call: (WAYesOrNoDialog new addMessage: aString; yourself).
</methods> <methods> Seaside.WAComponent <category>decorations</category>
decorationChainDo: aBlock aBlock value: self decoration
</methods> <methods> Seaside.WAComponent <category>call/answer</category>
answer: anObject "Give back control to the component from which the receiver was called from. When returning, a component can additionally return anObject to the caller." self decorationChainDo: [:ea | ea handleAnswer: anObject]
</methods> <methods> Seaside.WAComponent <category>call/answer</category>
answer self answer: self
</methods> <methods> Seaside.WAComponent <category>convenience</category>
request: aString "Display an input dialog whose question is queryString and answer the string the user accepts." ^ self request: aString default: ''
</methods> <methods> Seaside.WAComponent <category>rendering</category>
renderOn: aRenderer "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." self decorationChainDo: [ :each | each renderWithContext: aRenderer context ].
</methods> <methods> Seaside.WAComponent <category>convenience</category>
registerForBacktracking self session registerObjectForBacktracking: self
</methods> <methods> Seaside.WAComponent <category>call/answer</category>
show: aComponent onAnswer: aBlock delegation: aDelegation | event | event := nil. event := aComponent onAnswer: [:value | aDelegation remove. event remove. aBlock value: value]. self addDecoration: aDelegation
</methods> <methods> Seaside.WAComponent <category>convenience</category>
request: requestString label: labelString default: initialString ^ self call: ((WAInputDialog new label: labelString; default: initialString; yourself) addMessage: requestString; yourself)
</methods> <methods> Seaside.WACompound <category>initialization</category>
initialize super initialize. "do not remove properties, it is used by SeasideAsync" properties := Dictionary new.
</methods> <methods> Seaside.WACompound <category>callbacks</category>
on: selector of: anObject "copy pasted for the third time, we really need a traitified version of seaside" self value: (anObject perform: selector). self callback: [ :date | anObject perform: selector asMutator with: date ].
</methods> <methods> Seaside.WACompound <category>public api</category>
value: aValue value := aValue
</methods> <methods> Seaside.WACompound <category>callbacks</category>
callback: aBlock callbackBlock := aBlock
</methods> <methods> Seaside.WACompound <category>testing</category>
hasCallback ^callbackBlock notNil
</methods> <methods> Seaside.WAConditionalComment <category>features</category>
ie55 self addToCondition: ' IE 5.5'
</methods> <methods> Seaside.WAConditionalComment <category>features</category>
ie self addToCondition: ' IE'
</methods> <methods> Seaside.WAConditionalComment <category>initialize-release</category>
initializeWithRoot: anHtmlRoot root := anHtmlRoot. condition := 'if'
</methods> <methods> Seaside.WAConditionalComment <category>operators</category>
equal "implicit of nothing else"
</methods> <methods> Seaside.WAConditionalComment <category>flow-control</category>
do: aBlock root addHeadElement: (WAOpeningConditionalComment condition: condition). aBlock value. root addHeadElement: (WAClosingConditionalComment new).
</methods> <methods> Seaside.WAConditionalComment <category>private</category>
addToCondition: aString condition := condition, aString
</methods> <methods> Seaside.WAConditionalComment <category>features</category>
ie5 self addToCondition: ' IE 5'
</methods> <methods> Seaside.WAConditionalComment <category>features</category>
ie6 self addToCondition: ' IE 6'
</methods> <methods> Seaside.WAConditionalComment <category>operators</category>
orEqual self addToCondition: 'e'
</methods> <methods> Seaside.WAConditionalComment <category>features</category>
ie50 self addToCondition: ' IE 5.0'
</methods> <methods> Seaside.WAConditionalComment <category>operators</category>
greaterThan self addToCondition: ' gt'
</methods> <methods> Seaside.WAConditionalComment <category>features</category>
ie7 self addToCondition: ' IE 7'
</methods> <methods> Seaside.WAConditionalComment <category>operators</category>
greaterThanOrEqual self deprecatedApi. self greaterThan; orEqual
</methods> <methods> Seaside.WAConditionalComment <category>operators</category>
lessThanOrEqual self deprecatedApi. self lessThan; orEqual
</methods> <methods> Seaside.WAConditionalComment <category>operators</category>
lessThan self addToCondition: ' lt'
</methods> <methods> Seaside.WAConfiguration <category>values</category>
attributesAndValuesDo: keyValueBlock ^ self allAttributes do: [:ea | keyValueBlock value: ea value: (self valueForAttribute: ea)]
</methods> <methods> Seaside.WAConfiguration <category>initializing</category>
initialize
</methods> <methods> Seaside.WAConfiguration <category>attributes</category>
groupedAttributes | dict sorted | dict := Dictionary new. sorted := SortedCollection sortBlock: [:a :b | a key <= b key]. self allAttributes do: [:ea | (dict at: ea group ifAbsentPut: [SortedCollection sortBlock: [:a :b | a key <= b key]]) add: ea]. dict associationsDo: [:assoc | sorted add: assoc]. ^ sorted
</methods> <methods> Seaside.WAConfiguration <category>ancestry</category>
potentialAncestors ^ self allPotentialAncestors reject: [:ea | ea = self or: [(self inheritsFrom: ea) or: [ea inheritsFrom: self]]]
</methods> <methods> Seaside.WAConfiguration <category>testing</category>
hasMutableAncestry ^ false
</methods> <methods> Seaside.WAConfiguration <category>accessing</category>
name ^ self subclassResponsibility
</methods> <methods> Seaside.WAConfiguration <category>attributes</category>
allAttributes ^ Array streamContents: [:s | self withAllAncestorsDo: [:ea | s nextPutAll: ea attributes]]
</methods> <methods> Seaside.WAConfiguration <category>ancestry</category>
allPotentialAncestors ^ #()
</methods> <methods> Seaside.WAConfiguration <category>ancestry</category>
allAncestors | temp linear | temp := OrderedCollection new. linear := OrderedCollection new. self addAncestorsTo: temp linearization: linear. ^ linear allButFirst asArray
</methods> <methods> Seaside.WAConfiguration <category>attributes</category>
attributes ^ #()
</methods> <methods> Seaside.WAConfiguration <category>ancestry</category>
addAncestorsTo: tempCollection linearization: linearCollection (linearCollection includes: self) ifTrue: [tempCollection do: [:ea | linearCollection add: ea before: self]. tempCollection removeAllSuchThat: [:ea | true]] ifFalse: [tempCollection add: self. self ancestors isEmpty ifTrue: [linearCollection addAll: tempCollection. tempCollection removeAllSuchThat: [:ea | true]] ifFalse: [self ancestors do: [:ea | ea addAncestorsTo: tempCollection linearization: linearCollection]]]
</methods> <methods> Seaside.WAConfiguration <category>testing</category>
hasAttributeNamed: aSymbol ^ self allAttributes anySatisfy: [:ea | ea key = aSymbol]
</methods> <methods> Seaside.WAConfiguration <category>values</category>
valueAt: aSymbol ^ self localValueAt: aSymbol ifAbsent: [self lookupValueAt: aSymbol]
</methods> <methods> Seaside.WAConfiguration <category>values</category>
valueForAttribute: anAttribute ^ self valueAt: anAttribute key
</methods> <methods> Seaside.WAConfiguration <category>testing</category>
hasGroupNamed: aSymbol ^ self allAttributes anySatisfy: [:ea | ea group = aSymbol]
</methods> <methods> Seaside.WAConfiguration <category>values</category>
inheritedValueAndSourceAt: aSymbol do: aBlock self allAncestorsDo: [:ea | (ea localValueAt: aSymbol ifAbsent: []) ifNotNilDo: [:val | ^ aBlock value: val value: ea]]. ^ nil
</methods> <methods> Seaside.WAConfiguration <category>attributes</category>
attributeNamed: aSymbol ^ self allAttributes detect: [:ea | ea key = aSymbol] ifNone: [self error: 'No attribute named ', aSymbol printString]
</methods> <methods> Seaside.WAConfiguration <category>values</category>
localValueAt: aSymbol ifAbsent: absentBlock self subclassResponsibility
</methods> <methods> Seaside.WAConfiguration <category>testing</category>
hasLocalValueForAttribute: anAttribute self localValueAt: anAttribute key ifAbsent: [^ false]. ^ true
</methods> <methods> Seaside.WAConfiguration <category>values</category>
lookupValueAt: aSymbol ^ self inheritedValueAndSourceAt: aSymbol do: [:value :source | value]
</methods> <methods> Seaside.WAConfiguration <category>testing</category>
inheritsFrom: aConfiguration ^ self allAncestors anySatisfy: [:ea | ea = aConfiguration]
</methods> <methods> Seaside.WAConfiguration <category>ancestry</category>
ancestors ^ #()
</methods> <methods> Seaside.WAConfiguration <category>ancestry</category>
withAllAncestorsDo: aBlock aBlock value: self. ^ self allAncestorsDo: aBlock
</methods> <methods> Seaside.WAConfiguration <category>ancestry</category>
allAncestorsDo: aBlock self allAncestors do: aBlock
</methods> <methods> Seaside.WAConfigurationAttribute <category>accessing</category>
key ^ key
</methods> <methods> Seaside.WAConfigurationAttribute <category>accessing</category>
group ^ group ifNil: [#general]
</methods> <methods> Seaside.WAConfigurationAttribute <category>as yet unclassified</category>
valueFromString: aString self subclassResponsibility
</methods> <methods> Seaside.WAConfigurationAttribute <category>initialization</category>
initializeWithKey: keySymbol group: groupSymbol key := keySymbol. group := groupSymbol
</methods> <methods> Seaside.WAConfigurationAttribute <category>as yet unclassified</category>
stringForValue: anObject ^ anObject displayString
</methods> <methods> Seaside.WAConfigurationAttribute <category>as yet unclassified</category>
accept: aVisitor with: anObject self subclassResponsibility
</methods> <methods> Seaside.WAConfigurationEditor <category>rendering-attributes</category>
renderUnspecifiedAttribute: anAttribute on: html anAttribute accept: self with: html
</methods> <methods> Seaside.WAConfigurationEditor <category>rendering-attributes</category>
renderOverridenAttribute: anAttribute on: html anAttribute accept: self with: html
</methods> <methods> Seaside.WAConfigurationEditor <category>accessing</category>
configuration: aConfiguration configuration := aConfiguration
</methods> <methods> Seaside.WAConfigurationEditor <category>initialization</category>
initialize super initialize. configuration := WAConfiguration new
</methods> <methods> Seaside.WAConfigurationEditor <category>rendering-visitors</category>
visitNumberAttribute: anAttribute with: html html textInput size: 5; callback: [ :value | configuration takeValue: value asNumber forAttribute: anAttribute ]; value: (configuration valueForAttribute: anAttribute)
</methods> <methods> Seaside.WAConfigurationEditor <category>rendering-visitors</category>
visitBooleanAttribute: anAttribute with: html html select list: (Array with: true with: false); selected: (configuration valueForAttribute: anAttribute); callback: [:v | configuration takeValue: v forAttribute: anAttribute]; labels: [ :b | b ifTrue: [ 'true' ] ifFalse: [ 'false' ] ]
</methods> <methods> Seaside.WAConfigurationEditor <category>accessing</category>
trailName ^ configuration name
</methods> <methods> Seaside.WAConfigurationEditor <category>rendering-visitors</category>
visitListAttribute: anAttribute with: html html select list: (Array with: nil), anAttribute options asArray; selected: (configuration valueForAttribute: anAttribute); callback: [ :value | (configuration takeValue: value forAttribute: anAttribute ) ]; labels: [ :each | each ifNil: ['None'] ifNotNil: [ each displayString] ]
</methods> <methods> Seaside.WAConfigurationEditor <category>rendering-visitors</category>
visitStringAttribute: anAttribute with: html html textInput callback: [ :value | configuration takeValue: (anAttribute valueFromString: value) forAttribute: anAttribute ]; value: (configuration valueForAttribute: anAttribute)
</methods> <methods> Seaside.WAConfigurationEditor <category>rendering-ancestry</category>
renderAncestryOn: html html heading level2; with: 'Ancestry'. configuration potentialAncestors isEmpty ifFalse: [ html text: 'Add ancestor: '. self renderParentSelectorOn: html ]. self renderAncestryListFor: configuration seen: Set new on: html
</methods> <methods> Seaside.WAConfigurationEditor <category>rendering</category>
renderFormButtonsOn: html html submitButton on: #save of: self. html submitButton on: #done of: self.
</methods> <methods> Seaside.WAConfigurationEditor <category>rendering</category>
renderContentOn: html html form: [ self renderFormOn: html. self renderButtonsOn: html ]
</methods> <methods> Seaside.WAConfigurationEditor <category>rendering-attributes</category>
renderRevertForAttribute: anAttribute on: html html anchor callback: [configuration clearValueForAttribute: anAttribute]; with: 'clear'
</methods> <methods> Seaside.WAConfigurationEditor <category>rendering-attributes</category>
renderInheritedAttribute: anAttribute on: html html text: (configuration valueForAttribute: anAttribute) printString
</methods> <methods> Seaside.WAConfigurationEditor <category>accessing</category>
configuration ^ configuration
</methods> <methods> Seaside.WAConfigurationEditor <category>rendering-attributes</category>
renderInheritanceForAttribute: anAttribute on: html configuration inheritedValueAndSourceAt: anAttribute key do: [:value :source | (configuration hasLocalValueForAttribute: anAttribute) ifTrue: [ html tableData: [ html anchor callback: [configuration clearValueForAttribute: anAttribute]; with: 'revert'. html text: ' to: ', value printString]. html tableData: 'overriden from ', source name ] ifFalse: [ html tableData: [ html anchor callback: [configuration overrideAttribute: anAttribute]; with: 'override']. html tableData: 'inherited from ', source name ]. ^ self ]. (configuration hasLocalValueForAttribute: anAttribute) ifTrue: [ html tableData: [ html anchor callback: [configuration clearValueForAttribute: anAttribute]; with: 'clear']] ifFalse: [ html tableData: [ html span style: 'color: #ff0000'; with: '(unspecified)' ] ]. html tableData
</methods> <methods> Seaside.WAConfigurationEditor <category>rendering-ancestry</category>
renderParentSelectorOn: html | selectedAncestor | selectedAncestor := ValueHolder new. html select list: configuration potentialAncestors; selected: nil; callback: [ :value | selectedAncestor contents: value ]; labels: [ :each | each name ]. html space. html submitButton callback: [ configuration addAncestor: selectedAncestor contents ]; text: 'Add'
</methods> <methods> Seaside.WAConfigurationEditor <category>actions</category>
select: aConfiguration self call: (WAConfigurationEditor new configuration: aConfiguration)
</methods> <methods> Seaside.WAConfigurationEditor <category>rendering-attributes</category>
renderAttributesOn: html html heading level2; with: 'Configuration'. html table: [ configuration groupedAttributes do: [ :associaction | html tableRow: [ html tableData colSpan: 4; with: [ html heading level3; with: (self labelForSelector: associaction key) ] ]. associaction value do: [ :attribute | self renderAttribute: attribute on: html ] ] ]
</methods> <methods> Seaside.WAConfigurationEditor <category>rendering-visitors</category>
visitPasswordAttribute: anAttribute with: html html passwordInput callback: [ :value | configuration takeValue: (anAttribute valueFromString: value) forAttribute: anAttribute ]
</methods> <methods> Seaside.WAConfigurationEditor <category>rendering-attributes</category>
renderAttribute: anAttribute on: html html tableRow: [ html tableData: (self labelForSelector: anAttribute key). html tableData: [ (configuration valueForAttribute: anAttribute) ifNil: [ self renderUnspecifiedAttribute: anAttribute on: html ] ifNotNil: [ (configuration hasLocalValueForAttribute: anAttribute) ifTrue: [ self renderOverridenAttribute: anAttribute on: html ] ifFalse: [ self renderInheritedAttribute: anAttribute on: html ] ] ]. self renderInheritanceForAttribute: anAttribute on: html ]
</methods> <methods> Seaside.WAConfigurationEditor <category>rendering-ancestry</category>
renderParent: aConfiguration on: html html text: aConfiguration name; space. (configuration hasMutableAncestry and: [ configuration ancestors includes: aConfiguration]) ifTrue: [ html anchor callback: [ configuration removeAncestor: aConfiguration ]; with: '(remove)' ]
</methods> <methods> Seaside.WAConfigurationEditor <category>rendering-attributes</category>
renderInheritedValueForAttribute: anAttribute on: html | inheritedValue | inheritedValue := (configuration lookupValueAt: anAttribute key). inheritedValue isNil ifTrue: [ html span style: 'color: #ff0000'; with: '(unspecified)' ] ifFalse: [ html text: inheritedValue printString ]
</methods> <methods> Seaside.WAConfigurationEditor <category>rendering-ancestry</category>
renderAncestryListFor: aConfiguration seen: aSet on: html aConfiguration ancestors isEmpty ifTrue: [ ^ self ]. html unorderedList: [ aConfiguration ancestors do: [ :each | html listItem: [ self renderParent: each on: html. (aSet includes: each) ifFalse: [ aSet add: each. self renderAncestryListFor: each seen: aSet on: html ] ] ] ]
</methods> <methods> Seaside.WAConfigurationEditor <category>rendering</category>
renderFormOn: html self renderAncestryOn: html. self renderAttributesOn: html
</methods> <methods> Seaside.WAConfigurationEditor <category>rendering</category>
renderButtonsOn: html html break. html submitButton on: #save of: self. html submitButton on: #close of: self
</methods> <methods> Seaside.WAConfigurationEditor <category>rendering-attributes</category>
renderOverrideForAttribute: anAttribute on: html html anchor callback: [configuration overrideAttribute: anAttribute]; with: 'edit'
</methods> <methods> Seaside.WAConfigurationEditor <category>actions</category>
close self answer
</methods> <methods> Seaside.WAConfigurationEditor <category>actions</category>
save
</methods> <methods> Seaside.WAConfigurationTest <category>tests</category>
testLinearization "from http://www.webcom.com/haahr/dylan/linearization-oopsla96.html" | root boat dayBoat wheelBoat engineLess pedalWheelBoat smallMultihull smallCatamaran pedalo | root := WAUserConfiguration new. boat := WAUserConfiguration new addAncestor: root; yourself. dayBoat := WAUserConfiguration new addAncestor: boat; yourself. wheelBoat := WAUserConfiguration new addAncestor: boat; yourself. engineLess := WAUserConfiguration new addAncestor: dayBoat; yourself. pedalWheelBoat := WAUserConfiguration new addAncestor: engineLess; addAncestor: wheelBoat; yourself. smallMultihull := WAUserConfiguration new addAncestor: dayBoat; yourself. smallCatamaran := WAUserConfiguration new addAncestor: smallMultihull; yourself. pedalo := WAUserConfiguration new addAncestor: pedalWheelBoat; addAncestor: smallCatamaran; yourself. self assert: pedalWheelBoat allAncestors = (Array with: engineLess with: dayBoat with: wheelBoat with: boat with: root). self assert: smallCatamaran allAncestors = (Array with: smallMultihull with: dayBoat with: boat with: root). self assert: pedalo allAncestors = ((Array with: pedalWheelBoat with: engineLess with: smallCatamaran with: smallMultihull), (Array with: dayBoat with: wheelBoat with: boat with: root)).
</methods> <methods> Seaside.WACookie <category>accessing</category>
expiry ^ expiry
</methods> <methods> Seaside.WACookie <category>api</category>
expireIn: aDuration self expiry: DateAndTime now + aDuration
</methods> <methods> Seaside.WACookie <category>accessing</category>
expiry: aDateTime expiry := aDateTime asUTC
</methods> <methods> Seaside.WACookie <category>comparing</category>
= other ^(other isKindOf: WACookie) and: [ self key = other key and: [ self path = other path ] ]
</methods> <methods> Seaside.WACookie <category>api</category>
valueWithExpiry ^ expiry ifNil: [self value] ifNotNil: [(self value ifNil: ['']), '; expires=', self expiryString]
</methods> <methods> Seaside.WACookie <category>private</category>
expiryString ^ String streamContents: [:s | s nextPutAll: (expiry dayOfWeekName first: 3); nextPutAll: ', '; nextPutAll: expiry dayOfMonth displayString; nextPut: $-; nextPutAll: expiry monthName; nextPut: $-; nextPutAll: expiry year displayString; space; nextPutAll: expiry hour24 displayString; nextPut: $:; nextPutAll: expiry minute displayString; nextPut: $:; nextPutAll: expiry second displayString; nextPutAll: ' GMT']
</methods> <methods> Seaside.WACookie <category>accessing</category>
path: aString path := aString
</methods> <methods> Seaside.WACookie <category>writing</category>
writeOn: aStream aStream nextPutAll: self key; nextPut: $=; nextPutAll: (self value ifNil: [ '' ]). expiry isNil ifFalse: [ aStream nextPutAll: '; expires='; nextPutAll: self expiryString ]. path isNil ifFalse: [ aStream nextPutAll: '; path='; nextPutAll: self path ]
</methods> <methods> Seaside.WACookie <category>accessing</category>
value: aString value := aString
</methods> <methods> Seaside.WACookie <category>accessing</category>
key ^ key
</methods> <methods> Seaside.WACookie <category>accessing</category>
path ^ path ifNil: ['/']
</methods> <methods> Seaside.WACookie <category>accessing</category>
key: aString key := aString
</methods> <methods> Seaside.WACookie <category>accessing</category>
value ^ value
</methods> <methods> Seaside.WACookie <category>comparing</category>
hash ^self key hash bitXor: self path hash
</methods> <methods> Seaside.WACookieTest <category>actions</category>
go [self session checkForCookies] whileFalse: [self inform: 'You must have cookies enabled to proceed.']. self session redirectWithCookies: (Array with: "Should get back empty cookie ?" (WACookie new key: 'nullCookie'; expireIn: (Duration seconds: 60); yourself) with: (WACookie new key: 'cookietest'; value: 1000 atRandom displayString; expireIn: (Duration seconds: 60); yourself) with: "Should get back multiple (i.e. a collection of) cookies with same key ?" (WACookie new key: 'cookietest'; value: 1000 atRandom displayString; expireIn: (Duration seconds: 60); yourself)). self inform: self session currentRequest cookies displayString.
</methods> <methods> Seaside.WACounter <category>accessing</category>
count: anInteger count := anInteger
</methods> <methods> Seaside.WACounter <category>initialization</category>
initialize super initialize. self registerForBacktracking. self count: 0
</methods> <methods> Seaside.WACounter <category>actions</category>
decrease count := count - 1
</methods> <methods> Seaside.WACounter <category>rendering</category>
renderContentOn: html html heading: count. html anchor callback: [ self increase ]; with: '++'. html space. html anchor callback: [ self decrease ]; with: '--'
</methods> <methods> Seaside.WACounter <category>accessing</category>
count ^ count
</methods> <methods> Seaside.WACounter <category>actions</category>
increase count := count + 1
</methods> <methods> Seaside.WADateInput <category>private callbacks</category>
year ^year
</methods> <methods> Seaside.WADateInput <category>private callbacks</category>
addYearCallbackToBrush: aBrush self hasCallback ifFalse: [^self]. aBrush on: #year of: self
</methods> <methods> Seaside.WADateInput <category>accessing</category>
defaultOptions ^#(month day year)
</methods> <methods> Seaside.WADateInput <category>accessing</category>
options ^options ifNil: [ self defaultOptions ].
</methods> <methods> Seaside.WADateInput <category>private rendering</category>
addCallback self hasCallback ifFalse: [^self]. canvas forgetCurrentBrush. (canvas hiddenInput) callback: [callbackBlock value: self setValueWithNewDate]; close.
</methods> <methods> Seaside.WADateInput <category>accessing</category>
options: anArray "Valid values in the array : #year #month #day Can be used to control what is shown and in what order Default #(month day year)" options := anArray
</methods> <methods> Seaside.WADateInput <category>public api</category>
with: aBlock value isNil ifTrue: [value := Date today]. day := value dayOfMonth. month := value monthIndex. year := value year. self options do: [:each | self perform: ('render' , each asLowercase capitalized) asSymbol] separatedBy: [canvas space]. self addCallback.
</methods> <methods> Seaside.WADateInput <category>private rendering</category>
renderYear | brush | canvas forgetCurrentBrush. brush := (canvas textInput) id: (self id isNil ifTrue: [nil] ifFalse: [self id , '-year']); value: year; yourself. self addYearCallbackToBrush: brush. brush attributeAt: 'size' put: 4; attributeAt: 'maxlength' put: 4; close.
</methods> <methods> Seaside.WADateInput <category>private callbacks</category>
setValueWithNewDate ^value := Date newDay: ((day min: (Date daysInMonth: month forYear: year)) max: 1) monthNumber: month year: year.
</methods> <methods> Seaside.WADateInput <category>private callbacks</category>
month: anIntegerOrString month := [anIntegerOrString asNumber] on: Error do: [:e | 1]
</methods> <methods> Seaside.WADateInput <category>private callbacks</category>
month ^month
</methods> <methods> Seaside.WADateInput <category>private callbacks</category>
day: anIntegerOrString day := [anIntegerOrString asNumber] on: Error do: [:e | 1]
</methods> <methods> Seaside.WADateInput <category>private rendering</category>
renderMonth | brush | canvas forgetCurrentBrush. brush := (canvas select) id: self id; list: (1 to: 12); selected: month; yourself. self addMonthCallbackToBrush: brush. brush labels: [:ea | Date nameOfMonth: ea]; close.
</methods> <methods> Seaside.WADateInput <category>private callbacks</category>
addMonthCallbackToBrush: aBrush self hasCallback ifFalse: [^self]. aBrush on: #month of: self
</methods> <methods> Seaside.WADateInput <category>private callbacks</category>
addDayCallbackToBrush: aBrush self hasCallback ifFalse: [^self]. aBrush on: #day of: self
</methods> <methods> Seaside.WADateInput <category>private rendering</category>
renderDay | brush | canvas forgetCurrentBrush. brush := (canvas textInput) id: (self id isNil ifTrue: [nil] ifFalse: [self id , '-day']); value: day; yourself. self addDayCallbackToBrush: brush. brush attributeAt: 'size' put: 2; attributeAt: 'maxlength' put: 2; attributeAt: 'max' put: 31; close.
</methods> <methods> Seaside.WADateInput <category>private callbacks</category>
day ^day
</methods> <methods> Seaside.WADateInput <category>private callbacks</category>
year: anIntegerOrString year := [anIntegerOrString asNumber] on: Error do: [:e | 1900]
</methods> <methods> Seaside.WADateSelector <category>accessing</category>
year ^year
</methods> <methods> Seaside.WADateSelector <category>initialize-release</category>
initialize super initialize. startYear := Date today year - 1. endYear := Date today year + 5. self date: self dateClass today.
</methods> <methods> Seaside.WADateSelector <category>accessing</category>
labelForMonth: aNumber ^ Date nameOfMonth: aNumber
</methods> <methods> Seaside.WADateSelector <category>accessing</category>
date: aDate day := aDate dayOfMonth. month := aDate monthIndex. year := aDate year.
</methods> <methods> Seaside.WADateSelector <category>private</category>
dateClass ^ Date
</methods> <methods> Seaside.WADateSelector <category>accessing</category>
months ^ 1 to: 12
</methods> <methods> Seaside.WADateSelector <category>rendering</category>
renderContentOn: html html select list: self months; on: #month of: self; labels: [ :each | self labelForMonth: each ]. html select list: self days; on: #day of: self; labels: [ :each | self labelForDay: each ]. html select list: self yearRange; on: #year of: self; labels: [ :each | self labelForYear: each ]. self dateIsValid ifFalse: [self renderValidationErrorOn: html].
</methods> <methods> Seaside.WADateSelector <category>accessing</category>
endYear ^ endYear
</methods> <methods> Seaside.WADateSelector <category>private</category>
privateIsValidDay: theDay monthNumber: theMonth year: theYear | maxDay | theMonth > 0 & (theMonth <= 12) ifFalse: [^false]. maxDay := Month daysInMonth: theMonth forYear: theYear. ^theDay > 0 & (theDay <= maxDay)
</methods> <methods> Seaside.WADateSelector <category>accessing</category>
labelForYear: aNumber ^ aNumber
</methods> <methods> Seaside.WADateSelector <category>testing</category>
dateIsValid [self date] on: Error do: [:e | ^ false]. ^ true
</methods> <methods> Seaside.WADateSelector <category>accessing</category>
startYear: anInteger startYear := anInteger
</methods> <methods> Seaside.WADateSelector <category>accessing</category>
labelForDay: aNumber ^ aNumber
</methods> <methods> Seaside.WADateSelector <category>accessing</category>
month: anObject ^month := anObject
</methods> <methods> Seaside.WADateSelector <category>accessing</category>
yearRange ^ self startYear to: self endYear
</methods> <methods> Seaside.WADateSelector <category>accessing</category>
endYear: anInteger endYear := anInteger
</methods> <methods> Seaside.WADateSelector <category>accessing</category>
days ^ 1 to: 31
</methods> <methods> Seaside.WADateSelector <category>accessing</category>
startYear ^ startYear
</methods> <methods> Seaside.WADateSelector <category>accessing</category>
day: anObject ^day := anObject
</methods> <methods> Seaside.WADateSelector <category>accessing</category>
date (self privateIsValidDay: day monthNumber: month year: year) ifFalse: [self error: 'Invalid date']. ^ self dateClass year: year month: month day: day
</methods> <methods> Seaside.WADateSelector <category>rendering</category>
renderValidationErrorOn: html html span class: 'error'; with: 'invalid date'
</methods> <methods> Seaside.WADateSelector <category>accessing</category>
month ^month
</methods> <methods> Seaside.WADateSelector <category>accessing</category>
day ^day
</methods> <methods> Seaside.WADateSelector <category>accessing</category>
year: anObject ^year := anObject
</methods> <methods> Seaside.WADateSelectorTest <category>initialization</category>
initialize super initialize. beginDate := WADateSelector new. endDate := WADateSelector new. endDate date: (Date today addDays: 1). beginTime := WATimeSelector new. beginTime time: Time now. endTime := WATimeSelector new. endTime time: (beginTime time addSeconds: 3600). beginDAT := WADateTimeSelector new. endDAT := WADateTimeSelector new. endDAT dateAndTime: beginDAT dateAndTime + 1 day + 1 hour
</methods> <methods> Seaside.WADateSelectorTest <category>rendering</category>
renderContentOn: html self renderDateSelectorsOn: html. html horizontalRule. self renderTimeSelectorsOn: html. html horizontalRule. self renderDateTimeSelectorsOn: html.
</methods> <methods> Seaside.WADateSelectorTest <category>rendering</category>
renderDateSelectorsOn: html html heading level: 3; with: 'Dates'. html form: [ html table: [ html tableRow: [ html tableData: 'From'; tableData: beginDate]. html tableRow: [ html tableData: 'To'; tableData: endDate]]. html submitButton callback: [self inform: (endDate date - beginDate date) days printString , ' day(s)']; text: 'Compute duration'].
</methods> <methods> Seaside.WADateSelectorTest <category>rendering</category>
renderTimeSelectorsOn: html html heading level: 3; with: 'Times'. html form: [ html table: [ html tableRow: [ html tableData: 'From'; tableData: beginTime]. html tableRow: [ html tableData: 'To'; tableData: endTime ] ]. html submitButton callback: [self inform: (endTime time subtractTime: beginTime time) asSeconds printString , ' seconds(s)']; text: 'Compute duration'].
</methods> <methods> Seaside.WADateSelectorTest <category>rendering</category>
renderDateTimeSelectorsOn: html html heading level: 3; with: 'Dates and Times'. html form: [ html table: [ html tableRow: [ html tableData: 'From'; tableData: beginDAT ]. html tableRow: [ html tableData: 'To'; tableData: endDAT ] ]. html submitButton callback: [ | dateDiff | dateDiff := (endDAT dateAndTime asDate - beginDAT dateAndTime asDate) days. dateDiff isZero ifFalse: [ self inform: dateDiff printString , ' day(s)' ] ifTrue: [ self inform: (endDAT dateAndTime asTime subtractTime: beginDAT dateAndTime asTime) asSeconds printString , ' second(s)']]; text: 'Compute duration'].
</methods> <methods> Seaside.WADateSelectorTest <category>accessing</category>
children ^(OrderedCollection new) add: beginDate; add: endDate; add: beginTime; add: endTime; add: beginDAT; add: endDAT; yourself.
</methods> <methods> Seaside.WADateTable <category>enumerating</category>
monthsAndLengthsDo: aBlock |count last| count := 0. self datesDo: [:ea | count := count + 1. last := ea] separatedBy: [aBlock value: last month value: count. count := 0]
</methods> <methods> Seaside.WADateTable <category>actions</category>
updateDatesCache | date | (startDate isNil or: [endDate isNil]) ifTrue: [^ self]. datesCache := OrderedCollection new. date := startDate. [date > endDate] whileFalse: [datesCache add: date. date := date next]
</methods> <methods> Seaside.WADateTable <category>enumerating</category>
datesDo: aBlock separatedBy: monthlyBlock | month| month := datesCache first monthIndex. datesCache do: [:date | date monthIndex = month ifFalse: [month := date monthIndex. monthlyBlock value]. aBlock value: date]. monthlyBlock value.
</methods> <methods> Seaside.WADateTable <category>accessing</category>
startDate: aDate startDate := aDate. self updateDatesCache.
</methods> <methods> Seaside.WADateTable <category>rendering</category>
renderDayHeadingsOn: html self renderHeadingSpacerOn: html. self datesDo: [:date | html tableHeading class: 'DayHeading'; with: date dayOfMonth ] separatedBy: [ self renderHeadingSpacerOn: html ]
</methods> <methods> Seaside.WADateTable <category>accessing</category>
rows: aCollection rows := aCollection
</methods> <methods> Seaside.WADateTable <category>rendering</category>
renderHeadingSpacerOn: html html tableData: []
</methods> <methods> Seaside.WADateTable <category>rendering</category>
renderRow: anObject index: aNumber on: html self renderHeadingForRow: anObject on: html. self datesDo: [ :date | self renderCellForDate: date row: anObject index: aNumber on: html] separatedBy: [ self renderHeadingSpacerOn: html ]
</methods> <methods> Seaside.WADateTable <category>accessing</category>
endDate: aDate endDate := aDate. self updateDatesCache.
</methods> <methods> Seaside.WADateTable <category>rendering</category>
renderContentOn: html html table class: 'DateTable'; border: 1; with: [ html tableRow: [ self renderMonthHeadingsOn: html ]. html tableRow: [ self renderDayHeadingsOn: html ]. rows withIndexDo: [ :each :index | html tableRow: [self renderRow: each index: index on: html ] ] ]
</methods> <methods> Seaside.WADateTable <category>rendering</category>
renderCellForDate: aDate row: anObject index: aNumber on: html html tableData: [html space]
</methods> <methods> Seaside.WADateTable <category>rendering</category>
renderHeadingForRow: anObject on: html html tableHeading class: 'RowHeading'; with: anObject
</methods> <methods> Seaside.WADateTable <category>rendering</category>
renderMonthHeadingsOn: html self monthsAndLengthsDo: [ :month :length | self renderHeadingSpacerOn: html. html tableHeading colSpan: length; class: 'MonthHeading'; with: [ html text: month name. html space. html text: month year ] ]
</methods> <methods> Seaside.WADateTimeSelector <category>initialize-release</category>
initialize super initialize. dateSelector := WADateSelector new. timeSelector := WATimeSelector new.
</methods> <methods> Seaside.WADateTimeSelector <category>accessing</category>
dateAndTime ^ DateAndTime date: dateSelector date time: timeSelector time
</methods> <methods> Seaside.WADateTimeSelector <category>accessing</category>
children ^ Array with: dateSelector with: timeSelector
</methods> <methods> Seaside.WADateTimeSelector <category>accessing</category>
dateAndTime: anObject dateSelector date: anObject asDate. timeSelector time: anObject asTime.
</methods> <methods> Seaside.WADateTimeSelector <category>rendering</category>
renderContentOn: html html span: dateSelector. html span: [html strong: ' : ']. html span: timeSelector.
</methods> <methods> Seaside.WADebugErrorHandler <category>actions</category>
handleError: anError SeasidePlatformSupport openDebuggerOn: anError
</methods> <methods> Seaside.WADecoration <category>accessing</category>
component ^ self owner isDecoration ifTrue: [self owner component] ifFalse: [self owner]
</methods> <methods> Seaside.WADecoration <category>accessing</category>
owner: aPresenter next ifNil: [next := WAStateHolder new]. next contents: aPresenter
</methods> <methods> Seaside.WADecoration <category>rendering</category>
showHalo ^ false
</methods> <methods> Seaside.WADecoration <category>processing</category>
handleAnswer: anObject continueWith: aBlock aBlock value
</methods> <methods> Seaside.WADecoration <category>convenience</category>
asComponent ^ self component
</methods> <methods> Seaside.WADecoration <category>rendering</category>
renderOwnerOn: html self owner ifNotNilDo: [:owner | owner renderWithContext: html context]
</methods> <methods> Seaside.WADecoration <category>iterating</category>
nextPresentersDo: aBlock aBlock value: self owner
</methods> <methods> Seaside.WADecoration <category>testing</category>
isGlobal ^ false
</methods> <methods> Seaside.WADecoration <category>testing</category>
isDelegation ^ false
</methods> <methods> Seaside.WADecoration <category>call/answer</category>
handleAnswer: anObject (self owner handleAnswer: anObject) ifFalse: [self handleAnswer: anObject continueWith: [^ false]]. ^ true
</methods> <methods> Seaside.WADecoration <category>testing</category>
isDecoration ^ true
</methods> <methods> Seaside.WADecoration <category>accessing</category>
owner ^ next ifNotNil: [next contents]
</methods> <methods> Seaside.WADecoration <category>testing</category>
isLocal ^ (self isGlobal or: [self isDelegation]) not
</methods> <methods> Seaside.WADecoration <category>actions</category>
remove self component removeDecoration: self
</methods> <methods> Seaside.WADefaultActionCallback <category>accessing</category>
priority ^ 10
</methods> <methods> Seaside.WADefaultFormTest <category>rendering</category>
rendererClass "Intentionally using the classic API" ^WAHtmlRenderer
</methods> <methods> Seaside.WADefaultFormTest <category>rendering</category>
renderContentOn: html html formWithDefaultAction: [self inform: 'Default: ', value displayString] do: [ html submitButtonWithAction: [self inform: 'Before: ', value displayString] text: 'Before'. html break. html textInputWithValue: '' callback: [:v | value := v]. html submitButtonWithAction: [self inform: 'Go: ' , value displayString] text: 'Go'. html break. html submitButtonWithAction: [self inform: 'After: ', value displayString] text: 'After']
</methods> <methods> Seaside.WADelayTest <category>rendering</category>
rendererClass "Intentionally using the classic API" ^WAHtmlRenderer
</methods> <methods> Seaside.WADelayTest <category>rendering</category>
renderContentOn: html html anchorWithAction: [self go] text: 'go'
</methods> <methods> Seaside.WADelayTest <category>actions</category>
go self call: (WAComponent new addMessage: '3 seconds'; addDecoration: (WADelayedAnswerDecoration new delay: 3); yourself)
</methods> <methods> Seaside.WADelayedAnswerDecoration <category>accessing</category>
delay ^ delay ifNil: [1]
</methods> <methods> Seaside.WADelayedAnswerDecoration <category>path</category>
updateRoot: aRoot | callbacks url | callbacks := WACallbackRegistry context: aRoot context owner: self. url := aRoot context actionUrl withParameter: (callbacks registerActionCallback: [self component answer]). aRoot meta redirectAfter: self delay to: url asString
</methods> <methods> Seaside.WADelayedAnswerDecoration <category>accessing</category>
delay: aNumber delay := aNumber
</methods> <methods> Seaside.WADelegation <category>accessing</category>
delegate ^ delegate
</methods> <methods> Seaside.WADelegation <category>accessing</category>
delegate: aComponent delegate := aComponent
</methods> <methods> Seaside.WADelegation <category>iterating</category>
nextPresentersDo: aBlock delegate decorationChainDo: aBlock
</methods> <methods> Seaside.WADelegation <category>testing</category>
isDelegation ^ true
</methods> <methods> Seaside.WADispatchCallback <category>accessing</category>
priority ^ 5
</methods> <methods> Seaside.WADispatchCallback <category>evaluation</category>
evaluateWithArgument: anObject (context callbackAt: anObject) ifNotNilDo: [ :callback | callback evaluateWithArgument: nil ]
</methods> <methods> Seaside.WADispatcher <category>initialization</category>
initialize super initialize. entryPoints := Dictionary new. version := 0.
</methods> <methods> Seaside.WADispatcher <category>accessing</category>
defaultName ^ defaultName
</methods> <methods> Seaside.WADispatcher <category>processing</category>
handlerForRequest: aRequest ^ self handlerForRequest: aRequest relativeTo: self basePath
</methods> <methods> Seaside.WADispatcher <category>processing</category>
handlerForRequest: aRequest relativeTo: aString | fullUrl relativeUrl handlerName | fullUrl := aRequest url. (aString isEmpty or: [ fullUrl beginsWith: aString ]) ifTrue: [ relativeUrl := fullUrl allButFirst: aString size. handlerName := (relativeUrl notEmpty and: [ relativeUrl first = $/ ]) ifTrue: [ (relativeUrl findTokens: '/') at: 1 ifAbsent: [ self defaultName ] ] ifFalse: [ self defaultName ]. ^ self entryPoints at: handlerName ifAbsent: [ self entryPoints at: self defaultName ifAbsent: [ WANotFoundHandler new ] ] ]. ^ WANotFoundHandler new
</methods> <methods> Seaside.WADispatcher <category>registration</category>
unregister: anEntryPoint entryPoints removeKey: anEntryPoint name ifAbsent: [ ^ nil ]. self announceChangeOf: #entryPoint with: #add->anEntryPoint. ^ anEntryPoint unregistered.
</methods> <methods> Seaside.WADispatcher <category>private</category>
beAwareOfChangeOf: anAspectSymbol with: aParameter from: anEntryPoint (anEntryPoint == self and: [anAspectSymbol == #name]) ifTrue: [^ self]. "Here when anything has changed but the name in the receiver" version := self version + 1. lastUpdate := TimeStamp now. self changed
</methods> <methods> Seaside.WADispatcher <category>processing</category>
handleRequest: aRequest aRequest isPrefetch ifTrue: [ ^ WAResponse forbidden: aRequest url ]. ^ (self handlerForRequest: aRequest) handleRequest: aRequest
</methods> <methods> Seaside.WADispatcher <category>accessing</category>
entryPointAt: aString ^ (aString findTokens: '/') inject: self into: [ :dispatcher :token | dispatcher entryPoints at: token ]
</methods> <methods> Seaside.WADispatcher <category>registration</category>
register: anEntryPoint anEntryPoint name ifNil: [ self error: 'Unable to add unnamed entry point.' ]. entryPoints at: anEntryPoint name put: (anEntryPoint setParent: self). self announceChangeOf: #entryPoint with: #add->anEntryPoint. ^anEntryPoint.
</methods> <methods> Seaside.WADispatcher <category>accessing</category>
lastUpdate ^ lastUpdate
</methods> <methods> Seaside.WADispatcher <category>testing</category>
isDeployed ^ self entryPoints anySatisfy: [ :each | each isDeployed ]
</methods> <methods> Seaside.WADispatcher <category>private</category>
trimForDeployment "removes all non-production applications see: WAComponent class >> #isDeployed" (self entryPoints reject: [ :each | each isDeployed ]) do: [ :each | self unregister: each ]. (self entryPoints select: [ :each | each isDispatcher ]) do: [ :each | each trimForDeployment ]
</methods> <methods> Seaside.WADispatcher <category>accessing</category>
version ^ version ifNil: [ version := 0 ]
</methods> <methods> Seaside.WADispatcher <category>copying</category>
postCopy super postCopy. entryPoints := entryPoints valuesCollect: [ :each | each copy setParent: self ]
</methods> <methods> Seaside.WADispatcher <category>testing</category>
isDispatcher ^ true
</methods> <methods> Seaside.WADispatcher <category>accessing</category>
configurationComponent ^ WADispatcherEditor new dispatcher: self
</methods> <methods> Seaside.WADispatcher <category>accessing</category>
defaultName: aString defaultName := aString. self announceChangeOf: #defaultName with: aString
</methods> <methods> Seaside.WADispatcher <category>accessing</category>
entryPoints ^ entryPoints
</methods> <methods> Seaside.WADispatcher <category>testing</category>
isRoot ^ self parent isNil
</methods> <methods> Seaside.WADispatcherComponent <category>accessing</category>
dispatcher ^ dispatcher
</methods> <methods> Seaside.WADispatcherComponent <category>initialization</category>
initialize super initialize. self dispatcher: self application parent. self session registerObjectForBacktracking: self
</methods> <methods> Seaside.WADispatcherComponent <category>rendering-rows</category>
renderRowActions: anEntryPoint named: aString on: html
</methods> <methods> Seaside.WADispatcherComponent <category>rendering</category>
renderHeadingOn: html html heading level: 1; with: 'Seaside'. html div class: 'version'; with: SeasidePlatformSupport versionString
</methods> <methods> Seaside.WADispatcherComponent <category>accessing</category>
title ^ self class description
</methods> <methods> Seaside.WADispatcherComponent <category>rendering-rows</category>
renderRow: anEntryPoint named: aString on: html html tableRow: [ html tableData: [ self renderRowName: anEntryPoint named: aString on: html ]. html tableData: [ self renderRowDescription: anEntryPoint named: aString on: html ]. html tableData: [ self renderRowActions: anEntryPoint named: aString on: html ] ]
</methods> <methods> Seaside.WADispatcherComponent <category>accessing</category>
dispatcher: aDispatcher dispatcher := aDispatcher
</methods> <methods> Seaside.WADispatcherComponent <category>rendering</category>
renderDispatcherOn: html html heading level: 2; with: self dispatcher basePath , '/'. html table: [ self dispatcher isRoot ifFalse: [ self renderRow: self dispatcher parent named: '..' on: html ]. self entryPoints keysSortedSafely do: [ :each | self renderRow: (dispatcher entryPoints at: each) named: each on: html ] ]
</methods> <methods> Seaside.WADispatcherComponent <category>accessing</category>
upDirectory ^'..'
</methods> <methods> Seaside.WADispatcherComponent <category>rendering</category>
updateRoot: anHtmlRoot super updateRoot: anHtmlRoot. anHtmlRoot title: self title
</methods> <methods> Seaside.WADispatcherComponent <category>accessing</category>
entryPoints "Answer a dictionary with the visible entry points of the dispatcher." ^ self dispatcher entryPoints select: [ :each | each isEntryPoint ]
</methods> <methods> Seaside.WADispatcherComponent <category>rendering</category>
renderContentOn: html self renderHeadingOn: html. self renderDispatcherOn: html
</methods> <methods> Seaside.WADispatcherComponent <category>rendering-rows</category>
renderRowDescription: anEntryPoint named: aString on: html aString = self upDirectory ifFalse: [ html render: anEntryPoint description ] ifTrue: [ html render: 'Parent Directory' ]
</methods> <methods> Seaside.WADispatcherComponent <category>rendering-rows</category>
renderRowName: anEntryPoint named: aString on: html anEntryPoint isDispatcher ifTrue: [ html anchor callback: [ self dispatcher: anEntryPoint ]; with: aString ] ifFalse: [ anEntryPoint isApplication ifTrue: [ html anchor url: anEntryPoint basePath; with: aString ] ifFalse: [ html render: aString ] ]
</methods> <methods> Seaside.WADispatcherEditor <category>actions</category>
actionsFor: anEntryPoint ^ self class actionsFor: anEntryPoint inEditor: self
</methods> <methods> Seaside.WADispatcherEditor <category>actions</category>
configure: anEntryPoint anEntryPoint configurationComponent ifNotNilDo: [ :component | self call: component ]
</methods> <methods> Seaside.WADispatcherEditor <category>initialization</category>
initialize super initialize. type := WAApplication. name := String new
</methods> <methods> Seaside.WADispatcherEditor <category>rendering-rows</category>
renderRowActions: anEntryPoint named: aString on: html aString = self upDirectory ifTrue: [^nil] . (self actionsFor: anEntryPoint) do: [ :each | html anchor callback: (each at: #action); with: (each at: #label) ] separatedBy: [ html space ]
</methods> <methods> Seaside.WADispatcherEditor <category>rendering-parts</category>
renderAddEntryPointOn: html html heading level: 3; with: 'Add entry point'. html form: [ html table: [ html tableRow: [ html tableData class: 'label'; with: 'Name: '. html tableData: [ html textInput callback: [ :value | name := value ] ] ]. html tableRow: [ html tableData class: 'label'; with: 'Type: '. html tableData: [ html select list: self entryPointClasses; selected: type; callback: [ :value | type := value ]; labels: [ :each | each description ]. html space. html submitButton callback: [ self addEntryPoint ]; text: 'Add' ] ] ] ]
</methods> <methods> Seaside.WADispatcherEditor <category>rendering</category>
renderStatisticsOn: html html heading level: 2; with: 'Statistics'. html preformatted: SeasidePlatformSupport vmStatisticsReportString. html anchor callback: [ self clearCaches ]; with: 'Clear Caches'
</methods> <methods> Seaside.WADispatcherEditor <category>actions</category>
copy: anEntryPoint name := self request: 'Name' label: 'add' default: anEntryPoint name. name ifNil: [ ^ self ]. dispatcher register: (anEntryPoint copy setName: name)
</methods> <methods> Seaside.WADispatcherEditor <category>rendering-parts</category>
renderDefaultEntryPointOn: html html heading level: 3; with: 'Default entry point'. html form: [ html select beOptional; optionalLabel: '(none)'; list: self dispatcher entryPoints keysSortedSafely; on: #defaultName of: dispatcher. html space. html submitButton ]
</methods> <methods> Seaside.WADispatcherEditor <category>actions</category>
addEntryPoint | handler | (name isNil or: [ name isEmpty ]) ifTrue: [ ^ self inform: 'You must enter a path-name.' ]. handler := type named: name. dispatcher register: handler. self configure: handler
</methods> <methods> Seaside.WADispatcherEditor <category>accessing</category>
entryPointClasses ^ WAEntryPoint concreteSubclasses
</methods> <methods> Seaside.WADispatcherEditor <category>rendering</category>
renderSettingsOn: html html heading level: 2; with: 'Settings'. self renderDefaultEntryPointOn: html. self renderAddEntryPointOn: html
</methods> <methods> Seaside.WADispatcherEditor <category>actions</category>
remove: anEntryPoint dispatcher unregister: anEntryPoint
</methods> <methods> Seaside.WADispatcherEditor <category>rendering</category>
renderContentOn: html super renderContentOn: html. self renderSettingsOn: html. self renderStatisticsOn: html
</methods> <methods> Seaside.WADispatcherEditor <category>actions</category>
clearCaches WARegistry clearAllHandlers. Smalltalk garbageCollect
</methods> <methods> Seaside.WADispatcherEditorPlugin <category>as yet unclassified</category>
psuedoAppSession ^psuedoAppSession ifNil: [ psuedoAppSession := application sessionClass new setParent: application ]
</methods> <methods> Seaside.WADispatcherEditorPlugin <category>accessing</category>
application ^application
</methods> <methods> Seaside.WADispatcherEditorPlugin <category>accessing</category>
application: app application := app
</methods> <methods> Seaside.WADispatcherEditorPlugin <category>accessing</category>
title ^ self class name, ' - ', application name, ' (', application basePath, ')'
</methods> <methods> Seaside.WADispatcherEditorPlugin <category>as yet unclassified</category>
usingAppSession: aBlock WACurrentSession use: self psuedoAppSession during: aBlock
</methods> <methods> Seaside.WADispatcherEditorPlugin <category>rendering</category>
rendererClass ^ WARenderCanvas
</methods> <methods> Seaside.WADispatcherEditorPlugin <category>rendering</category>
renderContentOn: html "customize" html bold: 'Dispatcher Editor Plugin: ', self class label, ' on application ', application name
</methods> <methods> Seaside.WADispatcherFiles <category>accessing-pictures</category>
floppyGif | xxxCache | xxxCache := #(nil) beMutable. (xxxCache at: 1) isNil ifTrue: [ xxxCache at: 1 put: #(71 73 70 56 57 97 14 0 14 0 247 0 0 0 0 0 128 0 0 0 128 0 128 128 0 0 0 128 128 0 128 0 128 128 128 128 128 192 192 192 255 0 0 0 255 0 255 255 0 0 0 255 255 0 255 0 255 255 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 51 0 0 102 0 0 153 0 0 204 0 0 255 0 51 0 0 51 51 0 51 102 0 51 153 0 51 204 0 51 255 0 102 0 0 102 51 0 102 102 0 102 153 0 102 204 0 102 255 0 153 0 0 153 51 0 153 102 0 153 153 0 153 204 0 153 255 0 204 0 0 204 51 0 204 102 0 204 153 0 204 204 0 204 255 0 255 0 0 255 51 0 255 102 0 255 153 0 255 204 0 255 255 51 0 0 51 0 51 51 0 102 51 0 153 51 0 204 51 0 255 51 51 0 51 51 51 51 51 102 51 51 153 51 51 204 51 51 255 51 102 0 51 102 51 51 102 102 51 102 153 51 102 204 51 102 255 51 153 0 51 153 51 51 153 102 51 153 153 51 153 204 51 153 255 51 204 0 51 204 51 51 204 102 51 204 153 51 204 204 51 204 255 51 255 0 51 255 51 51 255 102 51 255 153 51 255 204 51 255 255 102 0 0 102 0 51 102 0 102 102 0 153 102 0 204 102 0 255 102 51 0 102 51 51 102 51 102 102 51 153 102 51 204 102 51 255 102 102 0 102 102 51 102 102 102 102 102 153 102 102 204 102 102 255 102 153 0 102 153 51 102 153 102 102 153 153 102 153 204 102 153 255 102 204 0 102 204 51 102 204 102 102 204 153 102 204 204 102 204 255 102 255 0 102 255 51 102 255 102 102 255 153 102 255 204 102 255 255 153 0 0 153 0 51 153 0 102 153 0 153 153 0 204 153 0 255 153 51 0 153 51 51 153 51 102 153 51 153 153 51 204 153 51 255 153 102 0 153 102 51 153 102 102 153 102 153 153 102 204 153 102 255 153 153 0 153 153 51 153 153 102 153 153 153 153 153 204 153 153 255 153 204 0 153 204 51 153 204 102 153 204 153 153 204 204 153 204 255 153 255 0 153 255 51 153 255 102 153 255 153 153 255 204 153 255 255 204 0 0 204 0 51 204 0 102 204 0 153 204 0 204 204 0 255 204 51 0 204 51 51 204 51 102 204 51 153 204 51 204 204 51 255 204 102 0 204 102 51 204 102 102 204 102 153 204 102 204 204 102 255 204 153 0 204 153 51 204 153 102 204 153 153 204 153 204 204 153 255 204 204 0 204 204 51 204 204 102 204 204 153 204 204 204 204 204 255 204 255 0 204 255 51 204 255 102 204 255 153 204 255 204 204 255 255 255 0 0 255 0 51 255 0 102 255 0 153 255 0 204 255 0 255 255 51 0 255 51 51 255 51 102 255 51 153 255 51 204 255 51 255 255 102 0 255 102 51 255 102 102 255 102 153 255 102 204 255 102 255 255 153 0 255 153 51 255 153 102 255 153 153 255 153 204 255 153 255 255 204 0 255 204 51 255 204 102 255 204 153 255 204 204 255 204 255 255 255 0 255 255 51 255 255 102 255 255 153 255 255 204 255 255 255 33 249 4 1 0 0 16 0 44 0 0 0 0 14 0 14 0 0 8 108 0 253 76 241 131 162 160 65 131 254 168 77 161 198 208 96 170 84 212 80 68 164 230 135 97 42 135 212 46 66 68 177 112 99 193 140 23 51 162 168 40 242 160 196 141 29 31 130 132 248 240 34 73 63 48 99 194 68 73 241 159 205 155 255 96 249 113 89 19 231 191 88 255 42 114 236 121 19 168 78 158 126 112 2 141 181 77 232 194 164 54 97 229 188 21 139 224 200 158 75 183 49 77 106 178 235 193 128 0 59) asByteArray ]. ^ xxxCache at: 1
</methods> <methods> Seaside.WADispatcherFiles <category>accessing-pictures</category>
topJpg | xxxCache | xxxCache := #(nil) beMutable. (xxxCache at: 1) isNil ifTrue: [ xxxCache at: 1 put: #(255 216 255 224 0 16 74 70 73 70 0 1 2 0 0 100 0 100 0 0 255 236 0 17 68 117 99 107 121 0 1 0 4 0 0 0 60 0 0 255 238 0 14 65 100 111 98 101 0 100 192 0 0 0 1 255 219 0 132 0 6 4 4 4 5 4 6 5 5 6 9 6 5 6 9 11 8 6 6 8 11 12 10 10 11 10 10 12 16 12 12 12 12 12 12 16 12 14 15 16 15 14 12 19 19 20 20 19 19 28 27 27 27 28 31 31 31 31 31 31 31 31 31 31 1 7 7 7 13 12 13 24 16 16 24 26 21 17 21 26 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 255 192 0 17 8 0 107 3 29 3 1 17 0 2 17 1 3 17 1 255 196 0 184 0 0 3 0 3 1 1 1 0 0 0 0 0 0 0 0 0 0 2 3 1 5 6 4 7 8 1 1 1 0 3 1 1 0 0 0 0 0 0 0 0 0 0 0 1 2 3 4 5 6 16 0 1 3 3 1 5 2 7 10 9 7 8 11 1 0 0 1 0 2 3 17 4 5 6 33 49 65 18 7 81 19 97 129 34 50 211 20 86 113 145 161 177 66 82 35 164 165 22 193 98 114 146 51 131 132 212 70 225 130 162 210 36 21 71 209 178 67 83 52 85 133 87 240 241 226 242 115 147 195 116 37 53 8 23 17 1 0 2 1 2 5 3 2 6 2 2 3 1 0 0 0 0 1 2 3 17 97 33 49 18 19 4 65 81 20 145 50 113 129 177 209 34 5 161 66 193 35 240 225 98 51 255 218 0 12 3 1 0 2 17 3 17 0 63 0 235 52 181 212 86 250 142 209 207 119 44 119 176 73 106 215 238 164 167 107 54 248 105 69 209 226 91 248 76 122 196 181 230 143 229 19 238 232 175 49 151 214 215 206 202 225 92 216 114 67 101 205 171 188 152 110 128 222 28 55 53 255 0 140 186 230 34 99 143 38 150 210 210 125 59 171 172 95 29 213 168 245 136 188 139 155 89 71 44 240 191 178 162 142 30 2 23 60 197 169 248 54 70 150 115 153 125 15 149 199 53 210 99 220 236 157 136 31 236 146 26 78 193 195 187 119 202 241 173 89 48 211 47 255 0 54 247 103 91 218 187 195 144 146 202 218 239 159 184 171 102 102 201 32 120 229 123 72 222 8 43 92 206 76 51 252 184 215 221 150 149 191 46 109 77 197 156 177 56 130 23 118 47 34 44 231 190 57 135 156 138 46 134 182 16 122 236 45 140 178 129 69 203 228 229 233 171 110 42 107 46 223 76 97 127 188 243 49 91 17 91 12 111 44 247 123 54 58 111 244 113 159 17 169 92 126 45 116 172 228 159 186 220 191 6 252 211 172 244 199 40 125 73 102 197 195 218 205 253 231 168 178 121 83 229 65 111 92 117 153 225 244 78 14 149 195 221 46 162 238 165 116 136 134 137 157 101 124 245 233 177 192 228 46 88 126 155 186 49 65 255 0 137 55 144 223 141 89 231 3 231 153 183 247 49 71 108 13 68 44 108 117 252 145 69 228 248 113 213 121 183 188 234 235 207 58 68 67 64 87 180 225 97 0 128 64 32 16 8 4 25 8 50 16 48 80 48 64 193 20 193 3 5 3 4 14 16 48 80 56 64 225 20 193 64 237 64 225 3 133 20 237 64 225 65 64 129 218 129 194 138 160 64 237 80 56 65 64 162 168 212 14 20 20 106 7 106 138 160 65 70 160 112 160 160 69 80 40 28 32 163 84 14 17 84 10 7 106 10 5 3 132 85 26 160 112 130 129 3 133 20 225 3 133 5 2 7 10 41 194 7 8 24 40 28 32 112 138 96 160 112 129 130 6 10 7 8 24 34 152 32 200 80 50 12 160 16 8 4 2 1 0 128 64 32 16 8 4 2 1 0 131 243 29 140 177 221 91 155 105 29 200 226 67 162 144 111 99 198 214 184 44 242 107 134 253 81 203 213 141 116 189 116 125 3 79 231 14 82 221 208 221 81 153 107 64 27 117 31 250 198 141 130 102 246 131 242 151 125 45 19 26 199 219 45 19 19 235 205 76 142 41 243 92 51 33 143 151 212 243 48 138 69 114 60 217 27 254 174 97 242 154 123 120 44 166 62 140 91 141 61 169 153 146 115 236 174 227 245 60 197 190 203 139 55 113 252 120 207 202 97 92 185 49 105 198 57 54 214 218 141 65 164 49 57 175 165 145 166 222 249 163 232 239 34 217 32 166 234 252 225 224 42 83 44 199 15 69 154 234 249 238 115 9 147 196 146 220 180 93 237 165 104 204 156 35 201 240 119 141 249 37 107 183 139 19 252 177 206 147 236 202 50 204 112 183 213 162 188 195 158 65 44 68 62 55 138 177 237 218 8 88 226 243 38 179 211 110 19 11 124 58 198 176 215 139 41 121 233 69 219 62 69 116 104 237 206 173 237 133 177 179 183 239 131 57 231 121 17 219 69 74 243 202 253 140 111 191 189 121 87 180 231 201 211 28 189 127 7 101 99 183 93 101 245 125 45 132 110 31 17 21 187 188 171 169 43 45 220 135 123 165 126 215 109 240 86 129 118 222 218 240 142 81 201 207 88 250 141 87 149 254 236 193 92 220 55 244 239 111 115 110 56 153 101 242 89 240 149 113 87 91 23 157 33 167 196 88 11 12 101 181 166 247 198 192 102 61 178 184 3 33 252 229 218 210 213 106 235 129 222 226 236 107 177 207 146 242 106 124 216 90 4 127 210 43 143 204 188 198 59 125 62 188 219 176 198 182 143 171 128 203 206 100 157 222 234 158 22 61 42 103 182 178 215 46 247 56 64 32 16 8 4 2 1 6 66 6 8 50 20 12 16 48 69 48 64 225 64 193 3 4 14 20 12 17 78 16 56 80 56 64 225 3 133 20 237 64 225 64 225 5 26 160 112 138 112 130 129 64 225 5 26 162 156 32 163 84 14 212 20 10 42 141 64 237 80 81 168 40 20 83 132 20 8 29 170 10 4 85 2 129 218 130 129 64 225 21 70 168 28 32 112 162 168 16 56 64 225 64 225 3 133 20 225 3 132 14 20 14 16 48 69 56 80 48 64 225 2 77 113 20 45 172 142 167 96 226 84 87 134 92 180 167 100 77 12 29 167 105 255 0 34 154 143 51 175 46 156 106 101 119 136 211 226 65 190 182 36 219 196 78 210 88 218 159 18 162 193 65 148 25 64 32 16 8 4 2 1 0 128 64 32 16 8 4 2 1 7 228 200 38 116 79 4 21 233 229 199 22 135 45 109 163 161 179 187 124 206 134 226 218 94 227 35 108 107 111 55 111 107 29 218 210 188 202 94 112 91 73 251 39 252 58 173 17 146 53 143 185 220 97 51 176 101 98 112 44 238 47 161 217 117 106 126 73 221 204 218 239 97 224 189 74 206 177 239 14 89 87 41 137 135 32 216 223 222 58 218 250 223 109 157 244 126 124 103 176 252 230 118 181 93 17 237 192 106 121 164 185 24 140 211 27 109 150 104 250 55 143 209 92 180 124 184 143 198 213 205 147 22 156 99 147 109 111 233 46 137 236 100 140 44 123 67 152 225 71 53 194 160 143 8 43 68 78 140 220 126 91 167 241 181 207 184 193 72 219 73 31 182 75 57 42 235 119 159 0 243 152 125 194 178 201 20 201 26 94 63 63 84 172 205 126 215 45 62 58 250 214 110 238 247 19 114 201 235 65 220 52 76 199 248 90 230 159 141 113 219 192 201 63 101 162 107 187 116 121 21 245 142 46 155 72 233 107 191 91 110 95 45 23 115 36 64 139 11 34 107 221 3 176 189 244 217 206 87 93 49 215 21 122 107 198 103 156 181 90 211 121 214 93 170 131 143 212 114 255 0 120 234 139 28 104 219 109 141 105 189 186 28 59 221 208 52 252 107 171 13 116 174 190 237 87 158 47 104 5 206 3 121 39 227 91 216 56 221 71 112 100 206 100 228 249 22 141 142 202 35 195 201 104 116 159 210 162 242 188 219 235 209 95 126 63 183 252 186 176 71 57 252 156 53 211 185 165 37 122 56 43 165 92 215 158 40 173 204 2 1 0 128 64 32 16 8 25 6 66 6 10 6 8 24 34 152 40 24 32 96 129 194 7 10 6 8 28 34 152 40 40 16 48 80 56 69 80 32 112 160 112 129 194 130 129 20 237 80 80 32 112 138 163 84 14 16 81 170 7 106 10 53 69 56 65 70 168 40 212 83 181 65 64 130 129 64 237 8 170 5 3 181 5 26 129 194 130 129 20 225 65 64 129 218 162 168 16 56 64 237 80 56 64 225 69 56 64 225 3 133 3 4 14 17 76 20 14 16 70 238 233 176 51 102 217 29 230 143 194 84 153 26 153 36 124 142 47 121 230 113 222 74 138 244 91 227 167 148 115 59 232 217 243 157 248 2 10 56 97 32 217 53 199 59 184 208 147 240 48 21 201 147 206 195 78 118 143 215 244 110 175 143 121 229 15 84 89 172 64 13 141 147 128 0 13 109 90 224 54 108 222 66 194 63 178 193 60 58 191 196 254 203 62 46 79 103 186 25 225 153 188 209 72 217 27 218 210 15 196 186 233 146 183 141 107 49 45 86 172 199 56 84 44 216 178 128 64 32 16 8 4 2 1 0 128 64 32 16 8 4 2 15 200 235 216 113 47 109 114 248 158 8 43 70 92 81 104 103 75 232 232 108 238 164 158 72 174 109 165 22 249 24 127 69 55 7 14 44 120 226 210 188 234 101 183 143 58 76 107 79 209 213 53 140 156 99 238 118 248 108 196 121 24 94 28 206 230 246 10 54 234 216 239 105 249 205 237 99 184 21 233 210 241 104 137 142 49 46 91 86 98 116 151 163 35 142 180 200 219 122 189 211 77 26 121 161 153 155 36 137 227 115 216 238 223 6 229 150 158 168 206 31 81 94 99 238 98 196 234 7 130 233 60 155 12 160 217 28 224 124 151 252 217 7 21 207 147 22 188 107 244 108 173 189 221 98 231 108 8 4 9 52 209 65 11 230 149 193 177 198 210 231 184 240 3 105 86 35 89 208 153 113 26 111 189 184 183 184 203 206 41 62 94 94 254 135 123 98 101 99 137 191 154 42 187 226 35 232 231 111 177 241 119 151 76 217 177 190 81 241 44 50 219 74 178 172 113 124 255 0 43 20 158 189 154 133 213 239 89 123 35 220 15 205 145 160 181 222 53 228 249 188 50 214 222 157 46 188 28 105 49 187 142 186 137 236 144 212 47 87 13 226 106 228 189 116 148 22 246 176 128 64 32 16 8 4 25 65 148 25 8 24 40 24 32 96 138 96 160 96 129 194 6 8 28 40 28 34 152 32 112 160 112 129 194 129 194 41 194 7 10 7 106 10 5 3 132 85 26 160 112 130 129 20 237 80 81 168 28 40 40 212 20 10 41 194 10 5 3 132 85 26 160 163 80 59 84 20 106 42 141 80 59 80 80 40 28 34 157 168 40 20 14 16 81 170 41 194 7 10 7 106 10 4 12 20 83 132 14 20 14 16 56 64 193 69 56 65 151 189 172 99 158 237 205 21 40 52 178 200 233 36 47 118 247 44 85 234 183 134 24 32 245 187 159 48 109 96 63 1 43 94 92 181 199 94 171 114 101 74 77 167 72 106 114 57 105 239 30 64 37 144 124 152 193 223 249 75 229 188 207 62 249 167 78 84 246 253 222 190 15 30 41 27 188 43 129 208 16 82 9 230 130 65 36 47 44 120 226 22 120 242 218 147 173 103 73 99 106 197 163 73 117 88 92 200 189 6 41 7 45 195 69 77 55 17 218 23 211 248 30 127 123 248 207 220 242 188 143 31 163 140 114 109 87 164 229 8 4 2 1 0 128 64 32 16 8 4 2 1 0 128 65 249 29 123 14 32 131 209 109 114 248 158 8 43 70 108 49 104 108 165 244 151 73 101 121 113 43 226 188 179 144 51 35 110 41 29 124 217 25 188 196 255 0 1 94 102 44 147 227 219 73 251 39 252 110 234 189 123 145 172 125 206 239 23 145 183 201 88 50 246 223 99 92 121 37 140 249 209 200 60 230 59 240 118 133 235 196 184 212 187 180 180 188 182 125 165 228 66 107 105 60 248 207 104 220 230 158 14 28 10 76 15 46 63 53 121 167 101 142 203 43 35 174 112 210 30 75 60 161 21 124 68 238 142 227 240 57 105 190 46 174 49 205 157 109 163 178 107 154 246 135 52 135 53 194 173 112 218 8 60 66 229 109 101 7 59 174 69 236 248 150 99 44 227 123 164 201 74 216 31 43 1 61 220 126 115 220 105 187 96 162 221 130 35 93 125 152 100 229 162 176 227 38 1 177 67 23 119 11 0 108 96 236 1 163 114 223 57 107 12 58 101 182 180 181 101 188 116 27 92 124 231 46 92 151 234 150 202 215 71 47 171 180 189 236 247 131 47 139 99 101 185 228 17 93 218 56 134 247 204 110 208 90 227 185 225 97 122 87 45 58 45 195 218 89 86 211 89 214 28 13 220 86 50 72 98 184 230 178 185 249 80 220 180 198 65 252 162 57 79 190 185 187 89 177 114 142 168 219 246 109 235 199 125 165 231 118 1 207 111 60 68 72 211 185 204 33 195 224 89 252 249 172 233 104 210 83 227 196 242 121 223 129 184 31 36 173 181 254 194 24 79 141 40 187 15 112 62 73 91 35 206 171 9 241 229 55 99 39 28 10 217 30 101 88 206 25 73 214 115 55 123 86 216 242 43 44 103 28 162 232 220 221 225 109 139 68 176 152 42 201 25 8 50 16 48 80 100 32 96 129 130 41 194 129 130 6 8 28 40 28 32 96 138 112 160 112 129 194 7 10 7 106 41 194 129 194 7 106 10 5 3 181 21 70 168 28 32 112 162 168 212 20 106 129 194 10 53 20 237 80 81 168 40 213 3 181 21 70 168 29 168 40 213 5 2 41 218 160 163 80 56 80 80 34 157 161 5 2 129 194 7 106 138 160 64 225 64 237 64 225 3 133 20 225 3 133 3 132 12 16 56 81 78 16 120 242 114 17 27 35 31 40 212 251 129 73 87 146 210 30 250 118 176 249 187 221 238 5 4 53 5 225 124 226 217 187 35 138 133 222 23 17 248 2 249 191 237 252 153 181 250 35 149 127 87 169 225 98 210 189 94 237 74 241 221 161 0 128 65 72 39 146 9 153 52 102 143 97 168 255 0 160 89 227 201 52 180 90 57 195 27 86 45 26 75 186 180 184 109 197 180 115 183 116 141 14 167 97 226 23 218 97 203 25 41 22 143 87 135 146 157 54 152 120 177 186 155 77 229 46 167 179 198 101 108 239 174 237 127 218 109 237 167 138 89 35 161 161 231 107 28 75 118 246 173 172 23 202 101 241 88 155 71 94 101 47 96 176 180 110 199 92 92 200 200 99 7 194 247 150 132 11 138 205 225 179 22 222 181 137 191 183 200 91 86 157 253 172 172 153 149 236 230 140 184 32 189 229 237 157 149 179 238 175 39 142 218 218 33 89 39 153 237 141 141 29 174 115 136 1 7 142 199 83 105 204 133 180 215 86 25 91 59 187 91 125 183 19 193 113 20 145 198 55 249 110 107 136 111 141 7 166 243 41 140 178 176 118 66 242 238 27 107 6 52 61 247 114 200 214 66 26 237 206 50 56 134 208 215 181 7 134 108 212 57 45 55 121 145 211 121 11 43 167 155 121 141 141 239 122 217 108 196 205 97 228 50 73 25 35 145 174 167 61 56 32 109 43 54 98 125 57 143 155 53 53 173 198 85 240 180 222 77 143 37 214 174 144 239 48 151 109 44 236 64 71 171 116 172 185 35 139 143 51 98 252 152 60 166 197 183 48 153 249 187 59 160 238 122 248 144 115 29 49 214 185 157 75 147 214 118 217 33 8 139 3 156 184 198 88 247 44 44 61 196 62 111 120 75 157 204 239 8 162 139 46 159 41 171 116 174 38 229 150 185 92 205 141 133 204 148 49 193 115 115 20 47 112 59 168 215 185 165 84 108 227 146 57 24 217 35 112 124 111 1 204 123 77 65 7 104 32 132 12 128 65 249 29 123 14 32 128 65 237 199 221 186 25 69 10 227 242 176 197 161 187 21 244 151 99 166 242 141 199 231 33 149 199 251 6 84 136 47 24 124 209 41 253 28 158 254 197 167 196 188 218 157 63 237 79 209 179 53 116 182 190 146 239 46 113 243 68 226 88 11 227 224 70 241 238 174 186 101 137 105 154 232 243 155 99 60 111 129 240 247 208 202 57 101 137 205 171 92 211 192 133 157 166 18 53 91 77 225 47 177 46 154 1 114 100 197 184 7 90 91 73 87 73 9 53 230 111 63 22 118 46 108 183 137 252 91 41 19 13 226 210 204 32 16 8 4 17 185 179 180 186 103 119 115 11 38 103 205 123 67 135 194 173 109 49 201 38 53 105 110 116 30 149 156 243 27 22 198 227 198 34 230 124 69 108 140 246 99 219 135 145 253 56 194 210 144 221 95 91 129 184 71 112 234 15 19 131 130 194 211 89 157 102 181 250 50 141 99 148 202 7 167 101 181 238 179 23 45 175 207 108 114 127 156 22 54 199 138 220 233 31 167 232 177 107 199 171 205 39 79 179 45 53 139 45 20 227 230 205 108 214 252 44 43 15 143 134 99 148 199 230 203 185 127 119 134 231 69 234 88 201 62 173 105 118 209 194 39 186 39 31 115 159 152 41 241 49 233 194 214 137 220 239 91 214 33 206 100 49 162 25 91 5 237 172 184 249 223 178 49 56 29 219 207 99 36 27 10 189 172 180 227 19 213 27 29 84 183 14 82 209 95 89 190 222 66 215 10 16 187 60 124 253 112 209 147 31 76 188 161 117 53 50 16 48 80 48 64 193 20 193 3 5 3 4 14 16 48 80 56 64 225 20 193 64 225 3 132 14 20 83 181 5 2 129 194 7 106 7 10 42 141 64 237 80 81 168 28 40 170 53 3 133 5 26 130 129 69 56 65 70 160 118 168 40 17 84 106 129 194 10 53 65 64 138 112 160 118 160 160 80 80 34 157 170 10 4 14 17 78 20 14 16 56 80 80 32 112 162 156 32 112 129 194 129 130 7 8 167 10 6 8 53 185 35 91 128 59 26 62 50 177 149 83 18 223 164 145 221 128 15 124 255 0 34 64 231 174 159 207 115 43 254 115 220 118 239 218 87 196 103 183 85 237 59 203 222 199 26 86 33 37 169 152 64 32 16 8 61 58 131 27 157 204 244 195 63 139 193 201 221 101 174 45 167 130 201 193 220 132 185 204 7 144 63 103 41 125 75 121 184 85 125 63 245 22 153 195 167 180 203 202 243 35 75 254 79 155 244 186 215 165 147 106 93 55 100 113 119 122 43 168 88 24 92 199 227 95 24 182 245 250 194 89 41 123 220 199 11 134 184 115 60 109 14 247 64 94 163 146 90 38 106 205 19 169 250 133 168 178 253 66 179 200 101 224 196 95 77 141 192 97 224 179 158 238 198 8 96 113 99 165 145 177 53 205 50 200 91 82 29 241 114 208 170 222 106 45 21 130 214 24 61 65 211 92 54 79 27 117 45 228 86 121 252 107 113 215 86 214 83 227 229 36 72 242 199 48 49 178 70 121 75 121 125 212 29 149 254 6 207 169 189 97 206 226 117 19 159 46 154 209 17 89 182 223 16 215 185 145 92 93 223 68 101 51 77 202 65 60 141 28 163 254 245 72 241 245 175 162 154 58 207 65 230 115 186 102 208 96 50 56 251 41 31 56 177 115 160 134 234 213 160 58 88 39 141 167 149 192 181 181 27 55 239 73 130 36 221 66 195 100 238 116 103 78 50 163 15 46 163 211 120 88 237 238 51 216 11 118 137 31 52 110 179 99 34 148 66 118 75 220 158 99 203 225 236 169 2 6 14 62 152 207 211 158 163 229 180 28 243 67 6 67 25 116 114 120 25 0 134 59 41 217 103 43 124 139 98 214 186 46 243 109 104 226 211 74 55 205 160 13 60 249 124 185 232 247 75 244 110 42 237 248 217 53 128 130 198 235 33 22 201 34 181 107 65 152 70 118 81 207 231 3 220 168 226 131 232 67 255 0 206 253 34 24 33 136 254 225 139 99 57 70 70 167 215 121 233 250 78 255 0 206 230 174 223 155 224 166 196 208 213 243 110 154 228 175 52 7 79 186 173 113 4 174 188 189 192 229 238 173 237 238 101 242 157 36 172 107 96 138 89 59 124 162 28 228 87 143 69 207 209 8 48 16 207 169 240 57 76 254 163 200 198 219 140 206 78 251 23 121 116 247 220 74 208 100 238 164 44 32 52 56 209 174 102 253 245 65 214 116 47 47 111 105 173 51 186 99 3 30 75 238 83 237 155 145 195 179 37 4 240 250 164 194 64 203 139 120 204 205 7 145 221 224 115 69 120 118 212 164 36 190 226 170 4 31 145 215 176 226 8 4 13 29 121 197 22 55 228 176 223 74 75 112 210 61 196 131 25 99 216 70 254 96 118 81 121 94 60 255 0 223 195 217 215 150 63 235 125 194 7 61 208 70 231 138 60 181 165 195 176 145 181 109 183 54 16 162 138 16 8 4 18 185 146 72 237 229 146 54 119 146 49 142 115 35 173 57 156 5 64 175 133 90 198 178 146 229 126 246 106 174 24 0 63 105 142 135 199 77 158 53 209 216 143 118 190 185 99 239 94 172 173 127 184 27 78 195 114 192 71 193 229 120 149 236 87 220 235 150 62 244 234 234 127 244 81 248 15 172 55 225 109 42 19 177 95 115 174 71 222 141 97 93 152 56 129 226 13 211 41 226 117 40 157 154 238 117 200 251 207 172 127 220 176 211 255 0 114 208 71 139 143 137 59 53 220 235 150 14 166 214 127 238 107 112 120 31 89 4 31 131 201 241 167 102 187 157 114 207 222 93 105 93 152 123 111 8 55 45 248 13 40 83 179 93 206 185 99 239 30 181 255 0 116 219 83 129 245 141 190 54 210 169 217 174 231 92 188 249 60 174 106 235 29 115 30 119 25 107 30 48 69 35 167 145 179 119 142 105 12 37 133 128 15 56 190 128 44 171 142 34 120 106 147 105 158 111 159 101 43 234 150 221 225 230 151 185 103 57 59 201 229 27 215 31 143 255 0 233 109 57 107 45 217 126 216 252 26 117 233 57 76 168 96 160 200 64 193 20 193 16 225 69 48 64 193 3 133 3 132 83 4 14 20 14 16 56 64 225 69 59 80 56 80 56 65 64 160 112 138 112 130 129 64 225 5 26 162 168 212 14 20 14 212 20 106 138 163 80 59 84 20 106 10 53 69 81 168 29 168 40 213 3 132 85 2 129 218 130 129 64 225 21 70 168 28 32 160 81 78 16 56 64 225 64 225 3 133 20 225 3 132 14 20 14 16 48 69 56 80 48 65 173 201 182 151 0 246 180 124 101 99 42 166 33 223 73 35 123 64 62 241 254 84 129 160 191 136 197 123 51 8 2 143 36 1 186 132 212 124 11 226 252 170 77 114 218 39 221 238 225 182 180 137 65 115 182 4 2 1 0 131 97 153 196 106 155 190 159 223 91 233 139 243 139 212 19 14 251 31 116 67 8 231 99 154 67 29 222 53 237 229 145 172 229 173 54 86 171 234 191 170 199 53 195 27 241 121 30 93 181 201 248 56 150 227 186 149 175 53 118 147 186 212 58 89 154 98 219 75 92 250 245 238 65 247 49 79 37 196 205 109 4 54 205 136 151 8 222 241 87 115 26 83 141 70 223 69 204 244 228 180 215 81 52 6 173 203 103 180 54 54 45 69 167 117 4 198 243 41 167 93 51 109 167 134 241 223 164 158 9 31 228 210 77 238 27 123 41 176 20 27 45 51 121 214 109 77 169 237 50 25 187 22 232 205 47 98 28 249 49 76 150 11 203 187 233 78 198 182 73 57 15 119 27 119 158 94 87 112 219 90 180 37 172 244 158 186 193 107 121 53 230 129 183 131 35 46 66 8 237 181 30 159 158 65 7 173 136 5 33 154 41 93 228 182 70 55 201 218 125 250 144 131 153 215 163 175 125 67 210 151 248 139 109 47 14 150 177 49 23 92 193 113 125 21 197 213 241 110 209 111 17 96 107 35 107 142 242 250 87 182 149 168 117 121 155 110 168 224 49 154 67 33 167 109 142 78 12 93 147 45 53 14 151 18 65 27 166 61 195 90 217 34 153 224 142 120 158 211 185 219 118 111 65 164 195 104 157 107 149 135 168 250 155 41 136 143 11 146 213 184 199 99 241 152 22 205 28 143 172 118 210 70 217 39 149 180 143 158 71 60 123 155 106 131 214 122 75 154 202 244 123 74 225 223 47 247 54 178 211 81 219 221 99 110 11 154 246 195 121 0 243 36 116 101 224 177 219 137 109 120 29 180 161 104 106 204 90 215 255 0 208 78 128 98 93 160 109 153 150 167 118 115 174 200 195 234 1 219 187 227 11 65 146 156 121 67 171 241 32 135 74 122 91 168 237 244 206 184 192 235 168 219 35 245 29 253 195 229 187 141 236 120 184 108 241 6 190 226 62 83 86 85 245 115 67 154 8 236 72 38 82 195 230 58 241 162 113 241 105 185 180 156 90 198 222 201 162 12 102 110 214 246 43 66 248 24 41 16 158 57 3 143 51 91 64 78 207 116 249 196 59 126 155 216 117 29 150 247 217 61 117 127 19 239 178 18 7 218 225 109 91 31 171 216 68 218 253 27 100 107 121 164 123 171 229 18 231 13 155 14 245 73 118 72 129 7 228 117 236 56 130 12 129 85 38 70 207 25 141 146 105 6 197 231 249 126 84 86 29 56 113 107 46 175 79 224 14 110 253 144 52 127 241 22 79 14 188 155 132 178 180 236 137 135 136 28 74 215 226 210 113 214 111 111 186 220 191 6 89 173 213 61 49 202 31 84 170 201 24 46 0 18 77 0 218 73 77 6 142 211 87 88 94 100 165 181 181 99 230 182 128 30 242 249 191 162 239 1 253 27 79 202 62 226 221 216 157 24 119 35 86 222 222 238 41 193 44 59 70 240 119 173 119 164 215 155 40 180 74 213 88 168 65 163 189 182 48 76 104 62 141 219 90 127 2 237 199 126 168 105 181 116 151 158 171 99 17 84 5 80 21 64 205 138 87 10 181 132 129 188 211 98 147 104 52 37 204 246 118 162 183 151 80 91 83 120 150 70 131 239 86 170 117 123 46 141 76 250 195 6 211 201 98 217 178 147 112 16 179 146 47 28 143 160 162 215 147 47 76 107 105 138 178 173 117 229 197 206 229 243 55 151 197 174 201 24 227 182 136 243 67 142 132 213 156 195 115 165 113 243 200 224 184 114 249 51 127 227 143 95 199 246 111 174 46 158 54 250 57 124 141 227 174 38 46 38 181 43 171 198 195 209 13 57 111 172 188 107 177 165 144 129 130 129 130 6 8 166 10 6 8 24 32 112 129 194 129 130 41 194 6 10 10 4 14 20 12 17 84 8 28 40 28 32 112 160 160 69 59 84 20 8 28 34 168 213 3 181 5 2 129 218 130 129 69 59 80 80 40 40 212 83 181 65 70 160 160 80 59 66 10 53 20 225 65 70 160 160 81 78 16 80 40 28 32 112 162 168 16 56 64 225 64 225 3 133 20 225 3 132 14 20 12 16 56 69 56 80 48 65 228 201 197 205 19 100 31 32 208 251 133 73 87 134 214 110 230 118 201 242 70 199 123 135 122 129 245 5 135 120 209 121 16 230 160 164 148 219 228 240 114 240 255 0 183 241 53 142 229 127 63 221 223 225 102 211 248 203 64 190 125 233 4 2 1 7 171 27 99 37 237 211 97 111 155 190 71 110 163 120 174 159 23 199 156 215 138 199 230 213 155 44 82 186 187 120 216 198 48 49 128 6 176 80 1 194 158 226 251 26 214 43 26 71 39 137 51 172 234 101 146 4 2 1 0 128 240 32 16 8 4 2 1 0 128 64 32 252 142 189 135 19 32 18 84 153 27 60 118 53 210 184 18 54 111 36 238 1 121 254 79 147 167 8 116 226 197 175 55 83 131 193 205 151 121 130 217 198 28 100 103 150 234 245 187 29 33 27 227 132 246 118 185 105 193 131 79 231 147 159 164 127 204 255 0 231 254 182 100 201 254 181 229 238 250 69 141 181 157 141 172 118 182 145 182 40 34 28 172 99 119 0 183 90 102 103 89 107 136 209 139 252 173 150 62 217 247 87 147 54 24 24 42 231 184 252 3 180 165 105 51 200 155 104 228 47 47 114 154 148 253 39 62 63 4 79 147 15 155 61 200 237 127 204 97 236 93 120 241 197 127 22 155 91 86 202 6 65 111 11 32 129 141 138 24 197 25 27 69 0 11 98 61 150 23 28 151 76 219 177 222 73 241 173 121 107 173 89 82 120 179 156 205 221 99 239 241 77 104 97 179 188 159 213 238 28 65 230 14 115 124 138 26 241 43 70 58 68 196 251 179 181 180 152 110 59 208 181 51 44 134 57 26 90 240 28 211 193 88 153 142 73 60 90 172 147 177 56 235 119 93 94 92 119 16 55 139 142 243 216 56 146 183 215 37 167 132 67 9 172 67 156 155 88 91 58 167 31 140 158 118 13 211 92 60 64 195 238 3 229 17 226 88 223 201 165 120 90 209 249 113 90 226 153 229 15 4 218 171 54 225 228 71 99 106 59 15 121 51 135 191 228 215 224 90 167 206 166 188 34 210 203 177 109 158 57 117 14 89 199 233 51 15 107 120 139 120 163 135 222 62 81 90 167 203 188 199 10 125 103 86 125 152 142 114 240 79 145 134 66 77 197 221 221 215 226 203 59 249 125 230 114 251 202 119 179 207 45 43 248 71 239 169 209 142 55 121 125 123 23 8 164 86 177 3 243 156 222 119 123 238 169 83 181 154 211 172 218 127 79 209 122 233 28 162 18 184 207 78 241 64 227 78 0 110 89 227 240 35 213 141 188 137 107 102 186 146 67 180 174 236 120 34 174 123 100 153 71 122 220 193 144 168 200 64 193 64 193 3 4 83 5 3 132 12 16 48 64 225 64 225 20 193 3 133 3 132 14 20 14 17 78 16 56 80 80 32 112 160 112 138 163 84 14 16 81 170 41 218 130 129 3 133 5 26 130 141 81 78 16 80 40 40 212 83 181 65 70 160 112 160 163 80 80 40 167 106 10 4 14 20 85 26 129 194 129 194 10 53 69 56 64 225 65 70 160 112 129 194 138 112 129 194 129 130 7 8 24 40 167 8 24 32 203 152 215 176 177 222 107 133 10 131 231 154 251 84 187 78 66 45 98 97 126 70 225 164 192 226 15 35 91 187 188 174 231 120 27 239 173 184 112 245 79 30 76 50 95 70 163 167 29 77 101 179 70 39 61 53 32 53 54 247 178 31 54 187 75 100 39 135 133 111 205 131 94 48 195 30 79 119 208 111 240 34 95 237 24 242 215 70 241 204 24 8 161 7 109 88 119 81 124 167 153 253 76 235 213 143 233 251 61 124 30 100 105 165 190 173 60 246 183 48 56 137 162 115 8 217 180 108 247 215 141 147 5 233 58 90 38 29 213 201 91 114 148 218 199 189 193 173 105 115 142 224 5 74 215 21 153 157 33 148 206 141 141 158 3 33 112 65 115 59 152 206 222 103 236 52 252 157 235 191 7 245 153 111 206 58 99 127 217 207 147 202 165 119 150 117 62 171 193 232 188 107 154 202 79 146 148 30 226 218 190 91 157 193 210 17 230 180 127 212 190 163 193 240 43 72 210 191 156 188 159 35 200 155 78 178 249 230 137 234 189 221 134 86 233 217 215 186 123 59 249 12 210 202 208 73 138 74 6 213 173 31 38 141 2 129 122 121 112 68 199 7 45 50 105 60 95 109 178 189 180 190 181 142 238 210 86 207 111 51 67 163 149 134 173 32 174 25 137 142 109 241 58 172 162 132 2 13 78 164 213 56 109 61 101 235 89 25 131 43 178 40 134 215 189 221 141 104 219 227 89 210 147 105 224 198 214 136 124 103 25 213 92 188 90 198 76 189 211 203 177 247 39 186 150 208 15 37 176 52 158 239 148 87 99 155 90 215 142 213 219 108 17 211 167 171 68 100 157 117 125 187 11 156 197 230 172 89 123 142 157 179 192 241 195 99 154 126 107 154 118 180 174 27 86 107 58 75 162 38 37 238 88 168 64 32 241 102 51 56 220 61 132 151 249 25 132 22 209 10 185 199 105 39 131 90 6 215 19 192 5 149 107 51 58 66 76 232 248 166 119 171 121 121 245 52 57 12 104 238 236 108 201 108 54 239 255 0 74 199 121 252 253 156 212 225 185 118 215 199 142 157 37 207 57 39 87 216 244 198 163 178 212 56 136 178 118 141 123 35 146 173 123 30 40 90 246 249 205 174 227 67 196 46 59 210 107 58 75 125 109 172 54 171 6 79 201 0 84 175 94 101 196 217 99 236 123 195 204 234 6 141 174 113 216 0 29 171 131 200 207 233 14 140 120 253 221 30 27 16 114 196 2 76 56 134 31 41 219 159 112 71 1 216 197 48 224 232 254 86 227 127 209 111 147 171 132 114 119 182 243 65 111 11 32 129 173 142 24 192 107 24 209 64 0 236 89 79 20 135 139 49 170 109 113 172 107 118 207 119 46 200 45 99 218 247 31 192 60 43 58 99 213 140 219 70 129 144 220 223 92 182 255 0 52 241 44 237 53 183 180 110 216 97 241 124 167 120 87 77 98 35 132 53 204 234 217 250 216 237 85 7 173 14 212 12 203 186 61 166 187 136 73 142 11 3 88 159 89 192 78 88 126 154 216 182 226 35 248 209 56 59 226 92 216 184 89 178 252 155 91 44 171 46 108 224 184 105 217 43 26 255 0 206 21 88 90 186 74 196 240 91 215 135 106 154 46 174 27 83 100 61 103 63 33 121 14 139 29 19 68 77 59 64 150 95 40 184 13 213 0 45 94 84 204 82 43 31 237 250 51 197 247 76 207 163 152 190 203 74 231 144 28 74 120 254 28 105 196 201 158 94 7 94 76 238 43 182 60 122 195 68 228 148 204 210 30 43 56 199 12 122 164 165 238 60 86 93 48 154 177 82 174 136 194 160 65 144 131 33 3 5 3 4 12 16 48 69 48 80 48 64 193 3 132 14 20 12 17 78 20 14 16 56 64 225 69 59 80 56 80 56 64 237 65 64 160 112 138 163 84 14 212 14 213 21 64 130 129 64 237 65 70 160 118 168 170 53 5 26 160 112 138 163 84 20 106 7 106 130 141 69 59 84 20 106 10 5 3 132 83 181 5 2 129 194 10 53 69 56 64 225 64 225 3 132 14 20 83 132 14 20 14 16 48 69 56 80 56 64 193 3 5 6 167 84 105 108 110 163 198 186 206 241 180 112 242 160 157 190 124 111 237 31 132 44 233 121 172 235 9 106 234 248 14 166 210 89 157 59 118 96 191 139 232 156 226 32 186 110 216 228 3 109 90 120 26 112 59 87 161 76 145 104 224 229 181 102 30 205 49 212 29 71 167 128 138 214 97 61 165 65 54 179 213 236 0 111 12 218 11 43 224 82 248 107 101 173 230 29 221 143 94 44 203 63 183 98 100 99 235 180 193 35 94 8 237 242 195 40 185 231 197 159 73 109 140 207 83 250 239 129 13 250 60 109 219 157 216 227 19 71 192 231 41 241 103 220 239 67 154 205 117 183 80 222 196 98 199 91 69 141 107 129 14 144 56 205 46 221 197 174 33 141 31 154 182 215 198 172 115 226 198 114 203 129 145 247 217 11 215 61 221 229 213 229 195 170 104 11 228 123 143 128 84 149 209 194 33 171 155 111 158 208 250 147 5 101 5 238 70 215 187 130 112 60 166 158 110 236 157 205 146 155 26 229 133 50 214 211 164 50 154 76 39 167 181 142 161 211 242 243 99 110 156 200 143 159 108 255 0 46 23 111 222 195 187 127 10 37 241 197 185 165 109 48 250 21 135 94 134 198 228 49 6 148 219 37 188 181 36 254 67 218 63 206 92 243 226 251 75 108 102 108 29 215 141 63 203 228 227 111 11 187 15 116 7 190 30 126 37 143 197 159 117 239 67 71 150 235 174 86 102 62 60 102 62 59 66 118 50 105 94 102 117 43 191 151 149 141 6 158 234 206 190 44 122 203 25 205 62 143 157 100 50 89 44 181 243 174 175 166 125 213 228 180 105 123 182 184 240 13 0 124 65 116 197 98 35 131 84 206 173 189 206 128 213 118 248 72 243 18 216 191 213 100 161 49 128 76 205 105 220 247 199 74 134 149 132 101 172 206 154 178 232 157 53 107 112 153 252 190 18 243 214 241 151 14 183 148 208 62 155 90 246 131 94 87 52 236 33 101 106 69 163 73 72 180 199 39 209 49 93 119 189 141 140 102 87 24 201 220 43 207 61 187 204 103 193 244 110 15 31 210 92 246 241 99 210 91 99 55 187 113 255 0 247 141 61 203 255 0 215 94 115 118 125 21 61 254 127 192 176 248 179 238 189 232 106 178 93 121 185 115 94 204 110 41 177 18 41 28 215 18 243 144 105 188 198 214 142 63 140 178 175 139 239 41 57 159 58 206 106 76 222 114 228 220 100 238 223 112 234 249 12 59 35 102 253 141 96 242 70 245 211 90 69 121 53 77 166 121 186 141 5 211 27 221 64 99 190 190 46 181 196 212 16 105 71 204 222 198 87 112 63 57 106 203 158 43 194 57 179 166 61 95 120 178 178 181 177 180 138 210 210 38 195 109 3 67 34 141 162 128 0 184 38 117 157 101 209 17 162 202 43 242 141 164 60 206 219 187 137 43 191 53 253 33 207 74 183 120 235 102 222 184 7 85 184 248 207 149 192 204 225 195 242 66 195 30 30 159 229 63 119 232 182 190 188 35 147 168 101 243 88 208 198 81 173 104 163 90 54 0 2 202 97 53 107 175 181 52 238 113 181 199 209 243 238 124 199 204 143 221 237 43 58 227 247 99 54 121 172 196 118 206 124 206 113 154 234 79 210 220 191 107 143 128 118 15 2 220 197 234 245 227 74 215 96 222 107 177 7 146 93 65 108 210 91 25 117 195 198 246 196 42 60 110 59 22 51 58 115 88 141 74 205 66 192 230 137 224 124 13 118 198 202 92 215 182 191 140 6 208 177 173 226 103 132 172 214 97 238 23 198 160 85 102 197 177 146 253 178 70 232 221 181 175 5 174 30 2 40 185 226 27 26 221 57 145 116 88 225 106 227 229 90 189 241 120 129 217 240 21 158 74 241 74 203 100 114 71 181 97 210 186 184 251 251 158 105 239 164 175 149 36 228 19 224 107 64 11 94 106 235 104 252 25 82 116 137 104 164 53 113 43 178 177 193 166 74 178 64 128 64 32 16 8 50 16 48 65 144 160 96 129 130 41 130 33 130 138 112 129 130 6 10 7 8 167 8 24 40 28 32 112 129 194 138 118 160 160 80 56 64 237 65 64 162 157 168 29 170 10 4 14 213 21 70 160 118 168 40 212 20 106 138 118 160 163 80 56 80 81 168 170 5 3 132 20 106 130 129 20 237 80 81 168 28 40 40 17 78 213 5 2 7 8 167 10 7 8 40 20 14 16 56 81 78 16 56 64 225 64 193 3 132 83 133 3 4 12 16 48 80 56 65 43 219 11 59 235 103 218 222 66 201 237 228 20 124 111 21 5 88 153 142 68 195 231 249 238 137 225 174 220 249 177 55 47 176 145 219 68 47 29 236 53 173 118 110 112 247 215 69 60 153 142 109 86 197 30 142 58 251 163 58 210 220 188 192 203 123 198 131 228 119 82 134 185 194 189 146 134 1 239 173 209 228 213 132 226 151 154 223 164 122 242 103 242 190 193 176 10 87 158 73 225 167 185 228 57 231 224 86 124 138 123 167 110 206 139 19 208 156 131 220 199 229 178 49 194 205 189 228 86 205 50 59 193 71 191 148 15 205 43 93 188 168 244 134 113 135 221 244 141 57 162 52 230 158 4 227 173 121 102 119 159 113 33 50 72 120 111 118 239 21 23 53 242 218 220 219 107 72 134 238 88 162 154 55 69 43 27 36 111 20 115 28 1 105 29 132 21 173 147 129 212 29 24 211 89 7 58 108 115 159 139 156 131 228 198 57 225 38 155 62 140 238 254 105 11 162 158 77 163 159 22 171 98 137 113 23 189 18 213 208 200 225 109 37 173 212 95 37 193 238 141 199 221 107 155 65 249 203 124 121 53 107 156 82 214 195 210 93 125 36 129 142 198 136 129 223 35 231 131 148 126 107 220 126 5 151 200 167 186 118 236 222 98 250 25 158 153 224 228 175 109 237 34 168 171 98 230 153 228 113 222 24 209 239 149 133 188 168 244 101 24 101 244 61 57 211 77 43 131 115 38 138 219 214 111 89 74 93 92 30 119 2 5 42 214 159 37 190 32 185 175 154 214 109 174 56 135 84 64 32 130 42 14 194 10 212 205 198 106 30 147 233 76 187 159 52 80 156 125 219 246 153 173 246 52 146 106 73 140 249 27 125 197 190 153 237 27 181 219 28 75 128 200 116 59 83 195 39 246 43 171 107 200 169 189 197 208 190 191 146 67 219 253 37 209 30 85 125 90 231 12 180 239 233 62 191 107 220 209 139 230 0 208 60 79 111 67 225 21 144 21 159 126 158 236 123 118 109 241 253 15 213 19 63 251 101 205 181 164 84 222 28 233 95 95 201 1 163 250 75 9 242 171 232 177 138 93 238 157 233 30 150 196 61 179 206 199 100 110 154 121 154 251 138 114 52 138 17 203 24 242 120 113 170 231 191 145 105 217 182 184 226 29 179 90 214 180 53 160 6 141 128 13 128 5 161 176 32 16 126 86 132 115 145 8 52 7 108 174 31 55 179 198 189 26 215 142 178 230 153 244 109 197 235 34 140 52 81 145 176 80 14 0 5 150 154 177 213 228 151 35 61 213 88 199 24 160 59 28 241 231 59 220 236 11 56 174 137 50 104 166 100 76 12 140 114 180 112 31 133 84 36 153 48 211 202 193 222 63 176 110 30 233 73 149 121 102 186 116 159 167 127 56 225 19 118 48 127 149 106 155 76 242 101 164 122 162 110 136 28 172 28 173 236 27 20 237 235 205 122 180 228 104 238 171 86 187 107 93 176 131 196 44 103 22 156 97 98 250 189 214 23 133 191 64 231 87 187 219 27 143 22 118 120 150 216 157 97 135 171 97 235 222 21 52 93 94 56 46 140 87 243 128 124 153 128 144 123 163 97 89 76 112 71 175 215 143 106 199 69 213 165 158 90 153 255 0 26 87 31 124 5 141 171 252 161 98 120 60 39 122 221 13 114 194 160 64 32 16 8 4 25 64 193 3 5 6 66 6 8 167 8 24 40 24 32 96 129 194 129 194 6 8 167 10 7 8 28 40 28 34 157 168 28 40 28 32 160 80 56 69 56 65 64 160 112 130 141 81 84 8 29 170 10 53 3 133 21 70 160 163 80 59 84 20 106 138 163 80 56 65 70 168 28 34 168 20 14 212 20 10 7 8 170 5 3 132 14 20 85 2 7 8 28 40 40 16 56 81 76 16 56 64 225 64 225 3 4 83 133 3 132 12 16 48 80 48 64 193 20 193 3 5 6 66 12 160 16 8 4 2 1 0 128 64 32 16 8 4 2 1 0 128 64 32 252 183 247 75 171 144 190 94 93 35 206 57 200 107 253 113 163 152 3 64 105 221 174 191 149 179 79 107 114 59 72 245 134 67 89 52 126 193 185 158 186 218 120 254 141 62 86 199 103 118 78 149 234 248 221 163 137 61 130 241 190 137 95 151 177 217 221 39 233 46 179 59 248 59 103 205 23 173 31 250 73 242 246 59 59 147 238 135 89 233 65 163 0 29 130 245 190 137 99 242 118 59 91 148 232 222 178 159 224 207 174 183 209 43 242 182 59 91 143 185 157 101 246 51 235 173 244 74 252 189 142 206 224 104 206 178 143 224 207 174 183 209 41 242 182 59 59 168 205 37 214 86 185 174 58 54 156 188 125 117 187 191 242 146 60 157 142 214 239 95 221 110 176 123 31 245 214 250 36 249 59 29 173 211 147 74 117 131 188 99 254 231 238 216 127 182 55 113 253 82 124 173 142 214 234 125 214 235 7 177 255 0 92 111 162 79 147 177 218 221 229 151 72 245 140 185 220 186 54 181 53 255 0 109 111 162 79 147 177 218 221 47 185 157 101 246 51 235 173 244 74 252 189 142 206 227 238 103 89 125 140 250 235 125 18 124 189 147 179 184 251 153 214 95 99 62 186 223 68 159 47 99 179 184 251 153 214 95 99 62 186 223 68 159 47 99 179 184 251 153 214 95 99 62 186 223 68 159 47 99 179 184 251 153 214 95 99 62 186 223 68 159 47 99 179 184 251 153 214 95 99 62 186 223 68 159 47 99 179 184 251 155 214 95 99 62 188 223 68 159 47 101 236 238 207 220 222 178 251 23 245 230 250 36 249 123 39 103 118 126 231 245 151 216 191 175 55 209 39 202 217 123 59 179 247 67 172 190 197 253 121 190 137 62 86 199 103 118 126 232 245 147 216 175 175 55 209 41 242 182 59 59 179 247 79 172 190 197 125 121 190 137 62 86 199 103 118 126 234 117 151 216 175 175 55 209 39 202 216 236 238 207 221 110 178 251 19 245 230 250 36 249 91 29 173 217 26 95 172 190 196 253 121 190 133 62 86 199 107 115 13 51 214 95 98 126 190 223 66 159 43 99 181 187 35 77 245 151 216 143 175 183 208 169 242 118 59 91 178 52 239 89 125 136 250 251 125 10 124 157 142 214 230 26 127 172 190 195 253 125 190 133 62 78 203 218 221 145 129 235 47 176 255 0 95 111 161 79 147 177 218 220 195 7 214 95 97 190 190 223 66 159 39 99 180 200 194 245 147 216 111 180 27 232 83 228 236 118 140 48 253 100 31 192 191 104 55 208 169 242 54 59 76 140 79 89 125 133 251 65 190 133 62 70 199 104 195 23 214 95 97 62 208 111 160 79 145 177 219 48 199 117 151 216 79 180 27 232 19 228 108 118 217 22 29 101 31 192 127 104 183 208 41 242 54 59 102 22 93 101 31 192 127 104 183 208 39 127 99 182 97 105 214 65 252 5 246 139 125 2 119 246 94 219 34 223 172 163 248 11 237 22 250 4 239 236 118 204 33 235 40 254 1 251 69 190 129 59 251 29 179 6 117 151 216 31 180 155 232 20 239 236 118 204 7 89 71 240 7 218 77 244 9 222 216 237 178 29 214 81 254 31 253 164 223 221 211 189 177 208 97 39 89 71 248 127 246 147 127 119 78 246 199 65 132 221 100 31 225 247 218 77 253 221 78 246 203 208 97 115 214 81 254 31 125 166 223 221 211 189 177 208 97 119 214 65 254 30 253 166 223 221 211 187 177 208 102 222 245 143 254 94 253 166 223 221 211 187 177 208 163 111 186 195 255 0 47 190 210 111 238 234 119 78 131 139 254 175 255 0 203 255 0 180 155 251 186 119 78 133 27 144 234 239 29 3 246 147 127 119 78 233 208 163 114 29 90 227 160 169 255 0 17 111 238 233 220 58 84 110 71 170 252 116 37 63 226 45 244 9 220 94 149 91 145 234 175 29 13 246 131 125 2 157 195 165 70 228 122 163 199 68 83 254 32 223 64 157 195 165 86 228 122 157 199 69 83 246 246 250 4 238 29 42 55 35 212 190 58 50 159 183 183 208 167 89 210 171 114 29 71 227 163 169 251 115 125 10 157 103 74 173 200 117 15 142 145 167 237 173 244 41 214 116 170 220 135 80 56 233 58 126 218 223 66 157 102 138 54 255 0 94 113 210 212 253 176 122 36 235 93 21 109 246 184 227 166 41 251 88 244 73 212 104 171 111 181 167 29 55 79 218 135 162 83 168 209 86 222 235 14 58 122 159 181 15 70 157 70 138 54 243 86 113 192 83 246 145 232 211 168 209 86 221 234 158 56 58 126 208 61 26 117 26 42 219 173 75 199 13 79 215 143 234 38 166 138 54 231 80 241 196 83 245 227 250 137 169 162 173 184 206 241 197 211 245 195 250 138 106 104 163 110 51 92 113 180 253 104 254 170 106 40 217 242 220 113 244 253 104 254 170 106 170 54 108 159 27 42 126 179 254 202 106 40 217 114 28 109 41 252 255 0 228 77 69 27 37 239 27 106 127 63 249 16 56 125 215 24 41 252 239 228 80 56 125 199 24 191 165 252 136 28 58 95 245 127 10 6 5 255 0 55 225 64 192 158 196 25 64 32 16 8 4 2 1 0 128 64 32 16 8 4 2 1 0 131 28 80 8 50 16 8 4 2 1 0 128 64 13 200 3 185 0 128 226 128 64 32 16 8 4 2 1 0 128 64 32 16 8 4 2 1 0 128 64 32 16 8 4 2 1 0 128 64 32 16 8 4 2 1 0 128 64 32 16 8 4 2 1 0 128 64 32 16 8 4 2 1 0 128 64 32 16 8 4 2 1 0 128 64 32 16 8 4 2 1 0 128 64 32 16 8 4 2 1 0 128 64 32 16 8 4 2 1 0 128 64 32 16 8 4 2 1 7 255 217) asByteArray ]. ^ xxxCache at: 1
</methods> <methods> Seaside.WADispatcherFiles <category>accessing</category>
selectorsToInclude ^#( netStyleCss libraryEditorCss )
</methods> <methods> Seaside.WADispatcherFiles <category>accessing-styles</category>
netStyleCss ^' /* The MIT License * * Copyright (c) 2003 Lukas Renggli * Copyright (c) 2003 Software Composition Group, University of Berne * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is furnished * to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, /* -- basic -- */ html, body, div { margin: 0; } img { border: 0px none white; } body { background-image: url(top.jpg); background-repeat: no-repeat; color: #222222; font-size: 90%; font-family: Verdana, Arial, Helvetica, sans-serif; padding-top: 100px; margin: 2em; } a, a:link, a:active, a:visited, a:focus, a:hover { color: #65769A; } a, a:link, a:visited { text-decoration: none; } a:active, a:focus, a:hover { text-decoration: underline; } h1 { color: #F5AE17; font-size: 120%; font-family: Verdana, Arial, Helvetica, sans-serif; } h2 { color: #F5AE17; font-size: 110%; font-family: Verdana, Arial, Helvetica, sans-serif; } pre { background-color: #eeeeff; border: 1px dashed #65769A; padding: 1em; } div.version { font-size: 70%; } '
</methods> <methods> Seaside.WADispatcherFiles <category>accessing-styles</category>
libraryEditorCss ^' .saveButton { margin: 0 1em 0 0; width: 12px; } '
</methods> <methods> Seaside.WADispatcherTest <category>changing</category>
update: anAspectSymbol lastUpdate := defaultDispatcher lastUpdate
</methods> <methods> Seaside.WADispatcherTest <category>testing</category>
testAlternateFiles | app originalApp | app := alternateDispatcher entryPointAt: 'files'. originalApp := defaultDispatcher entryPointAt: 'files'. self assert: app class == WAFileHandler. self deny: app isApplication. self deny: app isDispatcher. self deny: app parent isNil. self assert: app name = 'files'. self assert: app basePath = ('/' , alternateDispatcher name , '/files'). self deny: app == originalApp. self deny: app libraries == originalApp libraries. self assert: app name = originalApp name. self assert: app parent == alternateDispatcher. self assert: originalApp parent == defaultDispatcher.
</methods> <methods> Seaside.WADispatcherTest <category>testing</category>
testDefaultConfig | app | app := defaultDispatcher entryPointAt: 'config'. self assert: app class == WAApplication. self assert: app isApplication. self deny: app isDispatcher. self deny: app parent isNil. self assert: app name = 'config'. self assert: app basePath = ('/' , baseName , '/config').
</methods> <methods> Seaside.WADispatcherTest <category>testing</category>
testAlternateConfig | app originalApp | app := alternateDispatcher entryPointAt: 'config'. originalApp := defaultDispatcher entryPointAt: 'config'. self assert: app class == WAApplication. self assert: app isApplication. self deny: app isDispatcher. self deny: app parent isNil. self assert: app name = 'config'. self assert: app basePath = ('/' , alternateDispatcher name , '/config'). self deny: app == originalApp. self assert: app name = originalApp name. self assert: app parent == alternateDispatcher. self assert: originalApp parent == defaultDispatcher.
</methods> <methods> Seaside.WADispatcherTest <category>running</category>
setUp baseName := SeasidePlatformSupport isSqueak ifTrue: ['seaside'] ifFalse: ['seaside/go']. alternateName := 'seaside/stream'. defaultDispatcher := WADispatcher default. alternateDispatcher := defaultDispatcher copy setName: alternateName. shortDispatcher := defaultDispatcher copy setName: ''. defaultDispatcher addDependent: self.
</methods> <methods> Seaside.WADispatcherTest <category>testing</category>
testDefaultCounterDirect | app | app := defaultDispatcher entryPointAt: 'examples/counter'. self assert: app class == WAApplication. self assert: app isApplication. self deny: app isDispatcher. self deny: app parent isNil. self assert: app name = 'counter'. self assert: app parent name = 'examples'. self assert: app basePath = ('/' , baseName , '/examples/counter').
</methods> <methods> Seaside.WADispatcherTest <category>testing</category>
testShortTests | app | app := shortDispatcher entryPointAt: 'tests'. self assert: shortDispatcher basePath = ''. self assert: app basePath = ('/tests').
</methods> <methods> Seaside.WADispatcherTest <category>testing</category>
testDefaultFiles | app | app := defaultDispatcher entryPointAt: 'files'. self assert: app class == WAFileHandler. self deny: app isDispatcher. self deny: app isApplication. self deny: app parent isNil. self assert: app name = 'files'. self assert: app basePath = ('/' , baseName , '/files').
</methods> <methods> Seaside.WADispatcherTest <category>testing</category>
testRootDispatcher | app | app := defaultDispatcher entryPointAt: 'examples/counter'. self deny: app isRoot. self deny: app parent isRoot. self assert: app parent parent isRoot. self assert: app rootDispatcher == defaultDispatcher
</methods> <methods> Seaside.WADispatcherTest <category>testing</category>
testDefaultRoot | app | app := defaultDispatcher. self assert: app == WADispatcher default. self assert: app class == WADispatcher. self assert: app isDispatcher. self assert: app isRoot. self deny: app isApplication. self assert: app parent isNil. self assert: app name = baseName. self assert: app basePath = ('/' , baseName).
</methods> <methods> Seaside.WADispatcherTest <category>running</category>
tearDown defaultDispatcher removeDependent: self.
</methods> <methods> Seaside.WADispatcherTest <category>testing</category>
testRootDispatcherDependency | app old | lastUpdate := nil. app := defaultDispatcher entryPointAt: 'examples/counter'. old := app preferenceAt: #sessionExpirySeconds. app preferenceAt: #sessionExpirySeconds put: old. self deny: lastUpdate isNil. self assert: lastUpdate class == TimeStamp. defaultDispatcher removeDependent: self.
</methods> <methods> Seaside.WADispatcherTest <category>testing</category>
testDefaultTests | app | app := defaultDispatcher entryPointAt: 'tests'. self assert: app class == WADispatcher. self assert: app isDispatcher. self deny: app isRoot. self deny: app isApplication. self deny: app parent isNil. self assert: app name = 'tests'. self assert: app basePath = ('/' , baseName , '/tests').
</methods> <methods> Seaside.WADispatcherTest <category>testing</category>
testDefaultCounterNavigate | app | app := defaultDispatcher entryPointAt: 'examples'. self assert: app class == WADispatcher. self assert: app isDispatcher. self deny: app isRoot. self deny: app isApplication. self deny: app parent isNil. self assert: app name = 'examples'. self assert: app basePath = ('/' , baseName , '/examples'). app := app entryPointAt: 'counter'. self assert: app class == WAApplication. self assert: app isApplication. self deny: app isDispatcher. self deny: app parent isNil. self assert: app name = 'counter'. self assert: app parent name = 'examples'. self assert: app basePath = ('/' , baseName , '/examples/counter').
</methods> <methods> Seaside.WADispatcherTest <category>testing</category>
testAlternateCounterDirect | app originalApp | app := alternateDispatcher entryPointAt: 'examples/counter'. originalApp := defaultDispatcher entryPointAt: 'examples/counter'. self assert: app name = 'counter'. self assert: app parent name = 'examples'. self assert: app basePath = ('/' , alternateDispatcher name , '/examples/counter'). self deny: app == originalApp. self assert: app name = originalApp name. self deny: app parent == originalApp parent. self assert: app parent name = originalApp parent name. self deny: app parent parent == originalApp parent parent. self deny: app parent parent name = originalApp parent parent name. self assert: app parent parent == alternateDispatcher. self assert: originalApp parent parent == defaultDispatcher.
</methods> <methods> Seaside.WADispatcherTest <category>testing</category>
testAlternateTests | app originalApp | app := alternateDispatcher entryPointAt: 'tests'. originalApp := defaultDispatcher entryPointAt: 'tests'. self assert: app class == WADispatcher. self deny: app isApplication. self assert: app isDispatcher. self deny: app isRoot. self deny: app parent isNil. self assert: app name = 'tests'. self assert: app basePath = ('/' , alternateDispatcher name , '/tests'). self deny: app == originalApp. self assert: app name = originalApp name. self assert: app parent == alternateDispatcher. self assert: originalApp parent == defaultDispatcher.
</methods> <methods> Seaside.WADispatcherTest <category>testing</category>
testRootDispatcherChange | app before old | before := defaultDispatcher version. app := defaultDispatcher entryPointAt: 'examples/counter'. old := app preferenceAt: #sessionExpirySeconds. app preferenceAt: #sessionExpirySeconds put: old. self deny: defaultDispatcher version = before. before := defaultDispatcher version. app := defaultDispatcher entryPointAt: 'examples/counter'. app addLibrary: Object. app removeLibrary: Object. self deny: defaultDispatcher version = before. before := defaultDispatcher version. app := defaultDispatcher defaultName: defaultDispatcher defaultName. self deny: defaultDispatcher version = before.
</methods> <methods> Seaside.WADispatcherTest <category>private</category>
dispatcher: aDispatcher hasSameEntryPointsAs: anotherDispatcher "VW does not have Set >> #= OMFG! SRSLY? wtf...?" | aSet anotherSet | aSet := aDispatcher entryPoints keys. anotherSet := anotherDispatcher entryPoints keys. aSet == anotherSet ifTrue: [^ true]. "stop recursion" (aSet class == anotherSet class) ifFalse: [^ false]. aSet size = anotherSet size ifFalse: [^ false]. aSet do: [:each | (anotherSet includes: each) ifFalse: [^ false]]. ^ true
</methods> <methods> Seaside.WADispatcherTest <category>testing</category>
testAlternateRoot | app | app := alternateDispatcher. self assert: app class == WADispatcher. self deny: app isApplication. self assert: app isDispatcher. self assert: app isRoot. self assert: app parent isNil. self assert: app name = alternateName.
</methods> <methods> Seaside.WADispatcherTest <category>testing</category>
testAlternateCloning | originalHandler | self deny: alternateDispatcher == defaultDispatcher. self assert: (self dispatcher: alternateDispatcher hasSameEntryPointsAs: defaultDispatcher). alternateDispatcher entryPoints do: [:handler | originalHandler := defaultDispatcher entryPointAt: handler name. self assert: handler class == originalHandler class. self deny: handler == originalHandler. handler isDispatcher ifTrue: [self assert: (self dispatcher: handler hasSameEntryPointsAs: originalHandler)]]
</methods> <methods> Seaside.WADispatcherViewer <category>accessing</category>
entryPoints ^ super entryPoints select: [ :each | each isDispatcher or: [ each isApplication ] ]
</methods> <methods> Seaside.WADivTag <category>public api</category>
clear self class: 'clear'. self with: [canvas space]
</methods> <methods> Seaside.WADivTag <category>accessing</category>
tag ^ 'div'
</methods> <methods> Seaside.WADocumentHandler <category>accessing</category>
document ^ document
</methods> <methods> Seaside.WADocumentHandler <category>comparing</category>
hash ^ self document hash bitXor: self mimeType hash
</methods> <methods> Seaside.WADocumentHandler <category>initialization</category>
initializeWithDocument: anObject mimeType: mimeString fileName: fileString document := anObject. mimeType := mimeString. fileName := fileString
</methods> <methods> Seaside.WADocumentHandler <category>comparing</category>
= other ^ other species = self species and: [ other document = self document and: [ other mimeType = self mimeType ] ]
</methods> <methods> Seaside.WADocumentHandler <category>accessing</category>
mimeType ^ mimeType
</methods> <methods> Seaside.WADocumentHandler <category>actions</category>
handleRequest: aRequest ^ self response
</methods> <methods> Seaside.WADocumentHandler <category>accessing</category>
response | response | response := WAResponse new. response contents: self mimeDocument contentStream text. response contentType: (mimeType ifNil: [self mimeDocument contentType]). response headerAt: 'Expires' put: 'Thu, 01 Jan 2095 12:00:00 GMT'. fileName ifNotNil: [ response attachmentWithFileName: fileName ]. ^ response
</methods> <methods> Seaside.WADocumentHandler <category>accessing</category>
mimeDocument ^ mimeDocument ifNil: [ mimeDocument := document asMIMEDocumentType: mimeType ]
</methods> <methods> Seaside.WADynamicVariable <category>defaults</category>
defaultAction self resume: self class defaultValue
</methods> <methods> Seaside.WAEditDialog <category>actions</category>
cancel self rollback. self answer: false
</methods> <methods> Seaside.WAEditDialog <category>actions</category>
save self validate. self isValid ifTrue: [self answer: true]
</methods> <methods> Seaside.WAEditDialog <category>actions</category>
rollback model copyFrom: snapshot
</methods> <methods> Seaside.WAEditDialog <category>accessing</category>
buttons ^ #(save cancel)
</methods> <methods> Seaside.WAEditDialog <category>accessing</category>
model ^ model
</methods> <methods> Seaside.WAEditDialog <category>accessing</category>
model: anObject model := anObject. self snapshot.
</methods> <methods> Seaside.WAEditDialog <category>actions</category>
snapshot snapshot := model clone
</methods> <methods> Seaside.WAEditDialog <category>actions</category>
validate
</methods> <methods> Seaside.WAEditTag <category>attributes</category>
datetime: anObject "The value of this attribute specifies the date and time when the change was made. ISO date format" self attributeAt: 'datetime' put: anObject
</methods> <methods> Seaside.WAEditTag <category>attributes</category>
cite: aUrl "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." self attributeAt: 'cite' put: aUrl
</methods> <methods> Seaside.WAEmailConfirmation <category>accessing</category>
subject: aString subject := aString
</methods> <methods> Seaside.WAEmailConfirmation <category>accessing</category>
from: fromString from := fromString
</methods> <methods> Seaside.WAEmailConfirmation <category>rendering</category>
renderContentOn: html self sendMessageWithUrl: (html urlForAction: [self answer]). html div class: 'notice'; with: [html withLineBreaksAndUrls: notice]
</methods> <methods> Seaside.WAEmailConfirmation <category>accessing</category>
to: toString to := toString
</methods> <methods> Seaside.WAEmailConfirmation <category>accessing</category>
notice: aString notice := aString
</methods> <methods> Seaside.WAEmailConfirmation <category>actions</category>
sendMessageWithUrl: url SeasidePlatformSupport deliverMailFrom: from to: (Array with: to) text: 'Subject: ' , subject , ' ' , url displayString , ' ' , body
</methods> <methods> Seaside.WAEmailConfirmation <category>accessing</category>
body: aString body := aString
</methods> <methods> Seaside.WAEmailTest <category>initialization</category>
initialize state := #pending
</methods> <methods> Seaside.WAEmailTest <category>actions</category>
send self call: (WAEmailConfirmation new to: self to; from: 'myself@myhome.org'; subject: 'Testing email confirmation'; body: 'This is a test, click the link above to continue the process '; notice: 'An email was sent to you. Welcome back...'; yourself).
</methods> <methods> Seaside.WAEmailTest <category>accessing</category>
to "Answer the value of to" ^ to
</methods> <methods> Seaside.WAEmailTest <category>accessing</category>
to: anObject "Set the value of to" to := anObject
</methods> <methods> Seaside.WAEmailTest <category>rendering</category>
renderContentOn: html "Workflow in rendering code :-)" html form: [state == #confirmed ifTrue: [html text: 'Your registration is confirmed'. html break. html submitButton callback: [state := #pending]; text: 'OK'] ifFalse: [html text: 'Email address'. html textInput on: #to of: self. html submitButton callback: [self send. state := #confirmed]; text: 'Register']]
</methods> <methods> Seaside.WAEncodingTest <category>resources</category>
asianString ^ String with: (Character value: 22781) with: (Character value: 22785) with: (Character value: 15025)
</methods> <methods> Seaside.WAEncodingTest <category>resources</category>
euroSymbol ^ String with: (Character value: 8364)
</methods> <methods> Seaside.WAEncodingTest <category>rendering</category>
rendererClass "Intentionally using the classic API" ^WAHtmlRenderer
</methods> <methods> Seaside.WAEncodingTest <category>rendering</category>
renderContentOn: html | w allChars r | w := WriteStream on: String new. 32 to: 255 do: [ :c | w nextPut: c asCharacter ]. allChars := w contents. html code: [ html text: 'Start'; break. r := ReadStream on: allChars. [ r atEnd ] whileFalse: [ html text: (r next: 14); break ]. html text: 'End'; break ]. html text: 'Characters Encoded: '. 'Hello World' do: [ :c | html encodeCharacter: c ]. html break. html text: 'Euro symbol: '. html text: self euroSymbol. html break. html text: 'Asian characters: '. html text: self coreanString. html text: self asianString. html break.
</methods> <methods> Seaside.WAEncodingTest <category>rendering</category>
script "This is intended to verify that strings are properly encoded as utf-8" ^ ' // Euro symbol: ' , self euroSymbol, ' // Asian characters: ' , self coreanString , self asianString
</methods> <methods> Seaside.WAEncodingTest <category>resources</category>
coreanString ^ String with: (Character value: 50976) with: (Character value: 47532) with: (Character value: 47484)
</methods> <methods> Seaside.WAEntryPoint <category>printing</category>
printOn: aStream super printOn: aStream. aStream nextPutAll: ' named: '; print: self name
</methods> <methods> Seaside.WAEntryPoint <category>initialization</category>
setName: aString name := aString. self announceChangeOf: #name with: aString
</methods> <methods> Seaside.WAEntryPoint <category>public</category>
baseUrl ^ WAUrl new addToPath: self basePath; yourself
</methods> <methods> Seaside.WAEntryPoint <category>testing</category>
isEntryPoint ^ true
</methods> <methods> Seaside.WAEntryPoint <category>private</category>
announceChangeOf: anAspectSymbol with: aParameter "Short-circuit the dependency mechanics" self rootDispatcher isNil ifTrue: [^nil "Discard this change"]. self rootDispatcher beAwareOfChangeOf: anAspectSymbol with: aParameter from: self
</methods> <methods> Seaside.WAEntryPoint <category>accessing</category>
basePath ^ self parent isNil ifTrue: [self name isEmpty ifTrue: [''] ifFalse: ['/' , self name]] ifFalse: [self parent basePath , '/' , self name]
</methods> <methods> Seaside.WAEntryPoint <category>public</category>
configurationComponent ^ nil
</methods> <methods> Seaside.WAEntryPoint <category>testing</category>
isRoot ^false
</methods> <methods> Seaside.WAEntryPoint <category>accessing</category>
name ^ name
</methods> <methods> Seaside.WAEntryPoint <category>accessing</category>
description ^ self class description
</methods> <methods> Seaside.WAEntryPoint <category>accessing</category>
rootDispatcher self isRoot ifTrue: [^self]. self parent isNil ifTrue: [^nil]. ^self parent rootDispatcher.
</methods> <methods> Seaside.WAErrorHandler <category>actions</category>
handleWarning: aWarning self handleError: aWarning
</methods> <methods> Seaside.WAErrorHandler <category>actions</category>
handleError: anError anError pass
</methods> <methods> Seaside.WAErrorTest <category>rendering</category>
rendererClass "Intentionally using the classic API" ^WAHtmlRenderer
</methods> <methods> Seaside.WAErrorTest <category>rendering</category>
renderContentOn: html html anchorWithAction: [1/0] text: 'Raise error'. html break. html anchorWithAction: [self notify: 'Really?'. self inform: 'Ok!'] text: 'Raise warning'.
</methods> <methods> Seaside.WAExampleBrowser <category>initialize</category>
initialize super initialize. self class: self allClasses first
</methods> <methods> Seaside.WAExampleBrowser <category>rendering</category>
renderChooserOn: html html div class: 'chooser'; with: [ html form: [ html select beSubmitOnChange; list: self allClasses; selected: class; callback: [ :value | self class: value ] ]. self allSelectors size > 1 ifTrue: [ html form: [ html select beSubmitOnChange; list: self allSelectors; selected: selector; callback: [ :value | self selector: value ] ] ] ]
</methods> <methods> Seaside.WAExampleBrowser <category>accessing</category>
children ^ Array with: component
</methods> <methods> Seaside.WAExampleBrowser <category>helper</category>
allSelectors ^ (class class selectors select: [ :each | each beginsWith: self selectorPrefix ]) asSortedCollection
</methods> <methods> Seaside.WAExampleBrowser <category>accessing</category>
component: aComponent component := aComponent. hasAnswer := false. answer := nil. component onAnswer: [ :value | hasAnswer := true. answer := value ]
</methods> <methods> Seaside.WAExampleBrowser <category>rendering</category>
renderComponentOn: html html heading: component class headerForExampleBrowser level: 4. html div class: 'component'; with: component. hasAnswer ifTrue: [ html div class: 'answer'; with: answer printString ]
</methods> <methods> Seaside.WAExampleBrowser <category>accessing</category>
selector: aSymbol selector := aSymbol. self component: (class perform: selector)
</methods> <methods> Seaside.WAExampleBrowser <category>helper</category>
selectorPrefix ^ 'example'
</methods> <methods> Seaside.WAExampleBrowser <category>accessing</category>
class: aClass class := aClass. self selector: self allSelectors first
</methods> <methods> Seaside.WAExampleBrowser <category>accessing</category>
style ^ '.chooser { background-color: #eee; padding: 5px; } .chooser form, .chooser form div { display: inline; } .chooser form select { margin-right: 5px; } .component { padding: 5px; } .answer { background-color: #eee; padding: 5px; }'
</methods> <methods> Seaside.WAExampleBrowser <category>rendering</category>
renderContentOn: html self renderChooserOn: html. self renderComponentOn: html
</methods> <methods> Seaside.WAExampleBrowser <category>helper</category>
allClasses ^ (WAComponent allSubclasses select: [ :each | each class selectors anySatisfy: [ :sel | sel beginsWith: self selectorPrefix ] ]) asSortedCollection: [ :a :b | a name < b name ]
</methods> <methods> Seaside.WAExceptionTest <category>processing</category>
go [(self confirm: 'Raise an exception?') ifTrue: [self error: 'foo']] on: Error do: [:e | self inform: 'Caught: ', e displayString]
</methods> <methods> Seaside.WAExpiringHandler <category>testing</category>
expired ^ expired
</methods> <methods> Seaside.WAExpiringHandler <category>initialization</category>
initialize super initialize. expired := false
</methods> <methods> Seaside.WAExpiringHandler <category>actions</category>
expire expired := true
</methods> <methods> Seaside.WAExpiringHandler <category>defaults</category>
defaultTimeoutSeconds ^ 600
</methods> <methods> Seaside.WAExpiringHandler <category>accessing</category>
timeoutSeconds ^ timeout ifNil: [self defaultTimeoutSeconds]
</methods> <methods> Seaside.WAExpiringHandler <category>testing</category>
isActive ^ self expired not and: [ self secondsSinceLastAccess < self timeoutSeconds ]
</methods> <methods> Seaside.WAExpiringHandler <category>accessing</category>
lastAccess ^ lastAccess ifNil: [lastAccess := Time totalSeconds]
</methods> <methods> Seaside.WAExpiringHandler <category>accessing</category>
timeoutSeconds: aNumber timeout := aNumber
</methods> <methods> Seaside.WAExpiringHandler <category>processing</category>
incomingRequest: aRequest self subclassResponsibility
</methods> <methods> Seaside.WAExpiringHandler <category>processing</category>
handleRequest: aRequest lastAccess := Time totalSeconds. ^ self incomingRequest: aRequest
</methods> <methods> Seaside.WAExpiringHandler <category>accessing</category>
secondsSinceLastAccess ^ Time totalSeconds - self lastAccess
</methods> <methods> Seaside.WAExpirySession <category>initialize-release</category>
initialize super initialize. Created := Created + 1
</methods> <methods> Seaside.WAExpirySession <category>subclass responsibilities</category>
unregistered super unregistered. Unregistered := Unregistered + 1
</methods> <methods> Seaside.WAExpiryTest <category>rendering</category>
rendererClass "Intentionally using the classic API" ^WAHtmlRenderer
</methods> <methods> Seaside.WAExpiryTest <category>rendering</category>
renderContentOn: html html table: [ html tableRowWithLabel: 'Live session instances' column: WAExpirySession allInstances size. html tableRowWithLabel: 'Live component instances' column: self class allInstances size. html tableRowWithLabel: 'Sessions created' column: WAExpirySession created. html tableRowWithLabel: 'Sessions unregistered' column: WAExpirySession unregistered. ]. html anchorWithUrl: self session newSessionUrl do: 'New Session'. html break. html anchorWithAction: [self session expire] text: 'Expire'. html break. html anchorWithAction: [WAExpirySession resetCounters] text: 'Reset Counters'. html break. html anchorWithAction: [Smalltalk garbageCollect] text: 'Garbage Collect'. html break. html anchorWithAction: [self session application clearHandlers. Smalltalk garbageCollect] text: 'Clear Handlers'. html break. html anchorWithAction: [self session application clearHandlers. WAExpirySession resetCounters. Smalltalk garbageCollect. ] text: 'Reset All'. html form: [ html text: 'Expiry seconds:'. html textInputWithValue: self session application sessionExpirySeconds callback: [:v | self session application preferenceAt: #sessionExpirySeconds put: v]. html space. html submitButton]
</methods> <methods> Seaside.WAExternalID <category>private</category>
initialize GeneratorMutex critical: [1 to: self size do: [:i | self at: i put: ((($a to: $z), ($A to: $Z)) atRandom: Generator) asInteger]]
</methods> <methods> Seaside.WAExternalID <category>private</category>
printOn: stream self do: [:i | stream nextPut: (Character value: i)]
</methods> <methods> Seaside.WAFieldSetTag <category>private</category>
before legend ifNotNil: [canvas legend: legend]
</methods> <methods> Seaside.WAFieldSetTag <category>accessing</category>
tag ^ 'fieldset'
</methods> <methods> Seaside.WAFieldSetTag <category>accessing</category>
legend: aString legend := aString
</methods> <methods> Seaside.WAFile <category>accessing</category>
contentType ^ contentType
</methods> <methods> Seaside.WAFile <category>accessing</category>
contentType: aString contentType := aString
</methods> <methods> Seaside.WAFile <category>accessing</category>
contents "Answer a ByteArray" ^ contents
</methods> <methods> Seaside.WAFile <category>accessing</category>
fileName: aString fileName := aString
</methods> <methods> Seaside.WAFile <category>accessing</category>
contents: aByteArray contents := aByteArray
</methods> <methods> Seaside.WAFile <category>accessing</category>
fileName "compensate for windows explorer behavior" ^ ('#:\*' match: fileName) ifTrue: [fileName copyAfterLast: $\] ifFalse: [fileName]
</methods> <methods> Seaside.WAFileHandler <category>testing</category>
isDeployed ^ true
</methods> <methods> Seaside.WAFileHandler <category>private</category>
responseAt: aPath ifAbsent: aBlock | libraryName fileName library | libraryName := aPath at: aPath size - 1. fileName := aPath last. library := self libraryAt: libraryName asSymbol ifAbsent: [ ^ aBlock value ]. ^ library default documentAt: fileName ifAbsent: aBlock
</methods> <methods> Seaside.WAFileHandler <category>private</category>
notFound: aString ^ WAResponse notFound: aString
</methods> <methods> Seaside.WAFileHandler <category>private</category>
librariesDo: aOneArgumentBlock self libraryRootClasses do: [ :each | each allSubclassesDo: aOneArgumentBlock ]
</methods> <methods> Seaside.WAFileHandler <category>accessing</category>
configurationComponent ^ WAFileHandlerEditor new fileHandler: self
</methods> <methods> Seaside.WAFileHandler <category>accessing</category>
libraryAt: aSymbol ifAbsent: aBlock self librariesDo: [ :each | each name = aSymbol ifTrue: [ ^ each ] ]. ^ aBlock value
</methods> <methods> Seaside.WAFileHandler <category>accessing</category>
libraries ^ self libraryRootClasses gather: [ :each | each allSubclasses ]
</methods> <methods> Seaside.WAFileHandler <category>private</category>
libraryRootClasses ^ Array with: WAFileLibrary with: WAScriptLibrary with: WAStyleLibrary
</methods> <methods> Seaside.WAFileHandler <category>processing</category>
handleRequest: aRequest ^ self responseAt: (aRequest url findTokens: $/) ifAbsent: [ self notFound: aRequest url ]
</methods> <methods> Seaside.WAFileHandlerEditor <category>accessing</category>
basePath ^ self fileHandler basePath
</methods> <methods> Seaside.WAFileHandlerEditor <category>accessing</category>
libraries ^ self fileHandler libraries asSortedCollection: [ :a :b | a name < b name ]
</methods> <methods> Seaside.WAFileHandlerEditor <category>accessing</category>
fileHandler: aFilehandler fileHandler := aFilehandler
</methods> <methods> Seaside.WAFileHandlerEditor <category>accessing</category>
fileHandler ^fileHandler
</methods> <methods> Seaside.WAFileHandlerEditor <category>rendering</category>
renderContentOn: html html heading: WAFileHandler description. html table: [ self libraries do: [ :each | html tableRow: [ html tableData: each name. html tableData: [ html anchor callback: [ self configureLibrary: each default ]; with: 'configure' ] ] ] ]. html form: [ html submitButton callback: [ self answer ]; text: 'close' ]
</methods> <methods> Seaside.WAFileHandlerEditor <category>actions</category>
configureLibrary: aLibrary self call: aLibrary configurationComponent
</methods> <methods> Seaside.WAFileLibrary <category>private</category>
fileSelectors ^ (self class selectors select: [ :each | self isFileSelector: each ]) removeAllFoundIn: self nonFileSelectors; yourself
</methods> <methods> Seaside.WAFileLibrary <category>actions</category>
removeFile: aFilename SeasidePlatformSupport removeSelector: (self asSelector: aFilename) from: self class
</methods> <methods> Seaside.WAFileLibrary <category>private</category>
nonFileSelectors ^#( nonFileSelectors selectorsToInclude )
</methods> <methods> Seaside.WAFileLibrary <category>actions</category>
renameFile: oldName to: newName | contents file | (self asSelector: oldName) = (self asSelector: newName) ifTrue: [ ^ nil ]. contents := self perform: (self asSelector: oldName). file := WAFile new contents: contents. file fileName: newName. self addFile: file. self removeFile: oldName
</methods> <methods> Seaside.WAFileLibrary <category>accessing</category>
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" ^ #()
</methods> <methods> Seaside.WAFileLibrary <category>accessing</category>
mimetypeForFile: aFilename ^self class mimetypeFor: (aFilename copyAfterLast: $.)
</methods> <methods> Seaside.WAFileLibrary <category>private</category>
isFileSelector: aSymbol ^ aSymbol isUnary and: [ (self lastUpperCaseIndexIn: aSymbol) > 1 ]
</methods> <methods> Seaside.WAFileLibrary <category>private</category>
asFilename: aSelector | dotIndex extension | dotIndex := self lastUpperCaseIndexIn: aSelector. dotIndex = 0 ifTrue: [ ^aSelector asString ]. extension := (aSelector last: aSelector size - dotIndex + 1) asLowercase. ^ (aSelector first: dotIndex - 1) , '.' , extension
</methods> <methods> Seaside.WAFileLibrary <category>accessing</category>
configurationComponent ^ WAFileLibraryEditor new library: self; yourself
</methods> <methods> Seaside.WAFileLibrary <category>private</category>
lastUpperCaseIndexIn: aString ^ aString findLast: [ :each | each isUppercase ]
</methods> <methods> Seaside.WAFileLibrary <category>processing</category>
updateRoot: aHtmlRoot "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." self selectorsToInclude do: [ :each | (each endsWith: #Js) ifTrue: [ aHtmlRoot javascript url: (self urlOf: each) ]. (each endsWith: #Ico) ifTrue: [ aHtmlRoot link beShortcutIcon; url: (self urlOf: each) ]. (each endsWith: #Css) ifTrue: [ aHtmlRoot stylesheet url: (self urlOf: each) ] ]
</methods> <methods> Seaside.WAFileLibrary <category>actions</category>
addFile: aFile "adds a file to the receiver aFile an instance of of WAFile" | contents | aFile isNil ifTrue: [ ^self "in case no file was selected for uploading" ]. contents := (self class isBinary: aFile fileName) ifTrue: [ aFile contents ] ifFalse: [ SeasidePlatformSupport convertToSmalltalkNewlines: aFile contents ]. self class addFileNamed: aFile fileName contents: contents
</methods> <methods> Seaside.WAFileLibrary <category>private</category>
compileText: aString selector: aSymbol | code | code := String streamContents: [ :stream | stream nextPutAll: aSymbol; cr. stream tab; nextPutAll: '^ '''. aString do: [ :each | each = $' ifTrue: [ stream nextPut: $' ]. stream nextPut: each ]. stream nextPutAll: '''' ]. SeasidePlatformSupport compile: code into: self class classified: aSymbol
</methods> <methods> Seaside.WAFileLibrary <category>private</category>
asSelector: aFilename ^ self class asSelector: aFilename
</methods> <methods> Seaside.WAFileLibrary <category>private</category>
compileBinary: aString selector: aSymbol | code | code := String streamContents: [ :stream | stream nextPutAll: aSymbol; cr. stream tab; nextPutAll: '^ #('. aString asByteArray do: [ :each | each printOn: stream ] separatedBy: [ stream space ]. stream nextPutAll: ') asByteArray' ]. SeasidePlatformSupport compile: code into: self class classified: aSymbol
</methods> <methods> Seaside.WAFileLibraryDemo <category>accessing</category>
mainCss ^'/* Pier Copyright (c) 2003-2006 Lukas Renggli Copyright (c) 2005-2006 Software Composition Group, University of Berne */ * { margin: 0px; padding: 0px; } body { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #111111; margin: 10px; } img { border: none; } td, th { text-align: left; vertical-align: top; } a { text-decoration: none; color: #092565; } a:hover { text-decoration: underline; } .broken { color: #aa0000; } .protected { color: #aaaaaa; }'
</methods> <methods> Seaside.WAFileLibraryDemo <category>accessing</category>
mainJpg ^ #(255 216 255 224 0 16 74 70 73 70 0 1 1 1 0 72 0 72 0 0 255 225 0 22 69 120 105 102 0 0 77 77 0 42 0 0 0 8 0 0 0 0 0 0 255 219 0 67 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 255 219 0 67 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 255 192 0 17 8 0 4 2 152 3 1 34 0 2 17 1 3 17 1 255 196 0 24 0 1 0 3 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 7 9 10 255 196 0 38 16 0 2 3 0 1 1 8 3 1 0 0 0 0 0 0 0 0 1 17 81 145 7 2 6 8 9 40 49 54 116 195 65 103 129 183 255 196 0 20 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 196 0 20 17 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 218 0 12 3 1 0 2 17 3 17 0 63 0 235 191 191 103 181 250 190 7 87 216 85 254 17 73 62 9 229 249 83 230 63 181 191 230 188 74 0 26 177 10 150 33 10 150 32 0 66 165 136 66 165 136 0 16 169 98 16 169 98 0 4 42 88 132 42 88 128 1 10 150 33 10 150 32 0 66 165 136 66 165 136 0 16 169 98 16 169 98 0 4 42 88 132 42 88 128 1 10 150 33 10 150 32 0 66 165 136 66 165 136 0 16 169 98 16 169 98 0 4 42 88 132 42 88 128 1 10 150 33 10 150 32 0 66 165 136 66 165 136 0 16 169 98 16 169 98 0 4 42 88 132 42 88 128 1 10 150 33 10 150 32 0 66 165 136 66 165 136 0 16 169 98 16 169 98 0 4 42 88 132 42 88 128 1 10 150 33 10 150 32 0 66 165 136 66 165 136 0 16 169 98 16 169 98 0 4 42 88 132 42 88 128 1 10 150 33 10 150 32 0 66 165 136 66 165 136 0 16 169 98 16 169 98 0 4 42 88 132 42 88 128 1 10 150 33 10 150 32 0 66 94 137 47 225 32 0 0 0 0 0 132 253 84 145 10 150 32 0 66 165 136 66 165 136 0 16 169 98 16 169 98 0 4 42 88 132 42 88 128 1 10 150 33 10 150 32 0 66 165 136 66 165 136 0 16 169 98 16 169 98 0 4 42 88 140 168 241 117 73 112 55 16 66 75 204 143 100 255 0 31 173 121 108 0 44 254 226 126 215 233 248 29 63 88 0 15 255 217) asByteArray.
</methods> <methods> Seaside.WAFileLibraryEditor <category>rendering</category>
renderFilesOn: html html table: [ self library filenames asSortedCollection do: [ :each | html tableRow: [ renamingFile = each ifTrue: [ self renderRenameFormForFile: each on: html ] ifFalse: [ self renderFile: each on: html ] ] ] ]
</methods> <methods> Seaside.WAFileLibraryEditor <category>rendering</category>
renderRenameFormForFile: fileName on: html html tableData colSpan: 2; with: [ html form: [ html textInput value: fileName; callback: [ :value | newName := value ]. html submitButton callback: [ self library renameFile: fileName to: newName. renamingFile := nil ]; text: 'rename'. html cancelButton callback: [ renamingFile := nil ]; text: 'cancel' ] ]
</methods> <methods> Seaside.WAFileLibraryEditor <category>rendering</category>
renderAddFileOn: html html form multipart; with: [ html text: 'Add File: '. html fileUpload on: #addFile of: self library. html space. html submitButton text: 'Add' ]
</methods> <methods> Seaside.WAFileLibraryEditor <category>rendering</category>
renderContentOn: html self renderHeadingsOn: html. self renderAddFileOn: html. self renderFilesOn: html. self renderDoneOn: html
</methods> <methods> Seaside.WAFileLibraryEditor <category>rendering</category>
renderFile: fileName on: html html tableData: [ self renderSaveButtonOn: html for: fileName. html anchor url: (self urlFor: fileName); with: fileName ]. html tableData: [ html anchor callback: [ self library removeFile: fileName ]; with: 'remove'. html space. html anchor callback: [ renamingFile := fileName ]; with: 'rename' ]
</methods> <methods> Seaside.WAFileLibraryExample <category>rendering</category>
renderContentOn: html html div class: 'desc'; with: [html heading: 'This page has' level: 3. html unorderedList: [html listItem: 'a static stylesheet (main.css)'. html listItem: 'a static background image (main.jpg) named in a dynamic stylesheet']].
</methods> <methods> Seaside.WAFileLibraryExample <category>accessing</category>
basePath ^WADispatcher default basePath
</methods> <methods> Seaside.WAFileLibraryExample <category>rendering</category>
style ^' body { background: url(' , self basePath , '/files/WAFileLibraryDemo/main.jpg); } div.desc { padding: 2em; } '
</methods> <methods> Seaside.WAFileLibraryExample <category>rendering</category>
updateRoot: anHtmlRoot super updateRoot: anHtmlRoot. anHtmlRoot stylesheet url: self basePath , '/files/WAFileLibraryDemo/main.css'.
</methods> <methods> Seaside.WAFileLibraryTest <category>testing</category>
testAsSelectorFunky | library | library := WAFileLibraryDemo new. self assert: (library asSelector: '1_2$3-4/5()6!7 8.9.test 1 2 3 me 4 5 6 .txt') = #test123me456Txt.
</methods> <methods> Seaside.WAFileLibraryTest <category>testing</category>
testMainJpg | handler library request response contents | handler := WAFileHandler new. library := WAFileLibraryDemo new. request := WARequest method: 'GET' url: '/i/dont/care/WAFileLibraryDemo/main.jpg' headers: Dictionary new fields: Dictionary new cookies: Dictionary new. response := handler handleRequest: request. self assert: response status = '200'. self assert: response contentType = 'image/jpeg'. contents := response stream binary; contents. self assert: contents asByteArray = (library perform: #mainJpg)
</methods> <methods> Seaside.WAFileLibraryTest <category>testing</category>
testIsBinary self deny: (WAFileLibraryDemo isBinary: 'scipt.js'). self deny: (WAFileLibraryDemo isBinary: 'markup.xml'). self deny: (WAFileLibraryDemo isBinary: 'markup.xhtml'). self deny: (WAFileLibraryDemo isBinary: 'markup.html'). self deny: (WAFileLibraryDemo isBinary: 'file.txt'). self deny: (WAFileLibraryDemo isBinary: 'calendar.ics'). self assert: (WAFileLibraryDemo isBinary: 'image.jpeg'). self assert: (WAFileLibraryDemo isBinary: 'squeak.exe').
</methods> <methods> Seaside.WAFileLibraryTest <category>testing</category>
testStandardScripts | actual expected | actual := WAStandardScripts new filenames. expected := #('shortcuts.js' 'misc.js' 'externalAnchors.js'). self assert: actual size = expected size. expected do: [ :each | self assert: (actual includes: each) ]
</methods> <methods> Seaside.WAFileLibraryTest <category>testing</category>
testAsFileName | library | library := WAFileLibraryDemo new. self assert: (library asFilename: #mainJs) = 'main.js'. self assert: (library asFilename: #style2Css) = 'style2.css'. self assert: (library asFilename: #index) = 'index'
</methods> <methods> Seaside.WAFileLibraryTest <category>testing</category>
testFileLibraryDemo | actual expected | actual := WAFileLibraryDemo new filenames. expected := #('main.css' 'main.jpg'). self assert: actual size = expected size. expected do: [ :each | self assert: (actual includes: each) ]
</methods> <methods> Seaside.WAFileLibraryTest <category>testing</category>
testAsSelector | library | library := WAFileLibraryDemo new. self assert: (library asSelector: 'main.css') = #mainCss. self assert: (library asSelector: 'main.js') = #mainJs
</methods> <methods> Seaside.WAFileLibraryTest <category>testing</category>
testFilenames | expected actual | expected := #(#netStyleCss #libraryEditorCss #floppyGif #topJpg). actual := WADispatcherFiles new fileSelectors. "VW does not implement #= in Sets" self assert: actual size = expected size. expected do: [:each | self assert: (expected includes: each)].
</methods> <methods> Seaside.WAFileLibraryTest <category>testing</category>
testLiveUpdate | handler | handler := WAFileHandler new. self assertFile: 'misc.js' contentType: 'text/javascript; charset=utf-8' handler: handler symbol: #misc library: WAStandardScripts new
</methods> <methods> Seaside.WAFileLibraryTest <category>testing</category>
testCompileByteArray | library data file first second | library := WAFileLibraryDemo new. self deny: (library class selectors includes: #demoJpeg). data := (1 to: 255) asByteArray. file := WAFile new contentType: 'image/jpeg'; contents: data; fileName: 'demo.jpeg'; yourself. library addFile: file. self assert: (library class selectors includes: #demoJpeg). first := library perform: #demoJpeg. self assert: first = data. second := library perform: #demoJpeg. self assert: first == second. library removeFile: file fileName. self deny: (library class selectors includes: #demoJpeg).
</methods> <methods> Seaside.WAFileLibraryTest <category>testing</category>
testMainJs | handler request response | handler := WAFileHandler new. request := WARequest method: 'GET' url: '/i/dont/care/main.js' headers: Dictionary new fields: Dictionary new cookies: Dictionary new. response := handler handleRequest: request. self assert: response status = '404'.
</methods> <methods> Seaside.WAFileLibraryTest <category>utilities</category>
assertFile: aString contentType: aMimeType handler: aHandler symbol: aSymbol library: aLibrary | request response | request := WARequest method: 'GET' url: '/seaside/files/', aLibrary name ,'/', aString headers: Dictionary new fields: Dictionary new cookies: Dictionary new. response := aHandler handleRequest: request. self assert: response status = '200'. self assert: response contentType = aMimeType. self assert: response stream contents = (aLibrary perform: aSymbol).
</methods> <methods> Seaside.WAFileLibraryTest <category>testing</category>
testKalseyTabs | handler | handler := WAFileHandler new. self assertFile: 'kalseyTabs.css' contentType: 'text/css; charset=utf-8' handler: handler symbol: #kalseyTabs library: WAStandardStyles new
</methods> <methods> Seaside.WAFileLibraryTest <category>testing</category>
testMainCssCascade | handler | handler := WAFileHandler new. self assertFile: 'main.css' contentType: 'text/css; charset=utf-8' handler: handler symbol: #mainCss library: WAFileLibraryDemo new
</methods> <methods> Seaside.WAFileLibraryTest <category>testing</category>
testMainCss | handler | handler := WAFileHandler new. self assertFile: 'main.css' contentType: 'text/css; charset=utf-8' handler: handler symbol: #mainCss library: WAFileLibraryDemo new
</methods> <methods> Seaside.WAFileLibraryTest <category>testing</category>
testUrlOf self assert: (WAStandardFiles urlOf: #seasideJpg) asString = ( '/' , SeasidePlatformSupport defaultDispatcherName , '/files/WAStandardFiles/seaside.jpg' )
</methods> <methods> Seaside.WAFileLibraryTest <category>testing</category>
testAsSelectorCapitalized | library | library := WAFileLibraryDemo new. self assert: (library asSelector: 'COMMENTS.TXT') = #COMMENTSTxt. self assert: (library asFilename: #COMMENTSTxt) = 'COMMENTS.txt'.
</methods> <methods> Seaside.WAFileLibraryTest <category>testing</category>
testCompileString | library data file first second | library := WAFileLibraryDemo new. self deny: (library class selectors includes: #demoTxt). data := 'this is a string'. file := WAFile new contentType: 'text/plain'; contents: data; fileName: 'demo.txt'; yourself. library addFile: file. self assert: (library class selectors includes: #demoTxt). first := library perform: #demoTxt. self assert: first = data. second := library perform: #demoTxt. self assert: first == second. library removeFile: file fileName. self deny: (library class selectors includes: #demoTxt).
</methods> <methods> Seaside.WAFileLibraryTest <category>testing</category>
testStandardStyles | actual expected | actual := WAStandardStyles new filenames. expected := #('basics.css' 'kalseyTabs.css' 'sourceStyle.css'). self assert: actual size = expected size. expected do: [ :each | self assert: (actual includes: each) ]
</methods> <methods> Seaside.WAFileLibraryTest <category>testing</category>
testMimeType | library | library := WAFileLibraryDemo new. self assert: (library mimetypeForFile: 'main.js') = 'application/x-javascript'. self assert: (library mimetypeForFile: 'style2.css') = 'text/css'. self assert: (library mimetypeForFile: 'image.jpg') = 'image/jpeg'. self assert: (library mimetypeForFile: 'index') = 'application/octet-stream'
</methods> <methods> Seaside.WAFileLibraryTest <category>testing</category>
testKalseyTabsCascade | handler | handler := WAFileHandler new. self assertFile: 'kalseyTabs.css' contentType: 'text/css; charset=utf-8' handler: handler symbol: #kalseyTabs library: WAStandardStyles new
</methods> <methods> Seaside.WAFileLibraryTest <category>testing</category>
testAsSelectorLeadingDigits | library | library := WAFileLibraryDemo new. self assert: (library asSelector: '1readme.txt') = #readmeTxt. self assert: (library asSelector: '123456789readme.txt') = #readmeTxt. self assert: (library asSelector: '123456789readme89.txt') = #readme89Txt.
</methods> <methods> Seaside.WAFileUploadTag <category>callbacks</category>
on: selector of: anObject self callback: [ :value | anObject perform: selector asMutator with: value ].
</methods> <methods> Seaside.WAFileUploadTag <category>accessing</category>
type ^ 'file'
</methods> <methods> Seaside.WAFileUploadTag <category>callbacks</category>
callback: aBlock aBlock fixCallbackTemps. super callback: [ :file | aBlock value: (file = '' ifFalse: [ file ]) ].
</methods> <methods> Seaside.WAFormDecoration <category>accessing</category>
buttons: selectorArray buttons := selectorArray
</methods> <methods> Seaside.WAFormDecoration <category>rendering</category>
renderButtonsOn: html html div class: 'dialog-buttons'; with: [ self buttons do: [ :each | "Avoid duplicate cssId, if component used many times in the page" html span class: 'dialog-button-' , each; with: [self renderButtonForSelector: each on: html ] ] ]
</methods> <methods> Seaside.WAFormDecoration <category>accessing</category>
buttons ^ buttons
</methods> <methods> Seaside.WAFormDecoration <category>rendering</category>
renderContentOn: html html form defaultAction: [ self defaultAction ]; with: [ self renderOwnerOn: html. self renderButtonsOn: html ]
</methods> <methods> Seaside.WAFormDecoration <category>rendering</category>
renderButtonForSelector: aSymbol on: html html submitButton on: aSymbol of: self owner
</methods> <methods> Seaside.WAFormDecoration <category>actions</category>
defaultAction MessageSend receiver: self owner selector: self owner defaultButton
</methods> <methods> Seaside.WAFormDialog <category>rendering</category>
renderValidationError: aString on: html html span class: 'dialog-validation'; with: aString
</methods> <methods> Seaside.WAFormDialog <category>rendering</category>
renderDialogOn: html
</methods> <methods> Seaside.WAFormDialog <category>initialization</category>
initialize super initialize. self addFormByDefault ifTrue: [self addForm]
</methods> <methods> Seaside.WAFormDialog <category>accessing</category>
divClass ^ self class name
</methods> <methods> Seaside.WAFormDialog <category>rendering</category>
renderSpacerRowOn: html html div class: 'dialog-spacer'; with: [ html space ]
</methods> <methods> Seaside.WAFormDialog <category>accessing</category>
model ^ self
</methods> <methods> Seaside.WAFormDialog <category>testing</category>
isValid ^ validationError isNil
</methods> <methods> Seaside.WAFormDialog <category>accessing</category>
defaultButton ^self buttons first
</methods> <methods> Seaside.WAFormDialog <category>actions</category>
removeForm form ifNotNil: [self removeDecoration: form]
</methods> <methods> Seaside.WAFormDialog <category>actions</category>
ok self answer
</methods> <methods> Seaside.WAFormDialog <category>accessing</category>
buttons ^ #(ok)
</methods> <methods> Seaside.WAFormDialog <category>rendering</category>
renderContentOn: html html hiddenInput callback: [ validationError := nil ]. validationError ifNotNil: [ self renderValidationError: validationError on: html ]. html div class: self divClass; with: [ self renderDialogOn: html ]
</methods> <methods> Seaside.WAFormDialog <category>validation</category>
validationError: aString validationError := aString
</methods> <methods> Seaside.WAFormDialog <category>actions</category>
addForm form := WAFormDecoration new buttons: self buttons. self addDecoration: form
</methods> <methods> Seaside.WAFormDialog <category>testing</category>
addFormByDefault ^ true
</methods> <methods> Seaside.WAFormInputTag <category>attributes</category>
type: aString self attributes at: 'type' put: aString
</methods> <methods> Seaside.WAFormInputTag <category>attributes</category>
submitOnClick self onClick: 'submit()'
</methods> <methods> Seaside.WAFormInputTag <category>public</category>
with: aBlock self type isNil ifFalse: [ self attributes at: 'type' ifAbsentPut: [ self type ]. self class: self type ]. super with: aBlock
</methods> <methods> Seaside.WAFormInputTag <category>attributes</category>
name: aString self attributes at: 'name' put: aString
</methods> <methods> Seaside.WAFormInputTag <category>attributes</category>
tabindex: anInteger "deprecated, use #tabIndex:" self deprecatedApi. self attributes at: 'tabindex' put: anInteger
</methods> <methods> Seaside.WAFormInputTag <category>attributes</category>
value: anObject anObject ifNotNil: [ self attributes at: 'value' put: anObject ]
</methods> <methods> Seaside.WAFormInputTag <category>callbacks</category>
callback: aBlock self name: (canvas callbacks registerCallback: aBlock)
</methods> <methods> Seaside.WAFormInputTag <category>accessing</category>
tag ^ 'input'
</methods> <methods> Seaside.WAFormInputTag <category>attributes</category>
readonly: aBoolean "When set to true, this boolean attribute prohibits changes to the widget." self attributes at: 'readonly' put: aBoolean
</methods> <methods> Seaside.WAFormInputTag <category>accessing</category>
type ^ nil
</methods> <methods> Seaside.WAFormInputTag <category>attributes</category>
text: aString self value: aString
</methods> <methods> Seaside.WAFormInputTag <category>attributes</category>
value ^ self attributes at: 'value'
</methods> <methods> Seaside.WAFormInputTag <category>callbacks</category>
on: selector of: anObject self value: (anObject perform: selector). self callback: [ :value | anObject perform: selector asMutator with: value ]
</methods> <methods> Seaside.WAFormInputTag <category>javascript</category>
setFocus "Makes this element have the initial focus once the page is loaded aka autofocus." self ensureId. self session addLoadScript: 'setFocus(' , self id printString , ')'
</methods> <methods> Seaside.WAFormTag <category>callbacks</category>
defaultAction: aBlock defaultAction := aBlock.
</methods> <methods> Seaside.WAFormTag <category>attributes</category>
multipart: aBoolean aBoolean ifTrue: [ self multipart ].
</methods> <methods> Seaside.WAFormTag <category>initialize-release</category>
setParent: aBrush canvas: aCanvas super setParent: aBrush canvas: aCanvas. self post; action: ''
</methods> <methods> Seaside.WAFormTag <category>attributes</category>
name: aString self attributeAt: 'name' put: aString
</methods> <methods> Seaside.WAFormTag <category>attributes</category>
method: aString self attributeAt: 'method' put: aString
</methods> <methods> Seaside.WAFormTag <category>attributes</category>
action: aString self attributeAt: 'action' put: aString
</methods> <methods> Seaside.WAFormTag <category>private</category>
tag ^ 'form'
</methods> <methods> Seaside.WAFormTag <category>private</category>
after canvas div: [ canvas context actionUrl parameters keysAndValuesDo: [ :k :v | canvas hiddenInput name: k; value: v ] ]
</methods> <methods> Seaside.WAFormTag <category>attributes</category>
post self method: 'post'
</methods> <methods> Seaside.WAFormTag <category>attributes</category>
noAutocomplete self attributeAt: 'autocomplete' put: 'off'
</methods> <methods> Seaside.WAFormTag <category>attributes</category>
multipart self attributeAt: 'enctype' put: 'multipart/form-data'
</methods> <methods> Seaside.WAFormTag <category>private</category>
before defaultAction ifNil: [^nil]. "XHTML validator requires a div in form" canvas div: [ canvas submitButton callback: defaultAction; value: 'Default'; style: 'position: absolute; top: -100em'; with: nil. canvas textInput callback: [:v]; style: 'position: absolute; top: -100em'].
</methods> <methods> Seaside.WAFrameComponent <category>rendering</category>
renderContentOn: html html render: contents
</methods> <methods> Seaside.WAFrameComponent <category>accessing</category>
contents: aComponent contents := aComponent
</methods> <methods> Seaside.WAFrameComponent <category>accessing</category>
children ^ Array with: contents
</methods> <methods> Seaside.WAFrameComponent <category>accessing</category>
contents ^ contents
</methods> <methods> Seaside.WAGenericTag <category>accessing</category>
tag ^ tag
</methods> <methods> Seaside.WAGenericTag <category>initialize-release</category>
initializeWithTag: aString tag := aString
</methods> <methods> Seaside.WAGlobalConfiguration <category>defaults</category>
serverPort ^ 80
</methods> <methods> Seaside.WAGlobalConfiguration <category>defaults</category>
deploymentMode ^ DeploymentMode
</methods> <methods> Seaside.WAGlobalConfiguration <category>attributes</category>
attributes ^ Array with: ((WAListAttribute key: #serverProtocol group: #server) options: #(http https)) with: (WAStringAttribute key: #serverHostname group: #server) with: (WANumberAttribute key: #serverPort group: #server) with: (WAStringAttribute key: #serverPath group: #server) with: (WABooleanAttribute key: #deploymentMode)
</methods> <methods> Seaside.WAGlobalConfiguration <category>defaults</category>
serverProtocol ^ #http
</methods> <methods> Seaside.WAGridDialog <category>rendering</category>
renderDialogOn: html html table: [ self renderHeadingsOn: html. self items do: [ :each | self renderRowForItem: each on: html ] ]
</methods> <methods> Seaside.WAGridDialog <category>rendering</category>
renderHeadingForSelector: aSymbol on: html html text: (self labelForSelector: aSymbol)
</methods> <methods> Seaside.WAGridDialog <category>rendering</category>
renderRowForItem: anObject on: html html tableRow class: (self cssClassForItem: anObject); with: [ self columns do: [:each | html tableData class: each; with: [self renderColumn: each for: anObject on: html ] ] ]
</methods> <methods> Seaside.WAGridDialog <category>rendering</category>
renderDefaultColumn: aSymbol for: anObject on: html html text: (anObject perform: aSymbol)
</methods> <methods> Seaside.WAGridDialog <category>accessing</category>
style ^ ' .dialog-buttons {text-align: center} '
</methods> <methods> Seaside.WAGridDialog <category>accessing</category>
cssClassForItem: anObject ^ 'dialog-row'
</methods> <methods> Seaside.WAGridDialog <category>rendering</category>
renderingSelectorFor: aSymbol ^ ('render', aSymbol capitalized, 'For:on:') asSymbol
</methods> <methods> Seaside.WAGridDialog <category>accessing</category>
items ^ #()
</methods> <methods> Seaside.WAGridDialog <category>rendering</category>
renderHeadingsOn: html self columns do: [ :each | html tableHeading class: each; with: [ self renderHeadingForSelector: each on: html ] ]
</methods> <methods> Seaside.WAGridDialog <category>accessing</category>
columns ^ #()
</methods> <methods> Seaside.WAGridDialog <category>rendering</category>
renderColumn: aSymbol for: anObject on: html | renderSelector | renderSelector := self renderingSelectorFor: aSymbol. (self respondsTo: renderSelector) ifTrue: [self perform: renderSelector with: anObject with: html] ifFalse: [self renderDefaultColumn: aSymbol for: anObject on: html]
</methods> <methods> Seaside.WAHalo <category>accessing</category>
mode ^ mode contents
</methods> <methods> Seaside.WAHalo <category>initialization</category>
initialize super initialize. mode := WAStateHolder new contents: self modes first
</methods> <methods> Seaside.WAHalo <category>rendering</category>
renderIconsOn: html html div class: 'halo-icons'; with: [ html text: self target class name; text: ' '. (self haloImageLinksFor: self target) do: [:each | self renderHalo: (each at: #title) icon: (each at: #image) window: (each at: #action) on: html ] ]
</methods> <methods> Seaside.WAHalo <category>rendering-modes</category>
source: html | context haloHtml | haloHtml := self rendererClass context: html context callbacks: html callbacks. context := haloHtml context copy. context clearMode. context document: (WAPrettyPrintedDocument renderer: haloHtml). haloHtml div class: 'halo-source'; with: [ self target renderWithContext: context ]. haloHtml close. html context count: context count
</methods> <methods> Seaside.WAHalo <category>configuration</category>
modes ^ #( render: source: profile: )
</methods> <methods> Seaside.WAHalo <category>accessing</category>
target ^ target
</methods> <methods> Seaside.WAHalo <category>rendering</category>
renderModeOn: html html div class: 'halo-mode'; with: [ html text: '['. self modes do: [ :each | html anchor class: 'active' if: self mode = each; title: (self labelForSelector: each allButLast); callback: [ self mode: each ]; with: each first asUppercase ] separatedBy: [ html text: '|' ]. html text: ']' ]
</methods> <methods> Seaside.WAHalo <category>rendering</category>
renderHalo: aString icon: aUrl window: aComponentBlock on: html self renderHalo: aString icon: aUrl callback: [ WARenderLoop new call: (aComponentBlock value addDecoration: (WAWindowDecoration new title: aString); yourself) ] on: html
</methods> <methods> Seaside.WAHalo <category>accessing</category>
mode: aSymbol mode contents: aSymbol
</methods> <methods> Seaside.WAHalo <category>rendering-modes</category>
profile: html | context haloHtml | haloHtml := self rendererClass context: html context callbacks: html callbacks. context := haloHtml context copy. context clearMode. context document: WAProfiledDocument new. haloHtml div class: 'halo-source'; with: [ self target renderWithContext: context ]. haloHtml render: context document; close. html context count: context count
</methods> <methods> Seaside.WAHalo <category>rendering</category>
renderHalo: aString icon: aUrl callback: aBlock on: html html anchor title: aString; callback: aBlock; with: [ html image url: aUrl ]
</methods> <methods> Seaside.WAHalo <category>plugins</category>
haloImageLinksFor: aTarget ^ self class haloImageLinksFor: aTarget inHalo: self
</methods> <methods> Seaside.WAHalo <category>rendering</category>
renderContentOn: html | haloHtml | haloHtml := self rendererClass context: html context callbacks: html callbacks. haloHtml div class: 'halo'; with: [ haloHtml div class: 'halo-header'; with: [ self renderIconsOn: haloHtml. self renderModeOn: haloHtml. haloHtml div class: 'halo-contents' ]. haloHtml div: [ self perform: mode contents with: html ] ]. haloHtml close. html close
</methods> <methods> Seaside.WAHalo <category>rendering-modes</category>
render: html self target renderContentOn: html
</methods> <methods> Seaside.WAHalo <category>accessing</category>
target: aComponent target := aComponent
</methods> <methods> Seaside.WAHeadingTag <category>attributes</category>
level2 level := 2.
</methods> <methods> Seaside.WAHeadingTag <category>accessing</category>
tag ^ 'h', self level displayString
</methods> <methods> Seaside.WAHeadingTag <category>accessing</category>
level ^ level ifNil: [1]
</methods> <methods> Seaside.WAHeadingTag <category>attributes</category>
level5 level := 5.
</methods> <methods> Seaside.WAHeadingTag <category>attributes</category>
level1 level := 1.
</methods> <methods> Seaside.WAHeadingTag <category>attributes</category>
level4 level := 4.
</methods> <methods> Seaside.WAHeadingTag <category>attributes</category>
level: anInteger level := anInteger
</methods> <methods> Seaside.WAHeadingTag <category>attributes</category>
level3 level := 3.
</methods> <methods> Seaside.WAHeadingTag <category>attributes</category>
level6 level := 6.
</methods> <methods> Seaside.WAHiddenInputTag <category>accessing</category>
type ^ 'hidden'
</methods> <methods> Seaside.WAHomeTest <category>rendering</category>
renderContentOn: html html anchorWithAction: [main home] text: 'Home'. html div: main
</methods> <methods> Seaside.WAHomeTest <category>initialize-release</category>
initialize super initialize. main := WATaskTest new.
</methods> <methods> Seaside.WAHomeTest <category>rendering</category>
rendererClass "Intentionally using the classic API" ^WAHtmlRenderer
</methods> <methods> Seaside.WAHomeTest <category>accessing</category>
children ^ Array with: main
</methods> <methods> Seaside.WAHtmlAttributes <category>javascript</category>
submitOnClick self at: 'onclick' put: 'submit()'
</methods> <methods> Seaside.WAHtmlAttributes <category>accessing</category>
at: keyString put: valueString "Set the value of the attribute aKey to be aValue. Ignore the request if the aValue is nil." valueString ifNotNil: [self attributes at: keyString put: valueString]
</methods> <methods> Seaside.WAHtmlAttributes <category>printing</category>
writeOn: aStream attributes ifNil: [ ^ self ]. attributes keysAndValuesDo: [ :key :value | self writeKey: key value: value on: aStream ]
</methods> <methods> Seaside.WAHtmlAttributes <category>deprecated</category>
addMeasurementStyle: aString withValue: aValue | styleValue | self deprecatedApi. styleValue := aValue isNumber ifTrue: [ aValue px ] ifFalse: [ aValue displayString ]. self addStyle: aString , ': ' , styleValue
</methods> <methods> Seaside.WAHtmlAttributes <category>deprecated</category>
backgroundColor: aValue self deprecatedApi. self addStyle: 'background-color: ' , aValue displayString
</methods> <methods> Seaside.WAHtmlAttributes <category>private</category>
associations ^ self attributes associations
</methods> <methods> Seaside.WAHtmlAttributes <category>deprecated</category>
bgcolor: aValue self deprecatedApi. self at: 'bgcolor' put: aValue
</methods> <methods> Seaside.WAHtmlAttributes <category>accessing</category>
at: keyString append: aString separator: separatorString "Append aValue to the attribute aKey. If already present, concatenate it with aString. Ignore the request if aValue is nil." aString ifNil: [^ self at: keyString]. ^ self at: keyString put: (String streamContents: [:stream | self at: keyString ifPresent: [:s | stream nextPutAll: s; nextPutAll: separatorString]. stream nextPutAll: aString displayString])
</methods> <methods> Seaside.WAHtmlAttributes <category>accessing</category>
at: keyString ifPresent: aBlock ^ aBlock value: (self at: keyString ifAbsent: [^ nil]) value
</methods> <methods> Seaside.WAHtmlAttributes <category>accessing</category>
at: keyString "Answer the value associated with the attribute aKey. Answer nil, if no such attribute is defined." ^ (self at: keyString ifAbsent: [keyString -> nil]) value
</methods> <methods> Seaside.WAHtmlAttributes <category>private</category>
attributes ^ attributes ifNil: [attributes := Dictionary new]
</methods> <methods> Seaside.WAHtmlAttributes <category>accessing</category>
at: keyString ifAbsent: aBlock ^ self associations detect: [:ea | ea key = keyString] ifNone: aBlock
</methods> <methods> Seaside.WAHtmlAttributes <category>deprecated</category>
border: aValue | cssValue | self deprecatedApi. cssValue := 'none'. aValue displayString = '1' ifTrue: [cssValue := 'solid 1px black']. aValue displayString = '2' ifTrue: [cssValue := 'solid 2px black']. self addStyle: 'border: ' , cssValue.
</methods> <methods> Seaside.WAHtmlAttributes <category>deprecated</category>
height: aValue self deprecatedApi. self addMeasurementStyle: 'height' withValue: aValue
</methods> <methods> Seaside.WAHtmlAttributes <category>accessing</category>
at: keyString ifAbsentPut: errBlock "What if errBlock evaluates to nil ?" ^ self at: keyString ifAbsent: [self attributes add: keyString -> errBlock value]
</methods> <methods> Seaside.WAHtmlAttributes <category>javascript</category>
submitOnChange self at: 'onchange' put: 'submit()'
</methods> <methods> Seaside.WAHtmlAttributes <category>deprecated</category>
background: aValue self deprecatedApi. self addStyle: 'background-image: url(' , aValue displayString , ')'
</methods> <methods> Seaside.WAHtmlAttributes <category>accessing</category>
at: keyString append: aString "Append aValue to the attribute aKey. If already present, concatenate it with a space. Ignore the request if aValue is nil." ^ self at: keyString append: aString separator: ' '
</methods> <methods> Seaside.WAHtmlAttributes <category>deprecated</category>
bgcolor self deprecatedApi
</methods> <methods> Seaside.WAHtmlAttributes <category>convenience</category>
addClass: aString "Add an additional class aString to the receiver." aString ifNotNil: [ self at: 'class' append: aString ]
</methods> <methods> Seaside.WAHtmlAttributes <category>deprecated</category>
alignBottom self deprecatedApi. self at: 'valign' put: 'bottom'
</methods> <methods> Seaside.WAHtmlAttributes <category>deprecated</category>
align self deprecatedApi
</methods> <methods> Seaside.WAHtmlAttributes <category>deprecated</category>
alignCenter self deprecatedApi. self addStyle: 'text-align: center'
</methods> <methods> Seaside.WAHtmlAttributes <category>convenience</category>
addStyle: aString "Add an additional CSS style definition aString to the receiver." aString ifNotNil: [ self at: 'style' append: aString separator: ';' ]
</methods> <methods> Seaside.WAHtmlAttributes <category>dnu</category>
doesNotUnderstand: aMessage | argCount | self deprecatedApi. argCount := aMessage arguments size. argCount = 0 ifTrue: [^ self at: aMessage selector asLowercase put: true]. argCount = 1 ifTrue: [^ self at: aMessage selector allButLast asLowercase put: aMessage argument]. ^ super doesNotUnderstand: aMessage
</methods> <methods> Seaside.WAHtmlAttributes <category>deprecated</category>
width: aValue self deprecatedApi. self addMeasurementStyle: 'width' withValue: aValue
</methods> <methods> Seaside.WAHtmlAttributes <category>copying</category>
postCopy super postCopy. attributes := attributes copy.
</methods> <methods> Seaside.WAHtmlAttributes <category>deprecated</category>
noBorder self deprecatedApi. self border: 0
</methods> <methods> Seaside.WAHtmlAttributes <category>printing</category>
writeKey: aKey value: aValue on: aStream aValue = false ifFalse: [ aStream nextPut: $ ; nextPutAll: aKey; nextPutAll: '="'. aValue = true ifFalse: [ WAAbstractHtmlBuilder encode: aValue to: aStream ] ifTrue: [ aStream nextPutAll: aKey ]. aStream nextPut: $" ]
</methods> <methods> Seaside.WAHtmlAttributes <category>deprecated</category>
align: aValue self deprecatedApi. self at: 'align' put: aValue
</methods> <methods> Seaside.WAHtmlAttributes <category>convenience</category>
addScript: aString aString ifNotNil: [ self at: 'script' append: aString separator: ';' ]
</methods> <methods> Seaside.WAHtmlBuilder <category>accessing</category>
document: aDocument document := aDocument
</methods> <methods> Seaside.WAHtmlBuilder <category>accessing</category>
document ^ document
</methods> <methods> Seaside.WAHtmlCanvas <category>html</category>
popupAnchor ^ self brush: WAPopupAnchorTag new
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
sampleOutput "Sample output, from a program or script." ^ self tag: 'samp'
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
variable: aBlock self variable with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
tableColumnGroup "Defines groups of table columns." ^ self brush: WATableColumnGroupTag new
</methods> <methods> Seaside.WAHtmlCanvas <category>html</category>
map "Defines an anchor to be used around an image." ^ self brush: WAImageMapTag new
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
rubyTextContainer: aBlock self rubyTextContainer with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html</category>
form "Defines a form." ^ self tag: 'form'
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
preformatted: aBlock self preformatted with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
tableFoot "Defines a table footer." ^ self tag: 'tfoot'
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
sampleOutput: aBlock self sampleOutput with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
definitionData: aBlock self definitionData with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
heading "Defines header 1 to header 6." ^ self brush: WAHeadingTag new
</methods> <methods> Seaside.WAHtmlCanvas <category>encoding</category>
withLineBreaks: aString "Renders text preserving line breaks." | stream | stream := aString readStream. [stream atEnd] whileFalse: [self text: stream nextLine. stream atEnd ifFalse: [self break]]
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
small "Defines small text." ^ self tag: 'small'
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
variable "Defines a variable." ^ self tag: 'var'
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
big: aBlock self big with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
legend: aBlock self legend with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
table "Defines a table." ^ self brush: WATableTag new
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
emphasis "Defines emphasized text." ^ self tag: 'em'
</methods> <methods> Seaside.WAHtmlCanvas <category>public api</category>
comment: aString self flush. self document comment: aString displayString
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
orderedList: aBlock self orderedList with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
rubyBaseContainer ^ self tag: 'rbc'
</methods> <methods> Seaside.WAHtmlCanvas <category>html</category>
orderedList "Defines an ordered list." ^ self brush: WAListTag new beOrdered.
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
tableBody "Defines a table body." ^ self tag: 'tbody'
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
preformatted "Defines preformatted text." ^ self tag: 'pre'
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
keyboardInput "Keyboard, text to be entered by the user." ^ self tag: 'kbd'
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
fieldSet: aBlock self fieldSet with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
definitionTerm "Defines a definition term." ^ self tag: 'dt'
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
break "Inserts a single line break." ^ self tag: 'br'
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
acronym: aBlock self acronym with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html</category>
deleted "Defines deleted text." ^ self brush: (WAEditTag tag: 'del')
</methods> <methods> Seaside.WAHtmlCanvas <category>html</category>
inserted "Defines inserted text." ^ self brush: (WAEditTag tag: 'ins')
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
canvas: aBlock self canvas with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
address: aBlock self address with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
tableRow "Defines a table row." ^ self tag: 'tr'
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
rubyBase: aBlock self rubyBase with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>encoding</category>
withUrls: aString | stream url | stream := aString readStream. [stream atEnd] whileFalse: [self text: (stream upToAll: 'http://'). stream atEnd ifFalse: [url := 'http://', (stream upTo: $ ). self anchor url: url; with: url. self text: ' ']]
</methods> <methods> Seaside.WAHtmlCanvas <category>html</category>
unorderedList "Defines an unordered list." ^ self brush: WAListTag new beUnordered.
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
tableCaption "Defines a table caption." ^ self tag: 'caption'
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
listItem "Defines a list item." ^ self tag: 'li'
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
code "Defines computer code text." ^ self tag: 'code'
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
fieldSet "Defines a fieldset." ^ self brush: WAFieldSetTag new
</methods> <methods> Seaside.WAHtmlCanvas <category>html</category>
submitButton ^ self brush: WASubmitButtonTag new.
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
object: aBlock self object with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
definitionList: aBlock self definitionList with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
tableCaption: aBlock self tableCaption with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
abbreviated "Defines an abbreviation, such as 'M.', 'Inc.', 'et al.', 'etc.'" ^ self tag: 'abbr'
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
span: aBlock self span with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
rubyText: aBlock self rubyText with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html</category>
heading: aBlock level: aNumber self heading level: aNumber; with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>convenience</category>
space: anInteger anInteger timesRepeat: [ self space ]
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
tableHead "Defines a table header." ^ self tag: 'thead'
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
quote "Defines a short quotation." ^ self tag: 'q'
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
tableHead: aBlock self tableHead with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>deprecated</category>
underline self deprecatedApi. ^ self tag: 'u'
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
ruby ^ self tag: 'ruby'
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
strong "Defines strong text." ^ self tag: 'strong'
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
tableHeading "Defines a table header." ^ self brush: WATableHeadingTag new
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
ruby: aBlock self ruby with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
unorderedList: aBlock self unorderedList with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
iframe ^ self brush: WAIframeTag new
</methods> <methods> Seaside.WAHtmlCanvas <category>html</category>
deleted: aBlock self deleted with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
definitionTerm: aBlock self definitionTerm with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
image: aBlock self image with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
definition "Defines a definition term." ^ self tag: 'dfn'
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
image "Defines an image." ^ self brush: WAImageTag new
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
code: aBlock self code with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
definitionData "Defines a definition description." ^ self tag: 'dd'
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
emphasis: aBlock self emphasis with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
script: aBlock self script with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>public api</category>
text: anObject "Emit aString onto the target document." self html: (self encode: anObject)
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
form: aBlock self form with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
acronym "Defines an acronym, such as 'GmbH', 'NATO', and 'F.B.I.'" ^ self tag: 'acronym'
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
span "Defines a section in a document." ^ self tag: 'span'
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
tableColumn: aBlock self tableColumn with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
rubyParentheses ^ self tag: 'rp'
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
listItem: aBlock self listItem with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
rubyText ^ self brush: WARubyTextTag new
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
tableColumnGroup: aBlock self tableColumnGroup with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>deprecated</category>
underline: aBlock self deprecatedApi. self underline with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
div: aBlock self div with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
object "Defines an embedded object." ^ self brush: WAObjectTag new
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
blockquote: aBlock self blockquote with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
blockquote "Defines a long quotation." ^ self tag: 'blockquote'
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
paragraph: aBlock self paragraph with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
definition: aBlock self definition with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>deprecated</category>
italic self deprecatedApi. ^ self tag: 'i'
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
address "Defines an address element." ^ self tag: 'address'
</methods> <methods> Seaside.WAHtmlCanvas <category>deprecated</category>
italic: aBlock self deprecatedApi. self italic with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
tableBody: aBlock self tableBody with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>deprecated</category>
bold self deprecatedApi. ^ self tag: 'b'
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
quote: aBlock self quote with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
horizontalRule "Defines a horizontal rule." ^ self tag: 'hr'
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
small: aBlock self small with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
label: aBlock self label with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>deprecated</category>
bold: aBlock self deprecatedApi. self bold with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
tableRow: aBlock self tableRow with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>encoding</category>
withLineBreaksAndUrls: aString | stream | aString ifNil: [^ self]. stream := aString readStream. [stream atEnd] whileFalse: [self withUrls: stream nextLine. stream atEnd ifFalse: [self break]]
</methods> <methods> Seaside.WAHtmlCanvas <category>html</category>
imageForm: aForm self image form: aForm.
</methods> <methods> Seaside.WAHtmlCanvas <category>public api</category>
html: aString "Emit aString unescaped onto the target document." self flush. self document text: aString displayString
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
anchor "Defines an anchor." ^ self brush: WAAnchorTag new
</methods> <methods> Seaside.WAHtmlCanvas <category>html</category>
space self html: self spaceEntity
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
tableFoot: aBlock self tableFoot with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
tableData: aBlock self tableData with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
abbreviated: aBlock self abbreviated with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
rubyBaseContainer: aBlock self rubyBaseContainer with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
big "Defines big text." ^ self tag: 'big'
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
rubyTextContainer ^ self tag: 'rtc'
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
label "Defines a label for a form control." ^ self brush: WALabelTag new
</methods> <methods> Seaside.WAHtmlCanvas <category>accessing</category>
document self subclassResponsibility
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
parameter: aBlock self parameter
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
tableHeading: aBlock self tableHeading with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>encoding</category>
encode: anObject "This is needed by the SeasideAsync package" ^WAAbstractHtmlBuilder encode: anObject
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
keyboardInput: aBlock self keyboardInput with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
strong: aBlock self strong with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>public api</category>
tag: aString "Defines a generic tag with the name aString." ^ self brush: (WAGenericTag tag: aString)
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
canvas ^ self brush: WACanvasTag new
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
citation: aBlock self citation with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
tableColumn "Defines attributes for table columns." ^ self brush: WATableColumnTag new
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
script "Defines a script." ^ self brush: WAScriptTag new
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
table: aBlock self table with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html</category>
heading: aBlock self heading with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html</category>
spaceEntity "To be subclassed as needed" ^'&nbsp;'
</methods> <methods> Seaside.WAHtmlCanvas <category>html</category>
inserted: aBlock self inserted with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
paragraph "Defines a paragraph." ^ self tag: 'p'
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
rubyBase ^ self tag: 'rb'
</methods> <methods> Seaside.WAHtmlCanvas <category>html</category>
textInput ^ self brush: WATextInputTag new
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
legend "Defines a title in a fieldset." ^ self tag: 'legend'
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
citation "Defines a citation." ^ self tag: 'cite'
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
div "Defines a section in a document." ^ self brush: WADivTag new
</methods> <methods> Seaside.WAHtmlCanvas <category>encoding</category>
encodeCharacter: aCharacter self html: ('&#', aCharacter asInteger displayString, ';').
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
tableData "Defines a table cell." ^ self brush: WATableDataTag new
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
rubyParentheses: aBlock self rubyParentheses with: aBlock
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
parameter "Defines a parameter for an object." ^ self brush: WAParameterTag new
</methods> <methods> Seaside.WAHtmlCanvas <category>html-generated</category>
definitionList "Defines a definition list." ^ self tag: 'dl'
</methods> <methods> Seaside.WAHtmlDocument <category>public</category>
closeTag: aString self subclassResponsibility
</methods> <methods> Seaside.WAHtmlDocument <category>public</category>
text: aString self subclassResponsibility
</methods> <methods> Seaside.WAHtmlDocument <category>initialization</category>
initializeWithRoot: aRoot root := aRoot
</methods> <methods> Seaside.WAHtmlDocument <category>testing</category>
shouldPrintCloseTagFor: aString ^ (#('hr' 'br' 'input' 'img' 'link' 'col') includes: aString asString) not
</methods> <methods> Seaside.WAHtmlDocument <category>public</category>
openTag: aString attributes: anAttributes self subclassResponsibility
</methods> <methods> Seaside.WAHtmlDocument <category>public</category>
comment: aString "Display aString as comment in the resulting HTML document, the default implementation doesn't bother rendering comments."
</methods> <methods> Seaside.WAHtmlDocument <category>accessing</category>
root ^ root
</methods> <methods> Seaside.WAHtmlDocument <category>public</category>
close
</methods> <methods> Seaside.WAHtmlElement <category>printing</category>
printOpenTagOn: aStream aStream nextPut: $<; nextPutAll: self name. attributes ifNotNil: [attributes writeOn: aStream]. self shouldPrintCloseTag ifFalse: [aStream nextPutAll: ' /']. aStream nextPut: $>
</methods> <methods> Seaside.WAHtmlElement <category>printing</category>
prettyPrintHtmlOn: aStream indentLevel: anInteger aStream cr. anInteger timesRepeat: [aStream tab]. self printOpenTagOn: aStream. self childrenDo: [:ea | ea prettyPrintHtmlOn: aStream indentLevel: anInteger + 1]. self shouldPrintCloseTag ifTrue: [self printCloseTagOn: aStream].
</methods> <methods> Seaside.WAHtmlElement <category>printing</category>
printCloseTagOn: aStream aStream nextPutAll: '</'; nextPutAll: self name; nextPut: $>
</methods> <methods> Seaside.WAHtmlElement <category>commands</category>
writeOn: aStream self printOpenTagOn: aStream. self childrenDo: [:ea | ea isString ifTrue: [aStream nextPutAll: ea] ifFalse: [ea writeOn: aStream]]. self shouldPrintCloseTag ifTrue: [self printCloseTagOn: aStream].
</methods> <methods> Seaside.WAHtmlElement <category>accessing</category>
attributeAt: aString ^attributes at: aString
</methods> <methods> Seaside.WAHtmlElement <category>accessing</category>
attributeAt: aString put: anObject attributes at: aString put: anObject
</methods> <methods> Seaside.WAHtmlElement <category>accessing</category>
attributeAt: aString ifAbsent: aBlock ^(attributes at: aString ifAbsent: [ nil -> aBlock value ]) value
</methods> <methods> Seaside.WAHtmlElement <category>accessing</category>
name ^ name asLowercase
</methods> <methods> Seaside.WAHtmlElement <category>commands</category>
childrenDo: aBlock children ifNotNil: [children do: aBlock]
</methods> <methods> Seaside.WAHtmlElement <category>accessing</category>
shouldPrintCloseTag ^ isClosed
</methods> <methods> Seaside.WAHtmlElement <category>commands</category>
add: anElement children ifNil: [children := OrderedCollection new]. children add: anElement.
</methods> <methods> Seaside.WAHtmlElement <category>printing</category>
prettyPrintHtmlOn: aStream self prettyPrintHtmlOn: aStream indentLevel: 0.
</methods> <methods> Seaside.WAHtmlElement <category>printing</category>
printHtmlOn: aStream self printOpenTagOn: aStream. self childrenDo: [:ea | ea writeOn: aStream]. self shouldPrintCloseTag ifTrue: [self printCloseTagOn: aStream].
</methods> <methods> Seaside.WAHtmlElement <category>accessing</category>
notClosed isClosed := false
</methods> <methods> Seaside.WAHtmlElement <category>accessing</category>
beClosed isClosed := true
</methods> <methods> Seaside.WAHtmlElement <category>initialize-release</category>
initializeWithName: aString attributes: anAttributes name := aString. attributes := anAttributes. isClosed := true.
</methods> <methods> Seaside.WAHtmlRenderer <category>core</category>
openSelect | name | name := self isMultiple ifTrue: [self callbacks registerMultiDispatchCallback] ifFalse: [self callbacks registerDispatchCallback]. self attributes at: 'name' put: name. self openTag: 'select'.
</methods> <methods> Seaside.WAHtmlRenderer <category>convenience</category>
unorderedList: aCollection selected: anObject callback: aBlock labels: labelBlock aBlock fixTemps. self ensureCssClass: 'options'. self unorderedList: [ aCollection do: [:ea | self cssClass: (ea = anObject ifTrue: ['option option-selected'] ifFalse: ['option']). self listItem: [self anchorWithAction: [aBlock value: ea] text: (labelBlock value: ea)]]. ]
</methods> <methods> Seaside.WAHtmlRenderer <category>convenience</category>
selectInputOn: selectedSymbol of: anObject list: aCollection self selectFromList: aCollection selected: (anObject perform: selectedSymbol) callback: (self callbackForSelector: selectedSymbol of: anObject)
</methods> <methods> Seaside.WAHtmlRenderer <category>javascript</category>
anchorWithAction: actionBlock text: aString submitFormNamed: formName | key | key := self context nextKey. #submitFormTriggeringCallback. self attributes at: 'onClick' put: 'submitFormTriggeringCallback(' , formName asString printString , ', ' , key displayString printString , ' , "href" ); return false;'. self anchorWithAction: actionBlock text: aString
</methods> <methods> Seaside.WAHtmlRenderer <category>javascript</category>
autofocus: aBlock withCursorAt: cursorPosition | elementId aStream | cursorPosition isNil ifTrue: [^self autofocus: aBlock]. elementId := self ensureId. aBlock value. aStream := (String new: 30) writeStream. #setCursor. aStream nextPutAll: 'setCursor('; nextPutAll: elementId asString printString. cursorPosition isNumber ifTrue: [aStream nextPutAll: ',' , cursorPosition asString]. "Cursor will go at end of field value, if position is not a number" aStream nextPut: $). self script: aStream contents
</methods> <methods> Seaside.WAHtmlRenderer <category>core</category>
urlForIdempotentAction: actionBlock | url | url := (context actionUrl withParameter: (self callbacks registerActionCallback: actionBlock)) withParameter: '_n'. ^ url displayString
</methods> <methods> Seaside.WAHtmlRenderer <category>core</category>
openAnchorWithAction: actionBlock self attributeAt: 'href' put: (self urlForAction: actionBlock). self openTag: 'a'.
</methods> <methods> Seaside.WAHtmlRenderer <category>documents</category>
anchorWithDocument: anObject mimeType: mimeType fileName: fileName text: aString self openAnchorWithDocument: anObject mimeType: mimeType fileName: fileName. self text: aString. self closeTag: 'a'.
</methods> <methods> Seaside.WAHtmlRenderer <category>javascript</category>
anchorWithPopupAction: aBlock extent: aPoint do: anObject self anchorWithPopupUrl: (self urlForAction: aBlock) extent: aPoint do: anObject
</methods> <methods> Seaside.WAHtmlRenderer <category>model</category>
labelledRowForTextInputOn: aSymbol of: anObject self labelledRowForTextInputOn: aSymbol of: anObject size: nil
</methods> <methods> Seaside.WAHtmlRenderer <category>documents</category>
anchorWithDocument: anObject mimeType: mimeType text: aString self anchorWithDocument: anObject mimeType: mimeType fileName: nil text: aString
</methods> <methods> Seaside.WAHtmlRenderer <category>core</category>
form: aBlock self formWithMethod: 'post' action: context actionUrl urlString do: [ self div: [ context actionUrl parameters keysAndValuesDo: [:k :v | self inputWithType: 'hidden' named: k value: v]. aBlock value ]]
</methods> <methods> Seaside.WAHtmlRenderer <category>private</category>
fromStringConverterBlockFor: anObject callback: aBlock ^ [:v | aBlock value: ( [anObject convertSeasideString: v] on: Error do: [:e | v] ) ]
</methods> <methods> Seaside.WAHtmlRenderer <category>core</category>
optionWithLabel: aString callback: aBlock self optionWithLabel: aString selected: false callback: aBlock
</methods> <methods> Seaside.WAHtmlRenderer <category>model</category>
checkboxOn: aSymbol of: anObject self ensureCssId: aSymbol; checkboxWithValue: (anObject perform: aSymbol) callback: (self callbackForSelector: aSymbol of: anObject)
</methods> <methods> Seaside.WAHtmlRenderer <category>accessing</category>
initializeWithContext: aRenderingContext callbacks: aCallbackStore context := aRenderingContext. callbacks := aCallbackStore.
</methods> <methods> Seaside.WAHtmlRenderer <category>compound</category>
dateInputWithValue: aDate callback: aBlock | values | aBlock fixCallbackTemps. values := Array new: 3. self selectFromList: (1 to: 12) selected: aDate monthIndex callback: [ :month | values at: 2 put: month ] labels: [:ea | Date nameOfMonth: ea]. self space. self textInputWithValue: aDate dayOfMonth callback: [ :day | values at: 1 put: day ] maxLength: 2. self space. self textInputWithValue: aDate year callback: [ :year | values at: 3 put: year] maxLength: 4. self hiddenInputWithCallback: [aBlock value: (Date newDay: (values first min: (Date daysInMonth: values second forYear: values third)) monthNumber: values second year: values third)].
</methods> <methods> Seaside.WAHtmlRenderer <category>documents</category>
imageWithDocument: anObject mimeType: mimeType fileName: fileName self image: (self context urlForDocument: anObject mimeType: mimeType fileName: fileName).
</methods> <methods> Seaside.WAHtmlRenderer <category>convenience</category>
booleanMenuWithValue: aBoolean callback: callbackBlock labels: labelArray self selectFromList: (Array with: true with: false) selected: aBoolean callback: callbackBlock labels: [:b | b ifTrue: [labelArray first] ifFalse: [labelArray second]]
</methods> <methods> Seaside.WAHtmlRenderer <category>compound</category>
timeInputWithValue: aTime callback: aBlock | values | aBlock fixCallbackTemps. values := Array new: 2. self textInputWithValue: aTime hour callback: [:hour | values at: 1 put: hour] maxLength: 2. self space; text: ':'; space. self textInputWithValue: aTime minutes asTwoCharacterString callback: [:minute | values at: 2 put: minute asNumber] maxLength: 2. self hiddenInputWithCallback: [aBlock value: (Time hour: values first minute: (values second min: 59) second: 0)]
</methods> <methods> Seaside.WAHtmlRenderer <category>javascript</category>
installShortcuts | aStream | shortcutBuffer notNil ifTrue: [aStream := (String new: 30) writeStream. shortcutBuffer associations do: [:each | aStream nextPutAll: 'addShortcut('; nextPutAll: each key printString; nextPut: $,; nextPutAll: each value asString printString; nextPut: $)] separatedBy: [aStream nextPutAll: '; ']. shortcutBuffer := nil. #addShortcut. self script: aStream contents].
</methods> <methods> Seaside.WAHtmlRenderer <category>javascript</category>
anchorWithPopupAction: aBlock name: nameString extent: aPoint toggles: aCollection do: anObject self anchorWithPopupUrl: (self urlForAction: aBlock) name: nameString extent: aPoint toggles: aCollection do: anObject
</methods> <methods> Seaside.WAHtmlRenderer <category>convenience</category>
selectFromList: aCollection selected: selectedObject callback: callbackBlock labels: labelsBlock | isMultiple selected id | isMultiple := self isMultiple. selected := ValueHolder new contents: OrderedCollection new. isMultiple ifTrue: [id := self attributeAt: 'id'. id notNil ifTrue: [self attributeAt: 'id' put: id , '-hidden']. self attributeAt: 'multiple' put: false. self hiddenInputWithCallback: [selected contents: OrderedCollection new] fixCallbackTemps. self attributeAt: 'id' put: id. self attributeAt: 'multiple' put: true]. self openSelect. callbackBlock fixCallbackTemps. aCollection do: [:item | | isSelected | isSelected := isMultiple ifTrue: [selectedObject includes: item] ifFalse: [item = selectedObject]. self optionWithLabel: (labelsBlock value: item) selected: isSelected callback: [isMultiple ifTrue: [selected contents add: item] ifFalse: [callbackBlock value: item]] fixCallbackTemps]. self closeTag: 'select'. isMultiple ifTrue: [self hiddenInputWithCallback: [callbackBlock value: selected contents asArray] fixCallbackTemps]
</methods> <methods> Seaside.WAHtmlRenderer <category>core</category>
urlForAction: actionBlock andPath: aString | url | url := context actionUrl withParameter: (self callbacks registerActionCallback: actionBlock). url addToPath: aString. ^ url displayString
</methods> <methods> Seaside.WAHtmlRenderer <category>documents</category>
openAnchorWithDocument: anObject mimeType: mimeType fileName: fileName self attributeAt: 'href' put: (self context urlForDocument: anObject mimeType: mimeType fileName: fileName). self openTag: #a.
</methods> <methods> Seaside.WAHtmlRenderer <category>convenience</category>
anchorWithAction: actionBlock form: aForm self anchorWithAction: actionBlock do: [self imageWithForm: aForm.]
</methods> <methods> Seaside.WAHtmlRenderer <category>javascript</category>
closeTag: aString super closeTag: aString. self installShortcuts.
</methods> <methods> Seaside.WAHtmlRenderer <category>model</category>
anchorOn: aSymbol of: anObject self ensureCssId: aSymbol; anchorWithAction: (MessageSend receiver: anObject selector: aSymbol) text: (self labelForSelector: aSymbol of: anObject)
</methods> <methods> Seaside.WAHtmlRenderer <category>accessing</category>
close
</methods> <methods> Seaside.WAHtmlRenderer <category>model</category>
labelledRowForTextInputOn: aSymbol of: anObject size: sizeIntegerOrNil self tableRowWithLabel: (self labelForSelector: aSymbol of: anObject) on: aSymbol column: [sizeIntegerOrNil ifNotNil: [self attributeAt: #size put: sizeIntegerOrNil]. self textInputOn: aSymbol of: anObject]
</methods> <methods> Seaside.WAHtmlRenderer <category>convenience</category>
anchorWithAction: actionBlock do: linkBlock self openAnchorWithAction: actionBlock. self render: linkBlock. self closeTag: 'a'.
</methods> <methods> Seaside.WAHtmlRenderer <category>javascript</category>
anchorWithPopupAction: aBlock extent: aPoint text: aString self anchorWithPopupAction: aBlock extent: aPoint do: aString
</methods> <methods> Seaside.WAHtmlRenderer <category>core</category>
formWithDefaultAction: defaultBlock do: aBlock self form: [self defaultAction: defaultBlock. aBlock value]
</methods> <methods> Seaside.WAHtmlRenderer <category>convenience</category>
booleanMenuWithValue: aBoolean callback: callbackBlock self booleanMenuWithValue: aBoolean callback: callbackBlock labels: #(Yes No)
</methods> <methods> Seaside.WAHtmlRenderer <category>core</category>
labelAfter: aString input: aBlock | id | id := self nextId. self labelFor: id do: [self cssId: id. aBlock value. self space. self text: aString]
</methods> <methods> Seaside.WAHtmlRenderer <category>documents</category>
urlForDocument: anObject ^ self context urlForDocument: anObject
</methods> <methods> Seaside.WAHtmlRenderer <category>model</category>
labelledRowForTextAreaOn: aSymbol of: anObject self tableRowWithLabel: (self labelForSelector: aSymbol of: anObject) on: aSymbol column: [self textAreaOn: aSymbol of: anObject]
</methods> <methods> Seaside.WAHtmlRenderer <category>core</category>
textAreaWithCallback: callbackBlock self textAreaWithValue: nil callback: callbackBlock
</methods> <methods> Seaside.WAHtmlRenderer <category>documents</category>
parseImageMap: aString |s x y| ('?*,*' match: aString) ifFalse: [^ nil]. s := aString readStream. s upTo: $?. x := s upTo: $,. y := s upToEnd. ^ x asNumber @ y asNumber
</methods> <methods> Seaside.WAHtmlRenderer <category>javascript</category>
getId "Compatibility" ^ self nextId.
</methods> <methods> Seaside.WAHtmlRenderer <category>javascript</category>
ensureId ^ (self attributes at: 'id' ifAbsentPut: [self nextId]) value
</methods> <methods> Seaside.WAHtmlRenderer <category>convenience</category>
anchorWithCallback: actionBlock do: linkBlock self anchorWithUrl: (self urlForIdempotentAction: actionBlock) do: linkBlock
</methods> <methods> Seaside.WAHtmlRenderer <category>core</category>
isMultiple | value | ^ (value := self attributeAt: 'multiple') notNil and: [value ~~ false]
</methods> <methods> Seaside.WAHtmlRenderer <category>convenience</category>
submitButtonWithAction: aBlock text: aString self attributeAt: 'value' put: aString. self submitButtonWithAction: aBlock
</methods> <methods> Seaside.WAHtmlRenderer <category>core</category>
textAreaWithValue: anObject callback: callbackBlock | callback updateKey | callback := self fromStringConverterBlockFor: anObject callback: callbackBlock. updateKey := self callbacks registerCallback: callback. self textAreaNamed: updateKey value: anObject asSeasideString. ^updateKey
</methods> <methods> Seaside.WAHtmlRenderer <category>model</category>
labelledRowForCheckboxOn: aSymbol of: anObject self tableRowWithLabel: (self labelForSelector: aSymbol of: anObject) on: aSymbol column: [self checkboxOn: aSymbol of: anObject]
</methods> <methods> Seaside.WAHtmlRenderer <category>documents</category>
imageWithFileNamed: fileName mimeType: mimeType | document | document := WACachedDocument fileName: fileName. mimeType notNil ifTrue: [document mimeType: mimeType]. self imageWithDocument: document mimeType: document mimeType fileName: fileName.
</methods> <methods> Seaside.WAHtmlRenderer <category>convenience</category>
hiddenInputWithValue: anObject callback: callbackBlock self valueInputOfType: 'hidden' value: anObject callback: callbackBlock
</methods> <methods> Seaside.WAHtmlRenderer <category>convenience</category>
selectFromList: aCollection selected: selectedObject callback: callbackBlock self selectFromList: aCollection selected: selectedObject callback: callbackBlock labels: [:i | i displayString]
</methods> <methods> Seaside.WAHtmlRenderer <category>convenience</category>
textInputWithValue: anObject callback: callbackBlock maxLength: aNumber self attributes at: 'size' put: aNumber; at: 'maxlength' put: aNumber. self textInputWithValue: anObject callback: callbackBlock.
</methods> <methods> Seaside.WAHtmlRenderer <category>core</category>
defaultAction: actionBlock self style: 'position: absolute; top: -100em'; submitButtonWithAction: actionBlock text: 'Default'. self style: 'position: absolute; top: -100em'; textInputWithCallback: [:v | ].
</methods> <methods> Seaside.WAHtmlRenderer <category>core</category>
radioButtonInGroup: radioGroupKey selected: aBoolean callback: callbackBlock self attributeAt: 'checked' put: aBoolean. self inputWithType: 'radio' named: radioGroupKey value: (self callbacks registerCallback: callbackBlock)
</methods> <methods> Seaside.WAHtmlRenderer <category>javascript</category>
spanWithShow: showLink hide: hideLink do: aBlock | linkId divId onClick | divId := self ensureId. linkId := self nextId. #swapDisplay. onClick := 'swapDisplay(', linkId printString, ', ', divId asString printString, '); return false;'. self attributes id: linkId; style: 'display: block'. self anchorWithScript: onClick do: showLink. self attributes id: divId; style: 'display: none'. self span: [ self anchorWithScript: onClick do: hideLink. self span: aBlock. ]
</methods> <methods> Seaside.WAHtmlRenderer <category>core</category>
submitButtonWithAction: actionBlock image: aForm self attributes at: 'src' put: (self context urlForDocument: aForm); width: aForm width; height: aForm height. self inputWithType: 'image' named: (self callbacks registerImageCallback: actionBlock)
</methods> <methods> Seaside.WAHtmlRenderer <category>javascript</category>
checkboxWithValue: aBoolean callback: callbackBlock submitFormNamed: formName #submitForm. self attributes at: 'onClick' put: 'submitForm(' , formName asString printString , '); return false;'. self checkboxWithValue: aBoolean callback: callbackBlock
</methods> <methods> Seaside.WAHtmlRenderer <category>core</category>
submitButtonWithAction: actionBlock do: aBlock self buttonWithType: 'submit' named: (self callbacks registerActionCallback: actionBlock) value: nil do: aBlock
</methods> <methods> Seaside.WAHtmlRenderer <category>model</category>
labelledRowForList: aCollection on: aSymbol of: anObject self labelledRowForList: aCollection on: aSymbol of: anObject size: nil
</methods> <methods> Seaside.WAHtmlRenderer <category>accessing</category>
response ^ self context response
</methods> <methods> Seaside.WAHtmlRenderer <category>core</category>
fileUploadWithCallback: aBlock aBlock fixCallbackTemps. self inputWithType: 'file' named: (self callbacks registerCallback: [:f | aBlock value: (f = '' ifFalse: [f])])
</methods> <methods> Seaside.WAHtmlRenderer <category>accessing</category>
request ^ self context request
</methods> <methods> Seaside.WAHtmlRenderer <category>documents</category>
imageWithForm: aForm self image: (self context urlForDocument: aForm mimeType: aForm mimeType) width: aForm width height: aForm height
</methods> <methods> Seaside.WAHtmlRenderer <category>documents</category>
imageMapWithAction: aBlock form: aForm | point pointKey url id | aBlock fixTemps. point := ValueHolder new. pointKey := self callbacks registerCallback: [:ptString | point contents: (self parseImageMap: ptString)]. url := self urlForAction: [aBlock value: point contents]. self attributeAt: 'href' put: url, '&', pointKey, '='. id := self attributes at: 'id' ifAbsent: [nil]. self tag: 'a' do: [ id notNil ifTrue: [self cssId: id value , '-image']. self attributeAt: 'ismap' put: true. self imageWithForm: aForm. ]
</methods> <methods> Seaside.WAHtmlRenderer <category>convenience</category>
textInputWithValue: anObject callback: callbackBlock self valueInputOfType: 'text' value: anObject callback: callbackBlock
</methods> <methods> Seaside.WAHtmlRenderer <category>core</category>
optionWithLabel: labelString selected: aBoolean callback: callbackBlock self attributeAt: 'selected' put: aBoolean; attributeAt: 'value' put: (self callbacks registerCallback: callbackBlock). self tag: 'option' do: labelString.
</methods> <methods> Seaside.WAHtmlRenderer <category>accessing</category>
document ^ context document
</methods> <methods> Seaside.WAHtmlRenderer <category>convenience</category>
selectFromList: aCollection selected: selectedObject callback: callbackBlock labels: labelsBlock nilLabel: aString self selectFromList: (Array with: nil), aCollection asArray selected: selectedObject callback: callbackBlock labels: [:ea | ea ifNil: [aString] ifNotNil: [labelsBlock value: ea]]
</methods> <methods> Seaside.WAHtmlRenderer <category>model</category>
tableRowWithLabel: anObject on: aSymbol column: aBlock self tableRowWithLabel: [self labelFor: aSymbol do: anObject] column: aBlock
</methods> <methods> Seaside.WAHtmlRenderer <category>model</category>
submitButtonOn: aSymbol of: anObject self ensureCssId: aSymbol; submitButtonWithAction: (MessageSend receiver: anObject selector: aSymbol) text: (self labelForSelector: aSymbol of: anObject)
</methods> <methods> Seaside.WAHtmlRenderer <category>model</category>
textInputOn: aSymbol of: anObject self ensureCssId: aSymbol; textInputWithValue: (anObject perform: aSymbol) callback: (self callbackForSelector: aSymbol of: anObject)
</methods> <methods> Seaside.WAHtmlRenderer <category>accessing</category>
callbacks ^ callbacks
</methods> <methods> Seaside.WAHtmlRenderer <category>documents</category>
imageWithFileNamed: fileName self imageWithFileNamed: fileName mimeType: nil
</methods> <methods> Seaside.WAHtmlRenderer <category>core</category>
radioButtonInGroup: radioGroupKey withValue: value on: aSelector of: anObject self radioButtonInGroup: radioGroupKey selected: (value = (anObject perform: aSelector)) callback: [anObject perform: aSelector asMutator with: value]
</methods> <methods> Seaside.WAHtmlRenderer <category>model</category>
textAreaOn: aSymbol of: anObject self ensureCssId: aSymbol; textAreaWithValue: (anObject perform: aSymbol) callback: (self callbackForSelector: aSymbol of: anObject)
</methods> <methods> Seaside.WAHtmlRenderer <category>convenience</category>
anchorWithAction: actionBlock image: aForm self anchorWithAction: actionBlock do: [self imageWithForm: aForm.]
</methods> <methods> Seaside.WAHtmlRenderer <category>documents</category>
anchorWithDocument: anObject text: aString self anchorWithDocument: anObject mimeType: nil text: aString
</methods> <methods> Seaside.WAHtmlRenderer <category>convenience</category>
anchorWithAction: aBlock fileName: fileName text: doBlock self anchorWithUrl: (self actionUrl, '/', fileName, '?', (self callbacks registerActionCallback: aBlock)) do: doBlock
</methods> <methods> Seaside.WAHtmlRenderer <category>convenience</category>
passwordInputWithValue: anObject callback: callbackBlock self valueInputOfType: 'password' value: anObject callback: callbackBlock
</methods> <methods> Seaside.WAHtmlRenderer <category>javascript</category>
divWithShow: showLink hide: hideLink do: aBlock | linkId divId onClick | divId := self ensureId. linkId := self nextId. #swapDisplay. onClick := 'swapDisplay(', linkId printString, ', ', divId asString printString, '); return false;'. self attributes id: linkId; style: 'display: block'. self anchorWithScript: onClick do: showLink. self attributes id: divId; style: 'display: none'. self div: [ self anchorWithScript: onClick do: hideLink. self div: aBlock. ]
</methods> <methods> Seaside.WAHtmlRenderer <category>javascript</category>
anchorWithScript: aString do: linkBlock self attributes at: 'onClick' put: aString. self anchorWithUrl: '#' do: linkBlock
</methods> <methods> Seaside.WAHtmlRenderer <category>model</category>
labelledRowForList: aCollection on: aSymbol of: anObject size: sizeIntegerOrNil self tableRowWithLabel: (self labelForSelector: aSymbol of: anObject) on: aSymbol column: [sizeIntegerOrNil ifNotNil: [self attributeAt: #size put: sizeIntegerOrNil]. self cssId: aSymbol. self selectFromList: aCollection selected: (anObject perform: aSymbol) callback: (self callbackForSelector: aSymbol of: anObject)]
</methods> <methods> Seaside.WAHtmlRenderer <category>javascript</category>
autofocus: aBlock | elementId | elementId := self ensureId. aBlock value. #setFocus. self script: 'setFocus(', elementId asString printString, ')'
</methods> <methods> Seaside.WAHtmlRenderer <category>javascript</category>
peekNextId ^ 'id', self context nextKey
</methods> <methods> Seaside.WAHtmlRenderer <category>model</category>
callbackForSelector: aSymbol of: anObject ^ MessageSend receiver: anObject selector: (aSymbol copyWith: $:) asSymbol
</methods> <methods> Seaside.WAHtmlRenderer <category>core</category>
valueInputOfType: typeString value: anObject callback: callbackBlock | updateKey callback | callback := self fromStringConverterBlockFor: anObject callback: callbackBlock. updateKey := self callbacks registerCallback: callback. self inputWithType: typeString named: updateKey value: anObject asSeasideString. ^ updateKey
</methods> <methods> Seaside.WAHtmlRenderer <category>convenience</category>
anchorWithAction: actionBlock text: aString self anchorWithAction: actionBlock do: aString
</methods> <methods> Seaside.WAHtmlRenderer <category>core</category>
radioGroup ^ self callbacks registerDispatchCallback.
</methods> <methods> Seaside.WAHtmlRenderer <category>model</category>
labelForSelector: aSymbol of: anObject ^ anObject labelForSelector: aSymbol
</methods> <methods> Seaside.WAHtmlRenderer <category>convenience</category>
unorderedListOn: aSymbol of: anObject list: aCollection self unorderedList: aCollection selected: (anObject perform: aSymbol) callback: (self callbackForSelector: aSymbol of: anObject)
</methods> <methods> Seaside.WAHtmlRenderer <category>convenience</category>
unorderedList: aCollection selected: anObject callback: aBlock self unorderedList: aCollection selected: anObject callback: aBlock labels: [:ea | ea displayString]
</methods> <methods> Seaside.WAHtmlRenderer <category>canvas compatibility</category>
painter: aComponent
</methods> <methods> Seaside.WAHtmlRenderer <category>core</category>
urlForAction: actionBlock | url | url := context actionUrl withParameter: (self callbacks registerActionCallback: actionBlock). ^ url displayString
</methods> <methods> Seaside.WAHtmlRenderer <category>core</category>
optionGroupWithLabel: aString do: aBlock self attributes at: 'label' put: aString. self tag: 'optgroup' do: aBlock
</methods> <methods> Seaside.WAHtmlRenderer <category>model</category>
labelForSelector: aSymbol ^ self labelForSelector: aSymbol of: nil
</methods> <methods> Seaside.WAHtmlRenderer <category>convenience</category>
passwordInputWithCallback: callbackBlock self passwordInputWithValue: '' callback: callbackBlock
</methods> <methods> Seaside.WAHtmlRenderer <category>convenience</category>
textInputWithValue: aString callback: aBlock helpText: helpString aBlock fixCallbackTemps. aString ifNil: [self attributeAt: 'onfocus' put: 'if(''',helpString, ''' == this.value) {this.value=''''}; style.color=''black'''. self attributeAt: 'style' put: 'color: #aaa']. self textInputWithValue: (aString ifNil: [helpString]) callback: [:v | aBlock value: (v = helpString ifFalse: [v])]
</methods> <methods> Seaside.WAHtmlRenderer <category>javascript</category>
addShortcut: aString | id | id := self ensureId. shortcutBuffer isNil ifTrue: [shortcutBuffer := Dictionary new]. shortcutBuffer at: aString put: id.
</methods> <methods> Seaside.WAHtmlRenderer <category>model</category>
booleanMenuOn: aSymbol of: anObject self ensureCssId: aSymbol; booleanMenuWithValue: (anObject perform: aSymbol) callback: (self callbackForSelector: aSymbol of: anObject)
</methods> <methods> Seaside.WAHtmlRenderer <category>core</category>
label: aString input: aBlock | id | id := self nextId. self labelFor: id do: [self text: aString. self space. self cssId: id. aBlock value]
</methods> <methods> Seaside.WAHtmlRenderer <category>javascript</category>
nextId ^ 'id', self context advanceKey
</methods> <methods> Seaside.WAHtmlRenderer <category>core</category>
cancelButtonWithAction: aBlock self attributes value: 'Cancel'. self inputWithType: 'submit' named: (self callbacks registerCancelActionCallback: aBlock)
</methods> <methods> Seaside.WAHtmlRenderer <category>core</category>
submitButtonWithAction: actionBlock self inputWithType: 'submit' named: (self callbacks registerActionCallback: actionBlock)
</methods> <methods> Seaside.WAHtmlRenderer <category>accessing</category>
registry ^ WACurrentSession value application
</methods> <methods> Seaside.WAHtmlRenderer <category>convenience</category>
hiddenInputWithCallback: callbackBlock self inputWithType: 'hidden' named: (self callbacks registerCallback: callbackBlock)
</methods> <methods> Seaside.WAHtmlRenderer <category>accessing</category>
context ^ context
</methods> <methods> Seaside.WAHtmlRenderer <category>core</category>
checkboxWithValue: aBoolean callback: callbackBlock | value originalAttributes originalShortcuts | value := ValueHolder new. originalAttributes := attributeBuffer. attributeBuffer := nil. originalShortcuts := shortcutBuffer. shortcutBuffer := nil. self hiddenInputWithCallback: [:v | value contents: false]. attributeBuffer := originalAttributes. shortcutBuffer := originalShortcuts. self attributeAt: 'checked' put: aBoolean. self valueInputOfType: 'checkbox' value: 'true' callback: [:v | value contents: true]. callbackBlock fixTemps. self hiddenInputWithCallback: [:v | callbackBlock value: value contents]
</methods> <methods> Seaside.WAHtmlRenderer <category>convenience</category>
textInputWithCallback: callbackBlock self textInputWithValue: '' callback: callbackBlock
</methods> <methods> Seaside.WAHtmlRoot <category>new-api-convenience</category>
javascript ^self script beJavascript; yourself
</methods> <methods> Seaside.WAHtmlRoot <category>initialize-release</category>
initialize htmlAttrs := WAHtmlAttributes new. headAttrs := WAHtmlAttributes new. bodyAttrs := WAHtmlAttributes new. headElements := OrderedCollection new. scripts := OrderedCollection new. styles := OrderedCollection new. docType := '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'. title := 'Seaside'. self addHtmlNameSpace. self addMetaContentType.
</methods> <methods> Seaside.WAHtmlRoot <category>initialize-release</category>
addHtmlNameSpace htmlAttrs at: 'xmlns' put: 'http://www.w3.org/1999/xhtml'; at: 'xml:lang' put: 'en'; at: 'lang' put: 'en'.
</methods> <methods> Seaside.WAHtmlRoot <category>accessing</category>
bodyAttributes ^ bodyAttrs
</methods> <methods> Seaside.WAHtmlRoot <category>accessing</category>
title ^ title
</methods> <methods> Seaside.WAHtmlRoot <category>deprecated</category>
styleElementWithHref: anUrlString titled: aTitleString self deprecatedApi. ^ self removeHeadElement: (self stylesheet url: anUrlString; title: aTitleString; yourself)
</methods> <methods> Seaside.WAHtmlRoot <category>writing</category>
writeOn: aStream aStream nextPutAll: docType. aStream nextPutAll: '<html'. htmlAttrs writeOn: aStream. aStream nextPutAll: '><head'. headAttrs writeOn: aStream. aStream nextPutAll: '>'. self writeHeadOn: aStream. aStream nextPutAll: '</head><body'. bodyAttrs writeOn: aStream. aStream nextPutAll: '>'.
</methods> <methods> Seaside.WAHtmlRoot <category>accessing</category>
charSet ^'utf-8'
</methods> <methods> Seaside.WAHtmlRoot <category>writing</category>
writeScript: aString on: aStream aStream nextPutAll: '<script type="text/javascript">/*<![CDATA[*/'; nextPutAll: aString; nextPutAll: '/*]]>*/</script>'
</methods> <methods> Seaside.WAHtmlRoot <category>initialize-release</category>
addMetaContentType self meta contentType: self contentType charset: self charSet
</methods> <methods> Seaside.WAHtmlRoot <category>new-api-convenience</category>
stylesheet ^self link beStylesheet; beCss; notClosed; yourself
</methods> <methods> Seaside.WAHtmlRoot <category>deprecated</category>
forIE7Do: aBlock self deprecatedApi. self if ie7; do: aBlock
</methods> <methods> Seaside.WAHtmlRoot <category>deprecated</category>
linkToStyle: url self deprecatedApi. self stylesheet resourceUrl: url asString
</methods> <methods> Seaside.WAHtmlRoot <category>accessing</category>
resourceBaseUrl ^ resourceBaseUrl
</methods> <methods> Seaside.WAHtmlRoot <category>javascript</category>
addScript: aString "Include the script aString into the receiver." (scripts includes: aString) ifFalse: [scripts add: aString]
</methods> <methods> Seaside.WAHtmlRoot <category>new-api</category>
if ^WAConditionalComment root: self
</methods> <methods> Seaside.WAHtmlRoot <category>api</category>
redirectTo: locationString delay: aNumber self meta redirectAfter: aNumber to: locationString
</methods> <methods> Seaside.WAHtmlRoot <category>api</category>
absoluteUrlForResource: aString (aString beginsWith: 'http') ifTrue: [^ aString]. resourceBaseUrl ifNil: [^ aString]. ^ resourceBaseUrl, aString
</methods> <methods> Seaside.WAHtmlRoot <category>new-api</category>
link ^self addHeadElement: (WALinkElement named: 'link' root: self)
</methods> <methods> Seaside.WAHtmlRoot <category>new-api</category>
script ^self addHeadElement: (WAScriptElement named: 'script' root: self)
</methods> <methods> Seaside.WAHtmlRoot <category>api</category>
removeHeadElement: anHtmlElement ^ headElements remove: anHtmlElement
</methods> <methods> Seaside.WAHtmlRoot <category>accessing</category>
htmlAttributes ^ htmlAttrs
</methods> <methods> Seaside.WAHtmlRoot <category>accessing</category>
docType ^ docType
</methods> <methods> Seaside.WAHtmlRoot <category>accessing</category>
docType: aString "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" docType := aString
</methods> <methods> Seaside.WAHtmlRoot <category>deprecated</category>
linkToStyle: url titled: aString self deprecatedApi. self stylesheet resourceUrl: url asString; title: aString
</methods> <methods> Seaside.WAHtmlRoot <category>deprecated</category>
styleElementWithHref: aString self deprecatedApi. ^ self removeHeadElement: (self stylesheet url: aString)
</methods> <methods> Seaside.WAHtmlRoot <category>accessing</category>
headAttributes ^ headAttrs
</methods> <methods> Seaside.WAHtmlRoot <category>accessing</category>
contentType ^'text/html'
</methods> <methods> Seaside.WAHtmlRoot <category>deprecated</category>
scriptElementWithSrc: aString self deprecatedApi. ^ self javascript url: aString; yourself
</methods> <methods> Seaside.WAHtmlRoot <category>new-api</category>
base ^self addHeadElement: (WABaseElement named: 'base')
</methods> <methods> Seaside.WAHtmlRoot <category>accessing</category>
resourceBaseUrl: aString resourceBaseUrl := aString
</methods> <methods> Seaside.WAHtmlRoot <category>new-api</category>
meta ^self addHeadElement: ((WAMetaElement named: 'meta') notClosed; yourself)
</methods> <methods> Seaside.WAHtmlRoot <category>deprecated</category>
styleElementWithHref: anUrlString titled: aTitleString media: aMediaString self deprecatedApi. ^ self removeHeadElement: (self stylesheet url: anUrlString; title: aTitleString; media: aMediaString; yourself)
</methods> <methods> Seaside.WAHtmlRoot <category>deprecated</category>
linkToStyle: url titled: aString media: aMediaString self deprecatedApi. self stylesheet resourceUrl: url asString; title: aString; media: aMediaString
</methods> <methods> Seaside.WAHtmlRoot <category>css</category>
addStyle: aString "Include the style-sheet aString into the receiver." (styles includes: aString) ifFalse: [styles add: aString]
</methods> <methods> Seaside.WAHtmlRoot <category>deprecated</category>
forIE6Do: aBlock self deprecatedApi. self if ie6; do: aBlock
</methods> <methods> Seaside.WAHtmlRoot <category>accessing</category>
title: aString title := aString
</methods> <methods> Seaside.WAHtmlRoot <category>writing</category>
writeHeadOn: aStream aStream nextPutAll: '<title>', title, '</title>'. headElements do: [:ea | ea writeOn: aStream]. styles do: [:ea | self writeStyle: ea on: aStream]. scripts do: [:ea | self writeScript: ea on: aStream].
</methods> <methods> Seaside.WAHtmlRoot <category>deprecated</category>
forIE5Do: aBlock self deprecatedApi. self if greaterThan; orEqual; ie5; do: aBlock
</methods> <methods> Seaside.WAHtmlRoot <category>writing</category>
writeStyle: aString on: aStream aStream nextPutAll: '<style>'; nextPutAll: aString; nextPutAll: '</style>'
</methods> <methods> Seaside.WAHtmlRoot <category>api</category>
addHeadElement: anHtmlElement ^ headElements add: anHtmlElement
</methods> <methods> Seaside.WAHtmlRoot <category>javascript</category>
linkToScript: url "only link to script if it's not already been linked too, necessary when lists of child components try to link to dependant scripts, a google map for example" | fullUrl | fullUrl := self absoluteUrlForResource: url asString. headElements detect: [ :each | each name = 'script' and: [ each url = fullUrl ] ] ifNone: [ self scriptElementWithSrc: fullUrl ]
</methods> <methods> Seaside.WAHtmlRoot <category>api</category>
contentBase: urlString self base url: urlString
</methods> <methods> Seaside.WAHtmlStreamDocument <category>private</category>
writeOnLoad | attributes | attributes := WAHtmlAttributes new. attributes at: 'type' put: 'text/javascript'. self openTag: 'script' attributes: attributes. self text: '/*<![CDATA[*/function onLoad(){'. self session onLoadScripts do: [:each | self text: each displayString] separatedBy: [self text: ';']. self text: '}/*]]>*/'. self closeTag: 'script'. self session clearLoadScripts.
</methods> <methods> Seaside.WAHtmlStreamDocument <category>accessing</category>
stream ^ stream
</methods> <methods> Seaside.WAHtmlStreamDocument <category>initialization</category>
initializeWithRoot: anHtmlRoot super initializeWithRoot: anHtmlRoot. stream := String new writeStream. state := #head
</methods> <methods> Seaside.WAHtmlStreamDocument <category>public</category>
closeTag: aString self writeCloseTag: aString on: self bodyStream
</methods> <methods> Seaside.WAHtmlStreamDocument <category>private</category>
session ^WACurrentSession value
</methods> <methods> Seaside.WAHtmlStreamDocument <category>private</category>
writeOpenTag: aString attributes: anAttributes on: aStream aStream nextPut: $<; nextPutAll: aString. anAttributes ifNotNil: [anAttributes writeOn: aStream]. (self shouldPrintCloseTagFor: aString) ifFalse: [aStream nextPutAll: ' /']. aStream nextPut: $>
</methods> <methods> Seaside.WAHtmlStreamDocument <category>private</category>
writeCloseTag: aString on: aStream (self shouldPrintCloseTagFor: aString) ifTrue: [aStream nextPutAll: '</'; nextPutAll: aString; nextPut: $>]
</methods> <methods> Seaside.WAHtmlStreamDocument <category>public</category>
text: aString self bodyStream nextPutAll: aString displayString
</methods> <methods> Seaside.WAHtmlStreamDocument <category>accessing</category>
stream: aStream stream := aStream
</methods> <methods> Seaside.WAHtmlStreamDocument <category>public</category>
close self writeOnLoad. self bodyStream nextPutAll: '</body></html>'
</methods> <methods> Seaside.WAHtmlStreamDocument <category>public</category>
openTag: aString attributes: anAttributes self writeOpenTag: aString attributes: anAttributes on: self bodyStream
</methods> <methods> Seaside.WAHtmlStreamDocument <category>accessing</category>
bodyStream state = #head ifTrue: [state := #body. root writeOn: stream]. ^ stream
</methods> <methods> Seaside.WAHtmlTestDocument <category>public api</category>
reset self stream reset
</methods> <methods> Seaside.WAHtmlTestDocument <category>public api</category>
setStateToBody state := #body.
</methods> <methods> Seaside.WAHtmlTestDocument <category>public api</category>
setStateToHead state := #head.
</methods> <methods> Seaside.WAIframeTag <category>private</category>
performRendering: anObject | innerContext docRoot session document response renderer | innerContext := canvas context copy. docRoot := WARenderedHtmlRoot context: innerContext. docRoot resourceBaseUrl: innerContext document root resourceBaseUrl. docRoot base target: '_top'. session := WACurrentSession value. document := session outputDocumentClass root: docRoot. response := WAResponse new. response headerAt: 'Cache-Control' put: 'No-cache'. document stream: response stream. canvas context document: document. renderer := canvas species context: canvas context callbacks: canvas callbacks. renderer render: anObject; flush. document close. session returnResponse: response
</methods> <methods> Seaside.WAIframeTag <category>attributes</category>
url: aString self attributeAt: 'src' put: aString
</methods> <methods> Seaside.WAIframeTag <category>attributes</category>
name: aString self attributes at: 'name' put: aString
</methods> <methods> Seaside.WAIframeTag <category>conveniance</category>
contents: anObject self url: (canvas urlForAction: [self performRendering: anObject])
</methods> <methods> Seaside.WAIframeTag <category>conveniance</category>
document: anObject self document: anObject mimeType: nil
</methods> <methods> Seaside.WAIframeTag <category>attributes</category>
width: anInteger self attributes at: 'width' put: anInteger
</methods> <methods> Seaside.WAIframeTag <category>accessing</category>
tag ^ 'iframe'
</methods> <methods> Seaside.WAIframeTag <category>conveniance</category>
document: anObject mimeType: aMimeString fileName: aFileNameString self url: (canvas context urlForDocument: anObject mimeType: aMimeString fileName: aFileNameString)
</methods> <methods> Seaside.WAIframeTag <category>attributes</category>
height: anInteger self attributes at: 'height' put: anInteger
</methods> <methods> Seaside.WAIframeTag <category>conveniance</category>
document: anObject mimeType: aMimeString self document: anObject mimeType: aMimeString fileName: nil
</methods> <methods> Seaside.WAIframeTag <category>deprecated</category>
src: anUrl self deprecatedApi. self url: anUrl
</methods> <methods> Seaside.WAIframeTest <category>rendering</category>
renderContentOn: html html iframe contents: counter. html break; break. html iframe url: (WADispatcher default entryPointAt: WAStore entryPointName) basePath. html break; break. html iframe document: SeasidePlatformSupport seasideBanner mimeType: 'image/jpeg'
</methods> <methods> Seaside.WAIframeTest <category>initialization</category>
initialize super initialize. counter := WACounter new
</methods> <methods> Seaside.WAIframeTest <category>rendering</category>
style ^ 'iframe { border: 1px solid gray; width: 100%; }'
</methods> <methods> Seaside.WAIframeTest <category>accessing</category>
children ^ Array with: counter
</methods> <methods> Seaside.WAImageButtonTag <category>attributes</category>
height: aNumber self attributes at: 'height' put: aNumber
</methods> <methods> Seaside.WAImageButtonTag <category>attributes</category>
url: aString self attributes at: 'src' put: aString
</methods> <methods> Seaside.WAImageButtonTag <category>attributes</category>
form: aForm self extent: aForm extent. self url: (canvas context urlForDocument: aForm)
</methods> <methods> Seaside.WAImageButtonTag <category>accessing</category>
type ^ 'image'
</methods> <methods> Seaside.WAImageButtonTag <category>attributes</category>
resourceUrl: aString self url: (canvas document root absoluteUrlForResource: aString)
</methods> <methods> Seaside.WAImageButtonTag <category>attributes</category>
callback: aBlock self name: (canvas callbacks registerImageCallback: aBlock)
</methods> <methods> Seaside.WAImageButtonTag <category>attributes</category>
width: aNumber self attributes at: 'width' put: aNumber
</methods> <methods> Seaside.WAImageButtonTag <category>attributes</category>
extent: aPoint self width: aPoint x; height: aPoint y
</methods> <methods> Seaside.WAImageCallback <category>converting</category>
convertKey: aString ^ aString, '.x'
</methods> <methods> Seaside.WAImageMapTag <category>private</category>
callback: aBlock | pointKey value tempCallbackKey tempUrl | aBlock fixCallbackTemps. value := ValueHolder new. pointKey := canvas callbacks registerCallback: [ :pointString | value contents: (self parseImageMap: pointString) ]. tempCallbackKey := canvas callbacks registerActionCallback: [ aBlock value: value contents ]. tempUrl := canvas context actionUrl withParameter: tempCallbackKey. self url: tempUrl queryString, '&', pointKey, '='.
</methods> <methods> Seaside.WAImageMapTag <category>private</category>
parseImageMap: aString | stream x y | ('?*,*' match: aString) ifFalse: [^ nil]. stream := aString readStream. stream upTo: $?. x := stream upTo: $,. y := stream upToEnd. ^ x asNumber @ y asNumber
</methods> <methods> Seaside.WAImageTag <category>private</category>
generateCachedDocumentFromFilename document := WACachedDocument fileName: fileName. mimeType isNil ifFalse: [ document mimeType: mimeType ]
</methods> <methods> Seaside.WAImageTag <category>accessing</category>
url: aString url := aString
</methods> <methods> Seaside.WAImageTag <category>initialize-release</category>
initialize super initialize. self altText: ''.
</methods> <methods> Seaside.WAImageTag <category>initialize-release</category>
setParent: aBrush canvas: aCanvas super setParent: aBrush canvas: aCanvas. (aBrush isKindOf: WAImageMapTag) ifTrue: [ self attributeAt: 'ismap' put: true ]
</methods> <methods> Seaside.WAImageTag <category>accessing</category>
tag ^ 'img'
</methods> <methods> Seaside.WAImageTag <category>accessing</category>
fileName: aString fileName := aString
</methods> <methods> Seaside.WAImageTag <category>public api</category>
form: aForm self extent: aForm extent. self document: aForm.
</methods> <methods> Seaside.WAImageTag <category>attributes</category>
altText: aString self attributes at: 'alt' put: aString
</methods> <methods> Seaside.WAImageTag <category>deprecated</category>
border: aNumber self deprecatedApi. self attributes border: aNumber
</methods> <methods> Seaside.WAImageTag <category>accessing</category>
document: anObject document := anObject
</methods> <methods> Seaside.WAImageTag <category>accessing</category>
mimeType: aString mimeType := aString
</methods> <methods> Seaside.WAImageTag <category>deprecated</category>
noBorder self deprecatedApi. self border: 0
</methods> <methods> Seaside.WAImageTag <category>private</category>
close url isNil ifTrue: [ self generateUrlForDocument ]. self attributes at: 'src' put: url. super close.
</methods> <methods> Seaside.WAImageTag <category>public api</category>
resourceUrl: aString self url: (canvas document root absoluteUrlForResource: aString)
</methods> <methods> Seaside.WAImageTag <category>private</category>
generateUrlForDocument document isNil ifTrue: [ self generateCachedDocumentFromFilename ]. mimeType isNil ifTrue: [ mimeType := document mimeType ]. url := canvas context urlForDocument: document mimeType: mimeType fileName: fileName
</methods> <methods> Seaside.WAImageTag <category>deprecated</category>
src: aString self deprecatedApi. self url: aString
</methods> <methods> Seaside.WAImageTest <category>rendering</category>
rendererClass "Intentionally using the classic API" ^WAHtmlRenderer
</methods> <methods> Seaside.WAImageTest <category>rendering</category>
renderContentOn: html html form: [ html submitButtonWithAction: [self inform: 'ok'] image: (ScriptingSystem formAtKey: 'Halo-Debug')]
</methods> <methods> Seaside.WAInputDialog <category>accessing</category>
label: aString label := aString
</methods> <methods> Seaside.WAInputDialog <category>accessing</category>
label ^label ifNil: [ label := 'OK' ]
</methods> <methods> Seaside.WAInputDialog <category>rendering</category>
renderContentOn: html html form defaultAction: [ self answer: value ]; with: [ html textInput on: #value of: self. html space. html submitButton callback: [ self answer: value ]; text: self label ]
</methods> <methods> Seaside.WAInputDialog <category>accessing</category>
value: aString value := aString
</methods> <methods> Seaside.WAInputDialog <category>accessing</category>
value ^value
</methods> <methods> Seaside.WAInputDialog <category>accessing</category>
default: aString value := aString
</methods> <methods> Seaside.WAInputTest <category>initialize-release</category>
initialize super initialize. nilString := nil. emptyString := ''. integer := 42. fraction := 1/3. selection := nil. multiSelection := Set new.
</methods> <methods> Seaside.WAInputTest <category>accessing</category>
integer: anObject "Set the value of integer" integer := anObject
</methods> <methods> Seaside.WAInputTest <category>accessing</category>
label ^'Input'
</methods> <methods> Seaside.WAInputTest <category>accessing</category>
option ^option
</methods> <methods> Seaside.WAInputTest <category>accessing</category>
lastName "Answer the value of lastName" ^ lastName
</methods> <methods> Seaside.WAInputTest <category>accessing</category>
multiSelection: anObject multiSelection := anObject
</methods> <methods> Seaside.WAInputTest <category>rendering</category>
renderContentOn: html html form: [ html table: [ self renderHeadingsOn: html. self renderNilStringOn: html. self renderEmptyStringOn: html. self renderIntegerOn: html. self renderFractionOn: html. self renderTextInputWithExampleOn: html. self renderTextAreaWithExampleOn: html. self renderSingleSelectionOn: html. self renderMultiSelectionOn: html. self renderInputWithoutCallbackOn: html. self renderOptionGroupOn: html ]. html submitButton ]
</methods> <methods> Seaside.WAInputTest <category>rendering</category>
renderHeadingsOn: html html tableRow: [ html tableHeading: 'Name'. html tableHeading: 'Value'. html tableHeading: 'PrintString']
</methods> <methods> Seaside.WAInputTest <category>accessing</category>
lastName: anObject "Set the value of lastName" lastName := anObject
</methods> <methods> Seaside.WAInputTest <category>accessing</category>
selection: anObject selection := anObject
</methods> <methods> Seaside.WAInputTest <category>accessing</category>
nilString: anObject "Set the value of nilString" nilString := anObject
</methods> <methods> Seaside.WAInputTest <category>accessing</category>
emptyString: anObject "Set the value of emptyString" emptyString := anObject
</methods> <methods> Seaside.WAInputTest <category>accessing</category>
fraction: anObject "Set the value of fraction" fraction := anObject
</methods> <methods> Seaside.WAInputTest <category>rendering</category>
renderSingleSelectionOn: html html tableRow: [html tableData: 'Selection'. html tableData: [html select beOptional; list: #(#Quito #Dakar #Sydney #Bamako ); enablementBlock: [:value | #(nil #Quito #Sydney ) includes: value]; optionalLabel: 'nothing selected'; on: #selection of: self]. html tableData: [html text: selection]]
</methods> <methods> Seaside.WAInputTest <category>rendering</category>
renderOptionGroupOn: html | options | options := #( ('Dataflow' ('Hartmann pipelines' 'G' 'Max' 'Prograph')) ('Functional' ('Haskell ' 'Lisp' 'ML')) ('Fourth-generation' ('Today' 'Ubercode' 'Uniface'))). html tableRow: [ html tableData: 'Option Group'. html tableData: [ html select on: #option of: self; with: [ options do: [ :list | html optionGroup label: list first; with: [ list second do: [ :each | html option selected: self option = each; callback: [self option: each]; with: each ] ] ] ] ]. html tableData: [ html text: option ] ]
</methods> <methods> Seaside.WAInputTest <category>rendering</category>
renderEmptyStringOn: html html tableRow: [ html tableData: 'Empty String'. html tableData: [ html textInput on: #emptyString of: self]. html tableData: emptyString ]
</methods> <methods> Seaside.WAInputTest <category>rendering</category>
renderFractionOn: html html tableRow: [ html tableData: 'Fraction'. html tableData: [ html textInput on: #fraction of: self]. html tableData: fraction ]
</methods> <methods> Seaside.WAInputTest <category>accessing</category>
address "Answer the value of address" ^ address
</methods> <methods> Seaside.WAInputTest <category>rendering</category>
renderTextInputWithExampleOn: html html tableRow: [ html tableData: 'Text input with example'. html tableData: [ html textInput value: self lastName; exampleText: 'Your name'; callback: [:v | self lastName: v]]. html tableData: self lastName]
</methods> <methods> Seaside.WAInputTest <category>accessing</category>
multiSelection ^ multiSelection
</methods> <methods> Seaside.WAInputTest <category>accessing</category>
selection ^ selection
</methods> <methods> Seaside.WAInputTest <category>rendering</category>
renderIntegerOn: html html tableRow: [ html tableData: 'Integer'. html tableData: [ html textInput setFocus; on: #integer of: self]. html tableData: integer ]
</methods> <methods> Seaside.WAInputTest <category>accessing</category>
integer "Answer the value of integer" ^ integer
</methods> <methods> Seaside.WAInputTest <category>rendering</category>
renderMultiSelectionOn: html html tableRow: [ html tableData: 'Multi Selection'. html tableData: [ html select beMultiple; list: #(Breakfast Lunch Dinner); on: #multiSelection of: self ]. html tableData: [ html text: multiSelection ] ]
</methods> <methods> Seaside.WAInputTest <category>accessing</category>
fraction "Answer the value of fraction" ^ fraction
</methods> <methods> Seaside.WAInputTest <category>accessing</category>
emptyString "Answer the value of emptyString" ^ emptyString
</methods> <methods> Seaside.WAInputTest <category>rendering</category>
renderNilStringOn: html html tableRow: [ html tableData: 'Nil String'. html tableData: [ html textInput on: #nilString of: self]. html tableData: nilString ]
</methods> <methods> Seaside.WAInputTest <category>rendering</category>
renderInputWithoutCallbackOn: html html tableRow with: [ html tableData: 'Input elements with no callback'. html tableData with: [ html select size: 10; list: Collection subclasses]. html tableData with: [ html unorderedList beMultiple; selected: #(); list: Collection subclasses ] ]
</methods> <methods> Seaside.WAInputTest <category>accessing</category>
option: anObject option := anObject
</methods> <methods> Seaside.WAInputTest <category>rendering</category>
renderTextAreaWithExampleOn: html html tableRow: [ html tableData: 'Text area with example'. html tableData: [ html textArea value: self address; exampleText: 'Your address'; callback: [ :value | self address: value ] ]. html tableData: self address]
</methods> <methods> Seaside.WAInputTest <category>accessing</category>
address: anObject "Set the value of address" address := anObject
</methods> <methods> Seaside.WAInputTest <category>accessing</category>
nilString "Answer the value of nilString" ^ nilString
</methods> <methods> Seaside.WAInspector <category>initialize-release</category>
initialize super initialize. path := WAPath new
</methods> <methods> Seaside.WAInspector <category>rendering</category>
renderRowForObject: anObject named: aString on: html html tableRow: [ html tableData: [ (self canInspect: anObject) ifTrue: [html text: aString] ifFalse: [html anchor callback: [self chooseObject: anObject named: aString]; with: aString ] ]. html tableData: [ html form with: [ html textArea rows: 1; columns: 30; value: (anObject printStringLimitedTo: 100); callback: [ :value | self object instVarNamed: aString put: (self evaluate: value) ]. html submitButton text: 'accept' ] ] ]
</methods> <methods> Seaside.WAInspector <category>accessing</category>
children ^ Array with: path
</methods> <methods> Seaside.WAInspector <category>rendering</category>
renderEditAreaOn: html | input | input := ValueHolder new. html break. html form: [ html textArea rows: 6; columns: 60; callback: [ :value | input contents: value]. html break. html submitButton callback: [ self evaluate: input contents ]; text: 'do it'. html submitButton callback: [ self inform: (self evaluate: input contents) ]; text: 'print it'. html submitButton callback: [ WARenderLoop new call: ((self class on: (self evaluate: input contents)) addDecoration: (WAWindowDecoration new title: 'Inspector'); yourself) ]; text: 'inspect it'. ].
</methods> <methods> Seaside.WAInspector <category>actions</category>
evaluate: aString ^self object class evaluatorClass new evaluate: aString in: nil to: self object.
</methods> <methods> Seaside.WAInspector <category>rendering</category>
renderMembersOn: html | members | members := self object inspectorFields. members isEmpty ifTrue: [^self]. html strong: 'Members: '. html table border: 1; with: [ members associationsDo: [ :association | self renderRowForObject: association value named: association key on: html ] ]
</methods> <methods> Seaside.WAInspector <category>state variables</category>
object ^ path currentSegment
</methods> <methods> Seaside.WAInspector <category>rendering</category>
renderContentOn: html html render: path. html heading: (self object printStringLimitedTo: 50). html text: 'Identity Hash: ', self object identityHash displayString; break; break. self renderMembersOn: html. self renderEditAreaOn: html.
</methods> <methods> Seaside.WAInspector <category>state variables</category>
object: anObject path pushSegment: anObject name: anObject printString
</methods> <methods> Seaside.WAInspector <category>testing</category>
canInspect: anObject ^[ anObject isNumber or: [ (Array with: nil with: true with: false) includes: anObject ] ] on: Error do: [ :ex | false ]
</methods> <methods> Seaside.WAInspector <category>actions</category>
chooseObject: anObject named: aString path pushSegment: anObject name: aString
</methods> <methods> Seaside.WAJavascriptTest <category>rendering</category>
rendererClass "Intentionally using the classic API" ^WAHtmlRenderer
</methods> <methods> Seaside.WAJavascriptTest <category>rendering</category>
renderContentOn: html html form: [ html cssId: 'F0'. html textInputWithValue: value callback: [:v | value := v]. html cssId: #F1. html autofocus: [html textInputWithValue: value callback: [:v | value := v]]. html submitButton]. html cssId: #D1. html divWithShow: 'Show' hide: 'Hide' do: 'DIV'. html cssId: #S1. html spanWithShow: 'Show' hide: 'Hide' do: 'SPAN'
</methods> <methods> Seaside.WALRUCache <category>accessing</category>
at: key ^ self at: key ifAbsent: [self error: 'No entry for ', key]
</methods> <methods> Seaside.WALRUCache <category>initialize-release</category>
initialize max := 20. table := Dictionary new. ageTable := Dictionary new.
</methods> <methods> Seaside.WALRUCache <category>accessing</category>
at: key ifAbsent: errorBlock |val| val := table at: key ifAbsent: [^ errorBlock value]. ageTable at: val put: 0. ^ val.
</methods> <methods> Seaside.WALRUCache <category>accessing</category>
at: key put: val |removals| table at: key put: val. ageTable at: val put: 0. removals := OrderedCollection new. ageTable associationsDo: [:assoc | assoc value > max ifTrue: [removals add: assoc key]. assoc value: assoc value + 1]. removals do: [:ea | self remove: ea].
</methods> <methods> Seaside.WALRUCache <category>as yet unclassified</category>
capacity: aNumber max := aNumber
</methods> <methods> Seaside.WALRUCache <category>printing</category>
store: anObject |key| key := self nextKey. self at: key put: anObject. ^ key
</methods> <methods> Seaside.WALRUCache <category>callbacks</category>
nextKey |key| [table includesKey: (key := WAExternalID new displayString)] whileTrue. ^ key
</methods> <methods> Seaside.WALRUCache <category>testing</category>
isEmpty ^ table isEmpty
</methods> <methods> Seaside.WALRUCache <category>removing</category>
remove: anObject ageTable removeKey: anObject. table removeKey: (table keyAtValue: anObject)
</methods> <methods> Seaside.WALabelTag <category>attributes</category>
for: aString self attributeAt: 'for' put: aString.
</methods> <methods> Seaside.WALabelTag <category>accessing</category>
tag ^ 'label'
</methods> <methods> Seaside.WALabelledFormDialog <category>rendering</category>
renderDialogOn: html self rows do: [:ea | ea = #- ifTrue: [self renderSpacerRowOn: html] ifFalse: [self renderRowForSelector: ea on: html]].
</methods> <methods> Seaside.WALabelledFormDialog <category>rendering</category>
renderRowForSelector: aSymbol on: html html div id: 'dialog-row-' , aSymbol; class: 'dialog-row'; with: [ html span class: 'dialog-form-label'; with: [self renderLabelForSelector: aSymbol on: html]. html span class: 'dialog-form-field'; with: [self renderFieldForSelector: aSymbol on: html]].
</methods> <methods> Seaside.WALabelledFormDialog <category>rendering</category>
renderFieldForSelector: aSymbol on: html | renderSelector | renderSelector := self renderingSelectorFor: aSymbol. (self respondsTo: renderSelector) ifTrue: [self perform: renderSelector with: html] ifFalse: [self renderDefaultFieldForSelector: aSymbol on: html]
</methods> <methods> Seaside.WALabelledFormDialog <category>rendering</category>
renderTableRowsOn: html self rows do: [:ea | ea = #- ifTrue: [self renderSpacerRowOn: html] ifFalse: [self renderRowForSelector: ea on: html]].
</methods> <methods> Seaside.WALabelledFormDialog <category>accessing</category>
style ^ ' .dialog-row { clear: both; /*set position: relative to handle the ie disappearing text bug*/ position: relative; margin-top: 3px; } .dialog-form-label { width: 100px; float: left; text-align: right; padding: 2px 6px; margin-right: 4px; margin-top: 2px; } .dialog-form-field { text-align: left; padding: 2px; margin-top: 2px; float: left; } .dialog-buttons { clear: both; padding: 10px; text-align: center } .dialog-spacer { clear: both; height: 10px; } '
</methods> <methods> Seaside.WALabelledFormDialog <category>rendering</category>
renderingSelectorFor: aSymbol ^ ('render', aSymbol capitalized, 'On:') asSymbol
</methods> <methods> Seaside.WALabelledFormDialog <category>rendering</category>
renderLabelForSelector: aSymbol on: html html text: (self labelForSelector: aSymbol)
</methods> <methods> Seaside.WALabelledFormDialog <category>accessing</category>
rows ^ #()
</methods> <methods> Seaside.WALabelledFormDialog <category>rendering</category>
renderDefaultFieldForSelector: aSymbol on: html html textInput on: aSymbol of: self model
</methods> <methods> Seaside.WALibrary <category>accessing</category>
fileSelectors self subclassResponsibility
</methods> <methods> Seaside.WALibrary <category>accessing</category>
filenames ^ self fileSelectors collect: [ :each | self asFilename: each ]
</methods> <methods> Seaside.WALibrary <category>accessing</category>
asSelector: aFilename self subclassResponsibility
</methods> <methods> Seaside.WALibrary <category>accessing</category>
urlOf: aSymbol using: aHandler ^ aHandler baseUrl addToPath: self className; addToPath: (self asFilename: aSymbol); yourself
</methods> <methods> Seaside.WALibrary <category>accessing</category>
mimetypeForFile: aFilename self subclassResponsibility
</methods> <methods> Seaside.WALibrary <category>accessing</category>
asFilename: aFilename self subclassResponsibility
</methods> <methods> Seaside.WALibrary <category>accessing</category>
documentForFile: aFilename ^self perform: (self asSelector: aFilename)
</methods> <methods> Seaside.WALibrary <category>accessing</category>
urlForFile: aFilename ^ self urlOf: (self asSelector: aFilename)
</methods> <methods> Seaside.WALibrary <category>processing</category>
updateRoot: anHtmlRoot
</methods> <methods> Seaside.WALibrary <category>accessing</category>
urlOf: aSymbol ^ self urlOf: aSymbol using: WAFileHandler default
</methods> <methods> Seaside.WALibrary <category>accessing</category>
name ^ self class name
</methods> <methods> Seaside.WALibrary <category>accessing</category>
documentAt: aFilename ifAbsent: aBlock | selector | selector := self asSelector: aFilename. ^(self fileSelectors includes: selector) ifTrue: [ WAResponse document: (self documentForFile: aFilename) mimeType: (self mimetypeForFile: aFilename) ] ifFalse: [ aBlock value ]
</methods> <methods> Seaside.WALibraryBrowser <category>actions</category>
goto: anArray library := anArray first. selector := anArray second
</methods> <methods> Seaside.WALibraryBrowser <category>rendering</category>
renderEditorOn: html html textArea rows: 20; columns: 80; on: #string of: self.
</methods> <methods> Seaside.WALibraryBrowser <category>accessing</category>
orderedHits ^ self hits keys asSortedCollection: [:a :b | (hits at: a) size >= (hits at: b) size]
</methods> <methods> Seaside.WALibraryBrowser <category>actions</category>
save
</methods> <methods> Seaside.WALibraryBrowser <category>accessing</category>
library: aLibraryClass library := aLibraryClass. selector := nil.
</methods> <methods> Seaside.WALibraryBrowser <category>accessing</category>
string ^ self selector ifNotNilDo: [:s | library new perform: s]
</methods> <methods> Seaside.WALibraryBrowser <category>accessing</category>
libraries ^ (WAStyleLibrary subclasses, WAScriptLibrary subclasses) asSortedCollection: [:a :b | a name <= b name]
</methods> <methods> Seaside.WALibraryBrowser <category>accessing</category>
library ^ library
</methods> <methods> Seaside.WALibraryBrowser <category>rendering</category>
renderContentOn: html html div class: 'stylebrowser-columns'; with: [ html form: [ self renderColumnsOn: html ] ]. html div class: 'stylebrowser-search'; with: [ html form: [ html textInput value: search; callback: [:v | search := v]. html space. html submitButton callback: [self findAll: search]; text: 'Search' ]. html unorderedList: [ self orderedHits do: [:pair | html listItem: [ self renderHit: pair on: html ] ] ] ]. html div class: 'stylebrowser-editor'; with: [ html form: [ self renderEditorOn: html. html paragraph. html submitButton callback: [self save]; text: 'Save' ] ]
</methods> <methods> Seaside.WALibraryBrowser <category>actions</category>
findAll: aString hits := Dictionary new. (aString findTokens: ' ') do: [:ea | self find: ea]. hits isEmpty ifFalse: [self goto: self orderedHits first]
</methods> <methods> Seaside.WALibraryBrowser <category>accessing</category>
selectors ^ library ifNil: [#()] ifNotNil: [library selectors]
</methods> <methods> Seaside.WALibraryBrowser <category>rendering</category>
renderColumnsOn: html html select beSubmitOnChange; size: 10; list: self libraries; on: #library of: self. html select beSubmitOnChange; size: 10; list: self selectors; on: #selector of: self.
</methods> <methods> Seaside.WALibraryBrowser <category>rendering</category>
renderHit: anArray on: html | text | text := String streamContents: [ :stream | stream nextPutAll: anArray first name. stream nextPutAll: '>>'. stream nextPutAll: anArray second. stream space. stream nextPutAll: '('. (hits at: anArray) do: [:each | stream nextPutAll: each ] separatedBy: [ stream nextPutAll: ', ']. stream nextPutAll: ')']. html anchor callback: [self goto: anArray]; with: text.
</methods> <methods> Seaside.WALibraryBrowser <category>actions</category>
find: aString | inst | self libraries do: [:ea | inst := ea new. ea selectors do: [:sel | ((inst perform: sel) includesSubString: aString) ifTrue: [(hits at: (Array with: ea with: sel) ifAbsentPut: [SortedCollection new]) add: aString]]]
</methods> <methods> Seaside.WALibraryBrowser <category>accessing</category>
string: aString self selector ifNotNilDo: [:sel | library compile: (sel, ' ^ ', aString printString)]
</methods> <methods> Seaside.WALibraryBrowser <category>accessing</category>
selector: aSymbol (library selectors includes: aSymbol) ifTrue: [selector := aSymbol]
</methods> <methods> Seaside.WALibraryBrowser <category>accessing</category>
style ^ ' .stylebrowser-search {float: left} .stylebrowser-columns {float: left} .stylebrowser-columns select {width: 250px} .stylebrowser-editor {clear: both} '
</methods> <methods> Seaside.WALibraryBrowser <category>accessing</category>
selector ^ selector
</methods> <methods> Seaside.WALibraryBrowser <category>actions</category>
search: aString search := aString. self findAll: search
</methods> <methods> Seaside.WALibraryBrowser <category>accessing</category>
hits ^ hits ifNil: [ hits := Dictionary new ]
</methods> <methods> Seaside.WALinkElement <category>relationship</category>
beClossary self relationship: 'lossary'
</methods> <methods> Seaside.WALinkElement <category>attributes</category>
url: aString self attributeAt: 'href' put: aString
</methods> <methods> Seaside.WALinkElement <category>relationship</category>
relationship: aString "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." self attributeAt: 'rel' put: aString
</methods> <methods> Seaside.WALinkElement <category>media</category>
addProjection self addMedia: 'projection'
</methods> <methods> Seaside.WALinkElement <category>relationship</category>
beSubsection self relationship: 'subsection'
</methods> <methods> Seaside.WALinkElement <category>type</category>
beRss self type: 'application/rss+xml'
</methods> <methods> Seaside.WALinkElement <category>relationship</category>
beCopyright self relationship: 'copyright'
</methods> <methods> Seaside.WALinkElement <category>relationship</category>
beAuthor self relationship: 'author'
</methods> <methods> Seaside.WALinkElement <category>relationship</category>
beSearch "Gives a link to a resource that can be used to search through the current document and its related pages. " self relationship: 'search'
</methods> <methods> Seaside.WALinkElement <category>media</category>
addScreen self addMedia: 'screen'
</methods> <methods> Seaside.WALinkElement <category>relationship</category>
bePrevious "Indicates that the current document is a part of a series, and that the previous document in the series is the referenced document." self relationship: 'previous'
</methods> <methods> Seaside.WALinkElement <category>relationship</category>
beStylesheet "Imports a stylesheet." self relationship: 'stylesheet'
</methods> <methods> Seaside.WALinkElement <category>media</category>
addBraille self addMedia: 'braille'
</methods> <methods> Seaside.WALinkElement <category>media</category>
addMedia: aString | media | media := (((attributes at: 'media' ifAbsent: [ '' ]) findTokens: $,) collect: [ :each | each withBlanksTrimmed ]) asSet. media add: aString. self media: (String streamContents: [ :stream | media do: [ :each | stream nextPutAll: each ] separatedBy: [ stream nextPutAll: ', ' ] ])
</methods> <methods> Seaside.WALinkElement <category>relationship</category>
beNext "Indicates that the current document is a part of a series, and that the next document in the series is the referenced document." self relationship: 'next'
</methods> <methods> Seaside.WALinkElement <category>media</category>
addHandheld self addMedia: 'handheld'
</methods> <methods> Seaside.WALinkElement <category>relationship</category>
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." self relationship: 'start'
</methods> <methods> Seaside.WALinkElement <category>relationship</category>
beLast self relationship: 'last'
</methods> <methods> Seaside.WALinkElement <category>media</category>
addTeletype self addMedia: 'tty'
</methods> <methods> Seaside.WALinkElement <category>relationship</category>
beAlternateStylesheet self relationship: 'alternate stylesheet'
</methods> <methods> Seaside.WALinkElement <category>relationship</category>
beMicrosummary "http://wiki.mozilla.org/Microsummaries" self relationship: 'microsummary'
</methods> <methods> Seaside.WALinkElement <category>relationship</category>
beTableOfContents self relationship: 'contents'
</methods> <methods> Seaside.WALinkElement <category>type</category>
beCss self type: 'text/css'
</methods> <methods> Seaside.WALinkElement <category>relationship</category>
beUp "Provides a link to a document giving the context for the current document." self relationship: 'up'
</methods> <methods> Seaside.WALinkElement <category>relationship</category>
beIndex self relationship: 'index'
</methods> <methods> Seaside.WALinkElement <category>relationship</category>
beFirst "Indicates that the current document is a part of a series, and that the first document in the series is the referenced document." self relationship: 'first'
</methods> <methods> Seaside.WALinkElement <category>relationship</category>
beChapter self relationship: 'chapter'
</methods> <methods> Seaside.WALinkElement <category>media</category>
addTelevision self addMedia: 'tv'
</methods> <methods> Seaside.WALinkElement <category>media</category>
addPrint self addMedia: 'print'
</methods> <methods> Seaside.WALinkElement <category>relationship</category>
beAlternate "Gives alternate representations of the current document." self relationship: 'alternate'
</methods> <methods> Seaside.WALinkElement <category>relationship</category>
beSection self relationship: 'section'
</methods> <methods> Seaside.WALinkElement <category>relationship</category>
beFontDefinition self relationship: 'fontdef'
</methods> <methods> Seaside.WALinkElement <category>media</category>
addAll self addMedia: 'all'
</methods> <methods> Seaside.WALinkElement <category>media</category>
media: aString "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'." self attributeAt: 'media' put: aString
</methods> <methods> Seaside.WALinkElement <category>relationship</category>
beAppendix self relationship: 'appendix'
</methods> <methods> Seaside.WALinkElement <category>relationship</category>
beBookmark self relationship: 'bookmark'
</methods> <methods> Seaside.WALinkElement <category>relationship</category>
beShortcutIcon self relationship: 'shortcut icon'
</methods> <methods> Seaside.WALinkElement <category>relationship</category>
beHelp self relationship: 'help'
</methods> <methods> Seaside.WALinkElement <category>type</category>
beAtom self type: 'application/atom+xml'
</methods> <methods> Seaside.WALinkElement <category>relationship</category>
beTop self relationship: 'top'
</methods> <methods> Seaside.WALinkElement <category>attributes</category>
title: aString self attributeAt: 'title' put: aString
</methods> <methods> Seaside.WALinkElement <category>media</category>
addAural self addMedia: 'aural'
</methods> <methods> Seaside.WALinkSubmitTest <category>rendering</category>
rendererClass "Intentionally using the classic API" ^WAHtmlRenderer
</methods> <methods> Seaside.WALinkSubmitTest <category>initialize-release</category>
initialize super initialize. count := 0
</methods> <methods> Seaside.WALinkSubmitTest <category>rendering</category>
renderContentOn: html html attributes at: 'name' put: #myform. html form: [html textInputWithValue: count callback: [:v | count := v]. html break. html addShortcut: 'Ctrl-Down'. html anchorWithAction: [count := count - 1] text: '--' submitFormNamed: 'myform'. html space. html addShortcut: 'Ctrl-Up'. html anchorWithAction: [count := count + 1] text: '++' submitFormNamed: #myform. html break; break. html addShortcut: 'Ctrl-Z'. html addShortcut: 'Ctrl-z'. html checkboxWithValue: (count = 0) callback: [:v | v ifTrue: [count := 0] ] submitFormNamed: 'myform'. html space. html text: 'Reset' ]. html emphasis: 'Handy shortcuts : Ctrl-Up, Ctrl-Down and Ctrl-Z'
</methods> <methods> Seaside.WAListAttribute <category>accessing</category>
options: aCollection options := aCollection
</methods> <methods> Seaside.WAListAttribute <category>as yet unclassified</category>
valueFromString: aString ^ self options detect: [:ea | ea displayString = aString] ifNone: [self error: 'No matching list option']
</methods> <methods> Seaside.WAListAttribute <category>accessing</category>
options ^ options
</methods> <methods> Seaside.WAListAttribute <category>as yet unclassified</category>
accept: aVisitor with: anObject ^ aVisitor visitListAttribute: self with: anObject
</methods> <methods> Seaside.WAListTag <category>actions</category>
beUnordered tag := 'ul'.
</methods> <methods> Seaside.WAListTag <category>public</category>
with: aBlock | brush | super with: [ list do: [ :each | brush := canvas listItem class: 'option'. (self isSelected: each) ifTrue: [ brush class: 'option-selected' ]. brush with: [ self hasCallback ifFalse: [ canvas render: (self labelForOption: each) ] ifTrue: [ canvas anchor callback: [ self callbackForOption: each ]; with: (self labelForOption: each) ] ] ]. aBlock value ]
</methods> <methods> Seaside.WAListTag <category>actions</category>
beOrdered tag := 'ol'.
</methods> <methods> Seaside.WAListTag <category>accessing</category>
tag ^ tag ifNil: [ 'ul' ].
</methods> <methods> Seaside.WAListTag <category>private</category>
callbackForOption: anObject self isMultiple ifTrue: [ selected := (self isSelected: anObject) ifTrue: [ selected copyWithout: anObject ] ifFalse: [ selected copyWith: anObject ]. callbackBlock value: selected ] ifFalse: [ callbackBlock value: anObject ].
</methods> <methods> Seaside.WALoginDialog <category>rendering</category>
renderContentOn: html html form: [ html table: [ html tableRow: [ html tableHeading: 'Username:'. html tableData: [ html textInput value: username; callback: [ :value | username := value ] ] ]. html tableRow: [ html tableHeading: 'Password:'. html tableData: [ html passwordInput callback: [ :value | password := value ] ] ]. html tableRow: [ html tableData colSpan: 2; with: [ html submitButton on: #login of: self. html space. html submitButton on: #cancel of: self ] ] ] ]
</methods> <methods> Seaside.WALoginDialog <category>actions</category>
login (authenticator verifyPassword: password forUser: username) ifTrue: [self answer: username]
</methods> <methods> Seaside.WALoginDialog <category>accessing</category>
authenticator: anAuthenticator authenticator := anAuthenticator
</methods> <methods> Seaside.WALoginDialog <category>actions</category>
cancel self answer: nil
</methods> <methods> Seaside.WALotsaLinks <category>rendering</category>
rendererClass "Intentionally using the classic API" ^WAHtmlRenderer
</methods> <methods> Seaside.WALotsaLinks <category>rendering</category>
renderContentOn: html html list: (1 to: 5000) do: [:ea | html anchorWithAction: [self inform: ea] text: ea]
</methods> <methods> Seaside.WAMain <category>convenience</category>
application "Answer the application to which this entry point is associated." ^ self session application
</methods> <methods> Seaside.WAMain <category>accessing</category>
start: aRequest "The main entry point into a session." self subclassResponsibility
</methods> <methods> Seaside.WAMain <category>user authentication</category>
session "Answer the session to which this entry point is associated." ^ WACurrentSession value
</methods> <methods> Seaside.WAMessageDecoration <category>rendering</category>
renderContentOn: html html heading: message level: 3. self renderOwnerOn: html.
</methods> <methods> Seaside.WAMessageDecoration <category>accessing</category>
message: aString message := aString
</methods> <methods> Seaside.WAMetaElement <category>attributes</category>
contentType: aString self responseHeaderName: 'Content-Type'. self content: aString
</methods> <methods> Seaside.WAMetaElement <category>attributes</category>
scheme: aString self attributeAt: 'scheme' put: aString
</methods> <methods> Seaside.WAMetaElement <category>attributes</category>
beRightToLeft self textDirection: 'RTL'
</methods> <methods> Seaside.WAMetaElement <category>attributes</category>
name: aString self attributeAt: 'name' put: aString
</methods> <methods> Seaside.WAMetaElement <category>attributes</category>
textDirection: aString self attributeAt: 'dir' put: aString
</methods> <methods> Seaside.WAMetaElement <category>attributes</category>
contentType: aConentTypeString charset: aCharsetString self contentType: aConentTypeString, '; charset=', aCharsetString
</methods> <methods> Seaside.WAMetaElement <category>attributes</category>
language: aString self attributeAt: 'lang' put: aString
</methods> <methods> Seaside.WAMetaElement <category>attributes</category>
redirectAfter: seconds to: aString self responseHeaderName: 'refresh'. self content: seconds displayString , ';URL=' , aString
</methods> <methods> Seaside.WAMetaElement <category>attributes</category>
responseHeaderName: aString self attributeAt: 'http-equiv' put: aString
</methods> <methods> Seaside.WAMetaElement <category>attributes</category>
beLeftToRight self textDirection: 'LTR'
</methods> <methods> Seaside.WAMetaElement <category>attributes</category>
content: aString self attributeAt: 'content' put: aString
</methods> <methods> Seaside.WAMiniCalendar <category>testing</category>
canSelect: aDate ^ canSelectBlock value: aDate
</methods> <methods> Seaside.WAMiniCalendar <category>accessing-delegated</category>
year ^ self month year
</methods> <methods> Seaside.WAMiniCalendar <category>initialization</category>
initialize super initialize. month := WAStateHolder new contents: Date today month. date := WAStateHolder new. canSelectBlock := [ :value | true ]. selectBlock := [ :value | self answer: value ]
</methods> <methods> Seaside.WAMiniCalendar <category>accessing-delegated</category>
date: aDate date contents: aDate. month contents: aDate month
</methods> <methods> Seaside.WAMiniCalendar <category>private</category>
weekDays ^ (1 to: 7) collect: [ :i | (Date nameOfDay: i) first: 3 ]
</methods> <methods> Seaside.WAMiniCalendar <category>private</category>
monthHeading ^ self month name , ' ' , self month year displayString
</methods> <methods> Seaside.WAMiniCalendar <category>private</category>
months ^ (1 to: 12) collect: [ :i | Month month: i year: self year ]
</methods> <methods> Seaside.WAMiniCalendar <category>accessing</category>
canSelectBlock: aBlock canSelectBlock := aBlock
</methods> <methods> Seaside.WAMiniCalendar <category>rendering</category>
renderYearNavigationOn: html html span class: 'calendarPrevious'; with: [ html anchor callback: [self year: self year - 1]; with: (self year - 1) ]. html space. html span class: 'calendarNext'; with: [ html anchor callback: [self year: self year + 1]; with: (self year + 1) ]
</methods> <methods> Seaside.WAMiniCalendar <category>rendering</category>
renderContentOn: html html div class: 'calendar'; with: [ html span class: 'calendarCaption'; with: [ self renderMonthHeadingOn: html ]. html table: [ html tableRow class: 'calendarTitle'; with: [ self weekDays do: [ :each | html tableData: each ] ]. self month weeksDo: [ :week | self renderRowForWeek: week on: html ] ]. self renderMonthNavigationOn: html. html space; space. self renderYearNavigationOn: html ]
</methods> <methods> Seaside.WAMiniCalendar <category>accessing</category>
selectBlock: aBlock selectBlock := aBlock
</methods> <methods> Seaside.WAMiniCalendar <category>rendering</category>
renderRowForWeek: aWeek on: html html tableRow: [ aWeek datesDo: [ :each | self renderCellForDate: each on: html ] ]
</methods> <methods> Seaside.WAMiniCalendar <category>rendering</category>
renderMonthNavigationOn: html html span class: 'calendarPrevious'; with: [ html anchor callback: [self month: self month previous]; with: (self month previous name first: 3) ]. html space. html span class: 'calendarNext'; with: [ html anchor callback: [self month: self month next]; with: (self month next name first: 3) ]
</methods> <methods> Seaside.WAMiniCalendar <category>accessing-delegated</category>
month: aMonth ^ month contents: aMonth
</methods> <methods> Seaside.WAMiniCalendar <category>accessing-delegated</category>
month ^ month contents
</methods> <methods> Seaside.WAMiniCalendar <category>action</category>
select: aDate self date: aDate. selectBlock value: aDate
</methods> <methods> Seaside.WAMiniCalendar <category>accessing-delegated</category>
date ^ date contents
</methods> <methods> Seaside.WAMiniCalendar <category>rendering</category>
renderMonthHeadingOn: html html form: [ html select list: self months; on: #month of: self; labels: [:eachMonth | eachMonth name]. html textInput maxLength: 4; on: #year of: self. html submitButton text: 'Refresh' ]
</methods> <methods> Seaside.WAMiniCalendar <category>rendering</category>
renderCellForDate: aDate on: html html tableData: [ aDate month = self month ifTrue: [ html span class: (self date = aDate ifTrue: [ 'calendarArchiveDate' ]); with: [ (self canSelect: aDate) ifTrue: [ html anchor callback: [ self select: aDate ]; with: aDate dayOfMonth ] ifFalse: [ html text: aDate dayOfMonth ] ] ] ]
</methods> <methods> Seaside.WAMiniCalendar <category>accessing-delegated</category>
year: anInteger self month: (Month month: self month monthIndex year: anInteger)
</methods> <methods> Seaside.WAModelProxy <category>forwarding</category>
doesNotUnderstand: aMessage ^ aMessage selector isUnary ifTrue: [self performRead: aMessage selector] ifFalse: [ (aMessage selector isKeyword and: [aMessage arguments size = 1]) ifTrue: [self performWrite: aMessage selector allButLast with: aMessage argument] ifFalse: [super doesNotUnderstand: aMessage]]
</methods> <methods> Seaside.WAModelProxy <category>accessing</category>
model ^ model
</methods> <methods> Seaside.WAModelProxy <category>initializing</category>
setModel: anObject model := anObject. cache := Dictionary new.
</methods> <methods> Seaside.WAModelProxy <category>forwarding</category>
commit cache keysAndValuesDo: [:key :value | self performRealWrite: key with: value]. cache := Dictionary new.
</methods> <methods> Seaside.WAModelProxy <category>private</category>
performRealWrite: aSymbol with: anObject model perform: aSymbol asSymbol asMutator with: anObject
</methods> <methods> Seaside.WAModelProxy <category>private</category>
performRead: aSymbol ^ cache at: aSymbol asSymbol ifAbsent: [ model perform: aSymbol ]
</methods> <methods> Seaside.WAModelProxy <category>forwarding</category>
name ^ model name
</methods> <methods> Seaside.WAModelProxy <category>forwarding</category>
value ^ model value
</methods> <methods> Seaside.WAModelProxy <category>private</category>
performWrite: aSymbol with: anObject cache at: aSymbol asSymbol put: anObject
</methods> <methods> Seaside.WAMultiCounter <category>accessing</category>
children ^ counters
</methods> <methods> Seaside.WAMultiCounter <category>initialization</category>
initialize super initialize. counters := (1 to: 5) collect: [ :each | WACounter new ]
</methods> <methods> Seaside.WAMultiCounter <category>rendering</category>
renderContentOn: html counters do: [ :each | html render: each ] separatedBy: [ html horizontalRule ]
</methods> <methods> Seaside.WAMultiDispatchCallback <category>evaluation</category>
evaluateWithField: anObject (anObject isCollection and: [ anObject isString not ]) ifFalse: [ ^ super evaluateWithField: anObject ]. anObject do: [ :each | self evaluateWithArgument: (self valueForField: each) ].
</methods> <methods> Seaside.WANavigation <category>rendering</category>
renderOptionsOn: html html unorderedList list: self options; selected: self selection; callback: [:v | self select: v]; labels: [:ea | self labelForOption: ea]
</methods> <methods> Seaside.WANavigation <category>initialize</category>
initialize super initialize. selection := WAStateHolder new
</methods> <methods> Seaside.WANavigation <category>initialize</category>
options ^ #()
</methods> <methods> Seaside.WANavigation <category>selection</category>
select: anObject selection contents: anObject. self selectionChanged
</methods> <methods> Seaside.WANavigation <category>query</category>
labelForOption: anObject ^ anObject displayString
</methods> <methods> Seaside.WANavigation <category>selection</category>
selection ^ selection contents
</methods> <methods> Seaside.WANavigation <category>rendering</category>
renderSelectionOn: html
</methods> <methods> Seaside.WANavigation <category>rendering</category>
renderContentOn: html html div class: 'kalsey'; with: [ html div class: 'navigation-options'; with: [self renderOptionsOn: html]. html div class: 'navigation-content'; with: [self renderSelectionOn: html]]
</methods> <methods> Seaside.WANavigation <category>selection</category>
selectionChanged
</methods> <methods> Seaside.WANavigationBar <category>initialize-release</category>
initialize super initialize. actionsSelector := #actions
</methods> <methods> Seaside.WANavigationBar <category>rendering</category>
renderInput: aSymbol on: html html form: [ html strong: aSymbol capitalized. html space. html textInput callback: [ :value | self target perform: aSymbol with: value ] ]
</methods> <methods> Seaside.WANavigationBar <category>accessing</category>
actions ^ self target perform: actionsSelector
</methods> <methods> Seaside.WANavigationBar <category>accessing</category>
owner: anObject owner := anObject
</methods> <methods> Seaside.WANavigationBar <category>accessing</category>
actionsSelector: aSymbol actionsSelector := aSymbol
</methods> <methods> Seaside.WANavigationBar <category>accessing</category>
target ^ owner activeComponent
</methods> <methods> Seaside.WANavigationBar <category>rendering</category>
renderLink: aSymbol on: html html anchor on: aSymbol of: self target. html break
</methods> <methods> Seaside.WANavigationBar <category>rendering</category>
renderContentOn: html self actions do: [ :symbol | symbol numArgs = 0 ifTrue: [ self renderLink: symbol on: html ] ifFalse: [ self renderInput: symbol on: html ] ]
</methods> <methods> Seaside.WANotFoundHandler <category>actions</category>
handleRequest: aRequest ^ WAResponse notFound: aRequest url
</methods> <methods> Seaside.WANoteDialog <category>rendering</category>
renderDialogOn: html html textArea id: 'dialog-note'; on: #note of: self
</methods> <methods> Seaside.WANoteDialog <category>accessing</category>
style ^ ' #dialog-note {width: 80%; height: 200px} '
</methods> <methods> Seaside.WANoteDialog <category>actions</category>
ok self answer: note
</methods> <methods> Seaside.WANoteDialog <category>accessing</category>
buttons ^ #(ok cancel)
</methods> <methods> Seaside.WANoteDialog <category>accessing</category>
note ^note
</methods> <methods> Seaside.WANoteDialog <category>accessing</category>
note: aString note := aString
</methods> <methods> Seaside.WANoteDialog <category>actions</category>
cancel self answer: nil
</methods> <methods> Seaside.WANumberAttribute <category>as yet unclassified</category>
valueFromString: aString ^ Number readFrom: aString
</methods> <methods> Seaside.WANumberAttribute <category>as yet unclassified</category>
accept: aVisitor with: anObject ^ aVisitor visitNumberAttribute: self with: anObject
</methods> <methods> Seaside.WAObjectTag <category>attributes</category>
type: aString self attributeAt: 'type' put: aString
</methods> <methods> Seaside.WAObjectTag <category>attributes</category>
codebase: aUrl self attributeAt: 'codebase' put: aUrl
</methods> <methods> Seaside.WAObjectTag <category>attributes</category>
url: aUrl self attributeAt: 'data' put: aUrl
</methods> <methods> Seaside.WAObjectTag <category>attributes</category>
width: anInteger self attributeAt: 'width' put: anInteger
</methods> <methods> Seaside.WAObjectTag <category>accessing</category>
tag ^ 'object'
</methods> <methods> Seaside.WAObjectTag <category>attributes</category>
archive: aUrl self attributeAt: 'archive' put: aUrl
</methods> <methods> Seaside.WAObjectTag <category>attributes</category>
classId: aUrl self attributeAt: 'classid' put: aUrl
</methods> <methods> Seaside.WAObjectTag <category>attributes</category>
height: anInteger self attributeAt: 'height' put: anInteger
</methods> <methods> Seaside.WAObjectTag <category>attributes</category>
standby: aString self attributeAt: 'standby' put: aString
</methods> <methods> Seaside.WAObjectTag <category>attributes</category>
codetype: aString self attributeAt: 'codetype' put: aString
</methods> <methods> Seaside.WAObjectTag <category>attributes</category>
declare: aBoolean self attributeAt: 'declare' put: aBoolean
</methods> <methods> Seaside.WAOldApiHtmlTest <category>accessing</category>
message ^message
</methods> <methods> Seaside.WAOldApiHtmlTest <category>initialize</category>
initialize super initialize. message := self initialMessage. booleanList := #(a b c d) collect: [:key | key -> ((Array with: true with: false) atRandom)]. number := 10 atRandom.
</methods> <methods> Seaside.WAOldApiHtmlTest <category>rendering</category>
renderCheckboxesOn: html html text: booleanList. html paragraph. html cssId: 'checkbox-form'. html form: [booleanList do: [:assoc | html text: assoc key; space. html cssId: 'cb-' , assoc key asString. html checkboxWithValue: assoc value callback: [:b | assoc value: b]. html break]. html submitButton]
</methods> <methods> Seaside.WAOldApiHtmlTest <category>private</category>
allSelectors ^ (self class selectors asSortedCollection select: [:s | s beginsWith: 'render']) remove: #renderContentOn:; remove: #rendererClass; yourself
</methods> <methods> Seaside.WAOldApiHtmlTest <category>rendering</category>
renderSubmitButtonsOn: html html text: number. html paragraph. html cssId: 'button-form'. html form: [ 1 to: 10 do: [ :index | html addShortcut: 'F' , index asString. html addShortcut: 'Ctrl-' , index asString. html submitButtonWithAction: [ number := index ] text: index. html space]]. html attributes addStyle: 'font-size: 60%'. html attributes addStyle: 'font-style: italic'. html span: 'Handy shortcuts : F1..F10, Ctrl-1..Ctrl-9'.
</methods> <methods> Seaside.WAOldApiHtmlTest <category>rendering</category>
renderContentOn: html self allSelectors pairsDo: [:selA :selB | html divClass: 'row' with: [ html divClass: 'left' with: [self perform: selA with: html]. html divClass: 'right' with: [self perform: selB with: html] ]]
</methods> <methods> Seaside.WAOldApiHtmlTest <category>rendering</category>
renderTextInputOn: html html cssId: 'textInput-form'. html form: [html cssId: 'textInput-banner'. html span: message. html paragraph. html cssId: 'text-message'. html textInputWithValue: message callback: [:v | message := v]. html submitButton]
</methods> <methods> Seaside.WAOldApiHtmlTest <category>rendering</category>
renderTextAreaOn: html html cssId: 'textarea-form'. html form: [html cssId: 'textarea-banner'. html span: message. html paragraph. html cssId: 'textarea-message'. html textAreaWithValue: message callback: [:v | message := v]. html break; submitButton]
</methods> <methods> Seaside.WAOldApiHtmlTest <category>rendering</category>
renderZFieldSetOn: html | url1 | url1 := html context urlForDocument: (ScriptingSystem formAtKey: 'Halo-Debug') mimeType: 'image/jpg' fileName: 'Debug.jpg'. html fieldsetWithLegend: 'Various images in a fieldset' do: [html image: url1 altText: 'Halo-Debug'. html space. html attributeAt: 'alt' put: 'Halo-View'. html imageWithForm: (ScriptingSystem formAtKey: 'Halo-View'). html space. html attributeAt: 'alt' put: 'Halo-Paint'. html imageWithDocument: (ScriptingSystem formAtKey: 'Halo-Paint') mimeType: 'image/png' fileName: 'Paint.png'. html break. html attributes border: 1. html image: 'http://www.netstyle.ch/include/seaside/pics/top.jpg' width: '80%' altText: 'Seaside'. html break. html attributes border: 2. html image: 'http://www.netstyle.ch/include/seaside/pics/top.jpg' height: '50px' altText: 'Seaside'. html break. html attributes noBorder. html image: 'http://www.netstyle.ch/include/seaside/pics/top.jpg' width: '250px' height: '60px' altText: 'Seaside']
</methods> <methods> Seaside.WAOldApiHtmlTest <category>rendering</category>
renderVFieldSetOn: html html fieldsetWithLegend: 'Various text rendering in a fieldset' do: [html strong: 'Strong'; break; bold: 'Bold'; break; italic: 'Italic'; break; underline: 'Underline'; break; acronym: 'United States of America' do: 'USA'; break; emphasis: 'Emphasis'; break. html attributes addStyle: 'color: red'; backgroundColor: 'lightgreen'; addStyle: 'padding: 1em'; border: 2; addStyle: 'font-weight: bold'; addStyle: 'font-size: 150%'; height: '3em'; alignCenter. html div: 'Large bold red in a green div'; break]
</methods> <methods> Seaside.WAOldApiHtmlTest <category>rendering</category>
rendererClass "Intentionally using the classic API" ^WAHtmlRenderer
</methods> <methods> Seaside.WAOldApiHtmlTest <category>rendering</category>
renderRadioButtonsOn: html html text: booleanList. html paragraph. html cssId: 'radio-form'. html form: [booleanList do: [:assoc | | group | group := html radioGroup. html text: assoc key; space. html cssId: assoc key asString , '-on'. html addShortcut: 'Ctrl-' , assoc key. html radioButtonInGroup: group selected: assoc value callback: [assoc value: true]. html cssId: assoc key asString , '-off'. html addShortcut: 'Alt-' , assoc key. html radioButtonInGroup: group selected: assoc value not callback: [assoc value: false]. html break]. html submitButton]
</methods> <methods> Seaside.WAOldApiHtmlTest <category>accessing</category>
booleanList ^booleanList
</methods> <methods> Seaside.WAOldApiHtmlTest <category>rendering</category>
style ^ ' div.row {clear: both} div.left {float: left; width: 45%; margin: 1%} div.right {float: left; width: 45%; margin: 1%} '
</methods> <methods> Seaside.WAOldApiHtmlTest <category>rendering</category>
renderSelectsOn: html html text: number. html paragraph. html cssId: 'select-form'. html form: [html cssId: 'select-list'. html selectFromList: (1 to: 10) selected: number callback: [:i | number := i]. html submitButton]
</methods> <methods> Seaside.WAOldApiHtmlTest <category>initialize</category>
initialMessage ^'Hello world!'.
</methods> <methods> Seaside.WAOldApiHtmlTest <category>accessing</category>
number ^number
</methods> <methods> Seaside.WAOldApiInputTest <category>initialize-release</category>
initialize super initialize. nilString := nil. emptyString := ''. integer := 42. fraction := 1/3.
</methods> <methods> Seaside.WAOldApiInputTest <category>accessing</category>
integer: anObject "Set the value of integer" integer := anObject
</methods> <methods> Seaside.WAOldApiInputTest <category>rendering</category>
renderContentOn: html self renderFormOneOn: html. self renderFormTwoOn: html.
</methods> <methods> Seaside.WAOldApiInputTest <category>rendering</category>
renderFormOneOn: html html form: [ html table: [ html tableHeadings: #(Name Value PrintString); tableRowWithLabel: 'Nil String' column: [html textInputOn: #nilString of: self] column: [html text: nilString printString]; tableRowWithLabel: 'Empty String' column: [html textInputOn: #emptyString of: self] column: [html text: emptyString printString]; tableRowWithLabel: 'Integer' column: [html textInputOn: #integer of: self] column: [html text: integer printString]; tableRowWithLabel: 'Fraction' column: [html textInputOn: #fraction of: self] column: [html text: fraction printString]; tableRowWithLabel: 'Select' column: [html selectInputOn: #selected of: self list: #(a b c) ] column: [html text: selected]; tableRowWithLabel: 'Multi Select' column: [html attributeAt: 'multiple' put: true. html selectInputOn: #mSelected of: self list: #(1 2 3 4 5) ] column: [html text: mSelected]. ]. html break; submitButton. ]
</methods> <methods> Seaside.WAOldApiInputTest <category>accessing</category>
labelForSelector: aSymbol aSymbol == #nilString ifTrue: [^'Nil string, ' , self nilString printString]. aSymbol == #emptyString ifTrue: [^'Empty string, ' , self emptyString printString]. aSymbol == #integer ifTrue: [^'Integer, ' , self integer printString]. aSymbol == #fraction ifTrue: [^'Fraction, ' , self fraction printString]. ^ super labelForSelector: aSymbol
</methods> <methods> Seaside.WAOldApiInputTest <category>accessing</category>
mSelected: anObject mSelected := anObject
</methods> <methods> Seaside.WAOldApiInputTest <category>accessing</category>
selected: anObject selected := anObject
</methods> <methods> Seaside.WAOldApiInputTest <category>accessing</category>
integer "Answer the value of integer" ^integer
</methods> <methods> Seaside.WAOldApiInputTest <category>accessing</category>
fraction "Answer the value of fraction" ^fraction
</methods> <methods> Seaside.WAOldApiInputTest <category>accessing</category>
mSelected ^mSelected ifNil: [#()]
</methods> <methods> Seaside.WAOldApiInputTest <category>rendering</category>
rendererClass "Intentionally using the classic API" ^WAHtmlRenderer
</methods> <methods> Seaside.WAOldApiInputTest <category>accessing</category>
emptyString "Answer the value of emptyString" ^emptyString
</methods> <methods> Seaside.WAOldApiInputTest <category>accessing</category>
emptyString: anObject "Set the value of emptyString" emptyString := anObject
</methods> <methods> Seaside.WAOldApiInputTest <category>accessing</category>
nilString: anObject "Set the value of nilString" nilString := anObject
</methods> <methods> Seaside.WAOldApiInputTest <category>rendering</category>
style ^' form { float: left; margin: 0 150px 0 0; } '
</methods> <methods> Seaside.WAOldApiInputTest <category>accessing</category>
nilString "Answer the value of nilString" ^nilString
</methods> <methods> Seaside.WAOldApiInputTest <category>accessing</category>
fraction: anObject "Set the value of fraction" fraction := anObject
</methods> <methods> Seaside.WAOldApiInputTest <category>accessing</category>
selected ^selected
</methods> <methods> Seaside.WAOldApiInputTest <category>rendering</category>
renderFormTwoOn: html html form: [ html table: [ html tableHeadings: #(Name Value); labelledRowForTextInputOn: #nilString of: self size: 4; labelledRowForTextInputOn: #emptyString of: self size: 8; labelledRowForTextInputOn: #integer of: self size: 12; labelledRowForTextInputOn: #fraction of: self size: 16. ]. html break; submitButton. ]
</methods> <methods> Seaside.WAOpeningConditionalComment <category>accessing</category>
condition: aString condition := aString
</methods> <methods> Seaside.WAOpeningConditionalComment <category>accessing</category>
condition ^condition
</methods> <methods> Seaside.WAOpeningConditionalComment <category>writing</category>
writeOn: aStream aStream nextPutAll: '<!--['; nextPutAll: self condition; nextPutAll: ']>'
</methods> <methods> Seaside.WAOptionGroupTag <category>attributes</category>
label: aString "This attribute specifies the label for the option group." self attributeAt: 'label' put: aString
</methods> <methods> Seaside.WAOptionGroupTag <category>accessing</category>
tag ^ 'optgroup'
</methods> <methods> Seaside.WAOptionTag <category>attributes</category>
label: aString "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." self attributeAt: 'label' put: aString
</methods> <methods> Seaside.WAOptionTag <category>callbacks</category>
on: selector of: anObject "copy pasted from WASelectTag, we need a traitified version of seaside" self selected: (anObject perform: selector). self callback: [ :value | anObject perform: selector asMutator with: value ].
</methods> <methods> Seaside.WAOptionTag <category>attributes</category>
value: aString self attributes at: 'value' put: aString
</methods> <methods> Seaside.WAOptionTag <category>accessing</category>
tag ^ 'option'
</methods> <methods> Seaside.WAOptionTag <category>callbacks</category>
callback: aBlock "this is one of these methods that are copy-pasted all over the place but people don't need traits because traits do not solve real world problems" self attributeAt: 'value' put: (canvas callbacks registerCallback: aBlock).
</methods> <methods> Seaside.WAOptionTag <category>attributes</category>
selected: aBoolean self attributeAt: 'selected' put: aBoolean.
</methods> <methods> Seaside.WAParameterTag <category>attributes</category>
type: aString self attributeAt: 'type' put: aString
</methods> <methods> Seaside.WAParameterTag <category>attributes</category>
value: aString self attributeAt: 'value' put: aString
</methods> <methods> Seaside.WAParameterTag <category>accessing</category>
tag ^ 'param'
</methods> <methods> Seaside.WAParameterTag <category>attributes</category>
name: aString self attributeAt: 'name' put: aString
</methods> <methods> Seaside.WAParentTest <category>rendering</category>
rendererClass "Intentionally using the classic API" ^WAHtmlRenderer
</methods> <methods> Seaside.WAParentTest <category>accessing</category>
parent: aComponent parent := aComponent
</methods> <methods> Seaside.WAParentTest <category>rendering</category>
renderContentOn: html html anchorWithAction: [self go] text: 'swap parent'
</methods> <methods> Seaside.WAParentTest <category>processing</category>
go parent inform: 'foo'
</methods> <methods> Seaside.WAPasswordAttribute <category>as yet unclassified</category>
accept: aVisitor with: anObject ^ aVisitor visitPasswordAttribute: self with: anObject
</methods> <methods> Seaside.WAPasswordInputTag <category>accessing</category>
type ^ 'password'
</methods> <methods> Seaside.WAPath <category>behavior</category>
choose: anAssociation "Install a new stack of navigation from the old one and the specified association." | newStack | newStack := Array new writeStream. stack do: [:ea | newStack nextPut: ea. ea == anAssociation ifTrue: [stack := newStack contents. ^ self]]
</methods> <methods> Seaside.WAPath <category>initialize</category>
initialize super initialize. stack := #(). self session registerObjectForBacktracking: self.
</methods> <methods> Seaside.WAPath <category>accessing</category>
currentSegment ^ stack isEmpty ifTrue: [nil] ifFalse: [stack last value]
</methods> <methods> Seaside.WAPath <category>rendering</category>
renderContentOn: html stack isEmpty ifTrue: [^ self]. html div id: 'path'; with: [ stack allButLast do: [:assoc | html anchor callback: [self choose: assoc]; with: assoc key. html text: ' >> ']. html strong: stack last key].
</methods> <methods> Seaside.WAPath <category>behavior</category>
pushSegment: anObject name: aString stack := stack, (Array with: aString -> anObject)
</methods> <methods> Seaside.WAPathTest <category>rendering</category>
rendererClass "Intentionally using the classic API" ^WAHtmlRenderer
</methods> <methods> Seaside.WAPathTest <category>initialization</category>
initialize super initialize. self contents: WACounter new
</methods> <methods> Seaside.WAPathTest <category>rendering</category>
renderContentOn: html html anchorWithName: contents count. html render: contents.
</methods> <methods> Seaside.WAPathTest <category>path</category>
updateUrl: aUrl aUrl addToPath: contents count displayString. aUrl fragment: contents count displayString.
</methods> <methods> Seaside.WAPhraseElementsTest <category>rendering</category>
renderSampleOn: html html heading level2; with: '<samp>'. html text: 'If you select the ''champion'' option, you will receive the message '. html sampleOutput: 'The monkey is not a caterpillar'. html text: '.'
</methods> <methods> Seaside.WAPhraseElementsTest <category>rendering</category>
renderDefinitionOn: html html heading level2; with: '<dfn>'. html definition: 'Ichthyology'. html text: ' is the branch of natural science which studies fish.'
</methods> <methods> Seaside.WAPhraseElementsTest <category>rendering</category>
renderKeyboardInputOn: html html heading level2; with: '<kbd>'. html text: 'Finally, type '. html keyboardInput: 'logout'. html text: ' and press the return key.'
</methods> <methods> Seaside.WAPhraseElementsTest <category>rendering</category>
renderAddressOn: html html heading level2; with: '<address>'. html address: [ #( 'Newsletter editor' 'J.R. Brown' 'JimquickPost News, Jimquick, CT 01234' 'Tel (123) 456 7890') do: [ :each | html text: each ] separatedBy: [ html break ] ]
</methods> <methods> Seaside.WAPhraseElementsTest <category>rendering</category>
renderVariableOn: html html heading level2; with: '<var>'. html text: 'In the simplest case, the command for deleting a file in Unix is'. html break. html keyboardInput: 'rm'. html space. html variable: 'filename'
</methods> <methods> Seaside.WAPhraseElementsTest <category>rendering</category>
renderCodeOn: html html heading level2; with: '<code>'. html text: 'Expressions like '. html code: 'a[i++] + b[i++]'. html text: ' should not be used, since they cause undefined behavior'
</methods> <methods> Seaside.WAPhraseElementsTest <category>rendering</category>
renderContentOn: html self renderHarryOn: html. self renderAbbreviatedOn: html. self renderAcronymOn: html. self renderKeyboardInputOn: html. self renderVariableOn: html. self renderCodeOn: html. self renderDefinitionOn: html. self renderSampleOn: html. self renderAddressOn: html
</methods> <methods> Seaside.WAPhraseElementsTest <category>rendering</category>
renderHarryOn: html html heading level2; with: '<cite>, <q>, <strong>'. html text: 'As '. html citation: 'Harry S. Truman'. html text: ' said, '. html quote: 'The buck stops here.'. html break. html text: 'More information can be found in '. html citation: '[ISO-0000]'. html text: '.'. html break. html text: 'Please refer to the following reference number in future correspondence: '. html strong: '1-234-55'
</methods> <methods> Seaside.WAPhraseElementsTest <category>rendering</category>
renderAbbreviatedOn: html html heading level2; with: '<abbr>'. html abbreviated title: 'World Wide Web'; with: 'WWW'
</methods> <methods> Seaside.WAPhraseElementsTest <category>rendering</category>
renderAcronymOn: html html heading level2; with: '<acronym>'. html acronym title: 'Federal Bureau of Investigation'; with: 'F.B.I.'
</methods> <methods> Seaside.WAPluggableSelectBox <category>accessing</category>
changeSelected: aSymbol changeSelected := aSymbol
</methods> <methods> Seaside.WAPluggableSelectBox <category>accessing</category>
size: aNumber size := aNumber
</methods> <methods> Seaside.WAPluggableSelectBox <category>accessing</category>
list: aSymbol list := aSymbol
</methods> <methods> Seaside.WAPluggableSelectBox <category>rendering</category>
renderOn: html |array| array := (model perform: list) asArray. html div class: 'column-choice'; with: [ html form: [ html select beSubmitOnChange; size: size; list: array; selected: (array at: (model perform: selected) ifAbsent: []); callback: [ :item | model perform: changeSelected with: (array indexOf: item) ] ] ].
</methods> <methods> Seaside.WAPluggableSelectBox <category>accessing</category>
model: anObject model := anObject
</methods> <methods> Seaside.WAPluggableSelectBox <category>accessing</category>
selected: aSymbol selected := aSymbol
</methods> <methods> Seaside.WAPopupAnchorTag <category>accessing</category>
extent: aPoint extent := aPoint
</methods> <methods> Seaside.WAPopupAnchorTag <category>initialize-release</category>
initialize super initialize. dependent := false.
</methods> <methods> Seaside.WAPopupAnchorTag <category>private</category>
popupString ^ String streamContents: [:stream | stream nextPutAll: 'window.open('; nextPut: $'; nextPutAll: (url ifNil: [self actionUrl]); nextPut: $'; nextPut: $,; nextPut: $'; nextPutAll: name; nextPut: $'; nextPut:$,; nextPut: $'; nextPutAll: 'width='; nextPutAll: extent x displayString; nextPutAll: ',height='; nextPutAll: extent y displayString; nextPut: $,; nextPutAll: self toggleString; nextPut: $'; nextPutAll: ').focus()']
</methods> <methods> Seaside.WAPopupAnchorTag <category>public api</category>
with: aBlock self onClick: self popupString. self ignoreURL. ^ super with: aBlock.
</methods> <methods> Seaside.WAPopupAnchorTag <category>accessing</category>
name: aString name := aString
</methods> <methods> Seaside.WAPopupAnchorTag <category>public api</category>
showToolbar showToolbar := true
</methods> <methods> Seaside.WAPopupAnchorTag <category>public api</category>
shouldShowToolbar ^ showToolbar ifNil: [showToolbar := false]
</methods> <methods> Seaside.WAPopupAnchorTag <category>testing</category>
isDependent ^ dependent ifNil: [false]
</methods> <methods> Seaside.WAPopupAnchorTag <category>testing</category>
isResizable ^ resizable ifNil: [resizable := false]
</methods> <methods> Seaside.WAPopupAnchorTag <category>public api</category>
toggleString ^ String streamContents: [:stream | self toggleArray do: [:ea | stream nextPutAll: ea; nextPutAll: '=yes'] separatedBy: [stream nextPutAll: ',']]
</methods> <methods> Seaside.WAPopupAnchorTag <category>public api</category>
beResizable resizable := true
</methods> <methods> Seaside.WAPopupAnchorTag <category>public api</category>
showScrollbars showScrollbars := true
</methods> <methods> Seaside.WAPopupAnchorTag <category>public api</category>
beDependent dependent := true
</methods> <methods> Seaside.WAPopupAnchorTag <category>public api</category>
toggleArray ^ Array streamContents: [:stream | self isDependent ifTrue: [stream nextPut: #dependent]. self shouldShowToolbar ifTrue: [stream nextPut: #toolbar]. self isResizable ifTrue: [stream nextPut: #resizable]. self shouldShowScrollbars ifTrue: [stream nextPut: #scrollbars]]
</methods> <methods> Seaside.WAPopupAnchorTag <category>public api</category>
shouldShowScrollbars ^ showScrollbars ifNil: [showScrollbars := false]
</methods> <methods> Seaside.WAPopupTest <category>rendering</category>
rendererClass "Intentionally using the classic API" ^WAHtmlRenderer
</methods> <methods> Seaside.WAPopupTest <category>initialize-release</category>
initialize super initialize. url := 'http://www.seaside.st'
</methods> <methods> Seaside.WAPopupTest <category>rendering</category>
renderContentOn: html html form: [ html text: 'URL:'. html space. html textInputWithValue: url callback: [:v | url := v]. html submitButtonWithText: 'Update' ]. html anchorWithPopupUrl: url extent: 400@400 text: 'popup'. html space. html text: '(', url, ')'
</methods> <methods> Seaside.WAPresenter <category>initialization</category>
initialize
</methods> <methods> Seaside.WAPresenter <category>convenience</category>
fieldsAt: key ifPresent: aBlock "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." ^ self session fieldsAt: key ifPresent: aBlock
</methods> <methods> Seaside.WAPresenter <category>tree</category>
nextPresentersDo: aBlock self subclassResponsibility
</methods> <methods> Seaside.WAPresenter <category>call/answer</category>
handleAnswer: anObject self subclassResponsibility
</methods> <methods> Seaside.WAPresenter <category>decoration</category>
isDecoration ^ false
</methods> <methods> Seaside.WAPresenter <category>convenience</category>
preferenceAt: aSymbol put: anObject ^ self application preferenceAt: aSymbol put: anObject
</methods> <methods> Seaside.WAPresenter <category>rendering</category>
renderContentOn: aRenderer self nextPresentersDo: [:ea | ea renderWithContext: aRenderer context]
</methods> <methods> Seaside.WAPresenter <category>request processing</category>
processChildCallbacks: aStream self nextPresentersDo: [:ea | ea processCallbackStream: aStream]
</methods> <methods> Seaside.WAPresenter <category>convenience</category>
preferenceAt: aSymbol ^ self application preferenceAt: aSymbol
</methods> <methods> Seaside.WAPresenter <category>convenience</category>
application ^ self session application
</methods> <methods> Seaside.WAPresenter <category>rendering</category>
showHalo ^ true
</methods> <methods> Seaside.WAPresenter <category>rendering</category>
rendererClass "Override this method if you want a custom renderer." ^ WARenderCanvas
</methods> <methods> Seaside.WAPresenter <category>convenience</category>
session ^ WACurrentSession value
</methods> <methods> Seaside.WAPresenter <category>request processing</category>
processCallbackStream: aCallbackStream aCallbackStream processCallbacksWithOwner: self. self processChildCallbacks: aCallbackStream. aCallbackStream processCallbacksWithOwner: self.
</methods> <methods> Seaside.WAPresenter <category>path</category>
updateUrl: aUrl
</methods> <methods> Seaside.WAPresenter <category>rendering</category>
renderWithContext: aRenderingContext | html callbacks | callbacks := aRenderingContext callbacksFor: self. html := (self rendererClass context: aRenderingContext callbacks: callbacks) painter: self. (self showHalo and: [aRenderingContext isDebugMode]) ifTrue: [(WAHalo for: self) renderContentOn: html] ifFalse: [self renderContentOn: html]. html close.
</methods> <methods> Seaside.WAPresenter <category>path</category>
updateRoot: anHtmlRoot "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" self script ifNotNilDo: [:script | anHtmlRoot addScript: script]. self style ifNotNilDo: [:style | anHtmlRoot addStyle: style].
</methods> <methods> Seaside.WAPresenter <category>convenience</category>
fieldsAt: key ifAbsent: aBlock "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." ^ self session fieldsAt: key ifAbsent: aBlock
</methods> <methods> Seaside.WAPresenter <category>rendering</category>
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." ^ nil
</methods> <methods> Seaside.WAPresenter <category>rendering</category>
script "The same as #style except that it is for JavaScript. This is rarely used, consider using WAFileLibrary or exernal files instead." ^ nil
</methods> <methods> Seaside.WAPresenter <category>tree</category>
withNextPresentersDo: aBlock aBlock value: self. self nextPresentersDo: [:ea | ea withNextPresentersDo: aBlock]
</methods> <methods> Seaside.WAPresenter <category>convenience</category>
fieldsAt: key "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." ^ self session fieldsAt: key
</methods> <methods> Seaside.WAPresenter <category>rendering</category>
classForSection: aSymbol ^ (aSymbol copyFrom: 7 to: (aSymbol size - 1)) withFirstCharacterDownshifted
</methods> <methods> Seaside.WAPresenter <category>request processing</category>
initialRequest: aRequest "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:. You can not use #call: in here. Consider using a WATask instead and sending #call: in #go. See WABrowser for examples."
</methods> <methods> Seaside.WAPrettyPrintedDocument <category>testing</category>
cssClassFor: aString ^ (self isKnownTag: aString) ifTrue: [ 'tag-known' ] ifFalse: [ 'tag-unknown' ]
</methods> <methods> Seaside.WAPrettyPrintedDocument <category>public</category>
closeTag: aString indentLevel := indentLevel - 1. indentCloseTags removeLast ifTrue: [ self indent ]. (self shouldPrintCloseTagFor: aString) ifTrue: [html text: '</'. html span class: (self cssClassFor: aString); with: aString. html text: '>']
</methods> <methods> Seaside.WAPrettyPrintedDocument <category>public</category>
comment: aString self indent. html span class: 'comment'; with: [ html text: '<!-- '; text: aString; text: ' -->' ]
</methods> <methods> Seaside.WAPrettyPrintedDocument <category>private</category>
indent firstLine ifTrue: [ firstLine := false ] ifFalse: [ html break ]. indentLevel timesRepeat: [ html space ]
</methods> <methods> Seaside.WAPrettyPrintedDocument <category>testing</category>
cssClassForAttribute: aString ^ (self isKnownAttribute: aString) ifTrue: [ 'attribute-known' ] ifFalse: [ 'attribute-unknown' ]
</methods> <methods> Seaside.WAPrettyPrintedDocument <category>accessing</category>
root ^ html context document root
</methods> <methods> Seaside.WAPrettyPrintedDocument <category>initialization</category>
initializeWithRenderer: aRenderer html := aRenderer. indentCloseTags := OrderedCollection with: false. indentLevel := 0. firstLine := true
</methods> <methods> Seaside.WAPrettyPrintedDocument <category>testing</category>
isKnownAttribute: aString ^ self knownAttributes includes: aString asLowercase asSymbol
</methods> <methods> Seaside.WAPrettyPrintedDocument <category>private</category>
attributes: anAttributes anAttributes ifNotNil: [anAttributes associations do: [:ea | self attribute: ea]]
</methods> <methods> Seaside.WAPrettyPrintedDocument <category>public</category>
text: aString html text: aString
</methods> <methods> Seaside.WAPrettyPrintedDocument <category>testing</category>
knownTags ^ #(?xml !doctype !dt a abbr acronym address applet area attach b base basefont bdo big blink blockquote body br button caption center cite code col colgroup comment component dd del dfn dir div dl dt em fieldset font form frame frameset h h1 h2 h3 h4 h5 h6 head hr html i iframe img input ins isindex kbd label legend li link listing map menu meta multicol nextid nobr noframes noscript object ol optgroup option p param plaintext pre q s samp script select small span strike strong style sub sup table tbody td textarea textflow tfoot th thead title tr tt u ul var wbr xmp)
</methods> <methods> Seaside.WAPrettyPrintedDocument <category>testing</category>
isKnownTag: aString ^ self knownTags includes: aString asSymbol
</methods> <methods> Seaside.WAPrettyPrintedDocument <category>private</category>
attribute: anAssociation | attr value | attr := anAssociation key asLowercase. value := anAssociation value. value = false ifFalse: [html space. html span class: (self cssClassForAttribute: attr); with: [html text: attr]. html text: '='. html span class: 'attribute-value'; with: [html text: '"'. attr = 'href' ifTrue: [value ifNotNil: [html anchor url: value; with: value displayString]] ifFalse: [value = true ifFalse: [html text: value displayString] ifTrue: [html text: attr]]. html text: '"']]
</methods> <methods> Seaside.WAPrettyPrintedDocument <category>public</category>
openTag: aString attributes: anAttributes Continuation currentDo: [ :cc | self indent. html text: '<'. html anchor class: (self cssClassFor: aString); callback: [ cc invoke: [ self halt. WARenderNotification raiseSignal ] ]; with: aString. self attributes: anAttributes. (self shouldPrintCloseTagFor: aString) ifFalse: [ html space; text: '/' ]. html text: '>'. indentLevel := indentLevel + 1. indentCloseTags removeLast; addLast: true; addLast: false ]
</methods> <methods> Seaside.WAPrettyPrintedDocument <category>testing</category>
knownAttributes ^ #(abbr accept-charset accept accesskey action align alink alt archive axis background bgcolor bgproperties border cellpadding cellspacing char charoff charset checked cite class classid clear code codebase codetype color cols colspan compact content coords data datetime declare defer dir direction disabled encoding enctype face for frame frameborder framespacing gutter headers height href hreflang hspace http-equiv id ismap label lang leftmargin link longdesc loop lowsrc marginheight marginwidth maxlength media method methods multiple name nohref noresize noshade nowrap object onabort onblur onchange onclick ondblclick onerror onfocus onkeydown onkeypress onkeyup onload onmousedown onmousemove onmouseout onmouseover onmouseup onreset onselect onsubmit onunload prompt PUBLIC readonly rel rev rows rowspan rules scheme scope scrolling selected shape size span src standby style summary tabindex target text title type urn usemap valign value valuetype version vlink vspace width wrap xml:lang xmlns)
</methods> <methods> Seaside.WAProcessMonitor <category>initialization</category>
initialize mutex := Semaphore forMutualExclusion
</methods> <methods> Seaside.WAProcessMonitor <category>controlling</category>
terminate process ifNotNil: [process terminate]
</methods> <methods> Seaside.WAProcessMonitor <category>mutual exclusion</category>
critical: aBlock ifError: errorBlock |value| mutex critical: [responseSem := Semaphore new. process := [[value := aBlock on: Error do: errorBlock] ensure: [responseSem signal]] fork. responseSem wait]. process := nil. ^ value
</methods> <methods> Seaside.WAProfiledDocument <category>rendering</category>
renderCount: aBag titled: aString on: html aBag isEmpty ifTrue: [ ^ self ]. html heading level: 1; with: aString. html unorderedList list: aBag sortedCounts; labels: [ :each | each value displayString , ' (' , each key displayString , ')' ]
</methods> <methods> Seaside.WAProfiledDocument <category>public</category>
closeTag: aString
</methods> <methods> Seaside.WAProfiledDocument <category>initialization</category>
initializeWithRoot: aRoot super initializeWithRoot: aRoot. tags := Bag new. attributes := Bag new. names := Set new. classes := Set new
</methods> <methods> Seaside.WAProfiledDocument <category>public</category>
text: aString
</methods> <methods> Seaside.WAProfiledDocument <category>rendering</category>
renderList: aCollection titled: aString on: html aCollection isEmpty ifTrue: [ ^ self ]. html heading level: 1; with: aString. html unorderedList list: aCollection asSortedCollection
</methods> <methods> Seaside.WAProfiledDocument <category>rendering</category>
renderOn: html self renderCount: tags titled: 'Tags' on: html. self renderCount: attributes titled: 'Attributes' on: html. self renderList: names titled: 'Names' on: html. self renderList: classes titled: 'Classes' on: html
</methods> <methods> Seaside.WAProfiledDocument <category>public</category>
openTag: aString attributes: anAttributes tags add: aString. anAttributes ifNil: [ ^ self ]. attributes addAll: anAttributes attributes keys. anAttributes at: 'id' ifPresent: [ :value | names add: value ]. anAttributes at: 'class' ifPresent: [ :value | classes addAll: (value findTokens: ' ') ]
</methods> <methods> Seaside.WAProfiler <category>rendering</category>
children ^Array with: self root
</methods> <methods> Seaside.WAProfiler <category>rendering</category>
renderContentOn: html | profile | profile := SeasidePlatformSupport profileSendsDuring: [ html render: self root ]. html horizontalRule. html preformatted: profile
</methods> <methods> Seaside.WAProxyTest <category>testing</category>
test | ad p | ad := WAStoreAddress new. ad street: 'Parkway'. p := WAModelProxy on: ad. self assert: p street = ad street. self assert: ad city isNil. self assert: p city = ad city. p city: 'NYC'. self assert: p city = 'NYC'. self assert: ad city isNil. p commit. self assert: ad city = 'NYC'.
</methods> <methods> Seaside.WARadioButtonTag <category>attributes</category>
selected: aBoolean self attributeAt: 'checked' put: aBoolean.
</methods> <methods> Seaside.WARadioButtonTag <category>attributes</category>
beUnchecked self attributeAt: 'checked' put: false.
</methods> <methods> Seaside.WARadioButtonTag <category>attributes</category>
beChecked self attributeAt: 'checked' put: true.
</methods> <methods> Seaside.WARadioButtonTag <category>accessing</category>
type ^ 'radio'
</methods> <methods> Seaside.WARadioButtonTag <category>callbacks</category>
callback: aBlock self value: (canvas callbacks registerCallback: aBlock)
</methods> <methods> Seaside.WARadioButtonTag <category>javascript</category>
canHaveShortcut ^true
</methods> <methods> Seaside.WARadioButtonTag <category>attributes</category>
group: aRadioGroup self name: aRadioGroup key.
</methods> <methods> Seaside.WARadioGroup <category>accessing</category>
key ^ key
</methods> <methods> Seaside.WARadioGroup <category>public api</category>
radioButton ^ canvas radioButton group: self
</methods> <methods> Seaside.WARadioGroup <category>initialize-release</category>
initializeWithCanvas: aRenderCanvas canvas := aRenderCanvas. key := aRenderCanvas callbacks registerDispatchCallback.
</methods> <methods> Seaside.WARegistry <category>private</category>
initialize super initialize. self clearHandlers.
</methods> <methods> Seaside.WARegistry <category>private</category>
unregistered super unregistered. self clearHandlers
</methods> <methods> Seaside.WARegistry <category>private</category>
handleDefaultRequest: aRequest self subclassResponsibility
</methods> <methods> Seaside.WARegistry <category>private</category>
unregisterExpiredHandlers | expired newHandlersByKey newKeysByHandler | expired := OrderedCollection new. newHandlersByKey := Dictionary new. newKeysByHandler := Dictionary new. self mutex critical: [handlersByKey keysAndValuesDo: [:key :value | value isActive ifTrue: [newHandlersByKey at: key put: value. newKeysByHandler at: value put: key] ifFalse: [expired add: value]]. handlersByKey := newHandlersByKey. keysByHandler := newKeysByHandler]. [expired do: [:ea | ea unregistered]] fixTemps fork
</methods> <methods> Seaside.WARegistry <category>public</category>
urlForRequestHandler: anObject | key url | key := self ensureKeyForHandler: anObject. url := self baseUrl. url addParameter: self handlerField value: key displayString. ^ url
</methods> <methods> Seaside.WARegistry <category>private</category>
registerRequestHandler: anObject | key | key := WAExternalID new: 16. self shouldCollectHandlers ifTrue: [ self unregisterExpiredHandlers ]. self mutex critical: [ handlersByKey at: key put: anObject. keysByHandler at: anObject put: key ]. ^ key
</methods> <methods> Seaside.WARegistry <category>private</category>
keyOrNilForHandler: anObject ^ self mutex critical: [ keysByHandler at: anObject ifAbsent: [ nil ] ]
</methods> <methods> Seaside.WARegistry <category>public</category>
handleRequest: aRequest ^ (aRequest fields includesKey: self handlerField) ifTrue: [ self handleKeyRequest: aRequest ] ifFalse: [ self handleDefaultRequest: aRequest ]
</methods> <methods> Seaside.WARegistry <category>private</category>
isSeasideField: aString ^ aString notEmpty and: [ aString first = $_ ]
</methods> <methods> Seaside.WARegistry <category>private</category>
mutex ^ mutex ifNil: [mutex := Semaphore forMutualExclusion]
</methods> <methods> Seaside.WARegistry <category>private</category>
expiryPathFor: aRequest ^ aRequest url
</methods> <methods> Seaside.WARegistry <category>private</category>
handlerField ^ '_s'
</methods> <methods> Seaside.WARegistry <category>copying</category>
postCopy super postCopy. mutex := nil. self clearHandlers.
</methods> <methods> Seaside.WARegistry <category>private</category>
handleKeyRequest: aRequest | key handler keyString | "Under some circumstances, HTTP fields are collections of values" key := [keyString := aRequest at: self handlerField. (keyString isKindOf: OrderedCollection) ifTrue: [keyString := keyString first]. WAExternalID fromString: keyString] on: Error do: [:e | nil]. handler := handlersByKey at: key ifAbsent: [nil]. ^ (handler notNil and: [handler isActive]) ifTrue: [handler handleRequest: aRequest] ifFalse: [self handleExpiredRequest: aRequest]
</methods> <methods> Seaside.WARegistry <category>public</category>
ensureKeyForHandler: anObject ^ (self keyOrNilForHandler: anObject) ifNil: [ self registerRequestHandler: anObject ]
</methods> <methods> Seaside.WARegistry <category>private</category>
clearHandlers | handlers | self mutex critical: [handlers := handlersByKey. handlersByKey := Dictionary new. keysByHandler := Dictionary new]. (handlers notNil and: [handlers notEmpty]) ifTrue: [ [handlers do: [:ea | ea unregistered]] fixTemps fork ]
</methods> <methods> Seaside.WARegistry <category>private</category>
shouldCollectHandlers ^ 10 atRandom = 1
</methods> <methods> Seaside.WARegistry <category>private</category>
handleExpiredRequest: aRequest | url | aRequest isXmlHttpRequest ifTrue: [ ^ WAResponse new forbidden ]. url := WAUrl new. url addToPath: (self expiryPathFor: aRequest). url takeServerParametersFromRequest: aRequest. aRequest isGet ifTrue: [ aRequest fields keysAndValuesDo: [ :key :value | (url isSeasideField: key) ifFalse: [ url addParameter: key value: value ] ] ]. ^ WAResponse redirectTo: url displayString
</methods> <methods> Seaside.WARender <category>rendering</category>
unprocessedCallbacks: aCollection | owners | owners := (aCollection collect: [:ea | ea owner]) asSet asArray. self error: 'Components not found while processing callbacks: ', owners displayString
</methods> <methods> Seaside.WARender <category>convenience</category>
application ^ self session application
</methods> <methods> Seaside.WARender <category>rendering</category>
go self withPageExpiredHandler: [self withRenderNowHandler: [self render]. self shouldRedirect ifTrue: [self redirect]]
</methods> <methods> Seaside.WARender <category>convenience</category>
session ^ WACurrentSession value
</methods> <methods> Seaside.WARender <category>rendering</category>
withPageExpiredHandler: aBlock ^ aBlock on: WAPageExpired do: [:n |]
</methods> <methods> Seaside.WARender <category>rendering</category>
withRenderNowHandler: aBlock ^ aBlock on: WARenderNotification do: [:n | n]
</methods> <methods> Seaside.WARender <category>rendering</category>
buildDocRoot | docRoot | docRoot := WARenderedHtmlRoot context: context. docRoot resourceBaseUrl: self application resourceBaseUrl. docRoot bodyAttributes at: 'onload' append: 'onLoad()' separator: ';'. self session updateRoot: docRoot. root visiblePresentersDo: [:each | each updateRoot: docRoot]. ^ docRoot
</methods> <methods> Seaside.WARender <category>rendering</category>
shouldRedirect ^ request isGet not or: [(request fields includesKey: '_n') not]
</methods> <methods> Seaside.WARender <category>rendering</category>
redirect self session respond: [:anUrl | self updateUrl: anUrl. WAResponse redirectTo: anUrl displayString]
</methods> <methods> Seaside.WARender <category>rendering</category>
buildResponse | response document | self updateUrl: url. context actionUrl: url. response := self newResponse. response headerAt: 'Cache-Control' put: 'No-cache'. document := self session outputDocumentClass root: self buildDocRoot. document stream: response stream. context document: document. root decorationChainDo: [:ea | ea renderWithContext: context]. document close. ^ response
</methods> <methods> Seaside.WARender <category>rendering</category>
render | session | (session := self session) clearJumpTo. context := WARenderingContext new request: session currentRequest; session: session; yourself. request := session respond: [:u | url := u. self buildResponse]. self processCallbacks
</methods> <methods> Seaside.WARender <category>rendering</category>
updateUrl: aUrl root visiblePresentersDo: [:c | c updateUrl: aUrl]
</methods> <methods> Seaside.WARender <category>accessing</category>
root: aComponent root := aComponent
</methods> <methods> Seaside.WARender <category>rendering</category>
newResponse | s | s := self session currentRequest ifNotNilDo: [:r | r responseStream]. ^ s ifNil: [WAResponse new] ifNotNil: [WAStreamResponse new stream: s]
</methods> <methods> Seaside.WARender <category>rendering</category>
processCallbacks | lastPosition callbackStream | callbackStream := context callbackStreamForRequest: request. lastPosition := nil. [callbackStream position = lastPosition] whileFalse: [lastPosition := callbackStream position. root decorationChainDo: [:ea | ea processCallbackStream: callbackStream]]. callbackStream atEnd ifTrue: [WARenderNotification raiseSignal] ifFalse: [self unprocessedCallbacks: callbackStream upToEnd].
</methods> <methods> Seaside.WARenderCanvas <category>form-elements</category>
radioGroup: aBlock ^ aBlock value: self radioGroup
</methods> <methods> Seaside.WARenderCanvas <category>form-elements</category>
option: aBlock ^ self option with: aBlock
</methods> <methods> Seaside.WARenderCanvas <category>form-buttons</category>
cancelButton ^ self brush: WACancelButtonTag new.
</methods> <methods> Seaside.WARenderCanvas <category>form-elements</category>
radioGroup ^ WARadioGroup canvas: self
</methods> <methods> Seaside.WARenderCanvas <category>accessing</category>
context "Answer the rendering context." ^ context
</methods> <methods> Seaside.WARenderCanvas <category>form-elements</category>
option ^ self brush: WAOptionTag new.
</methods> <methods> Seaside.WARenderCanvas <category>accessing</category>
document "Answer the XHTML document." ^ self context document
</methods> <methods> Seaside.WARenderCanvas <category>public api</category>
urlForAction: actionBlock "Answer an action URL that will evaluate aBlock when beeing requested." ^ context actionUrl withParameter: (self callbacks registerActionCallback: actionBlock).
</methods> <methods> Seaside.WARenderCanvas <category>form-elements</category>
hiddenInput ^ self brush: WAHiddenInputTag new.
</methods> <methods> Seaside.WARenderCanvas <category>accessing</category>
callbacks "Answer the callback registry." ^ callbacks
</methods> <methods> Seaside.WARenderCanvas <category>form-elements</category>
checkbox ^ self brush: WACheckboxTag new
</methods> <methods> Seaside.WARenderCanvas <category>form-elements</category>
select ^ self brush: WASelectTag new
</methods> <methods> Seaside.WARenderCanvas <category>initialize-release</category>
initializeWithContext: aRenderingContext callbacks: aCallbackStore context := aRenderingContext. callbacks := aCallbackStore
</methods> <methods> Seaside.WARenderCanvas <category>form-elements</category>
timeInput ^ self brush: WATimeInput new
</methods> <methods> Seaside.WARenderCanvas <category>form-elements</category>
textArea ^ self brush: WATextAreaTag new
</methods> <methods> Seaside.WARenderCanvas <category>public api</category>
nextId ^ 'id' , context advanceKey
</methods> <methods> Seaside.WARenderCanvas <category>form-elements</category>
optionGroup ^ self brush: WAOptionGroupTag new
</methods> <methods> Seaside.WARenderCanvas <category>form-elements</category>
select: aBlock ^ self select with: aBlock
</methods> <methods> Seaside.WARenderCanvas <category>form-buttons</category>
imageButton ^ self brush: WAImageButtonTag new.
</methods> <methods> Seaside.WARenderCanvas <category>form-elements</category>
optionGroup: aBlock ^ self optionGroup with: aBlock
</methods> <methods> Seaside.WARenderCanvas <category>form-elements</category>
radioButton ^ self brush: WARadioButtonTag new.
</methods> <methods> Seaside.WARenderCanvas <category>form-elements</category>
dateInput ^ self brush: WADateInput new
</methods> <methods> Seaside.WARenderCanvas <category>form-buttons</category>
form ^ self brush: WAFormTag new
</methods> <methods> Seaside.WARenderCanvas <category>form-elements</category>
passwordInput ^ self brush: WAPasswordInputTag new.
</methods> <methods> Seaside.WARenderCanvas <category>form-elements</category>
radioButton: aBlock ^ self radioButton with: aBlock
</methods> <methods> Seaside.WARenderCanvas <category>public api</category>
peekNextId ^ 'id' , context nextKey
</methods> <methods> Seaside.WARenderCanvas <category>form-elements</category>
fileUpload ^ self brush: WAFileUploadTag new
</methods> <methods> Seaside.WARenderCanvas <category>private</category>
close self flush.
</methods> <methods> Seaside.WARenderCanvas <category>form-buttons</category>
button ^ self brush: WAButtonTag new.
</methods> <methods> Seaside.WARenderCanvasCompoundTests <category>testing</category>
testDateInput | divElement formElement element | html div: [WACanvasDateTimeTest basicNew renderDateTimeOn: html]. divElement := html xmlContents elements first. formElement := divElement elements at: 2. element := formElement elementsExcludingContent at: 2. self assert: element name asString = 'select'. self assert: (element attributeAt: 'id') = 'date-input'. element := formElement elementsExcludingContent at: 3. self assert: element name asString = 'input'. self assert: (element attributeAt: 'type') = 'text'. self assert: (element attributeAt: 'class') = 'text'. self assert: (element attributeAt: 'id') = 'date-input-day'. self assert: (element attributeAt: 'max') = '31'. self assert: (element attributeAt: 'maxlength') = '2'. self assert: (element attributeAt: 'size') = '2'. element := formElement elementsExcludingContent at: 4. self assert: element name asString = 'input'. self assert: (element attributeAt: 'type') = 'text'. self assert: (element attributeAt: 'class') = 'text'. self assert: (element attributeAt: 'id') = 'date-input-year'. self assert: (element attributeAt: 'maxlength') = '4'. self assert: (element attributeAt: 'size') = '4'
</methods> <methods> Seaside.WARenderCanvasCompoundTests <category>testing</category>
testTimeInput | divElement formElement element | html div: [WACanvasDateTimeTest basicNew renderDateTimeOn: html]. divElement := html xmlContents elements first. formElement := divElement elements at: 2. element := formElement elementsExcludingContent at: 6. self assert: element name asString = 'input'. self assert: (element attributeAt: 'type') = 'text'. self assert: (element attributeAt: 'class') = 'text'. self assert: (element attributeAt: 'id') = 'time-input'. self assert: (element attributeAt: 'maxlength') = '2'. self assert: (element attributeAt: 'size') = '2'. element := formElement elementsExcludingContent at: 7. self assert: element name asString = 'input'. self assert: (element attributeAt: 'type') = 'text'. self assert: (element attributeAt: 'class') = 'text'. self assert: (element attributeAt: 'id') = 'time-input-mins'. self assert: (element attributeAt: 'max') = '59'. self assert: (element attributeAt: 'maxlength') = '2'. self assert: (element attributeAt: 'size') = '2'. element := formElement elementsExcludingContent at: 8. self assert: element name asString = 'input'. self assert: (element attributeAt: 'type') = 'text'. self assert: (element attributeAt: 'class') = 'text'. self assert: (element attributeAt: 'id') = 'time-input-secs'. self assert: (element attributeAt: 'max') = '59'. self assert: (element attributeAt: 'maxlength') = '2'. self assert: (element attributeAt: 'size') = '2'
</methods> <methods> Seaside.WARenderCanvasForTest <category>public api</category>
setStateToBody self document setStateToBody.
</methods> <methods> Seaside.WARenderCanvasForTest <category>public api</category>
setStateToHead self document setStateToHead.
</methods> <methods> Seaside.WARenderCanvasForTest <category>accessing</category>
contents self flush. ^self document stream contents
</methods> <methods> Seaside.WARenderCanvasForTest <category>xml</category>
spaceEntity "To be subclassed as needed" ^'&#160;'
</methods> <methods> Seaside.WARenderCanvasForTest <category>public api</category>
reset ^self document reset
</methods> <methods> Seaside.WARenderCanvasForTest <category>accessing</category>
xmlContents " Make sure you enclose your tested html in some container (a div element for instance) to ensure xml well-formedness thus avoiding parse errors " ^SeasidePlatformSupport parseDocumentFrom: self contents readStream
</methods> <methods> Seaside.WARenderCanvasTestCase <category>constants</category>
defaultActionElements ^'<div>' , '<input name="1" class="submit" style="position: absolute; top: -100em" type="submit" value="Default" />' , '<input name="2" class="text" style="position: absolute; top: -100em" type="text" value="" />' ,'</div>'
</methods> <methods> Seaside.WARenderCanvasTestCase <category>constants</category>
hiddenFormElements ^'<div>' , '<input type="hidden" name="_s" value="s" class="hidden" />' , '<input type="hidden" name="_k" value="k" class="hidden" />' , '</div>'
</methods> <methods> Seaside.WARenderCanvasTestCase <category>set-up</category>
setUp html := WARenderCanvasForTest new. html context actionUrl addToPath: 'testUrl'; addParameter: '_s' value: 's'; addParameter: '_k' value: 'k'
</methods> <methods> Seaside.WARenderCanvasTests <category>constants</category>
callbackUrlParameters | parameters aString | parameters := #('_k=k&amp;' '_s=s&amp;' ). "Order is not predictable, depending on Smalltalk dialect, Try our best possible guess" aString := html contents. ^ (aString indexOfSubCollection: parameters first startingAt: 1) < (aString indexOfSubCollection: parameters last startingAt: 1) ifTrue: [parameters first , parameters last] ifFalse: [parameters last , parameters first]
</methods> <methods> Seaside.WARenderCanvasTests <category>testing</category>
testFormWithDefaultAction html form defaultAction: []; with: 'foo'. self assert: (html contents isSameXmlAs: '<form action="" method="post">' , self defaultActionElements , 'foo' , self hiddenFormElements , '</form>')
</methods> <methods> Seaside.WARenderCanvasTests <category>testing</category>
testAnchorWithCallback html anchor callback: []; with: 'foo'. self assert: html contents = ('<a href="?' , self callbackUrlParameters , '1">foo</a>'). html anchor callback: []; with: 'bar'. self assert: html contents = ('<a href="?' , self callbackUrlParameters , '1">foo</a>' , '<a href="?' , self callbackUrlParameters , '2">bar</a>')
</methods> <methods> Seaside.WARenderCanvasTests <category>testing</category>
testFormAndButton html form with: [html submitButton text: 'foo']. self assert: (html contents isSameXmlAs: '<form method="post" action="">' , '<input type="submit" value="foo" class="submit" />' , self hiddenFormElements , '</form>')
</methods> <methods> Seaside.WARenderCanvasTests <category>testing</category>
testSpace html space. self assert: html contents = '&#160;'. html reset. html space: 3. self assert: html contents = '&#160;&#160;&#160;'
</methods> <methods> Seaside.WARenderCanvasTests <category>testing</category>
testForm html form with: 'foo'. self assert: (html contents isSameXmlAs:'<form action="" method="post">foo' , self hiddenFormElements , '</form>')
</methods> <methods> Seaside.WARenderCanvasTests <category>testing</category>
testFormAndButtonWithCallback html form with: [(html submitButton) callback: []; text: 'foo']. self assert: (html contents isSameXmlAs: '<form method="post" action="">' , '<input name="1" value="foo" type="submit" class="submit" />' , self hiddenFormElements , '</form>')
</methods> <methods> Seaside.WARenderCanvasTests <category>testing</category>
testDivWithClassAndId html div class: #foo; id: #bar; with: 'zork'. self assert: (html contents isSameXmlAs: '<div class="foo" id="bar">zork</div>').
</methods> <methods> Seaside.WARenderCanvasTests <category>testing</category>
testImage html image url:'foo'; altText: 'bar'; title:'zork'. self assert: (html contents isSameXmlAs: '<img src="foo" alt="bar" title="zork" />')
</methods> <methods> Seaside.WARenderCanvasTests <category>testing</category>
testBreak html break. self assert: html contents = '<br />'
</methods> <methods> Seaside.WARenderCanvasTests <category>testing</category>
testDivAndSpan html div with: 'foo'. self assert: html contents = '<div>foo</div>'. html span with: 'bar'. self assert: html contents = '<div>foo</div><span>bar</span>'
</methods> <methods> Seaside.WARenderCanvasTests <category>testing</category>
testFormAndTextInput html form with: [html textInput id: #foo; value: 'bar']. self assert: (html contents isSameXmlAs: '<form action="" method="post">' , '<input type="text" class="text" value="bar" id="foo" />' , self hiddenFormElements , '</form>')
</methods> <methods> Seaside.WARenderCanvasTests <category>testing</category>
testFormAndTextInputWithCallback html form with: [html textInput id: #foo; callback: [:v | ]; value: 'bar']. self assert: (html contents isSameXmlAs: '<form action="" method="post">' , '<input name="1" class="text" id="foo" type="text" value="bar" />' , self hiddenFormElements , '</form>')
</methods> <methods> Seaside.WARenderCanvasTests <category>testing</category>
testDivWithClass html div class: #bar; with: 'foo'. self assert: html contents = '<div class="bar">foo</div>'
</methods> <methods> Seaside.WARenderCanvasTests <category>testing</category>
testAnchor html anchor with: 'foo'. self assert: html contents = '<a>foo</a>'
</methods> <methods> Seaside.WARenderCanvasTests <category>testing</category>
testDiv html div: 'foo'. self assert: html contents = '<div>foo</div>'. html reset. html div with: 'bar'. self assert: html contents = '<div>bar</div>'
</methods> <methods> Seaside.WARenderLoop <category>convenience</category>
application "Answer the application to which this entry point is associated." ^ self session application
</methods> <methods> Seaside.WARenderLoop <category>convenience</category>
session "Answer the session to which this entry point is associated." ^ WACurrentSession value
</methods> <methods> Seaside.WARenderLoop <category>accessing</category>
root: aComponent self basicRoot: (self application deploymentMode ifFalse: [ WAToolFrame on: aComponent ] ifTrue: [ aComponent ])
</methods> <methods> Seaside.WARenderLoop <category>as yet unclassified</category>
basicRoot: aComponent root := aComponent
</methods> <methods> Seaside.WARenderLoop <category>rendering</category>
run [(WARender new root: root) go] repeat
</methods> <methods> Seaside.WARenderLoop <category>call</category>
call: aComponent ^ self call: aComponent withToolFrame: true
</methods> <methods> Seaside.WARenderLoop <category>call</category>
call: aComponent withToolFrame: aBoolean aBoolean ifTrue: [self root: aComponent] ifFalse: [self basicRoot: aComponent]. aComponent onAnswer: [:v | ^ v]. self run
</methods> <methods> Seaside.WARenderLoopConfiguration <category>attributes</category>
attributes ^ Array with: ((WAListAttribute key: #rootComponent) options: self rootComponents) with: (WAStringAttribute key: #resourceBaseUrl group: #server)
</methods> <methods> Seaside.WARenderLoopConfiguration <category>defaults</category>
mainClass ^ WARenderLoopMain
</methods> <methods> Seaside.WARenderLoopConfiguration <category>defaults</category>
rootComponents ^ (WAComponent allSubclasses select: [:ea | ea canBeRoot]) asSortedCollection: [:a :b | a name <= b name]
</methods> <methods> Seaside.WARenderLoopConfiguration <category>ancestry</category>
ancestors ^ Array with: WASessionConfiguration new
</methods> <methods> Seaside.WARenderLoopConfiguration <category>defaults</category>
errorHandler ^ WAWalkbackErrorHandler
</methods> <methods> Seaside.WARenderLoopMain <category>as yet unclassified</category>
createRoot ^ self rootClass new
</methods> <methods> Seaside.WARenderLoopMain <category>accessing</category>
rootClass ^ self application rootComponent
</methods> <methods> Seaside.WARenderLoopMain <category>decorations</category>
call: aComponent ^ WARenderLoop new call: aComponent
</methods> <methods> Seaside.WARenderLoopMain <category>accessing</category>
start: aRequest | root | root := self createRoot. root visiblePresentersDo: [:ea | ea initialRequest: aRequest]. (WARenderLoop new root: root) run
</methods> <methods> Seaside.WARenderedHtmlRoot <category>accessing</category>
context ^ context
</methods> <methods> Seaside.WARenderedHtmlRoot <category>initialize-release</category>
initializeWithContext: aRenderingContext context := aRenderingContext. self initialize.
</methods> <methods> Seaside.WARenderedHtmlRoot <category>deprecated</category>
linkWithScript: aString self deprecatedApi. self javascript document: aString
</methods> <methods> Seaside.WARenderedHtmlRoot <category>writing</category>
writeStyle: aString on: aStream "this is ugly code, but at least you know can see that at first glance" | style | style := self stylesheet document: aString; yourself. style writeOn: aStream. self removeHeadElement: style
</methods> <methods> Seaside.WARenderedHtmlRoot <category>deprecated</category>
linkWithStyle: aString self deprecatedApi. self stylesheet document: aString
</methods> <methods> Seaside.WARenderedHtmlRoot <category>deprecated</category>
linkWithStyle: aString titled: aTitleString self deprecatedApi. self stylesheet title: aString; document: aString
</methods> <methods> Seaside.WARenderedHtmlRoot <category>writing</category>
writeScript: aString on: aStream "this is ugly code, but at least you know can see that at first glance" | script | script := self javascript document: aString; yourself. script writeOn: aStream. self removeHeadElement: script
</methods> <methods> Seaside.WARenderedHtmlRoot <category>deprecated</category>
linkWithStyle: aString titled: aTitleString media: aMediaString self deprecatedApi. self stylesheet title: aString; media: aMediaString; document: aString
</methods> <methods> Seaside.WARenderingContext <category>accessing</category>
actionUrl: anObject actionUrl := anObject
</methods> <methods> Seaside.WARenderingContext <category>initialize-release</category>
initialize count := ValueHolder new contents: 1. callbacks := Dictionary new
</methods> <methods> Seaside.WARenderingContext <category>modes</category>
clearMode mode := nil
</methods> <methods> Seaside.WARenderingContext <category>accessing</category>
propertyAt: key put: value ^ self properties at: key put: value
</methods> <methods> Seaside.WARenderingContext <category>callbacks</category>
callbackAt: aString ^ callbacks at: aString ifAbsent: [ ]
</methods> <methods> Seaside.WARenderingContext <category>accessing</category>
session: aSession session := aSession
</methods> <methods> Seaside.WARenderingContext <category>modes</category>
debugMode mode := #debug
</methods> <methods> Seaside.WARenderingContext <category>documents</category>
urlForDocument: anObject mimeType: mimeString ^ self urlForDocument: anObject mimeType: mimeString fileName: nil
</methods> <methods> Seaside.WARenderingContext <category>accessing</category>
response ^ response
</methods> <methods> Seaside.WARenderingContext <category>accessing</category>
document "Answer the value of document" ^ document
</methods> <methods> Seaside.WARenderingContext <category>accessing</category>
count: anInteger count := anInteger
</methods> <methods> Seaside.WARenderingContext <category>accessing</category>
request ^ request
</methods> <methods> Seaside.WARenderingContext <category>callbacks</category>
nextKey "See discussion on VWNC Some VW users have overriden #displayString to answer a Text object. #asString works fine here since the count held by the ValueHolder is a Number" ^ count contents asString
</methods> <methods> Seaside.WARenderingContext <category>callbacks</category>
callbacksFor: anObject ^ WACallbackRegistry context: self owner: anObject
</methods> <methods> Seaside.WARenderingContext <category>callbacks</category>
callbackStreamForRequest: aRequest ^ WACallbackStream callbacks: callbacks request: aRequest
</methods> <methods> Seaside.WARenderingContext <category>documents</category>
urlForDocument: anObject ^ self urlForDocument: anObject mimeType: nil
</methods> <methods> Seaside.WARenderingContext <category>accessing</category>
actionUrl "Answer the value of actionUrl" ^ actionUrl
</methods> <methods> Seaside.WARenderingContext <category>callbacks</category>
advanceKey | key | key := self nextKey. self increaseKey. ^ key
</methods> <methods> Seaside.WARenderingContext <category>accessing</category>
session ^ session
</methods> <methods> Seaside.WARenderingContext <category>accessing</category>
document: anObject "Set the value of document" document := anObject
</methods> <methods> Seaside.WARenderingContext <category>callbacks</category>
storeCallback: aCallback | key | key := self advanceKey. callbacks at: (aCallback convertKey: key) put: aCallback. ^ key
</methods> <methods> Seaside.WARenderingContext <category>accessing</category>
propertyAt: key ifAbsent: aBlock ^ self properties at: key ifAbsent: aBlock
</methods> <methods> Seaside.WARenderingContext <category>accessing</category>
properties ^ properties ifNil: [properties := Dictionary new]
</methods> <methods> Seaside.WARenderingContext <category>modes</category>
isDebugMode ^ mode = #debug
</methods> <methods> Seaside.WARenderingContext <category>documents</category>
urlForDocument: anObject mimeType: mimeType fileName: fileName ^ (self registry urlForRequestHandler: (WADocumentHandler document: anObject mimeType: mimeType fileName: fileName)) displayString
</methods> <methods> Seaside.WARenderingContext <category>accessing</category>
response: aResponse response := aResponse
</methods> <methods> Seaside.WARenderingContext <category>callbacks</category>
increaseKey count contents: count contents + 1
</methods> <methods> Seaside.WARenderingContext <category>accessing</category>
request: aRequest request := aRequest
</methods> <methods> Seaside.WARenderingContext <category>documents</category>
registry ^ WACurrentSession value application
</methods> <methods> Seaside.WARenderingContext <category>accessing</category>
count ^ count
</methods> <methods> Seaside.WAReport <category>initialize</category>
initialize super initialize. rows := #().
</methods> <methods> Seaside.WAReport <category>accessing</category>
rows: anArray rows := anArray
</methods> <methods> Seaside.WAReportColumn <category>initialize-release</category>
initialize formatBlock := [:x | x displayString]. sortBlock := [:a :b | a <= b]. valueBlock := [:row | nil]. clickBlock := nil. title := 'Untitled'. hasTotal := false.
</methods> <methods> Seaside.WAReportColumn <category>public</category>
chooseRow: row ^ clickBlock value: row
</methods> <methods> Seaside.WAReportColumn <category>rendering</category>
renderValue: anObject on: html valueBlock value: anObject value: html
</methods> <methods> Seaside.WAReportColumn <category>public</category>
title ^title
</methods> <methods> Seaside.WAReportColumn <category>accessing</category>
columnClickBlock: aBlock self clickBlock: [:r | aBlock value: (self valueForRow: r)]
</methods> <methods> Seaside.WAReportColumn <category>accessing</category>
index: aNumber valueBlock := [:row | row at: aNumber]
</methods> <methods> Seaside.WAReportColumn <category>accessing</category>
valueBlock: aBlock valueBlock := aBlock
</methods> <methods> Seaside.WAReportColumn <category>accessing</category>
clickBlock: aBlock clickBlock := aBlock
</methods> <methods> Seaside.WAReportColumn <category>accessing</category>
hasTotal: aBoolean hasTotal := aBoolean
</methods> <methods> Seaside.WAReportColumn <category>rendering</category>
canRender ^valueBlock numArgs > 1
</methods> <methods> Seaside.WAReportColumn <category>public</category>
sortRows: anArray |assocs| assocs := anArray collect: [:ea | ea -> (self valueForRow: ea)]. assocs := assocs asSortedCollection: [:a :b | sortBlock value: a value value: b value]. ^ assocs collect: [:ea | ea key]
</methods> <methods> Seaside.WAReportColumn <category>public</category>
textForRow: row ^ formatBlock value: (self valueForRow: row)
</methods> <methods> Seaside.WAReportColumn <category>public</category>
canChoose ^ clickBlock notNil
</methods> <methods> Seaside.WAReportColumn <category>accessing</category>
title: aString title := aString
</methods> <methods> Seaside.WAReportColumn <category>accessing</category>
selector: aSymbol valueBlock := [:row | row perform: aSymbol]
</methods> <methods> Seaside.WAReportColumn <category>accessing</category>
formatBlock: anObject formatBlock := anObject
</methods> <methods> Seaside.WAReportColumn <category>public</category>
totalForRows: aCollection ^ hasTotal ifFalse: [''] ifTrue: [formatBlock value: (aCollection detectSum: [:r | self valueForRow: r])]
</methods> <methods> Seaside.WAReportColumn <category>public</category>
valueForRow: row ^ valueBlock value: row
</methods> <methods> Seaside.WAReportColumn <category>accessing</category>
sortBlock: anObject sortBlock := anObject
</methods> <methods> Seaside.WAReportColumn <category>public</category>
canSort ^self canRender not and: [sortBlock notNil].
</methods> <methods> Seaside.WARequest <category>accessing</category>
headerAt: aKey ifAbsent: aBlock ^ headers at: aKey ifAbsent: aBlock
</methods> <methods> Seaside.WARequest <category>accessing</category>
responseStream: aStream responseStream := aStream
</methods> <methods> Seaside.WARequest <category>accessing</category>
headerAt: aKey ^ self headerAt: aKey ifAbsent: []
</methods> <methods> Seaside.WARequest <category>private</category>
decodeAuthorization: aString ^ SeasidePlatformSupport base64Decode: (aString findTokens: ' ') last
</methods> <methods> Seaside.WARequest <category>private</category>
setMethod: methodString url: urlString headers: headDict fields: fieldDict cookies: cookieDict method := methodString. url := urlString. headers := headDict. fields := fieldDict. cookies := cookieDict
</methods> <methods> Seaside.WARequest <category>accessing</category>
cookies ^ cookies ifNil: [cookies := Dictionary new]
</methods> <methods> Seaside.WARequest <category>accessing</category>
at: key ifPresent: aBlock ^ fields at: key ifPresent: aBlock
</methods> <methods> Seaside.WARequest <category>accessing</category>
at: key ^ fields at: key
</methods> <methods> Seaside.WARequest <category>accessing</category>
at: key ifAbsent: aBlock ^ fields at: key ifAbsent: aBlock
</methods> <methods> Seaside.WARequest <category>accessing-headers</category>
acceptCharset ^ self headerAt: 'accept-charset'
</methods> <methods> Seaside.WARequest <category>accessing</category>
password ^ self authorization ifNotNilDo: [:auth | auth copyAfter: $:]
</methods> <methods> Seaside.WARequest <category>accessing</category>
nativeRequest: aRequest nativeRequest := aRequest
</methods> <methods> Seaside.WARequest <category>testing</category>
isGet ^ self method asUppercase = 'GET'
</methods> <methods> Seaside.WARequest <category>accessing-headers</category>
host ^ self headerAt: 'host'
</methods> <methods> Seaside.WARequest <category>testing</category>
includesKey: key ^ fields includesKey: key
</methods> <methods> Seaside.WARequest <category>accessing-headers</category>
userAgent ^ self headerAt: 'user-agent'
</methods> <methods> Seaside.WARequest <category>accessing</category>
nativeRequest ^ nativeRequest
</methods> <methods> Seaside.WARequest <category>accessing</category>
fields ^ fields
</methods> <methods> Seaside.WARequest <category>accessing-headers</category>
accept ^ self headerAt: 'accept'
</methods> <methods> Seaside.WARequest <category>accessing</category>
headers ^ headers
</methods> <methods> Seaside.WARequest <category>accessing-headers</category>
acceptLanguage ^ self headerAt: 'accept-language'
</methods> <methods> Seaside.WARequest <category>accessing</category>
user ^ self authorization ifNotNilDo: [:auth | auth copyUpTo: $:]
</methods> <methods> Seaside.WARequest <category>accessing-headers</category>
referer ^ self headerAt: 'referer'
</methods> <methods> Seaside.WARequest <category>testing</category>
isFromIE "this is extremely unreliable" | tokens | tokens := (headers at: 'user-agent') findTokens: ' '. ^(tokens includes: 'MSIE') and: [ (tokens includes: 'Opera') not ]
</methods> <methods> Seaside.WARequest <category>accessing</category>
responseStream ^ responseStream
</methods> <methods> Seaside.WARequest <category>accessing</category>
method ^ method
</methods> <methods> Seaside.WARequest <category>accessing</category>
url ^ url
</methods> <methods> Seaside.WARequest <category>accessing-headers</category>
acceptEncoding ^ self headerAt: 'accept-encoding'
</methods> <methods> Seaside.WARequest <category>private</category>
authorization ^ (self headerAt: 'Authorization' ifAbsent: [self headerAt: 'authorization']) ifNotNilDo: [:auth | self decodeAuthorization: auth]
</methods> <methods> Seaside.WARequest <category>testing</category>
isXmlHttpRequest ^ (self headerAt: 'x-requested-with') = 'XMLHttpRequest'
</methods> <methods> Seaside.WARequest <category>testing</category>
isPrefetch ^ (self headerAt: 'HTTP_X_MOZ') = 'prefetch'
</methods> <methods> Seaside.WARequestHandler <category>testing</category>
isApplication ^ false
</methods> <methods> Seaside.WARequestHandler <category>initialization</category>
initialize
</methods> <methods> Seaside.WARequestHandler <category>processing</category>
unregistered
</methods> <methods> Seaside.WARequestHandler <category>initialization</category>
setParent: aRequestHandler parent := aRequestHandler
</methods> <methods> Seaside.WARequestHandler <category>testing</category>
isEntryPoint ^ false
</methods> <methods> Seaside.WARequestHandler <category>copying</category>
postCopy super postCopy. parent := nil
</methods> <methods> Seaside.WARequestHandler <category>testing</category>
isDispatcher ^ false
</methods> <methods> Seaside.WARequestHandler <category>testing</category>
isActive ^ true
</methods> <methods> Seaside.WARequestHandler <category>accessing</category>
description "Answer a descriptive text of the receiver." ^ String new
</methods> <methods> Seaside.WARequestHandler <category>processing</category>
handleRequest: aRequest "Handle aRequest and answer a response." self subclassResponsibility
</methods> <methods> Seaside.WARequestHandler <category>accessing</category>
parent "Answer the parent request handler of the receiver." ^ parent
</methods> <methods> Seaside.WAResponse <category>accessing</category>
contentType: mimeTypeString contentType := mimeTypeString. "Append the charset if needed but not supplied" self needsCharSet ifTrue: [contentType := contentType , '; ' , self class defaultValueForCharSet]
</methods> <methods> Seaside.WAResponse <category>initialize-release</category>
initialize | session | stream := SeasidePlatformSupport readWriteStream. status := '200'. session := WACurrentSession value. contentType := session isNil ifFalse: [session contentType] ifTrue: [self class defaultValueForContentType]
</methods> <methods> Seaside.WAResponse <category>accessing</category>
stream ^ stream
</methods> <methods> Seaside.WAResponse <category>convenience</category>
redirectTo: aString self headerAt: 'Location' put: aString. self redirect.
</methods> <methods> Seaside.WAResponse <category>accessing</category>
nextPut: aCharacter stream nextPut: aCharacter asCharacter
</methods> <methods> Seaside.WAResponse <category>writing</category>
writeOn: aStream self writeStatusOn: aStream. self writeHeadersOn: aStream. aStream crlf. aStream nextPutAll: stream contents
</methods> <methods> Seaside.WAResponse <category>accessing</category>
cookieAt: key put: value self addCookie: (WACookie key: key value: value)
</methods> <methods> Seaside.WAResponse <category>testing</category>
isBinary "Answer false when the output is a text file, subject to UTF-8 encoding" | tokens subTypes | tokens := self contentType findTokens: '/'. tokens isEmpty ifTrue: [^true]. tokens first = 'text' ifTrue: [^false]. subTypes := tokens second findTokens: '+'. (subTypes includes: 'xml') ifTrue: [^false]. ^true
</methods> <methods> Seaside.WAResponse <category>accessing</category>
deleteCookieAt: key "Delete the cookie in the browser" self addCookie: ((WACookie key: key value: '') expireIn: (Duration days: -10000); yourself)
</methods> <methods> Seaside.WAResponse <category>accessing</category>
contents ^ stream reset
</methods> <methods> Seaside.WAResponse <category>convenience</category>
doNotCache self headerAt: 'Cache-Control' put: 'no-cache'.
</methods> <methods> Seaside.WAResponse <category>accessing</category>
release stream := cookies := headers := nil. super release
</methods> <methods> Seaside.WAResponse <category>accessing</category>
cookies ^ cookies ifNil: [#()]
</methods> <methods> Seaside.WAResponse <category>accessing</category>
addCookie: aCookie cookies ifNil: [cookies := Set new]. cookies add: aCookie
</methods> <methods> Seaside.WAResponse <category>accessing</category>
contents: aStream stream := aStream
</methods> <methods> Seaside.WAResponse <category>status</category>
redirect self status: 302
</methods> <methods> Seaside.WAResponse <category>status</category>
internalError self status: 500
</methods> <methods> Seaside.WAResponse <category>accessing</category>
status: statusString status := statusString displayString
</methods> <methods> Seaside.WAResponse <category>status</category>
authenticationFailed self status: 401
</methods> <methods> Seaside.WAResponse <category>testing</category>
needsCharSet "Answer true when the charset= spec is expected and missing" | tokens | self isBinary ifTrue: [^ false]. tokens := self contentType findTokens: '/'. ^(tokens last beginsWith: 'charset=') not
</methods> <methods> Seaside.WAResponse <category>convenience</category>
attachmentWithFileName: aString self headerAt: 'Content-Disposition' put: 'attachment; filename="', aString, '"'
</methods> <methods> Seaside.WAResponse <category>writing</category>
writeHeadersOn: aStream self headers associationsDo: [ :assoc | aStream nextPutAll: assoc key; nextPutAll: ': '; nextPutAll: assoc value displayString. aStream crlf ]. cookies ifNotNil: [ cookies do: [ :each | aStream nextPutAll: 'Set-Cookie: '. each writeOn: aStream. aStream crlf ] ]. aStream nextPutAll: 'Content-Type: ', self contentType. aStream crlf
</methods> <methods> Seaside.WAResponse <category>accessing</category>
contentType ^ contentType
</methods> <methods> Seaside.WAResponse <category>accessing</category>
headers ^ headers ifNil: [#()]
</methods> <methods> Seaside.WAResponse <category>accessing</category>
status ^ status
</methods> <methods> Seaside.WAResponse <category>convenience</category>
beXML contentType := contentType copyReplaceAll: '/html' with: '/xml'.
</methods> <methods> Seaside.WAResponse <category>writing</category>
writeStatusOn: aStream aStream nextPutAll: self class defaultHttpVersion; space; nextPutAll: self status asString; crlf
</methods> <methods> Seaside.WAResponse <category>status</category>
forbidden self status: 403
</methods> <methods> Seaside.WAResponse <category>status</category>
notFound self status: 404
</methods> <methods> Seaside.WAResponse <category>accessing</category>
nextPutAll: aString aString do: [:ea | self nextPut: ea]
</methods> <methods> Seaside.WAResponse <category>accessing</category>
stream: aStream stream := aStream
</methods> <methods> Seaside.WAResponse <category>accessing</category>
space stream space.
</methods> <methods> Seaside.WAResponse <category>convenience</category>
basicAuthenticationRealm: aString self headerAt: 'WWW-Authenticate' put: ('Basic realm="',aString,'"'). self authenticationFailed
</methods> <methods> Seaside.WAResponse <category>accessing</category>
headerAt: key put: value headers ifNil: [headers := OrderedCollection new]. headers add: (Association key: key value: value).
</methods> <methods> Seaside.WARootedElement <category>attributes</category>
type: aString self attributeAt: 'type' put: aString
</methods> <methods> Seaside.WARootedElement <category>attributes</category>
url: aString self subclassResponsibility
</methods> <methods> Seaside.WARootedElement <category>attributes</category>
document: aDocument self document: aDocument mimeType: self typeOrNil
</methods> <methods> Seaside.WARootedElement <category>attributes</category>
document: aDocument mimeType: mimeType fileName: fileName self url: (root context urlForDocument: aDocument mimeType: mimeType fileName: fileName)
</methods> <methods> Seaside.WARootedElement <category>private</category>
typeOrNil ^self attributeAt: 'type' ifAbsent: [ nil ]
</methods> <methods> Seaside.WARootedElement <category>initialize-release</category>
setRoot: anHtmlRoot root := anHtmlRoot
</methods> <methods> Seaside.WARootedElement <category>attributes</category>
document: aDocument fileName: fileName self document: aDocument mimeType: self typeOrNil fileName: fileName
</methods> <methods> Seaside.WARootedElement <category>attributes</category>
resourceUrl: aString self url: (root absoluteUrlForResource: aString)
</methods> <methods> Seaside.WARootedElement <category>attributes</category>
document: aDocument mimeType: mimeType self document: aDocument mimeType: mimeType fileName: nil
</methods> <methods> Seaside.WARubyTest <category>rendering</category>
renderContentOn: html self renderSimpleOn: html. self renderSimpleParenthesesOn: html. self renderComplexOn: html
</methods> <methods> Seaside.WARubyTest <category>rendering</category>
renderComplexOn: html html heading level2; with: 'Complex ruby markup'. html ruby: [ html rubyBaseContainer: [ html rubyBase: 10. html rubyBase: 31. html rubyBase: 2002 ]. html rubyTextContainer: [ html rubyText: 'Month'. html rubyText: 'Day'. html rubyText: 'Year' ]. html rubyTextContainer: [ html rubyText span: 3; with: 'Expiration Date' ] ]
</methods> <methods> Seaside.WARubyTest <category>rendering</category>
renderSimpleParenthesesOn: html html heading level2; with: 'Simple ruby markup with parentheses'. html ruby: [ html rubyBase: 'WWW'. html rubyParentheses: '('. html rubyText: 'World Wide Web'. html rubyParentheses: ')' ]
</methods> <methods> Seaside.WARubyTest <category>rendering</category>
renderSimpleOn: html html heading level2; with: 'Simple ruby markup'. html ruby: [ html rubyBase: 'WWW'. html rubyText: 'World Wide Web' ]
</methods> <methods> Seaside.WARubyTextTag <category>attributes</category>
span: anInteger self attributeAt: 'rbspan' put: anInteger
</methods> <methods> Seaside.WARubyTextTag <category>accessing</category>
tag ^ 'rt'
</methods> <methods> Seaside.WAScriptElement <category>attributes</category>
beJavascript self type: 'text/javascript'
</methods> <methods> Seaside.WAScriptElement <category>attributes</category>
url: aString self attributeAt: 'src' put: aString
</methods> <methods> Seaside.WAScriptElement <category>attributes</category>
url ^self attributeAt: 'src' ifAbsent: [ nil ]
</methods> <methods> Seaside.WAScriptLibrary <category>accessing</category>
extension ^ '.js'
</methods> <methods> Seaside.WAScriptLibrary <category>processing</category>
updateRoot: anHtmlRoot self do: [ :each | anHtmlRoot addScript: each ]
</methods> <methods> Seaside.WAScriptLibrary <category>accessing</category>
mimetype ^ 'text/javascript'
</methods> <methods> Seaside.WAScriptTag <category>private</category>
after self document text: '/*]]>*/'
</methods> <methods> Seaside.WAScriptTag <category>attributes</category>
url: aString self attributes at: 'src' put: aString
</methods> <methods> Seaside.WAScriptTag <category>attributes</category>
resourceUrl: aString self url: (canvas document root absoluteUrlForResource: aString)
</methods> <methods> Seaside.WAScriptTag <category>private</category>
before self document text: '/*<![CDATA[*/'
</methods> <methods> Seaside.WAScriptTag <category>accessing</category>
tag ^ 'script'
</methods> <methods> Seaside.WAScriptTag <category>public</category>
with: aString self attributes at: 'type' ifAbsentPut: [ 'text/javascript' ]. super with: [ self document text: aString ]
</methods> <methods> Seaside.WASelectTag <category>initialize-release</category>
initialize super initialize. isOptional := false. isSubmitOnChange := false
</methods> <methods> Seaside.WASelectTag <category>attributes</category>
name: aString "This attribute assigns the control name." self attributes at: 'name' put: aString
</methods> <methods> Seaside.WASelectTag <category>accessing</category>
tag ^ 'select'
</methods> <methods> Seaside.WASelectTag <category>attributes</category>
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" isOptional := true
</methods> <methods> Seaside.WASelectTag <category>private</category>
optionsOn: html | brush registeredSelection | self isOptional ifTrue: [brush := html option selected: selected isNil; yourself. self hasCallback ifTrue: [brush callback: [callbackBlock value: nil]]. brush with: optionalLabel]. registeredSelection := false. list do: [:each | brush := html option. (self isDisabled: each) ifTrue: [brush disabled]. ((self isMultiple or: [registeredSelection not]) and: [self isSelected: each]) ifTrue: [brush selected: true. registeredSelection := true]. self hasCallback ifTrue: [brush callback: [self isMultiple ifTrue: [selected add: each] ifFalse: [callbackBlock value: each]]]. brush with: (self labelForOption: each)]
</methods> <methods> Seaside.WASelectTag <category>testing</category>
isSubmitOnChange ^ isSubmitOnChange
</methods> <methods> Seaside.WASelectTag <category>testing</category>
isEnabled: option ^ enablementBlock isNil or: [enablementBlock value: option]
</methods> <methods> Seaside.WASelectTag <category>attributes</category>
size: anInteger "This attribute specifies the number of options in the list that should be visible at the same time." self attributes at: 'size' put: anInteger.
</methods> <methods> Seaside.WASelectTag <category>attributes</category>
optionalLabel: aString "the label for the nil element. See #beOptional" optionalLabel := aString
</methods> <methods> Seaside.WASelectTag <category>accessing</category>
numberOfOptions | count | count := list size. self isOptional ifTrue: [count := count + 1]. ^ count
</methods> <methods> Seaside.WASelectTag <category>testing</category>
isOptional ^ isOptional
</methods> <methods> Seaside.WASelectTag <category>testing</category>
isDisabled: option ^(self isEnabled: option) not
</methods> <methods> Seaside.WASelectTag <category>public</category>
enablementBlock: aBlock enablementBlock := aBlock fixCallbackTemps
</methods> <methods> Seaside.WASelectTag <category>attributes</category>
beSubmitOnChange "submits the whole form in the user selects a value" isSubmitOnChange := true
</methods> <methods> Seaside.WASelectTag <category>testing</category>
hasOther ^ otherLabel notNil
</methods> <methods> Seaside.WASelectTag <category>attributes</category>
otherLabel: labelString otherCallback: aBlock promptString: aString otherLabel := labelString. otherCallbackBlock := aBlock fixCallbackTemps. promptString := aString.
</methods> <methods> Seaside.WASelectTag <category>public</category>
with: aBlock | hidden value other onChange | onChange := ''. self hasOther ifTrue: [other := (canvas context nextKey asNumber + self numberOfOptions + 1) displayString. hidden := canvas context nextKey asString. value := ValueHolder new. canvas insert: [canvas hiddenInput id: hidden; value: nil; callback: [:n | value contents: n]; with: []]. onChange := 'if(this.value == ' , other printString , ') {chooseOther(this, ' , hidden printString , ', ' , promptString printString , ')};']. self isSubmitOnChange ifTrue: [onChange := onChange, ' submit();']. onChange isEmpty ifFalse: [self onChange: onChange]. self isMultiple ifTrue: [ canvas insert: [canvas hiddenInput callback: [ selected := OrderedCollection new ]; with: [] ] ]. self hasCallback ifTrue: [ self attributes at: 'name' put: (self isMultiple ifTrue: [ canvas callbacks registerMultiDispatchCallback ] ifFalse: [ canvas callbacks registerDispatchCallback ])]. self attributes at: 'multiple' put: self isMultiple. super with: [self optionsOn: canvas. aBlock value. self hasOther ifTrue: [canvas option selected: false; callback: [otherCallbackBlock value: value contents]; with: otherLabel]]. (self isMultiple and: [self hasCallback]) ifTrue: [ canvas insert: [canvas hiddenInput callback: [ callbackBlock value: selected ]; with: [] ] ].
</methods> <methods> Seaside.WASelection <category>initialization</category>
initialize super initialize. items := #(). labelBlock := [:ea | ea displayString].
</methods> <methods> Seaside.WASelection <category>accessing</category>
items: aCollection items := aCollection
</methods> <methods> Seaside.WASelection <category>accessing</category>
items ^ items
</methods> <methods> Seaside.WASelection <category>accessing</category>
labelBlock ^ labelBlock
</methods> <methods> Seaside.WASelection <category>accessing</category>
labelBlock: aBlock labelBlock := aBlock
</methods> <methods> Seaside.WASelection <category>rendering</category>
renderContentOn: html html unorderedList list: self items; labels: self labelBlock; callback: [ :value | self answer: value ]
</methods> <methods> Seaside.WASelectionDateTable <category>editor access</category>
selectAll dateSelectionStart := startDate. dateSelectionEnd := endDate. rowSelectionStart := 1. rowSelectionEnd := rows size.
</methods> <methods> Seaside.WASelectionDateTable <category>as yet unclassified</category>
startDateSelection ^ dateSelectionStart ifNotNil: [dateSelectionStart min: dateSelectionEnd]
</methods> <methods> Seaside.WASelectionDateTable <category>as yet unclassified</category>
endRowSelection ^ rowSelectionStart ifNotNil: [rows at: (rowSelectionStart max: rowSelectionEnd)]
</methods> <methods> Seaside.WASelectionDateTable <category>as yet unclassified</category>
startRow ^ rowSelectionStart min: rowSelectionEnd
</methods> <methods> Seaside.WASelectionDateTable <category>selecting</category>
clearSelection dateSelectionStart := dateSelectionEnd := rowSelectionStart := rowSelectionEnd := nil
</methods> <methods> Seaside.WASelectionDateTable <category>as yet unclassified</category>
selectDate: aDate rowIndex: rowIndex self hasSelection ifFalse: [dateSelectionStart := dateSelectionEnd := aDate. rowSelectionStart := rowSelectionEnd := rowIndex] ifTrue: [dateSelectionEnd := aDate. rowSelectionEnd := rowIndex]
</methods> <methods> Seaside.WASelectionDateTable <category>as yet unclassified</category>
selectionContainsDate: aDate rowIndex: aNumber ^ ((aDate between: dateSelectionStart and: dateSelectionEnd) or: [aDate between: dateSelectionEnd and: dateSelectionStart]) and: [(aNumber between: rowSelectionStart and: rowSelectionEnd) or: [aNumber between: rowSelectionEnd and: rowSelectionStart]]
</methods> <methods> Seaside.WASelectionDateTable <category>rendering</category>
renderCellForDate: aDate row: anObject index: aNumber on: html | text | html tableData style: 'background-color: ', (self colorForDate: aDate rowIndex: aNumber); align: 'center'; with: [ text := cellBlock value: anObject value: aDate. html anchor callback: [self selectDate: aDate rowIndex: aNumber]; with: text ]
</methods> <methods> Seaside.WASelectionDateTable <category>accessing</category>
startDate: aDate self clearSelection. super startDate: aDate
</methods> <methods> Seaside.WASelectionDateTable <category>testing</category>
hasSelection ^ dateSelectionStart notNil
</methods> <methods> Seaside.WASelectionDateTable <category>accessing</category>
rows: aCollection self clearSelection. super rows: aCollection
</methods> <methods> Seaside.WASelectionDateTable <category>as yet unclassified</category>
startRowSelection ^ rowSelectionStart ifNotNil: [rows at: (rowSelectionStart min: rowSelectionEnd)]
</methods> <methods> Seaside.WASelectionDateTable <category>as yet unclassified</category>
endRow ^ rowSelectionStart max: rowSelectionEnd
</methods> <methods> Seaside.WASelectionDateTable <category>as yet unclassified</category>
rowsAndDatesDisplay: aBlock cellBlock := aBlock
</methods> <methods> Seaside.WASelectionDateTable <category>rendering</category>
style ^ 'td a {text-decoration: none}'
</methods> <methods> Seaside.WASelectionDateTable <category>as yet unclassified</category>
colorForDate: aDate rowIndex: aNumber ^ (self hasSelection and: [self selectionContainsDate: aDate rowIndex: aNumber]) ifTrue: ['lightgrey'] ifFalse: ['white']
</methods> <methods> Seaside.WASelectionDateTable <category>accessing</category>
endDate: aDate self clearSelection. super endDate: aDate
</methods> <methods> Seaside.WASelectionDateTable <category>as yet unclassified</category>
selectedRows ^ rows copyFrom: self startRow to: self endRow
</methods> <methods> Seaside.WASelectionDateTable <category>as yet unclassified</category>
endDateSelection ^ dateSelectionStart ifNotNil: [dateSelectionStart max: dateSelectionEnd]
</methods> <methods> Seaside.WASession <category>request handling</category>
unknownRequest: aRequest self start: aRequest
</methods> <methods> Seaside.WASession <category>initializing</category>
initialize super initialize. continuations := WALRUCache new. monitor := WAProcessMonitor new. state := WAStateRegistry new. cookiesEnabled := true
</methods> <methods> Seaside.WASession <category>responding</category>
newSessionUrl ^ (self baseUrl takeServerParametersFromRequest: currentRequest) displayString
</methods> <methods> Seaside.WASession <category>cookies</category>
useSessionCookie ^cookiesEnabled and: [ self application useSessionCookie ]
</methods> <methods> Seaside.WASession <category>redirecting</category>
redirectTo: anUrlOrString self returnResponse: (self redirectResponseFor: anUrlOrString)
</methods> <methods> Seaside.WASession <category>responding</category>
actionUrlForKey: aString | url | url := self useSessionCookie ifTrue: [ self baseUrl ] ifFalse: [ self application urlForRequestHandler: self ]. url takeServerParametersFromRequest: currentRequest. url addParameter: self actionField value: aString. jumpTo ifNotNil: [ url fragment: jumpTo ]. ^ url
</methods> <methods> Seaside.WASession <category>accessing</category>
errorHandler ^ self application errorHandler
</methods> <methods> Seaside.WASession <category>accessing</category>
currentRequest ^ currentRequest
</methods> <methods> Seaside.WASession <category>request handling</category>
start: aRequest self useSessionCookie ifTrue: [self redirectWithCookie: self sessionCookie]. self mainClass new start: aRequest
</methods> <methods> Seaside.WASession <category>responding</category>
sessionCookie ^WACookie key: self sessionCookieName value: (self application ensureKeyForHandler: self) displayString
</methods> <methods> Seaside.WASession <category>responding</category>
script: aString self redirectWithMessage: '<script>', aString, '</script>' delay: 0
</methods> <methods> Seaside.WASession <category>scripts</category>
jumpToAnchor: aString jumpTo := aString
</methods> <methods> Seaside.WASession <category>scripts</category>
clearLoadScripts scripts := nil
</methods> <methods> Seaside.WASession <category>accessing</category>
outputDocumentClass "To be subclassed as needed" ^WAHtmlStreamDocument
</methods> <methods> Seaside.WASession <category>request handling</category>
fieldsAt: key ifPresent: aBlock ^ self currentRequest at: key ifPresent: aBlock
</methods> <methods> Seaside.WASession <category>state</category>
registerObjectForBacktracking: anObject "registers anObject for backtracking This means when you hit the back button the state of all the objects that are registered for backtracking will be reverted to the state they had when the page displayed was rendered. In general this should only be done for UI state and not model state. An example usage is a selection index of a report table. An other usage for this when the contents returned by #children change over time because your store components in instance variables and change their content during the lifetime of a session." state registerObject: anObject
</methods> <methods> Seaside.WASession <category>request handling</category>
withEscapeContinuation: aBlock ^ EscapeContinuation currentDo: [:cc | escapeContinuation := cc. aBlock value. self pageIntentionallyLeftBlank]
</methods> <methods> Seaside.WASession <category>cookies</category>
redirectWithCookie: aCookie self redirectWithCookies: (Array with: aCookie)
</methods> <methods> Seaside.WASession <category>responding</category>
pageIntentionallyLeftBlank self returnResponse: WAResponse new
</methods> <methods> Seaside.WASession <category>scripts</category>
clearJumpTo jumpTo := nil
</methods> <methods> Seaside.WASession <category>responding</category>
actionUrlForContinuation: aContinuation ^ self actionUrlForKey: (continuations store: aContinuation)
</methods> <methods> Seaside.WASession <category>cookies</category>
hasSessionCookie ^currentRequest cookies includesKey: self sessionCookieName
</methods> <methods> Seaside.WASession <category>responding</category>
returnResponse: aResponse escapeContinuation value: aResponse
</methods> <methods> Seaside.WASession <category>accessing</category>
application ^ parent
</methods> <methods> Seaside.WASession <category>expiring</category>
pageExpired state restoreLastSnapshot. self redirectWithMessage: 'That page has expired.' delay: 3. WAPageExpired raiseSignal.
</methods> <methods> Seaside.WASession <category>expiring</category>
defaultTimeoutSeconds ^ (self application notNil and: [self application sessionExpirySeconds notNil]) ifTrue: [self application sessionExpirySeconds] ifFalse: [super defaultTimeoutSeconds]
</methods> <methods> Seaside.WASession <category>responding</category>
closePopupWithoutReloadingOpener ^ self respond: [:url | WAResponse new nextPutAll: '<html><script>'; nextPutAll: 'self.close();'; nextPutAll: '</script></html>'; yourself]
</methods> <methods> Seaside.WASession <category>scripts</category>
onLoadScripts ^ scripts ifNil: [#()]
</methods> <methods> Seaside.WASession <category>redirecting</category>
redirect ^ self respond: [ :url | self redirectResponseFor: url ]
</methods> <methods> Seaside.WASession <category>responding</category>
redirectWithMessage: aString delay: aNumber self respond: [:url | WAResponse refreshWithMessage: aString location: url displayString delay: aNumber].
</methods> <methods> Seaside.WASession <category>responding</category>
updateRoot: anHtmlRoot "This method is very similar to its brother in WAPresenter. It is suited for application wide settings like doctype and CSS or JS files that are always needed. Whenever you override this method don't forget to send super" self application updateRoot: anHtmlRoot
</methods> <methods> Seaside.WASession <category>request handling</category>
incomingRequest: aRequest ((aRequest fields includesKey: 'terminate') and: [self application deploymentMode not]) ifTrue: [ monitor terminate. ^ WAResponse new nextPutAll: 'Process terminated']. ^ (monitor critical: [ self responseForRequest: aRequest ] ifError: [ :error | internalError := WAResponse internalError: error ]) ifNil: [ | resp | resp := internalError. internalError := nil. resp ]
</methods> <methods> Seaside.WASession <category>cookies</category>
checkForCookies | check | check := WAExternalID new displayString. self redirectWithCookie: ((WACookie new) key: check; value: 'yes'; expireIn: (Duration seconds: 2); yourself). ^ currentRequest cookies includesKey: check
</methods> <methods> Seaside.WASession <category>request handling</category>
fieldsAt: key ^ self currentRequest at: key
</methods> <methods> Seaside.WASession <category>scripts</category>
addLoadScript: aString ^ (scripts ifNil: [scripts := OrderedCollection new]) add: aString
</methods> <methods> Seaside.WASession <category>cookies</category>
redirectWithCookies: aCollection | response | self respond: [:url | url addParameter: self checkCookiesField value: 'y'. response := self redirectResponseFor: url. aCollection do: [:ea | response addCookie: ea]. response]
</methods> <methods> Seaside.WASession <category>expiring</category>
unregistered super unregistered. self expire
</methods> <methods> Seaside.WASession <category>responding</category>
sessionCookieName ^self application name
</methods> <methods> Seaside.WASession <category>http</category>
contentType ^WAResponse defaultValueForContentType. "text/html; charset=utf-8"
</methods> <methods> Seaside.WASession <category>accessing</category>
actionField ^ '_k'
</methods> <methods> Seaside.WASession <category>request handling</category>
responseForRequest: aRequest currentRequest := aRequest. ^ self withEscapeContinuation: [ WACurrentSession use: self during: [ self withErrorHandler: [ self performRequest: aRequest ] ] ]
</methods> <methods> Seaside.WASession <category>request handling</category>
performRequest: aRequest | key continuation | key := aRequest fields at: self actionField ifAbsent: [^ self start: aRequest]. ((aRequest fields includesKey: self checkCookiesField) and: [aRequest cookies isEmpty]) ifTrue: [cookiesEnabled := false]. "Under some circumstances, HTTP fields are collections of values" (key isKindOf: OrderedCollection) ifTrue: [key := key first]. continuation := continuations at: key ifAbsent: [^ self unknownRequest: aRequest]. continuation value: aRequest
</methods> <methods> Seaside.WASession <category>responding</category>
closePopupAndContinue ^ self respond: [:url | WAResponse new nextPutAll: '<html><script>'; nextPutAll: 'self.close();'; nextPutAll: 'self.opener.location=',url displayString printString; nextPutAll: '</script></html>'; yourself]
</methods> <methods> Seaside.WASession <category>accessing</category>
checkCookiesField ^ '_ck'
</methods> <methods> Seaside.WASession <category>accessing</category>
baseUrl ^ self parent baseUrl
</methods> <methods> Seaside.WASession <category>responding</category>
respond: responseBlock |request snapshotHolder response oldEscape | snapshotHolder := ValueHolder new. oldEscape := escapeContinuation. escapeContinuation := [:v | snapshotHolder contents: state snapshot. oldEscape value: v]. request := ResponseContinuation currentDo: [:cc ||url| url := self actionUrlForContinuation: cc. response := responseBlock value: url. self useSessionCookie ifTrue: [response addCookie: self sessionCookie] ifFalse: [self hasSessionCookie ifTrue: [response deleteCookieAt: self sessionCookieName]]. self returnResponse: response]. state restoreSnapshot: snapshotHolder contents. ^ request
</methods> <methods> Seaside.WASession <category>responding</category>
closePopup ^ self respond: [:url | WAResponse new nextPutAll: '<html><script>'; nextPutAll: 'self.close();'; nextPutAll: 'self.opener.location=self.opener.location'; nextPutAll: '</script></html>'; yourself]
</methods> <methods> Seaside.WASession <category>request handling</category>
fieldsAt: key ifAbsent: aBlock ^ self currentRequest at: key ifAbsent: aBlock
</methods> <methods> Seaside.WASession <category>accessing</category>
mainClass ^ self application mainClass
</methods> <methods> Seaside.WASession <category>redirecting</category>
redirectResponseFor: anUrlOrString ^ WAResponse redirectTo: anUrlOrString displayString
</methods> <methods> Seaside.WASession <category>request handling</category>
withErrorHandler: aBlock ^ [aBlock on: Error do: [:e | self errorHandler handleError: e. WAPageExpired raiseSignal]] on: Warning do: [:w | self errorHandler handleWarning: w. WAPageExpired raiseSignal]
</methods> <methods> Seaside.WASessionConfiguration <category>attributes</category>
attributes ^ Array with: (WANumberAttribute key: #sessionExpirySeconds) with: ((WAListAttribute key: #sessionClass) options: self sessionClasses) with: ((WAListAttribute key: #mainClass) options: self mainClasses) with: ((WAListAttribute key: #errorHandler) options: self errorHandlerClasses) with: (WABooleanAttribute key: #useSessionCookie)
</methods> <methods> Seaside.WASessionConfiguration <category>defaults</category>
useSessionCookie ^ false
</methods> <methods> Seaside.WASessionConfiguration <category>defaults</category>
errorHandler ^ WASimpleErrorHandler
</methods> <methods> Seaside.WASessionConfiguration <category>defaults</category>
sessionClasses ^ WASession withAllSubclasses
</methods> <methods> Seaside.WASessionConfiguration <category>defaults</category>
sessionClass ^ WASession
</methods> <methods> Seaside.WASessionConfiguration <category>ancestry</category>
ancestors ^ Array with: WAGlobalConfiguration new
</methods> <methods> Seaside.WASessionConfiguration <category>defaults</category>
sessionExpirySeconds ^ 600
</methods> <methods> Seaside.WASessionConfiguration <category>defaults</category>
errorHandlerClasses ^ WAErrorHandler allSubclasses
</methods> <methods> Seaside.WASessionConfiguration <category>defaults</category>
mainClasses ^ WAMain allSubclasses
</methods> <methods> Seaside.WASessionProtector <category>testing</category>
isGlobal ^true
</methods> <methods> Seaside.WASessionProtector <category>accessing</category>
storedRemoteAddress remoteAddress isNil ifTrue: [ remoteAddress := self remoteAddressFromRequest: self session currentRequest ]. ^remoteAddress
</methods> <methods> Seaside.WASessionProtector <category>testing</category>
verifyRequest: aRequest ^(self remoteAddressFromRequest: aRequest) = self storedRemoteAddress
</methods> <methods> Seaside.WASessionProtector <category>forwarding</category>
updateRoot: html super updateRoot: html. (self verifyRequest: self session currentRequest) ifFalse: [ self respondNotVerified ]
</methods> <methods> Seaside.WASessionProtector <category>forwarding</category>
respondNotVerified self session redirectTo: self session application basePath.
</methods> <methods> Seaside.WASessionProtector <category>forwarding</category>
renderContentOn: html self renderOwnerOn: html
</methods> <methods> Seaside.WASessionProtector <category>accessing</category>
remoteAddressFromRequest: aRequest ^aRequest headerAt: 'x-forwarded-for' ifAbsent: [ aRequest nativeRequest remoteAddress ]
</methods> <methods> Seaside.WASessionProtector <category>forwarding</category>
processChildCallbacks: aStream (self verifyRequest: self session currentRequest) ifTrue: [ super processChildCallbacks: aStream ] ifFalse: [ self respondNotVerified ]
</methods> <methods> Seaside.WASimpleErrorHandler <category>actions</category>
handleError: anError WACurrentSession value returnResponse: (WAResponse internalError: anError)
</methods> <methods> Seaside.WASimpleNavigation <category>initialize</category>
initialize super initialize. components := OrderedCollection new
</methods> <methods> Seaside.WASimpleNavigation <category>rendering</category>
renderSelectionOn: html html render: self selectedComponent
</methods> <methods> Seaside.WASimpleNavigation <category>accessing</category>
options ^ components collect: [:ea | ea key]
</methods> <methods> Seaside.WASimpleNavigation <category>accessing</category>
children ^Array with: self selectedComponent.
</methods> <methods> Seaside.WASimpleNavigation <category>accessing</category>
labels "Return the tabs labels" ^ self options
</methods> <methods> Seaside.WASimpleNavigation <category>behavior</category>
add: aComponent label: aString components add: aString -> aComponent
</methods> <methods> Seaside.WASimpleNavigation <category>accessing</category>
selectedComponent ^ (components detect: [:ea | ea key = self selection] ifNone: [^ nil]) value
</methods> <methods> Seaside.WAStandardFiles <category>accessing-images</category>
haloPaintGif | xxxCache | xxxCache := #(nil) beMutable. (xxxCache at: 1) isNil ifTrue: [ xxxCache at: 1 put: #(71 73 70 56 57 97 16 0 16 0 128 0 0 63 63 63 212 212 212 33 249 4 1 0 0 1 0 44 0 0 0 0 16 0 16 0 64 2 31 140 143 169 0 199 26 216 131 212 200 138 211 156 153 183 12 134 209 23 54 87 231 144 148 167 66 15 39 198 71 1 0 59) asByteArray ]. ^ xxxCache at: 1
</methods> <methods> Seaside.WAStandardFiles <category>accessing-scripts</category>
shortcutsJs ^ ' var shortcutKeys = []; var shortcutElements = []; function resetShortcuts() { shortcutKeys = []; shortcutElements = []; } function addShortcut(shortcut, elementID) { var elem = document.getElementById(elementID); if ((elem.tagName == "INPUT" & (elem.type == "submit" || elem.type == "checkbox" || elem.type == "radio")) || elem.tagName == "A") { shortcutKeys[shortcutKeys.length] = shortcut; shortcutElements[shortcutElements.length] = elem; } else alert("Attempt to assign a shortcut (" + shortcut + ") to something that is not clickable"); } function onKeyDown(event) { var keyname = ""; var element; var nav; if (navigator.userAgent.indexOf("Safari") > 0) nav = "Safari"; else if (navigator.product == "Gecko") nav = "Gecko"; else nav = "IE"; // cope with MS-IE if (event == null) event = window.event; if (event) { if (event.ctrlKey) keyname = keyname + "Ctrl-"; if (event.altKey) keyname = keyname + "Alt-"; if (event.metaKey) keyname = keyname + "Meta-"; // cope with Netscape var keyCode = event.which; if (keyCode == null) keyCode = event.keyCode; if (keyCode == null) keyCode = event.charCode; if (keyCode != 0) { var character = String.fromCharCode(keyCode); character = character.toLowerCase(); if (event.shiftKey) character = character.toUpperCase(); // cope with special keys, designated with some logical names if (keyCode == 27) character = "Esc"; if (keyCode == 8) character = "Backspace"; if (keyCode == 9) character = "Tab"; if (keyCode == 13) character = "Return"; if (keyCode == 37) character = "Left"; if (keyCode == 38) character = "Up"; if (keyCode == 39) character = "Right"; if (keyCode == 40) character = "Down"; // cope with func-keys (some keys not intercepted for MS-IE) if ((keyCode >= 112) & (keyCode <= 123)) character = "F" + (keyCode - 112 + 1); for ( var x = 1 ; x <= shortcutKeys.length ; x++ ) { if (shortcutKeys[x-1] == keyname+character) { // alert("key=" + keyCode + " " + keyname + character); element = shortcutElements[x-1]; if (element.tagName == "A" & nav != "IE") { if (element.onclick) element.onclick.call(); else /* This does not work for anchor in IE */ location.href = element.href; } else { element.click(); } } } return false; } } } '
</methods> <methods> Seaside.WAStandardFiles <category>accessing-scripts</category>
miscJs ^ ' function swapDisplay(a, b) { var tmp = document.getElementById(a).style.display; document.getElementById(a).style.display = document.getElementById(b).style.display; document.getElementById(b).style.display = tmp; } function submitFormTriggeringCallback(formName, callbackKey, value) { if (value) { var ele = document.createElement("input"); ele.type = "hidden"; ele.name = callbackKey; ele.value = value; document.forms[formName].appendChild(ele) } submitForm(formName) } function submitForm(formName) { document.forms[formName].submit(); } function chooseOther(select, hiddenId, p) { value = prompt(p); document.getElementById(hiddenId).value = value; select.options[select.options.length-1].text = value; } function enableChoice(enableID, disableID) { document.getElementById(enableID).disabled = false; document.getElementById(disableID).disabled = true; } function setFocus(elementId) { document.getElementById(elementId).focus(); } function setSelection(elementId, start, stop) { var input = document.getElementById(elementId); input.focus(); /* When stop parameter not supplied, all field is selected */ if (!start) start = 1; if (!stop) stop = input.value.length + 1; if (typeof document.selection != "undefined") { /* Place selection in MS-IE */ var range = document.selection.createRange(); range.moveStart("character", start - 1); range.moveEnd("character", stop - start); range.select(); } else if (typeof input.selectionStart != "undefined") { /* Place selection in Gecko browsers */ input.selectionStart = start - 1; input.selectionEnd = stop - 1; } else { /* Other browsers, please feel free to implement */ alert("unknown browser"); } } '
</methods> <methods> Seaside.WAStandardFiles <category>accessing</category>
selectorsToInclude ^#( basicsCss kalseyTabsCss sourceStyleCss externalAnchorsJs miscJs shortcutsJs )
</methods> <methods> Seaside.WAStandardFiles <category>accessing-images</category>
haloDebugGif | xxxCache | xxxCache := #(nil) beMutable. (xxxCache at: 1) isNil ifTrue: [ xxxCache at: 1 put: #(71 73 70 56 57 97 16 0 16 0 128 0 0 63 63 63 212 212 212 33 249 4 1 0 0 1 0 44 0 0 0 0 16 0 16 0 64 2 27 140 143 169 192 173 207 158 60 113 90 3 80 189 120 243 15 122 156 168 101 221 213 56 33 9 130 5 0 59) asByteArray ]. ^ xxxCache at: 1
</methods> <methods> Seaside.WAStandardFiles <category>accessing-styles</category>
basicsCss ^ 'div.clearer {clear: both} .option-selected {font-weight: bold}'
</methods> <methods> Seaside.WAStandardFiles <category>accessing-images</category>
haloViewGif | xxxCache | xxxCache := #(nil) beMutable. (xxxCache at: 1) isNil ifTrue: [ xxxCache at: 1 put: #(71 73 70 56 57 97 16 0 16 0 128 0 0 63 63 63 212 212 212 33 249 4 1 0 0 1 0 44 0 0 0 0 16 0 16 0 64 2 33 140 143 121 96 224 223 84 120 80 218 139 17 115 147 78 73 113 217 72 150 73 21 106 77 40 50 203 6 137 230 76 7 5 0 59) asByteArray ]. ^ xxxCache at: 1
</methods> <methods> Seaside.WAStandardFiles <category>processing</category>
updateRoot: aHtmlRoot super updateRoot: aHtmlRoot. aHtmlRoot bodyAttributes at: 'onkeydown' put: 'onKeyDown(event)'
</methods> <methods> Seaside.WAStandardFiles <category>accessing-styles</category>
sourceStyleCss ^'.halo .halo-source .tag-known { font-weight: bold; color: navy; } .halo .halo-source .attribute-known { color: navy; } .halo .halo-source .attribute-value { color: purple; } .halo-source .comment { font-style: italic; color: green; }'
</methods> <methods> Seaside.WAStandardFiles <category>accessing-styles</category>
kalseyTabsCss "this is from http://kalsey.com/tools/csstabs/ - would also be nice to do http://www.alistapart.com/articles/slidingdoors/" ^ ' .kalsey .navigation-options { border-bottom : 1px solid #ccc; margin : 0; padding-bottom : 19px; padding-left : 10px; } .kalsey .navigation-options ul, .kalsey .navigation-options li { display : inline; list-style-type : none; margin : 0; padding : 0; } .kalsey .navigation-options a:link, .kalsey .navigation-options a:visited { background : #E8EBF0; border : 1px solid #ccc; color : #666; float : left; font-size : small; font-weight : normal; line-height : 14px; margin-right : 8px; padding : 2px 10px 2px 10px; text-decoration : none; } .kalsey .navigation-options a:link.active, .kalsey .navigation-options a:visited.active { background : #fff; border-bottom : 1px solid #fff; color : #000; } .kalsey .navigation-options ul a:hover { color : #f00; } .kalsey .navigation-options .option-selected a { background : #fff; border-bottom : 1px solid #fff; color : #000; } .kalsey .navigation-content { background : #fff; border : 1px solid #ccc; border-top : none; clear : both; margin : 0px; padding : 15px; line-height: 1.1; /* IE6 CSS workaround - http://www.dracos.co.uk/web/css/ie6floatbug/ */ } '
</methods> <methods> Seaside.WAStandardFiles <category>accessing-scripts</category>
externalAnchorsJs ^ '// See http://www.sitepoint.com/article/standards-compliant-world function externalLinks() { if (!document.getElementsByTagName) return; var anchors = document.getElementsByTagName("a"); for (var i=0; i<anchors.length; i++) { var anchor = anchors[i]; if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") anchor.target = "_blank"; } }'
</methods> <methods> Seaside.WAStandardScripts <category>scripts</category>
externalAnchors ^ '// See http://www.sitepoint.com/article/standards-compliant-world function externalLinks() { if (!document.getElementsByTagName) return; var anchors = document.getElementsByTagName("a"); for (var i=0; i<anchors.length; i++) { var anchor = anchors[i]; if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") anchor.target = "_blank"; } }'
</methods> <methods> Seaside.WAStandardScripts <category>processing</category>
updateRoot: aHtmlRoot super updateRoot: aHtmlRoot. aHtmlRoot bodyAttributes at: 'onkeydown' put: 'onKeyDown(event)'
</methods> <methods> Seaside.WAStandardScripts <category>scripts</category>
shortcuts ^ ' var shortcutKeys = []; var shortcutElements = []; function resetShortcuts() { shortcutKeys = []; shortcutElements = []; } function addShortcut(shortcut, elementID) { var elem = document.getElementById(elementID); if ((elem.tagName == "INPUT" & (elem.type == "submit" || elem.type == "checkbox" || elem.type == "radio")) || elem.tagName == "A") { shortcutKeys[shortcutKeys.length] = shortcut; shortcutElements[shortcutElements.length] = elem; } else alert("Attempt to assign a shortcut (" + shortcut + ") to something that is not clickable"); } function onKeyDown(event) { var keyname = ""; var element; var nav; if (navigator.userAgent.indexOf("Safari") > 0) nav = "Safari"; else if (navigator.product == "Gecko") nav = "Gecko"; else nav = "IE"; // cope with MS-IE if (event == null) event = window.event; if (event) { if (event.ctrlKey) keyname = keyname + "Ctrl-"; if (event.altKey) keyname = keyname + "Alt-"; if (event.metaKey) keyname = keyname + "Meta-"; // cope with Netscape var keyCode = event.which; if (keyCode == null) keyCode = event.keyCode; if (keyCode == null) keyCode = event.charCode; if (keyCode != 0) { var character = String.fromCharCode(keyCode); character = character.toLowerCase(); if (event.shiftKey) character = character.toUpperCase(); // cope with special keys, designated with some logical names if (keyCode == 27) character = "Esc"; if (keyCode == 8) character = "Backspace"; if (keyCode == 9) character = "Tab"; if (keyCode == 13) character = "Return"; if (keyCode == 37) character = "Left"; if (keyCode == 38) character = "Up"; if (keyCode == 39) character = "Right"; if (keyCode == 40) character = "Down"; // cope with func-keys (some keys not intercepted for MS-IE) if ((keyCode >= 112) & (keyCode <= 123)) character = "F" + (keyCode - 112 + 1); for ( var x = 1 ; x <= shortcutKeys.length ; x++ ) { if (shortcutKeys[x-1] == keyname+character) { // alert("key=" + keyCode + " " + keyname + character); element = shortcutElements[x-1]; if (element.tagName == "A" & nav != "IE") { if (element.onclick) element.onclick.call(); else /* This does not work for anchor in IE */ location.href = element.href; } else { element.click(); } } } return false; } } } '
</methods> <methods> Seaside.WAStandardScripts <category>scripts</category>
misc ^ ' function swapDisplay(a, b) { var tmp = document.getElementById(a).style.display; document.getElementById(a).style.display = document.getElementById(b).style.display; document.getElementById(b).style.display = tmp; } function submitFormTriggeringCallback(formName, callbackKey, value) { if (value) { var ele = document.createElement("input"); ele.type = "hidden"; ele.name = callbackKey; ele.value = value; document.forms[formName].appendChild(ele) } submitForm(formName) } function submitForm(formName) { document.forms[formName].submit(); } function chooseOther(select, hiddenId, p) { value = prompt(p); document.getElementById(hiddenId).value = value; select.options[select.options.length-1].text = value; } function enableChoice(enableID, disableID) { document.getElementById(enableID).disabled = false; document.getElementById(disableID).disabled = true; } function setFocus(elementId) { document.getElementById(elementId).focus(); } function setSelection(elementId, start, stop) { var input = document.getElementById(elementId); input.focus(); /* When stop parameter not supplied, all field is selected */ if (!start) start = 1; if (!stop) stop = input.value.length + 1; if (typeof document.selection != "undefined") { /* Place selection in MS-IE */ var range = document.selection.createRange(); range.moveStart("character", start - 1); range.moveEnd("character", stop - start); range.select(); } else if (typeof input.selectionStart != "undefined") { /* Place selection in Gecko browsers */ input.selectionStart = start - 1; input.selectionEnd = stop - 1; } else { /* Other browsers, please feel free to implement */ alert("unknown browser"); } } '
</methods> <methods> Seaside.WAStandardStyles <category>styles</category>
sourceStyle ^'.halo .halo-source .tag-known { font-weight: bold; color: navy; } .halo .halo-source .attribute-known { color: navy; } .halo .halo-source .attribute-value { color: purple; } .halo-source .comment { font-style: italic; color: green; }'
</methods> <methods> Seaside.WAStandardStyles <category>styles</category>
basics ^ 'div.clearer {clear: both} .option-selected {font-weight: bold}'
</methods> <methods> Seaside.WAStandardStyles <category>styles</category>
kalseyTabs "this is from http://kalsey.com/tools/csstabs/ - would also be nice to do http://www.alistapart.com/articles/slidingdoors/" ^ ' .kalsey .navigation-options { border-bottom : 1px solid #ccc; margin : 0; padding-bottom : 19px; padding-left : 10px; } .kalsey .navigation-options ul, .kalsey .navigation-options li { display : inline; list-style-type : none; margin : 0; padding : 0; } .kalsey .navigation-options a:link, .kalsey .navigation-options a:visited { background : #E8EBF0; border : 1px solid #ccc; color : #666; float : left; font-size : small; font-weight : normal; line-height : 14px; margin-right : 8px; padding : 2px 10px 2px 10px; text-decoration : none; } .kalsey .navigation-options a:link.active, .kalsey .navigation-options a:visited.active { background : #fff; border-bottom : 1px solid #fff; color : #000; } .kalsey .navigation-options ul a:hover { color : #f00; } .kalsey .navigation-options .option-selected a { background : #fff; border-bottom : 1px solid #fff; color : #000; } .kalsey .navigation-content { background : #fff; border : 1px solid #ccc; border-top : none; clear : both; margin : 0px; padding : 15px; line-height: 1.1; /* IE6 CSS workaround - http://www.dracos.co.uk/web/css/ie6floatbug/ */ } '
</methods> <methods> Seaside.WAStateHolder <category>accessing</category>
contents: anObject contents := anObject
</methods> <methods> Seaside.WAStateHolder <category>printing</category>
printOn: aStream super printOn: aStream. aStream nextPut: $(. contents printOn: aStream. aStream nextPut: $).
</methods> <methods> Seaside.WAStateHolder <category>comparing</category>
hash "this is a workaround for the indentityHash limit in Squeak (4096) and VW (16384) this is no longer needed in Squeak 3.9" ^ hash ifNil: [ hash := SmallInteger maxVal atRandom ]
</methods> <methods> Seaside.WAStateHolder <category>accessing</category>
contents ^ contents
</methods> <methods> Seaside.WAStateRegistry <category>initialize-release</category>
initialize objects := SeasidePlatformSupport weakDictionaryOfSize: 10.
</methods> <methods> Seaside.WAStateRegistry <category>as yet unclassified</category>
restoreObject: object fromSnapshot: copy object restoreFromSnapshot: copy. objects at: object put: copy.
</methods> <methods> Seaside.WAStateRegistry <category>accessing</category>
size ^ objects size
</methods> <methods> Seaside.WAStateRegistry <category>as yet unclassified</category>
restoreSnapshot: aDictionary aDictionary keysAndValuesDo: [:k :v | self restoreObject: k fromSnapshot: v]
</methods> <methods> Seaside.WAStateRegistry <category>as yet unclassified</category>
calculateFootprint ^ (objects detectSum: [:ea | 2 + ea class instSize + (ea class isVariable ifTrue: [ea size + 1] ifFalse: [0])]) * 4
</methods> <methods> Seaside.WAStateRegistry <category>as yet unclassified</category>
registerObject: anObject objects at: anObject put: anObject snapshotCopy
</methods> <methods> Seaside.WAStateRegistry <category>testing</category>
isEmpty ^self size = 0
</methods> <methods> Seaside.WAStateRegistry <category>as yet unclassified</category>
restoreLastSnapshot lastSnapshot ifNotNil: [self restoreSnapshot: lastSnapshot]
</methods> <methods> Seaside.WAStateRegistry <category>accessing</category>
snapshot lastSnapshot := SeasidePlatformSupport weakDictionaryOfSize: objects size. objects keysAndValuesDo: [:obj :copy| (obj isIdenticalToSnapshot: copy) ifTrue: [lastSnapshot at: obj put: copy] ifFalse: [lastSnapshot at: obj put: obj snapshotCopy]]. ^ lastSnapshot
</methods> <methods> Seaside.WAStateRegistryTest <category>as yet unclassified</category>
assertSnapshot: x isIdenticalTo: y
</methods> <methods> Seaside.WAStateRegistryTest <category>tests</category>
testNoChangeAfterRestore | a snap1 snap2 snap3 | a := ValueHolder new contents: 1. registry registerObject: a. snap1 := registry snapshot. a contents: 2. snap2 := registry snapshot. self deny: (self snapshot: snap1 isIdenticalTo: snap2). registry restoreSnapshot: snap1. self assert: a contents = 1. snap3 := registry snapshot. self assert: (self snapshot: snap1 isIdenticalTo: snap3).
</methods> <methods> Seaside.WAStateRegistryTest <category>tests</category>
testRevert |a snap1| a := ValueHolder new contents: 1. registry registerObject: a. snap1 := registry snapshot. a contents: 2. self assert: a contents = 2. registry restoreSnapshot: snap1. self assert: a contents = 1
</methods> <methods> Seaside.WAStateRegistryTest <category>running</category>
setUp registry := WAStateRegistry new
</methods> <methods> Seaside.WAStateRegistryTest <category>tests</category>
testRevertTwice |a snap1| a := ValueHolder new contents: 1. registry registerObject: a. snap1 := registry snapshot. a contents: 2. self assert: a contents = 2. registry restoreSnapshot: snap1. self assert: a contents = 1. a contents: 3. registry restoreSnapshot: snap1. self assert: a contents = 1.
</methods> <methods> Seaside.WAStateRegistryTest <category>tests</category>
testGarbageCollection | a | a := ValueHolder new contents: 1. registry registerObject: a. registry snapshot. Smalltalk garbageCollect. self assert: registry size = 1. a := nil. Smalltalk garbageCollect. SeasidePlatformSupport isSqueak ifTrue: ["This used to test the contrary, but it is changed now since the default implementation doesn't use weak dictionaries anymore." self deny: registry isEmpty] ifFalse: [self assert: registry isEmpty]
</methods> <methods> Seaside.WAStateRegistryTest <category>as yet unclassified</category>
snapshot: x isIdenticalTo: y ^ ((IdentitySet withAll: x values) includesAllOf: y values).
</methods> <methods> Seaside.WAStateRegistryTest <category>tests</category>
testConsecutiveSnapshots |a snap1 snap2 snap3 | a := ValueHolder new contents: 1. registry registerObject: a. snap1 := registry snapshot. snap2 := registry snapshot. self assert: (self snapshot: snap1 isIdenticalTo: snap2). a contents: 2. snap3 := registry snapshot. self deny: (self snapshot: snap3 isIdenticalTo: snap2).
</methods> <methods> Seaside.WAStaticHtmlCanvas <category>accessing</category>
document: aDocument document := aDocument
</methods> <methods> Seaside.WAStaticHtmlCanvas <category>initialize-release</category>
initializeWithDocument: aDocument document := aDocument
</methods> <methods> Seaside.WAStaticHtmlCanvas <category>form-elements</category>
textArea ^ self brush: WATextAreaTag new
</methods> <methods> Seaside.WAStaticHtmlCanvas <category>accessing</category>
document ^ document
</methods> <methods> Seaside.WAStore <category>initialize-release</category>
initialize super initialize. task := WAStoreTask new.
</methods> <methods> Seaside.WAStore <category>accessing</category>
style ^ ' body { margin: 0px; font-family: sans-serif } #banner { width: 100% } #banner tr { background-color: lightblue; text-align: right; padding: 10px; vertical-align: bottom } #title { font-size: 18pt; font-weight: bold } #subtitle { font-size: 9pt; font-style: italic } #body { padding: 5px } .validation-error { color: red; font-size: 15pt; padding: 5px } '
</methods> <methods> Seaside.WAStore <category>accessing</category>
title ^ 'sushiNet'
</methods> <methods> Seaside.WAStore <category>rendering</category>
renderContentOn: html html table id: 'banner'; with: [ html tableRow: [ html tableData: [ html div id: 'title'; with: self title. html div id: 'subtitle'; with: self subtitle ] ] ]. html div id: 'body'; with: task
</methods> <methods> Seaside.WAStore <category>accessing</category>
children ^ Array with: task
</methods> <methods> Seaside.WAStore <category>accessing</category>
subtitle ^ 'fresh, raw fish delivered to your door'
</methods> <methods> Seaside.WAStoreAddress <category>accessing</category>
name: aString name := aString
</methods> <methods> Seaside.WAStoreAddress <category>accessing</category>
country: aString country := aString
</methods> <methods> Seaside.WAStoreAddress <category>accessing</category>
city: aString city := aString
</methods> <methods> Seaside.WAStoreAddress <category>accessing</category>
city ^ city
</methods> <methods> Seaside.WAStoreAddress <category>accessing</category>
street ^ street
</methods> <methods> Seaside.WAStoreAddress <category>accessing</category>
country ^ country
</methods> <methods> Seaside.WAStoreAddress <category>actions</category>
validate street ifNil: [self validationError: 'You must provide a street address.']. city ifNil: [self validationError: 'You must provide a city.']. country ifNil: [self validationError: 'You must provide a country.'].
</methods> <methods> Seaside.WAStoreAddress <category>accessing</category>
name ^ name
</methods> <methods> Seaside.WAStoreAddress <category>accessing</category>
street: aString street := aString
</methods> <methods> Seaside.WAStoreAddressEditor <category>rendering</category>
renderCountryOn: html html select list: self countries; on: #country of: address
</methods> <methods> Seaside.WAStoreAddressEditor <category>initialize-release</category>
initialize super initialize. address := WAStoreAddress new
</methods> <methods> Seaside.WAStoreAddressEditor <category>path</category>
updateRoot: anHtmlRoot super updateRoot: anHtmlRoot. anHtmlRoot title: 'Seaside Sushi Store : Your address'.
</methods> <methods> Seaside.WAStoreAddressEditor <category>actions</category>
ok self answer: address
</methods> <methods> Seaside.WAStoreAddressEditor <category>accessing</category>
rows ^ #(name street city country)
</methods> <methods> Seaside.WAStoreAddressEditor <category>accessing</category>
countries ^ #(Canada USA)
</methods> <methods> Seaside.WAStoreAddressEditor <category>accessing</category>
labelForSelector: aSymbol aSymbol == #name ifTrue: [^'Your name']. aSymbol == #street ifTrue: [^'The street']. aSymbol == #city ifTrue: [^'The city']. aSymbol == #ok ifTrue: [^'Continue']. ^ super labelForSelector: aSymbol
</methods> <methods> Seaside.WAStoreAddressEditor <category>accessing</category>
model ^ address
</methods> <methods> Seaside.WAStoreCart <category>as yet unclassified</category>
countsAndItems ^ items sortedCounts
</methods> <methods> Seaside.WAStoreCart <category>testing</category>
hasItems ^ items notNil and: [items isEmpty not]
</methods> <methods> Seaside.WAStoreCart <category>removing</category>
remove: anObject items remove: anObject ifAbsent: []
</methods> <methods> Seaside.WAStoreCart <category>accessing</category>
items ^ items
</methods> <methods> Seaside.WAStoreCart <category>as yet unclassified</category>
totalPrice ^ items detectSum: [:ea | ea price]
</methods> <methods> Seaside.WAStoreCart <category>adding</category>
add: anObject items ifNil: [items := Bag new]. items add: anObject
</methods> <methods> Seaside.WAStoreCartConfirmation <category>rendering</category>
renderContentOn: html | table | table := html table. table id: 'invoice'; with: [ html tableHead: [#(Item Price Count Total) do: [:ea | html tableHeading: ea]]. cart countsAndItems do: [:assoc | |count item| count := assoc key. item := assoc value. html tableRow: [ html tableData class: 'item-title'; with: item title. html tableData class: 'item-price'; with: item price printStringAsCents. html tableData class: 'item-count'; with: count displayString. html tableData class: 'item-total'; with: (item price * count) printStringAsCents ] ]. html tableRow: [ html tableData: nil. html tableData: nil. html tableData: nil. html tableData class: 'cart-total'; with:cart totalPrice printStringAsCents ]. ]. html paragraph. html form: [ html submitButton callback: [ self answer: true ]; text: 'Proceed with checkout'. html break. html submitButton callback: [self answer: false]; text: 'Modify my order'. ]
</methods> <methods> Seaside.WAStoreCartConfirmation <category>accessing</category>
cart: aCart cart := aCart
</methods> <methods> Seaside.WAStoreCartConfirmation <category>accessing</category>
style ^' .item-title { text-align: left; width: 15em; } .item-count { text-align: right; width: 5em; } .item-price { text-align: right; width: 5em; } .item-total { text-align: right; width: 5em; } .cart-total { text-align: right; font-weight: bold; } #invoice table { border-collapse: collapse; } #invoice td { padding: 0.3em; border: 1px lightblue dotted; } #invoice tr { background-color: lightyellow; } '
</methods> <methods> Seaside.WAStoreCartConfirmation <category>path</category>
updateRoot: anHtmlRoot super updateRoot: anHtmlRoot. anHtmlRoot title: 'Seaside Sushi Store : Verify your cart'.
</methods> <methods> Seaside.WAStoreCartView <category>rendering</category>
renderContentOn: html cart hasItems ifFalse: [^ self]. html div id: 'cart'; with: [ html small: [ html strong: 'Your cart:' ]. html table: [ cart countsAndItems do: [:assoc | self renderRowForCount: assoc key of: assoc value on: html ]. html tableRow: [ html space]. html tableRow: [ html tableData: ''. html tableData: ''. html tableData: [html strong: cart totalPrice printStringAsCents] ] ] ]
</methods> <methods> Seaside.WAStoreCartView <category>accessing</category>
cart: aCart cart := aCart
</methods> <methods> Seaside.WAStoreCartView <category>rendering</category>
renderRowForCount: aNumber of: anItem on: html | countString | countString := (aNumber = 1) ifTrue: [''] ifFalse: ['(', aNumber displayString, ') ']. html tableRow: [ html tableData: [ html anchor callback: [ cart remove: anItem ]; with: '-']. html tableData: countString, anItem title. html tableData: (aNumber * anItem price) printStringAsCents ]
</methods> <methods> Seaside.WAStoreCreditCard <category>accessing</category>
expiry
</methods> <methods> Seaside.WAStoreCreditCard <category>accessing</category>
expiry: aDate expiry := aDate
</methods> <methods> Seaside.WAStoreCreditCard <category>accessing</category>
number: aString number := aString
</methods> <methods> Seaside.WAStoreCreditCard <category>accessing</category>
name: aString name := aString
</methods> <methods> Seaside.WAStoreCreditCard <category>accessing</category>
name ^ name
</methods> <methods> Seaside.WAStoreCreditCard <category>accessing</category>
number ^ number
</methods> <methods> Seaside.WAStoreCreditCard <category>actions</category>
validate name ifNil: [self validationError: 'You must provide the name of the credit card owner.']. number ifNil: [self validationError: 'You must provide a credit card number.']. expiry ifNil: [self validationError: 'You must provide an expiry date.']. expiry < Date today ifTrue: [self validationError: 'The expiry date must not be in the past'].
</methods> <methods> Seaside.WAStoreFillCart <category>initialize-release</category>
initialize super initialize. main := WAStoreInfo new. cartView := WAStoreCartView new
</methods> <methods> Seaside.WAStoreFillCart <category>accessing</category>
cart: aCart cart := aCart. cartView cart: aCart.
</methods> <methods> Seaside.WAStoreFillCart <category>rendering</category>
renderNavBarOn: html html form: [ html strong: 'Search:'. html space. html textInput callback: [:v | self search: v]; value: '' ]. html anchor callback: [self browse]; with: 'Browse'. cart hasItems ifTrue: [ html break. html anchor callback: [self checkout]; with: 'Checkout']
</methods> <methods> Seaside.WAStoreFillCart <category>accessing</category>
children ^ Array with: cartView with: main
</methods> <methods> Seaside.WAStoreFillCart <category>accessing</category>
inventory ^ WAStoreInventory default
</methods> <methods> Seaside.WAStoreFillCart <category>path</category>
updateRoot: anHtmlRoot super updateRoot: anHtmlRoot. anHtmlRoot title: 'Seaside Sushi Store : Fill your cart'.
</methods> <methods> Seaside.WAStoreFillCart <category>accessing</category>
style ^ ' #search {vertical-align: bottom} #main {width: 50%; padding: 10px} #side {vertical-align: top; } #cart {border-style: dashed; border-width: 1; padding: 5px} #nav {background-color: lightgrey; vertical-align: top; padding: 5px; border-width: 1; width: 15%; font-size: 12pt} #batch {font-size: 10pt} '
</methods> <methods> Seaside.WAStoreFillCart <category>actions</category>
displayItems: aCollection | list | aCollection size = 1 ifTrue: [^ self displayItem: aCollection first]. list := WABatchSelection items: aCollection link: #title text: #subtitle. [self displayItem: (main call: list)] repeat
</methods> <methods> Seaside.WAStoreFillCart <category>actions</category>
browse self displayItems: self inventory allItems
</methods> <methods> Seaside.WAStoreFillCart <category>actions</category>
checkout self answer.
</methods> <methods> Seaside.WAStoreFillCart <category>actions</category>
search: aString | results | results := self inventory findItem: aString. results isEmpty ifTrue: [main inform: 'No items match ', aString printString] ifFalse: [self displayItems: results].
</methods> <methods> Seaside.WAStoreFillCart <category>actions</category>
displayItem: anItem main call: (WAStoreItemView new item: anItem; cart: cart; yourself)
</methods> <methods> Seaside.WAStoreFillCart <category>rendering</category>
renderContentOn: html html table: [ " html tableRow: [ html tableData colSpan: 3; with: trail ]." html tableRow: [ html tableData id: 'nav'; with: [ self renderNavBarOn: html ]. html tableData id: 'main'; with: main. html tableData id: 'side'; with: cartView ] ]
</methods> <methods> Seaside.WAStoreInfo <category>accessing</category>
text ^ 'Welcome to the sushiNet online store. This is a sample Seaside application. Use the search box at the top left to find some results. Good searches to try might be "tuna", "saba", or "fish". '
</methods> <methods> Seaside.WAStoreInfo <category>rendering</category>
renderContentOn: html html withLineBreaks: self text
</methods> <methods> Seaside.WAStoreInventory <category>as yet unclassified</category>
findItem: searchString ^ items select: [:ea | ea matches: searchString]
</methods> <methods> Seaside.WAStoreInventory <category>initialize-release</category>
initialize items := OrderedCollection new. self itemSpecs do: [:row | items add: (self itemFromSpec: row)]
</methods> <methods> Seaside.WAStoreInventory <category>accessing</category>
allItems ^ items
</methods> <methods> Seaside.WAStoreInventory <category>as yet unclassified</category>
itemFromSpec: anArray ^ WAStoreItem new title: anArray first; subtitle: anArray second; description: anArray third; price: anArray fourth; yourself
</methods> <methods> Seaside.WAStoreInventory <category>as yet unclassified</category>
itemSpecs "adapted from http://www.thaddeus.com/ftp/database/sushi.zip" ^ #( #('Akami Maguro' 'Red Tuna' 'The lean meat near the spine of the tuna fish. It comes in various shades of red--with the lighter, shinier varieties being the best. For dieters, however, the redder the better. Easy on the palatte. The least expensive of the three types of maguro.' 150) #('Chutoro Maguro' 'Fatty Tuna' 'The moderately fatty part of the tuna belly. It''s pink, but not the faint pink of ohtoro. Soft, butter-like texture. Moderately expensive.' 275) #('Geso Ika' 'Cuttlefish Tentacles' 'White in color, geso is boiled and brushed with thick teriyaki sauce before serving as sushi. Its texture is chewy, and its mild flavor is complemented by the sweet-salty teriyaki.' 200) #('Himo Akagai' 'Ark Shell Filaments' 'This is the thread-like edges which connect the flesh to the shell. A delicious, soft texture and mild taste.' 200) #('Hotategai' 'Scallop' 'The part of the scallop that is eaten is the edible adductor muscle that opens the animal''s shell. It''s pale beige-yellow in color with a brown, crusty edging. The taste is delicate, and melts in your mouth. ' 250) #('Iwashi' 'Sardine' 'Shiny, slippery, and ''fishy,'' the taste of sardine sushi is slightly oily. Sardine must be eaten shortly after it has been caught if it''s to be used in Sushi. Often eaten with soy sauce mixed with ginger and onion.' 175) #('Kazunoko' 'Herring Roe' 'An expensive delicacy which is also known as ''yellow diamonds'' (because of the color and expense). Revered in Japan, it''s usually eaten on special occasions. An acquired taste for Westerners.' 475) #('Kisu' 'Sillago' 'A fresh Sillago has bright-gold skin. The taste is mild and delicate.' 225) #('Ohtoro Maguro' 'Fattiest Tuna' 'Fattiest part of the fatty tuna belly. It is light pink in color and melts in your mouth. Mild with a rich texture. This is the most expensive of the three types of Maguro sushi.' 325) #('Shima-Aji' 'Yellow Jack' 'A slice of white silvery shima-aji eaten with beef-steak plant and fresh ginger is delicious. The flavor is delicate and the texture of good, fresh yellow jack is smooth and slides down easily.' 180) #('Aji' 'Horse Mackerel' 'This fish is pink-grey and shiny. When it''s fresh, the flesh is almost transparent. The texture is slippery and easy on the tongue--it should melt in your mouth. Aji is often eaten with soy sauce containing onion, ginger and garlic.' 250) #('Inarizushi' 'Stuffed Bean Curd Rolls' '' 200) #('Kappa Maki' 'Cucumber Rolls' '' 150) #('Sakura Denbu' 'Shredded Cod Fish' 'Seasoned shredded cod fish.' 200) #('California Roll' '' 'Rice, cucumber, crab meat, & avacado.' 250) #('Futo-Maki' 'Fat Rolls' 'Kampyo gourd, oboro or denbu pink powder, tamago omelet, and shiitake mushrooms. May also include bamboo shoots, cucumbers, cooked eel, cooked carrots, and cooked spinach or other greens.' 275) #('Tekkamaki' 'Tuna Roll' 'Tuna wrapped in rice and nori.' 225) #('Chakinzushi' 'Omelet-wrapped Sushi' 'Sushi rice in a thin omelet wrapper shaped and tied like a lady''s drawstring purse. Sometimes a single pea or small shrimp decorates the ruffled part of the wrapper.' 300) #('Shiro Maguro' 'Albacore Tuna' '' 300) #('Hamachi' 'Yellowtail' '' 325) #('Kohada' 'Gizzard Shad' 'This Japanese shad is a member of the herring family, and is a small silver-grey fish, with a black spotted back. Marinated in vinegar and cross- hatched before serving. The taste is strong, and a favorite for herring fans.' 275) #('Katsuo' 'Bonito' '' 275) #('Saba' 'Mackerel' '' 200) #('Sake' 'Salmon' '' 250) #('Tai' 'Red Snapper' '' 250) #('Hirame' 'Flounder' 'Good hirame is a sushi gourmet''s delight. Since it''s cut from such a small part of the fish, it''s scarce and expensive. In appearance, it''s pale pink and smooth, with no markings. The taste is delicate and buttery.' 350) #('Suzuki' 'Sea Bass' '' 300) #('Unagi' 'Freshwater Eel' '' 300) #('Ika' 'Cuttlefish' 'When fresh, cuttlefish is almost transparent. It''s butter-like and melts in your mouth. The texture is sticky. Cuttlefish is smoky white and glistens. Also popular grilled and mixed with ginger soy sauce. Also good with lemon for Western palettes.' 325) #('Awabi' 'Abalone' 'Abalone or ''sea snail'' is another sushi favorite. The color ranges from beige-grey to pinkish yellow. Fresh abalone is not too rubbery, and is very subtle in flavor.' 300) #('Mirugai' 'Horse Clam' 'Also known as Geoduck. This is a large, hard-shelled clam which is yellowish-white in color. It has a slight ''shellfish'' taste and an elastic type texture. The part used in sushi is the long muscular siphon which projects from the shell.' 350) #('Akagai' 'Ark Shell Clam' 'The softest texture of any shellfish. Akagai has an attractive pink-orange color. The taste is delicate and slightly sweet.' 300) #('Kobashira' 'Trough Shell (Small) Scallop' 'The edible adductor muscle that opens the shell of the aoyagi. More prized than the aoyagi itself.' 500) #('Kani' 'Crab' '' 250) #('Ebi' 'Cooked Prawn' '' 225) #('Ikura' 'Salmon Roe' 'Appealing to the eye with its bright red color. Very appetizing with a delicate taste.' 325) #('Tobiko ' 'Flying-Fish Roe' '' 350) #('Masago ' 'Capelin Roe' '' 350) #('Anago' 'Conger Eel' 'Anago is one of the few pre-cooked sushi. It is grilled and basted with a thick teriyaki sauce. The soft, slighty warm eel, the sweet soy sauce, and the vinegared rice make a particularly delicious sushi.' 300) #('Uni' 'Sea Urchin Roe' 'A prized delicacy with its oily, rich texture. Mustard color, paste-like topping is held in place by a band of nori seaweed.' 400) ) asSortedCollection: [:a :b | a first <= b first]
</methods> <methods> Seaside.WAStoreItem <category>accessing</category>
subtitle ^ subtitle
</methods> <methods> Seaside.WAStoreItem <category>accessing</category>
title ^ title
</methods> <methods> Seaside.WAStoreItem <category>accessing</category>
title: aString title := aString
</methods> <methods> Seaside.WAStoreItem <category>accessing</category>
price ^ price
</methods> <methods> Seaside.WAStoreItem <category>printing</category>
printString ^ self title
</methods> <methods> Seaside.WAStoreItem <category>accessing</category>
subtitle: aString subtitle := aString
</methods> <methods> Seaside.WAStoreItem <category>accessing</category>
description ^ description
</methods> <methods> Seaside.WAStoreItem <category>accessing</category>
description: aString description := aString
</methods> <methods> Seaside.WAStoreItem <category>accessing</category>
price: cents price := cents
</methods> <methods> Seaside.WAStoreItem <category>private</category>
matches: aString ^ (title includesSubstring: aString caseSensitive: false) or: [description includesSubstring: aString caseSensitive: false]
</methods> <methods> Seaside.WAStoreItemView <category>accessing</category>
cart: aCart cart := aCart
</methods> <methods> Seaside.WAStoreItemView <category>rendering</category>
renderContentOn: html html heading: item title. html heading level3; with: item subtitle. html paragraph: item description. html emphasis: item price printStringAsCents. html form: [ html submitButton callback: [self addToCart]; text: 'Add To Cart'. html space. html submitButton callback: [self answer]; text: 'Done' ]
</methods> <methods> Seaside.WAStoreItemView <category>accessing</category>
item: anItem item := anItem
</methods> <methods> Seaside.WAStoreItemView <category>actions</category>
addToCart cart add: item
</methods> <methods> Seaside.WAStoreItemView <category>updating</category>
updateUrl: aUrl aUrl addToPath: item title
</methods> <methods> Seaside.WAStoreMasterCard <category>actions</category>
validate super validate. (number notEmpty and: [number first = $5]) ifFalse: [self validationError: 'Mastercard numbers must start with "5"'].
</methods> <methods> Seaside.WAStorePaymentEditor <category>accessing</category>
year ^year
</methods> <methods> Seaside.WAStorePaymentEditor <category>accessing</category>
cardTypes ^ WAStoreCreditCard subclasses
</methods> <methods> Seaside.WAStorePaymentEditor <category>accessing</category>
name: aString name := aString
</methods> <methods> Seaside.WAStorePaymentEditor <category>accessing</category>
cardType: aCreditCardClass cardType := aCreditCardClass
</methods> <methods> Seaside.WAStorePaymentEditor <category>accessing</category>
cardNumber ^cardNumber
</methods> <methods> Seaside.WAStorePaymentEditor <category>accessing</category>
months ^ (1 to: 12)
</methods> <methods> Seaside.WAStorePaymentEditor <category>accessing</category>
name ^name
</methods> <methods> Seaside.WAStorePaymentEditor <category>actions</category>
ok self answer: (cardType new name: name; number: cardNumber; expiry: (Date newDay: 1 monthNumber: month year: year); yourself)
</methods> <methods> Seaside.WAStorePaymentEditor <category>accessing</category>
rows ^ #(cardType name cardNumber expirationDate)
</methods> <methods> Seaside.WAStorePaymentEditor <category>rendering</category>
renderCardNumberOn: html html textInput on: #cardNumber of: self
</methods> <methods> Seaside.WAStorePaymentEditor <category>accessing</category>
labelForSelector: aSymbol aSymbol == #ok ifTrue: [^'OK to pay']. ^ super labelForSelector: aSymbol
</methods> <methods> Seaside.WAStorePaymentEditor <category>accessing</category>
cardType ^cardType
</methods> <methods> Seaside.WAStorePaymentEditor <category>rendering</category>
renderCardTypeOn: html html select list: self cardTypes; on: #cardType of: self; labels: [ :each | each abbreviation]
</methods> <methods> Seaside.WAStorePaymentEditor <category>rendering</category>
renderExpirationDateOn: html html select list: self months; on: #month of: self. html select list: self years; on: #year of: self
</methods> <methods> Seaside.WAStorePaymentEditor <category>accessing</category>
month: anInteger month := anInteger
</methods> <methods> Seaside.WAStorePaymentEditor <category>accessing</category>
month ^month
</methods> <methods> Seaside.WAStorePaymentEditor <category>rendering</category>
renderNameOn: html html textInput on: #name of: self
</methods> <methods> Seaside.WAStorePaymentEditor <category>path</category>
updateRoot: anHtmlRoot super updateRoot: anHtmlRoot. anHtmlRoot title: 'Seaside Sushi Store : Payment'.
</methods> <methods> Seaside.WAStorePaymentEditor <category>accessing</category>
years ^ (Date today year to: Date today year + 5)
</methods> <methods> Seaside.WAStorePaymentEditor <category>accessing</category>
cardNumber: aString cardNumber := aString
</methods> <methods> Seaside.WAStorePaymentEditor <category>accessing</category>
year: anInteger year := anInteger
</methods> <methods> Seaside.WAStoreTask <category>as yet unclassified</category>
fillCart self call: (WAStoreFillCart new cart: cart)
</methods> <methods> Seaside.WAStoreTask <category>actions</category>
go | shipping billing creditCard | cart := WAStoreCart new. self isolate: [[self fillCart. self confirmContentsOfCart] whileFalse]. self isolate: [shipping := self getShippingAddress. billing := (self useAsBillingAddress: shipping) ifFalse: [self getBillingAddress] ifTrue: [shipping]. creditCard := self getPaymentInfo. self shipTo: shipping billTo: billing payWith: creditCard]. self displayConfirmation.
</methods> <methods> Seaside.WAStoreTask <category>as yet unclassified</category>
confirmContentsOfCart ^ self call: ((WAStoreCartConfirmation new cart: cart) addMessage: 'Please verify your order:'; yourself)
</methods> <methods> Seaside.WAStoreTask <category>as yet unclassified</category>
getBillingAddress ^ self getAddressWithMessage: 'Please enter your billing address:'.
</methods> <methods> Seaside.WAStoreTask <category>as yet unclassified</category>
getPaymentInfo ^ self call: (WAStorePaymentEditor new validateWith: [:p | p validate]; addMessage: 'Please enter your payment information:'; yourself)
</methods> <methods> Seaside.WAStoreTask <category>as yet unclassified</category>
displayConfirmation self inform: 'Your fish is on its way.'
</methods> <methods> Seaside.WAStoreTask <category>as yet unclassified</category>
shipTo: shippingAddress billTo: billingAddress payWith: aCreditCard "no-op"
</methods> <methods> Seaside.WAStoreTask <category>as yet unclassified</category>
getShippingAddress ^ self getAddressWithMessage: 'Please enter your shipping address:'.
</methods> <methods> Seaside.WAStoreTask <category>as yet unclassified</category>
getAddressWithMessage: aString ^ self call: (WAStoreAddressEditor new validateWith: [:a | a validate]; addMessage: aString; yourself)
</methods> <methods> Seaside.WAStoreTask <category>as yet unclassified</category>
useAsBillingAddress: anAddress ^ self confirm: 'Do you wish to use ', anAddress street printString, ' as your billing address?'
</methods> <methods> Seaside.WAStoreVisaCard <category>actions</category>
validate super validate. (number notEmpty and: [number first = $4]) ifFalse: [self validationError: 'Visa card numbers must start with "4"'].
</methods> <methods> Seaside.WAStreamResponse <category>private</category>
writeOn: aStream self hasWrittenHeaders ifFalse: [ self writeStatusOn: aStream. self writeHeadersOn: aStream. aStream crlf. writtenHeaders := true ]
</methods> <methods> Seaside.WAStreamResponse <category>initialize-release</category>
initialize super initialize. writtenHeaders := false
</methods> <methods> Seaside.WAStreamResponse <category>accessing</category>
hasWrittenHeaders ^ writtenHeaders
</methods> <methods> Seaside.WAStreamResponse <category>accessing</category>
stream self writeOn: stream. ^ stream
</methods> <methods> Seaside.WAStringAttribute <category>as yet unclassified</category>
valueFromString: aString ^ aString isEmptyOrNil ifFalse: [ aString ]
</methods> <methods> Seaside.WAStringAttribute <category>as yet unclassified</category>
accept: aVisitor with: anObject ^ aVisitor visitStringAttribute: self with: anObject
</methods> <methods> Seaside.WAStringLibrary <category>accessing</category>
fileSelectors ^self keys select: [:each | (self at: each) isString].
</methods> <methods> Seaside.WAStringLibrary <category>accessing</category>
at: aSymbol ^ self perform: aSymbol
</methods> <methods> Seaside.WAStringLibrary <category>accessing</category>
at: aSymbol put: aString self class compile: aSymbol, ' ^ ', aString printString
</methods> <methods> Seaside.WAStringLibrary <category>enumerating</category>
do: aBlock self keys do: [:each | | object | object := self at: each. object isString ifTrue: [aBlock value: object]].
</methods> <methods> Seaside.WAStringLibrary <category>converting</category>
asSelector: aFilename ^(aFilename copyUpToLast: $.) asSymbol
</methods> <methods> Seaside.WAStringLibrary <category>accessing</category>
keys ^ (self class selectors select: [:ea | ea isUnary]) asSortedCollection
</methods> <methods> Seaside.WAStringLibrary <category>accessing</category>
mimetypeForFile: aFilename ^self mimetype
</methods> <methods> Seaside.WAStringLibrary <category>private</category>
asFilename: aSelector ^ aSelector , self extension
</methods> <methods> Seaside.WAStringLibrary <category>accessing</category>
configurationComponent ^ WAStringLibraryEditor new library: self; yourself
</methods> <methods> Seaside.WAStringLibrary <category>accessing</category>
extension self subclassResponsibility
</methods> <methods> Seaside.WAStringLibrary <category>accessing</category>
mimetype self subclassResponsibility
</methods> <methods> Seaside.WAStringLibraryEditor <category>rendering</category>
renderSaveButtonOn: html for: fileName html anchor document: (self library documentForFile: fileName) mimeType: (self library mimetypeForFile: fileName) fileName: fileName; with: [html image class: 'saveButton'; url: (self resources addToPath: 'floppy.gif'); altText: 'Save'; title: 'Save ' , fileName].
</methods> <methods> Seaside.WAStringLibraryEditor <category>accessing</category>
library: aLibrary library := aLibrary
</methods> <methods> Seaside.WAStringLibraryEditor <category>rendering</category>
renderDoneOn: html html form: [ html submitButton callback: [ self answer ]; text: 'close' ]
</methods> <methods> Seaside.WAStringLibraryEditor <category>private</category>
urlFor: aFilename ^ (self library urlForFile: aFilename) asString
</methods> <methods> Seaside.WAStringLibraryEditor <category>rendering</category>
renderFilesOn: html html unorderedList: [self library filenames do: [:each | html listItem: [ self renderSaveButtonOn: html for: each. html anchor url: (self urlFor: each); with: each]]]
</methods> <methods> Seaside.WAStringLibraryEditor <category>accessing</category>
library ^ library
</methods> <methods> Seaside.WAStringLibraryEditor <category>accessing</category>
resources ^ WAUrl new addToPath: WADispatcher default basePath , '/files/WADispatcherFiles/'
</methods> <methods> Seaside.WAStringLibraryEditor <category>rendering</category>
renderContentOn: html self renderHeadingsOn: html. self renderFilesOn: html. self renderDoneOn: html
</methods> <methods> Seaside.WAStringLibraryEditor <category>rendering</category>
renderHeadingsOn: html html heading: self library name
</methods> <methods> Seaside.WAStyleLibrary <category>accessing</category>
extension ^ '.css'
</methods> <methods> Seaside.WAStyleLibrary <category>processing</category>
updateRoot: anHtmlRoot self do: [ :each | anHtmlRoot addStyle: each ]
</methods> <methods> Seaside.WAStyleLibrary <category>accessing</category>
mimetype ^ 'text/css'
</methods> <methods> Seaside.WASubmitButtonTag <category>callbacks</category>
on: aSymbol of: anObject self value: (self labelForSelector: aSymbol of: anObject). self callback: [ anObject perform: aSymbol ]
</methods> <methods> Seaside.WASubmitButtonTag <category>accessing</category>
type ^ 'submit'
</methods> <methods> Seaside.WASubmitButtonTag <category>callbacks</category>
callback: aBlock self name: (canvas callbacks registerActionCallback: aBlock)
</methods> <methods> Seaside.WASubmitButtonTag <category>javascript</category>
canHaveShortcut ^true
</methods> <methods> Seaside.WASvgTest <category>rendering</category>
renderContentOn: html html object type: 'image/svg+xml'; width: 600; height: 800; standby: 'loading tiger'; classId: 'http://www.adobe.com/svg/viewer/install/main.html'; url: 'http://croczilla.com/svg/samples/tiger/tiger.svg'; with: 'Your browser doesn''t support SVG'
</methods> <methods> Seaside.WASystemConfiguration <category>attributes</category>
attributes self subclassResponsibility
</methods> <methods> Seaside.WASystemConfiguration <category>accessing</category>
name ^ self class name
</methods> <methods> Seaside.WASystemConfiguration <category>values</category>
localValueAt: aSymbol ifAbsent: absentBlock ^ (self respondsTo: aSymbol) ifTrue: [self perform: aSymbol] ifFalse: [absentBlock value]
</methods> <methods> Seaside.WATableCellTag <category>attributes</category>
character: aStringOrCharacter self attributes at: 'char' put: aStringOrCharacter displayString.
</methods> <methods> Seaside.WATableCellTag <category>attributes</category>
scope: aString self attributes at: 'scope' put: aString.
</methods> <methods> Seaside.WATableCellTag <category>attributes</category>
rowSpan: anInteger self attributes at: 'rowspan' put: anInteger.
</methods> <methods> Seaside.WATableCellTag <category>attributes</category>
characterOffset: anInteger self attributes at: 'charoff' put: anInteger.
</methods> <methods> Seaside.WATableCellTag <category>attributes</category>
verticalAlign: aString self attributes at: 'valign' put: aString.
</methods> <methods> Seaside.WATableCellTag <category>attributes</category>
colSpan: anInteger self attributes at: 'colspan' put: anInteger.
</methods> <methods> Seaside.WATableCellTag <category>attributes</category>
align: aString self attributes at: 'align' put: aString.
</methods> <methods> Seaside.WATableColumnGroupTag <category>attributes</category>
characterOffset: anInteger self attributes at: 'charoff' put: anInteger.
</methods> <methods> Seaside.WATableColumnGroupTag <category>attributes</category>
span: anInteger self attributes at: 'span' put: anInteger.
</methods> <methods> Seaside.WATableColumnGroupTag <category>attributes</category>
character: aStringOrCharacter self attributes at: 'char' put: aStringOrCharacter displayString.
</methods> <methods> Seaside.WATableColumnGroupTag <category>attributes</category>
verticalAlign: aString self attributes at: 'valign' put: aString.
</methods> <methods> Seaside.WATableColumnGroupTag <category>accessing</category>
tag ^ 'colgroup'
</methods> <methods> Seaside.WATableColumnGroupTag <category>attributes</category>
align: aString self attributes at: 'align' put: aString.
</methods> <methods> Seaside.WATableColumnGroupTag <category>attributes</category>
width: aNumber self attributeAt: 'width' put: aNumber displayString
</methods> <methods> Seaside.WATableColumnTag <category>accessing</category>
tag ^ 'col'
</methods> <methods> Seaside.WATableDataTag <category>accessing</category>
tag ^ 'td'
</methods> <methods> Seaside.WATableHeadingTag <category>accessing</category>
tag ^ 'th'
</methods> <methods> Seaside.WATableReport <category>state variables</category>
sortColumn ^ sortColumn contents
</methods> <methods> Seaside.WATableReport <category>accessing</category>
initialize super initialize. isReversed := false. columns := #(). sortColumn := WAStateHolder new. rowColors := #('white' 'lightyellow'). rowPeriod := 3
</methods> <methods> Seaside.WATableReport <category>rendering</category>
renderRowNumber: index item: row on: html html tableRow style: 'background-color: ' , (self colorForRowNumber: index); with: [ columns do: [ :each | self renderColumn: each row: row on: html ] ]
</methods> <methods> Seaside.WATableReport <category>rendering</category>
renderTableHeaderOn: html html tableRow: [ columns do: [ :each | self renderHeaderForColumn: each on: html] ]
</methods> <methods> Seaside.WATableReport <category>accessing</category>
columns: anArray columns := anArray
</methods> <methods> Seaside.WATableReport <category>accessing</category>
rows | r | self sortColumn ifNil: [^ rows]. r := self sortColumn sortRows: rows. ^ self isReversed ifTrue: [r reversed] ifFalse: [r]
</methods> <methods> Seaside.WATableReport <category>rendering</category>
renderContentOn: html html table: [ self renderTableHeaderOn: html. self renderRowsOn: html. self renderTableFooterOn: html ]
</methods> <methods> Seaside.WATableReport <category>rendering</category>
renderRowsOn: html self rows withIndexDo: [:row :i | self renderRowNumber: i item: row on: html ]
</methods> <methods> Seaside.WATableReport <category>rendering</category>
renderTableFooterOn: html html tableRow: [ columns do: [ :each | self renderFooterForColumn: each on: html] ]
</methods> <methods> Seaside.WATableReport <category>accessing</category>
rowColors: colorArray rowColors := colorArray
</methods> <methods> Seaside.WATableReport <category>testing</category>
isReversed ^ isReversed
</methods> <methods> Seaside.WATableReport <category>accessing</category>
rowPeriod: aNumber rowPeriod := aNumber
</methods> <methods> Seaside.WATableReport <category>rendering</category>
renderHeaderForColumn: aColumn on: html html tableHeading: [ aColumn canSort ifTrue: [ html anchor callback: [self sortColumn: aColumn]; with: aColumn title] ifFalse: [ html text: aColumn title ] ]
</methods> <methods> Seaside.WATableReport <category>as yet unclassified</category>
colorForRowNumber: aNumber ^ rowColors at: ((aNumber-1 // rowPeriod) \\ rowColors size) + 1 ifAbsent: ['white']
</methods> <methods> Seaside.WATableReport <category>rendering</category>
renderColumn: aColumn row: aRow on: html | text | aColumn canRender ifTrue: [ ^html tableData: [aColumn renderValue: aRow on: html]]. text := aColumn textForRow: aRow. text isEmpty ifTrue: [ text := ' ' ]. html tableData: [ aColumn canChoose ifFalse: [ html text: text ] ifTrue: [ html anchor callback: [ self chooseRow: aRow column: aColumn ]; with: text ] ]
</methods> <methods> Seaside.WATableReport <category>rendering</category>
renderFooterForColumn: aColumn on: html html tableHeading: (aColumn totalForRows: rows)
</methods> <methods> Seaside.WATableReport <category>state variables</category>
sortColumn: anObject isReversed := anObject = self sortColumn and: [isReversed not ]. sortColumn contents: anObject
</methods> <methods> Seaside.WATableReport <category>as yet unclassified</category>
chooseRow: aRow column: aColumn aColumn chooseRow: aRow
</methods> <methods> Seaside.WATableReportTest <category>accessing</category>
children ^Array with: widget.
</methods> <methods> Seaside.WATableReportTest <category>initialize-release</category>
initialize | cols rows | cols := OrderedCollection new add: (WAReportColumn selector: #title title: 'Title' onClick: [:v | self inform: v description]); add: (WAReportColumn selector: #subtitle title: 'Subtitle'); add: (WAReportColumn selector: #price title: 'Price'); add: (WAReportColumn renderBlock: [:obj :html | html emphasis: obj description] title: 'Description'); yourself. rows := WAStoreInventory default allItems. widget := WATableReport new columns: cols; rows: rows; rowPeriod: 1; rowColors: #(lightblue lightyellow); yourself.
</methods> <methods> Seaside.WATableReportTest <category>rendering</category>
renderContentOn: html html render: widget.
</methods> <methods> Seaside.WATableTag <category>deprecated</category>
layout self deprecatedApi. self border: 0. self cellspacing: 0. self cellpadding: 0
</methods> <methods> Seaside.WATableTag <category>attributes</category>
cellspacing: anInteger self attributes at: 'cellspacing' put: anInteger
</methods> <methods> Seaside.WATableTag <category>deprecated</category>
border: anInteger self deprecatedApi. self attributes at: 'border' put: anInteger
</methods> <methods> Seaside.WATableTag <category>attributes</category>
summary: aString self attributes at: 'summary' put: aString
</methods> <methods> Seaside.WATableTag <category>accessing</category>
tag ^ 'table'
</methods> <methods> Seaside.WATableTag <category>deprecated</category>
align: aString self deprecatedApi. self attributes at: 'align' put: aString.
</methods> <methods> Seaside.WATableTag <category>attributes</category>
cellpadding: anInteger self attributes at: 'cellpadding' put: anInteger
</methods> <methods> Seaside.WATagBrush <category>javascript</category>
ignoreURL ^ self onClick: 'return false'
</methods> <methods> Seaside.WATagBrush <category>attributes</category>
tabIndex: aString "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." self attributes at: 'tabindex' put: aString
</methods> <methods> Seaside.WATagBrush <category>attributes</category>
attributeAt: key ^(self attributes at: key ifAbsent: [key -> nil]) value.
</methods> <methods> Seaside.WATagBrush <category>accessing</category>
tag self subclassResponsibility
</methods> <methods> Seaside.WATagBrush <category>events</category>
onChange: aString "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." self attributes at: 'onchange' append: aString separator: ';'
</methods> <methods> Seaside.WATagBrush <category>accessing</category>
document ^ canvas document
</methods> <methods> Seaside.WATagBrush <category>events</category>
disableEnter "pressing the 'enter' key in the form input element does not submit the form" self onEnter: ''.
</methods> <methods> Seaside.WATagBrush <category>attributes</category>
disabled: aBoolean self attributes at: 'disabled' put: aBoolean.
</methods> <methods> Seaside.WATagBrush <category>accessing</category>
id "Convert to a String in case it was supplied as a Symbol; like in WALinkSubmitTest" | idValue | idValue := self attributeAt: 'id'. ^ idValue ifNotNil: [idValue asString]
</methods> <methods> Seaside.WATagBrush <category>private</category>
before "This template method is called directly before rendering the content of the receiver."
</methods> <methods> Seaside.WATagBrush <category>attributes</category>
id: aString "The id attribute assigns a identifier to an element. The id of an element must be unique within a document." self attributeAt: 'id' put: aString
</methods> <methods> Seaside.WATagBrush <category>private</category>
openTag "Open the receiving and all associated attributes onto the document." self document openTag: self tag attributes: attributes.
</methods> <methods> Seaside.WATagBrush <category>attributes</category>
attributes ^ attributes ifNil: [attributes := WAHtmlAttributes new]
</methods> <methods> Seaside.WATagBrush <category>events</category>
onMouseMove: aString "The onmousemove event occurs when the pointing device is moved while it is over an element." self attributes at: 'onmousemove' append: aString separator: ';'
</methods> <methods> Seaside.WATagBrush <category>events</category>
onMouseDown: aString "The onmousedown event occurs when the pointing device button is pressed over an element." self attributes at: 'onmousedown' append: aString separator: ';'
</methods> <methods> Seaside.WATagBrush <category>public</category>
section: aSymbol self class: (canvas painter classForSection: aSymbol). self with: [canvas painter perform: aSymbol with: canvas]
</methods> <methods> Seaside.WATagBrush <category>events</category>
onFocus: aString "The onfocus event occurs when an element receives focus either by the pointing device or by tabbing navigation." self attributes at: 'onfocus' append: aString separator: ';'
</methods> <methods> Seaside.WATagBrush <category>private</category>
closeTag "Close the receiving tag onto the document." self document closeTag: self tag.
</methods> <methods> Seaside.WATagBrush <category>events</category>
onKeyUp: aString "The onkeyup event occurs when a key is released over an element." self attributes at: 'onkeyup' append: aString separator: ';'
</methods> <methods> Seaside.WATagBrush <category>private</category>
within: aBlock self before. aBlock renderOn: canvas. self after.
</methods> <methods> Seaside.WATagBrush <category>private</category>
after "This template method is called directly after rendering the content of the receiver."
</methods> <methods> Seaside.WATagBrush <category>events</category>
onMouseOver: aString "The onmouseover event occurs when the pointing device is moved onto an element." self attributes at: 'onmouseover' append: aString separator: ';'
</methods> <methods> Seaside.WATagBrush <category>attributes</category>
class: aString if: aBoolean "Adds the class aString aString to this element if aBoolean is true, Example html div class: 'important' if: self isImportant; with: self message" aBoolean ifTrue: [self class: aString]
</methods> <methods> Seaside.WATagBrush <category>attributes</category>
class: aString "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." self attributes addClass: aString
</methods> <methods> Seaside.WATagBrush <category>attributes</category>
accessKey: aString "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." self attributeAt: 'accesskey' put: aString
</methods> <methods> Seaside.WATagBrush <category>public</category>
with: aBlock "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." self openTag. super with: [self within: aBlock]. self closeTag. parent := attributes := nil.
</methods> <methods> Seaside.WATagBrush <category>events</category>
onDoubleClick: aString "The ondblclick event occurs when the pointing device button is double clicked over an element." self attributes at: 'ondblclick' append: aString separator: ';'
</methods> <methods> Seaside.WATagBrush <category>events</category>
onSubmit: aString "The onsubmit event occurs when a form is submitted." self attributes at: 'onsubmit' append: aString separator: ';'
</methods> <methods> Seaside.WATagBrush <category>convenience</category>
withLineBreaks: aString "Renders text preserving line breaks." self with: [canvas withLineBreaks: aString]
</methods> <methods> Seaside.WATagBrush <category>events</category>
onMouseOut: aString "The onmouseout event occurs when the pointing device is moved away from an element." self attributes at: 'onmouseout' append: aString separator: ';'
</methods> <methods> Seaside.WATagBrush <category>events</category>
onEnter: aString "If 'enter' is pressed" self onKeyPress: 'if((window.event ? window.event.keyCode : event.which) == 13){', aString displayString, '; return false}; return true'
</methods> <methods> Seaside.WATagBrush <category>events</category>
onScroll: aString self attributes at: 'onscroll' append: aString separator: ';'
</methods> <methods> Seaside.WATagBrush <category>attributes</category>
attributeAt: key put: value self attributes at: key put: value
</methods> <methods> Seaside.WATagBrush <category>events</category>
onSelect: aString "The onselect event occurs when a user selects some text in a text field." self attributes at: 'onselect' append: aString separator: ';'
</methods> <methods> Seaside.WATagBrush <category>attributes</category>
disabled self disabled: true.
</methods> <methods> Seaside.WATagBrush <category>events</category>
onReset: aString "The onreset event occurs when a form is reset." self attributes at: 'onreset' append: aString separator: ';'
</methods> <methods> Seaside.WATagBrush <category>javascript</category>
confirm: aString self onClick: 'return confirm("', aString, '")'
</methods> <methods> Seaside.WATagBrush <category>events</category>
onKeyDown: aString "The onkeydown event occurs when a key is pressed down over an element." self attributes at: 'onkeydown' append: aString separator: ';'
</methods> <methods> Seaside.WATagBrush <category>javascript</category>
addShortcut: aString self canHaveShortcut ifFalse: [ self error: 'May not assign shortcut on items that are not clickable' ]. self ensureId. self session addLoadScript: (String streamContents: [ :stream | stream nextPutAll: 'addShortcut('; nextPutAll: aString printString; nextPut: $,; nextPutAll: self id printString; nextPut: $) ])
</methods> <methods> Seaside.WATagBrush <category>events</category>
onMouseUp: aString "The onmouseup event occurs when the pointing device button is released over an element." self attributes at: 'onmouseup' append: aString separator: ';'
</methods> <methods> Seaside.WATagBrush <category>attributes</category>
addStyle: aString self attributes addStyle: aString.
</methods> <methods> Seaside.WATagBrush <category>events</category>
onLoad: aString "The onload event occurs when the user agent finishes loading a window." self attributes at: 'onload' append: aString separator: ';'
</methods> <methods> Seaside.WATagBrush <category>public</category>
ensureId "Answer the id of the receiving attribute. In case the receiver doesn't have an id yet, generate a new one." "Makes sure this tag has an id attribute and returns it. If it doesn't already have one, one is generated." | id | ^self id ifNil: [ id := canvas nextId. self id: id. id ]
</methods> <methods> Seaside.WATagBrush <category>attributes</category>
title: aString "This attribute offers advisory information about the element for which it is set. Visual browsers frequently display the title as a 'tool tip'." self attributeAt: 'title' put: aString
</methods> <methods> Seaside.WATagBrush <category>events</category>
onResize: aString self attributes at: 'onresize' append: aString separator: ';'
</methods> <methods> Seaside.WATagBrush <category>attributes</category>
style: aString "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." self attributes addStyle: aString
</methods> <methods> Seaside.WATagBrush <category>attributes</category>
attributes: anHtmlAttributes attributes := anHtmlAttributes
</methods> <methods> Seaside.WATagBrush <category>events</category>
onBlur: aString "The onblurs event occurs when the element that is in focus, loses that focus." self attributes at: 'onblur' append: aString separator: ';'
</methods> <methods> Seaside.WATagBrush <category>events</category>
onKeyPress: aString "The onkeypress event occurs when a key is pressed and released over an element." self attributes at: 'onkeypress' append: aString separator: ';'
</methods> <methods> Seaside.WATagBrush <category>javascript</category>
canHaveShortcut ^false
</methods> <methods> Seaside.WATagBrush <category>events</category>
onClick: aString "The onclick event occurs when the pointing device button is clicked over an element." self attributes at: 'onclick' append: aString separator: ';'
</methods> <methods> Seaside.WATagBrush <category>events</category>
onUnload: aString "The onunload event occurs when the user agent removes a document from a window." self attributes at: 'onunload' append: aString separator: ';'
</methods> <methods> Seaside.WATagBrush <category>events</category>
onError: aString self attributes at: 'onerror' append: aString separator: ';'
</methods> <methods> Seaside.WATask <category>processing</category>
updateRoot: aHtmlRoot | callbacks url | callbacks := WACallbackRegistry context: aHtmlRoot context owner: self. url := aHtmlRoot context actionUrl withParameter: (callbacks registerActionCallback: [ [ self answer: self go ] repeat ]). self session redirectTo: url
</methods> <methods> Seaside.WATask <category>decorations</category>
decoration: oldDecoration shouldWrap: newDecoration ^ (oldDecoration isGlobal and: [newDecoration isGlobal not]) or: [oldDecoration isLocal and: [newDecoration isDelegation]]
</methods> <methods> Seaside.WATask <category>processing</category>
go self subclassResponsibility
</methods> <methods> Seaside.WATaskTest <category>rendering</category>
rendererClass "Intentionally using the classic API" ^WAHtmlRenderer
</methods> <methods> Seaside.WATaskTest <category>rendering</category>
renderContentOn: html html anchorWithAction: [self call: WAExceptionTest new] text: 'go'.
</methods> <methods> Seaside.WATextAreaTag <category>public api</category>
with: aBlock ^ value ifNotNil: [super with: value] ifNil: [super with: aBlock]
</methods> <methods> Seaside.WATextAreaTag <category>attributes</category>
columns: anInteger "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." self attributeAt: 'cols' put: anInteger.
</methods> <methods> Seaside.WATextAreaTag <category>accessing</category>
value ^value
</methods> <methods> Seaside.WATextAreaTag <category>accessing</category>
value: aString value := aString
</methods> <methods> Seaside.WATextAreaTag <category>accessing</category>
tag ^ 'textarea'
</methods> <methods> Seaside.WATextAreaTag <category>attributes</category>
rows: anInteger "This attribute specifies the number of visible text lines. If more are entered, the widget scrolls." self attributeAt: 'rows' put: anInteger.
</methods> <methods> Seaside.WATextInputTag <category>attributes</category>
size: aNumber "This attribute tells the user agent the initial width of the widget. The width is given in number of characters." self attributeAt: 'size' put: aNumber
</methods> <methods> Seaside.WATextInputTag <category>attributes</category>
beRangeInput self type: 'range'.
</methods> <methods> Seaside.WATextInputTag <category>accessing</category>
type ^ 'text'
</methods> <methods> Seaside.WATextInputTag <category>attributes</category>
maxLength: aNumber "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." self attributeAt: 'maxlength' put: aNumber
</methods> <methods> Seaside.WATextInputTag <category>attributes</category>
beSearchInput self type: 'search'.
</methods> <methods> Seaside.WATimeInput <category>private callbacks</category>
minutes ^minutes
</methods> <methods> Seaside.WATimeInput <category>initialize-release</category>
initialize super initialize. self withoutSeconds
</methods> <methods> Seaside.WATimeInput <category>public api</category>
with: aBlock value isNil ifTrue: [value := Time now]. hours := value hour. minutes := value minutes. seconds := value seconds. self renderHours. canvas space; text: ':'; space. self renderMinutes. withSeconds ifTrue: [canvas space; text: ':'; space. self renderSeconds] ifFalse: [seconds := 0]. self addCallback.
</methods> <methods> Seaside.WATimeInput <category>private callbacks</category>
addSecondsCallbackToBrush: aBrush self hasCallback ifFalse: [^self]. aBrush on: #seconds of: self.
</methods> <methods> Seaside.WATimeInput <category>accessing</category>
withSeconds withSeconds := true
</methods> <methods> Seaside.WATimeInput <category>private rendering</category>
renderHours | brush | canvas forgetCurrentBrush. brush := (canvas textInput) id: self id; value: hours asTwoCharacterString; yourself. self addHoursCallbackToBrush: brush. brush attributeAt: 'size' put: 2; attributeAt: 'maxlength' put: 2; close.
</methods> <methods> Seaside.WATimeInput <category>private callbacks</category>
seconds: anIntegerOrString seconds := [anIntegerOrString asNumber] on: Error do: [:e | 0]
</methods> <methods> Seaside.WATimeInput <category>private rendering</category>
renderMinutes | brush | canvas forgetCurrentBrush. brush := (canvas textInput) id: (self id isNil ifTrue: [nil] ifFalse: [self id , '-mins']); value: minutes asTwoCharacterString; yourself. self addMinutesCallbackToBrush: brush. brush attributeAt: 'size' put: 2; attributeAt: 'maxlength' put: 2; attributeAt: 'max' put: 59; close.
</methods> <methods> Seaside.WATimeInput <category>private rendering</category>
renderSeconds | brush | canvas forgetCurrentBrush. brush := (canvas textInput) id: (self id isNil ifTrue: [nil] ifFalse: [self id , '-secs']); value: seconds asTwoCharacterString; yourself. self addSecondsCallbackToBrush: brush. brush attributeAt: 'size' put: 2; attributeAt: 'maxlength' put: 2; attributeAt: 'max' put: 59; close.
</methods> <methods> Seaside.WATimeInput <category>private callbacks</category>
addHoursCallbackToBrush: aBrush self hasCallback ifFalse: [^self]. aBrush on: #hours of: self.
</methods> <methods> Seaside.WATimeInput <category>private callbacks</category>
addMinutesCallbackToBrush: aBrush self hasCallback ifFalse: [^self]. aBrush on: #minutes of: self.
</methods> <methods> Seaside.WATimeInput <category>private callbacks</category>
hours ^hours
</methods> <methods> Seaside.WATimeInput <category>private callbacks</category>
seconds ^seconds
</methods> <methods> Seaside.WATimeInput <category>private callbacks</category>
minutes: anIntegerOrString minutes := [anIntegerOrString asNumber] on: Error do: [:e | 0]
</methods> <methods> Seaside.WATimeInput <category>private callbacks</category>
setValueWithNewTime ^value := Time hour: hours minute: (minutes min: 59) second: (seconds min: 59).
</methods> <methods> Seaside.WATimeInput <category>private callbacks</category>
hours: anIntegerOrString hours := [anIntegerOrString asNumber] on: Error do: [:e | 0]
</methods> <methods> Seaside.WATimeInput <category>accessing</category>
withoutSeconds withSeconds := false
</methods> <methods> Seaside.WATimeInput <category>private rendering</category>
addCallback self hasCallback ifFalse: [^self]. canvas forgetCurrentBrush. (canvas hiddenInput) callback: [callbackBlock value: self setValueWithNewTime]; close
</methods> <methods> Seaside.WATimeSelector <category>initialize-release</category>
initialize super initialize. startHour := 0. endHour := 23. self time: Time midnight
</methods> <methods> Seaside.WATimeSelector <category>accessing</category>
endHour ^endHour
</methods> <methods> Seaside.WATimeSelector <category>accessing</category>
date: aDate second := aDate dayOfMonth. hour := aDate monthIndex. minute := aDate year
</methods> <methods> Seaside.WATimeSelector <category>accessing</category>
minute ^minute
</methods> <methods> Seaside.WATimeSelector <category>private</category>
timeClass ^Time
</methods> <methods> Seaside.WATimeSelector <category>accessing</category>
second: anObject ^second := anObject
</methods> <methods> Seaside.WATimeSelector <category>accessing</category>
minute: anObject ^minute := anObject
</methods> <methods> Seaside.WATimeSelector <category>private</category>
privateIsValidSecond: theSecond hourNumber: theHour minuteNumber: theMinute ^ (theHour between: 0 and: 23) and: [ theMinute between: 0 and: 59 ] and: [ theSecond between: 0 and: 59 ]
</methods> <methods> Seaside.WATimeSelector <category>testing</category>
timeIsValid [self time] on: Error do: [:e | ^ false]. ^ true
</methods> <methods> Seaside.WATimeSelector <category>rendering</category>
renderContentOn: html html select list: (0 to: 23); on: #hour of: self. html select list: (0 to: 59); on: #minute of: self. html select list: (0 to: 59); on: #second of: self. self timeIsValid ifFalse: [self renderValidationErrorOn: html]
</methods> <methods> Seaside.WATimeSelector <category>accessing</category>
time: aTime second := aTime second. hour := aTime hour. minute := aTime minute
</methods> <methods> Seaside.WATimeSelector <category>accessing</category>
time (self privateIsValidSecond: second hourNumber: hour minuteNumber: minute) ifFalse: [self error: 'Invalid time']. ^self timeClass hour: hour minute: minute second: second
</methods> <methods> Seaside.WATimeSelector <category>accessing</category>
endHour: anInteger endHour := anInteger
</methods> <methods> Seaside.WATimeSelector <category>accessing</category>
hour ^hour
</methods> <methods> Seaside.WATimeSelector <category>rendering</category>
renderValidationErrorOn: html html span class: 'error'; with: 'invalid time'
</methods> <methods> Seaside.WATimeSelector <category>accessing</category>
days ^ 1 to: 31
</methods> <methods> Seaside.WATimeSelector <category>accessing</category>
startHour ^startHour
</methods> <methods> Seaside.WATimeSelector <category>accessing</category>
second ^second
</methods> <methods> Seaside.WATimeSelector <category>accessing</category>
hour: anObject ^hour := anObject
</methods> <methods> Seaside.WATimeSelector <category>accessing</category>
startHour: anInteger startHour := anInteger
</methods> <methods> Seaside.WATool <category>accessing</category>
root: aComponent root := aComponent
</methods> <methods> Seaside.WATool <category>accessing</category>
root "Answer the root component of the application." ^ root
</methods> <methods> Seaside.WAToolFrame <category>initialization</category>
initialize super initialize. showHalos := WAStateHolder new contents: false. deprecated := Dictionary new
</methods> <methods> Seaside.WAToolFrame <category>rendering</category>
renderDeprecationOn: html self deprecated isEmpty ifFalse: [ html space. html anchor style: 'color: red'; callback: [ self deprecatedCode ]; with: 'Deprecated' ].
</methods> <methods> Seaside.WAToolFrame <category>actions</category>
toggleHalos WAHalo initialize. showHalos contents: showHalos contents not.
</methods> <methods> Seaside.WAToolFrame <category>rendering</category>
renderTimesOn: html html span title: 'Render Time'; with: renderTime displayString. html text: '/'. html span title: 'Callback Time'; with: processTime displayString. html text: ' ms'
</methods> <methods> Seaside.WAToolFrame <category>accessing</category>
deprecated ^ deprecated
</methods> <methods> Seaside.WAToolFrame <category>rendering</category>
renderToolbarOn: html html paragraph. html div id: 'toolbar'; with: [ self renderNewSessionOn: html. html space. self renderActionsOn: html. self renderToolsOn: html. self renderTerminateOn: html. html space. self renderValidationOn: html. self renderDeprecationOn: html. html space. self renderTimesOn: html ]. processTime := nil
</methods> <methods> Seaside.WAToolFrame <category>rendering</category>
renderToolsOn: html self tools do: [ :each | html anchor callback: [ self openTool: each ]; with: each title. html space ]
</methods> <methods> Seaside.WAToolFrame <category>rendering</category>
renderContentOn: html html div id: 'frameContent'; with: [self renderChildOn: html]. html div: [html space]. "Compensate for Mozilla: bottom of contents hidden by toolbar" self renderToolbarOn: html.
</methods> <methods> Seaside.WAToolFrame <category>rendering</category>
renderActionsOn: html self actions do: [ :each | html anchor on: each of: self. html space ].
</methods> <methods> Seaside.WAToolFrame <category>actions</category>
openTool: aToolClass self call: (aToolClass new root: contents; addDecoration: (WAWindowDecoration new title: aToolClass title; yourself); yourself)
</methods> <methods> Seaside.WAToolFrame <category>rendering</category>
renderValidationOn: html html anchor title: 'Validate XHTML'; url: 'http://validator.w3.org/check/referer'; with: 'XHTML'
</methods> <methods> Seaside.WAToolFrame <category>rendering</category>
renderChildOn: html showHalos contents ifTrue: [ html context debugMode ]. processTime := processTime ifNil: [ 0 ] ifNotNil: [ Time millisecondClockValue - processTime ]. renderTime := Time millisecondsToRun: [ self deprecatedApi: [ html render: contents ] on: html ]. html context clearMode
</methods> <methods> Seaside.WAToolFrame <category>actions</category>
deprecatedCode | result | result := self confirm: [ :html | html heading: 'Clear deprecated warnings?'. html unorderedList: [ self deprecated keysAndValuesDo: [ :message :cc | html listItem: [ html anchor callback: [ cc value ]; with: message ] ] ] ]. result ifTrue: [ deprecated := Dictionary new ]
</methods> <methods> Seaside.WAToolFrame <category>rendering</category>
renderTerminateOn: html html anchor url: (html context actionUrl withParameter: 'terminate' value: '1'); with: 'Terminate'
</methods> <methods> Seaside.WAToolFrame <category>rendering</category>
renderNewSessionOn: html html anchor callback: [self session expire; redirectTo: self session newSessionUrl]; with: 'New Session'.
</methods> <methods> Seaside.WAToolFrame <category>processing</category>
processCallbackStream: aCallbackStream processTime := Time millisecondClockValue. super processCallbackStream: aCallbackStream
</methods> <methods> Seaside.WAToolFrame <category>actions</category>
configure self call: (WAApplicationEditor new application: self session application)
</methods> <methods> Seaside.WAToolFrame <category>accessing</category>
tools ^ WATool allSubclasses
</methods> <methods> Seaside.WAToolFrame <category>rendering</category>
style ^ '#toolbar { position: fixed; bottom: 0; left: 0; right: 0; margin-top: 40px; padding: 3px; clear: both; background: #d3d3d3; font-size: 10pt; z-index: 20 } #toolbar-profile { margin-top: 40px; padding: 3px; clear: both; background: #d3d3d3; font-size: 10pt } .halo { border-style: solid; border-width: 1px; margin: 4px; border-color: #aaaaaa } .halo-header { font-size: 10pt; background-color: #cccccc } .halo-mode { float: right } .halo-mode .active { font-weight: bold } .halo-icons { float: left } .halo-icons img { border: 0 } .halo-contents { clear: both }'
</methods> <methods> Seaside.WAToolFrame <category>private</category>
deprecatedApi: aBlock on: html aBlock on: WADeprecatedApi do: [ :notification | | continuation | continuation := Continuation fromContext: notification signalerContext. deprecated at: notification messageText put: [ continuation invoke: [ self halt: notification messageText. WARenderNotification raiseSignal ] ]. notification resume ]
</methods> <methods> Seaside.WAToolFrame <category>accessing</category>
actions ^ #( configure toggleHalos )
</methods> <methods> Seaside.WATrail <category>accessing</category>
root: anObject root := anObject
</methods> <methods> Seaside.WATrail <category>rendering</category>
renderContentOn: html | last selected | last := nil. html unorderedList class: 'trail'; with: [ root visiblePresentersDo: [ :each | (each isDecoration and: [each isDelegation]) ifTrue: [ (each component respondsTo: #trailName) ifTrue: [ last := each. html listItem: [ html anchor callback: [ each remove ]; with: each component trailName ] ] ] ]. selected := last ifNil: [ root ] ifNotNil: [ last delegate ]. (selected respondsTo: #trailName) ifTrue: [ html listItem: selected trailName ] ]
</methods> <methods> Seaside.WATrail <category>rendering</category>
style ^' ul.trail { margin-left: 0; padding-left: 0; display: inline; border: none; } ul.trail li { margin-left: 0; padding-left: 2px; border: none; list-style: none; display: inline; } ul.trail li:before { content: "\0020 \0020 \0020 \00BB \0020"; } ul.trail li.first:before { content: " "; } '
</methods> <methods> Seaside.WATransaction <category>testing</category>
isGlobal ^ true
</methods> <methods> Seaside.WATransaction <category>initialization</category>
initialize super initialize. active := true
</methods> <methods> Seaside.WATransaction <category>rendering</category>
renderContentOn: html active ifTrue: [ self renderOwnerOn: html ] ifFalse: [ self session pageExpired ]
</methods> <methods> Seaside.WATransaction <category>open/close</category>
close active := false
</methods> <methods> Seaside.WATransaction <category>forwarding</category>
processChildCallbacks: aStream ^ active ifTrue: [super processChildCallbacks: aStream] ifFalse: [self session pageExpired].
</methods> <methods> Seaside.WATransactionTest <category>processing</category>
go self inform: 'Before parent txn'. self isolate: [self inform: 'Inside parent txn'. self isolate: [self inform: 'Inside child txn']. self inform: 'Outside child txn']. self inform: 'Outside parent txn'
</methods> <methods> Seaside.WATree <category>testing</category>
canSelect: aNode ^self selectBlock notNil and: [ self canSelectBlock isNil or: [ self canSelectBlock value: aNode ] ].
</methods> <methods> Seaside.WATree <category>initialization</category>
initialize super initialize. self session registerObjectForBacktracking: (expanded := IdentitySet new). self selectBlock: [ :node | self answer: node ]. self childrenBlock: [ :node | Array new ]. self labelBlock: [ :node | node displayString ]
</methods> <methods> Seaside.WATree <category>actions</category>
expand: aNode expanded add: aNode.
</methods> <methods> Seaside.WATree <category>rendering-nodes</category>
renderNodeButton: aNode on: html | isExpanded | html span class: 'button'; with: [ (self hasChildren: aNode) ifTrue: [ isExpanded := self isExpanded: aNode. self renderNodeButtonLink: aNode action: (MessageSend receiver: self selector: (isExpanded ifTrue: [ #collapse: ] ifFalse: [ #expand: ]) argument: aNode) text: (isExpanded ifTrue: [ '-' ] ifFalse: [ '+' ]) on: html ] ]
</methods> <methods> Seaside.WATree <category>testing</category>
isExpanded: aNode ^expanded includes: aNode.
</methods> <methods> Seaside.WATree <category>actions</category>
collapse: aNode expanded remove: aNode.
</methods> <methods> Seaside.WATree <category>rendering-nodes</category>
renderNodeChildren: aNode on: html | children | children := self childrenOf: aNode. children isEmpty ifFalse: [ (self isExpanded: aNode) ifTrue: [ html unorderedList: [ children do: [ :each | self renderNode: each on: html ] ] ] ].
</methods> <methods> Seaside.WATree <category>accessing-nodes</category>
labelOf: aNode ^self labelBlock value: aNode.
</methods> <methods> Seaside.WATree <category>accessing</category>
root ^root
</methods> <methods> Seaside.WATree <category>accessing-configuration</category>
canSelectBlock ^canSelectBlock
</methods> <methods> Seaside.WATree <category>accessing-configuration</category>
canSelectBlock: aBlock canSelectBlock := aBlock
</methods> <methods> Seaside.WATree <category>testing</category>
hasChildren: aNode ^(self childrenOf: aNode) isEmpty not.
</methods> <methods> Seaside.WATree <category>rendering-nodes</category>
renderNodeButtonLink: aNode action: aBlock text: anObject on: html html anchor callback: aBlock; with: anObject
</methods> <methods> Seaside.WATree <category>rendering-nodes</category>
renderNodeLabel: aNode on: html | label | html span class: 'label'; class: (self selected == aNode ifTrue: [ 'active' ] ifFalse: [ 'inactive' ]); with: [ label := self labelOf: aNode. (self canSelect: aNode) ifFalse: [ html render: label ] ifTrue: [ self renderNodeLabelLink: aNode action: (MessageSend receiver: self selector: #select: argument: aNode) text: label on: html ] ].
</methods> <methods> Seaside.WATree <category>rendering</category>
renderContentOn: html self renderTreeOn: html.
</methods> <methods> Seaside.WATree <category>actions</category>
expandAll: aCollection expanded addAll: aCollection.
</methods> <methods> Seaside.WATree <category>accessing-configuration</category>
childrenBlock ^childrenBlock
</methods> <methods> Seaside.WATree <category>accessing-configuration</category>
selectBlock: aBlock selectBlock := aBlock
</methods> <methods> Seaside.WATree <category>accessing</category>
selected: aNode selected := aNode
</methods> <methods> Seaside.WATree <category>accessing-configuration</category>
selectBlock ^selectBlock
</methods> <methods> Seaside.WATree <category>rendering-nodes</category>
renderNode: aNode on: html html listItem: [ self renderNodeButton: aNode on: html. self renderNodeLabel: aNode on: html. self renderNodeChildren: aNode on: html ]
</methods> <methods> Seaside.WATree <category>actions</category>
select: aNode (self canSelect: aNode) ifTrue: [ self selected: aNode. self selectBlock isNil ifFalse: [ self selectBlock value: aNode ] ].
</methods> <methods> Seaside.WATree <category>accessing-configuration</category>
labelBlock: aBlock labelBlock := aBlock
</methods> <methods> Seaside.WATree <category>rendering-nodes</category>
renderNodeLabelLink: aNode action: aBlock text: anObject on: html html anchor callback: aBlock; with: anObject
</methods> <methods> Seaside.WATree <category>rendering</category>
renderTreeOn: html html unorderedList: [ self renderNode: self root on: html ].
</methods> <methods> Seaside.WATree <category>accessing</category>
selected ^selected
</methods> <methods> Seaside.WATree <category>accessing-configuration</category>
labelBlock ^labelBlock
</methods> <methods> Seaside.WATree <category>accessing-configuration</category>
childrenBlock: aBlock childrenBlock := aBlock
</methods> <methods> Seaside.WATree <category>accessing-nodes</category>
childrenOf: aNode | children | children := self childrenBlock value: aNode. ^ children ifNil: [ Array new ]
</methods> <methods> Seaside.WATree <category>accessing</category>
root: aNode root := aNode
</methods> <methods> Seaside.WAUploadTest <category>rendering</category>
rendererClass "Intentionally using the classic API" ^WAHtmlRenderer
</methods> <methods> Seaside.WAUploadTest <category>rendering</category>
renderContentOn: html html heading: 'Upload File'. html attributeAt: 'enctype' put: 'multipart/form-data'. html form: [ html fileUploadWithCallback: [:f | file := f]. html submitButton. ]. file ifNotNil: [ html anchorWithDocument: file contents mimeType: file contentType fileName: file fileName text: file fileName , ' (' , file contentType , ')'. html break. html anchorWithDocument: file contents text:file fileName. html preformatted: file contents ]
</methods> <methods> Seaside.WAUrl <category>initialize-release</category>
initialize path := OrderedCollection new. params := Dictionary new. scheme := #http
</methods> <methods> Seaside.WAUrl <category>printing</category>
displayString ^ self urlWithQueryString
</methods> <methods> Seaside.WAUrl <category>accessing</category>
fragment ^ fragment
</methods> <methods> Seaside.WAUrl <category>printing</category>
urlString ^ self serverString , self pathString , self fragmentString
</methods> <methods> Seaside.WAUrl <category>accessing</category>
fragment: aString fragment := aString
</methods> <methods> Seaside.WAUrl <category>private</category>
defaultPortForScheme: aSymbol ^ aSymbol = #http ifTrue: [80] ifFalse: [aSymbol = #https ifTrue: [443]]
</methods> <methods> Seaside.WAUrl <category>printing</category>
asString ^ self urlWithQueryString
</methods> <methods> Seaside.WAUrl <category>private</category>
orderedParameterKeys | keys | keys := OrderedCollection new. params keys do: [:ea | (self isSeasideField: ea) ifTrue: [keys addLast: ea] ifFalse: [keys addFirst: ea]]. ^ keys
</methods> <methods> Seaside.WAUrl <category>requesting</category>
getDocument ^ SeasidePlatformSupport getDocumentWithUrl: self
</methods> <methods> Seaside.WAUrl <category>accessing</category>
port: aNumber port := aNumber
</methods> <methods> Seaside.WAUrl <category>accessing</category>
addToPath: aString path addAll: (aString findTokens: '/')
</methods> <methods> Seaside.WAUrl <category>private</category>
removeParameters params := Dictionary new
</methods> <methods> Seaside.WAUrl <category>copying</category>
withParameter: aString value: valueString ^ self copy addParameter: aString value: valueString; yourself
</methods> <methods> Seaside.WAUrl <category>accessing</category>
scheme ^ scheme
</methods> <methods> Seaside.WAUrl <category>printing</category>
pathString ^ String streamContents: [ :stream | stream nextPut: $/. path do: [ :each | stream nextPutAll: each ] separatedBy: [ stream nextPut: $/ ] ]
</methods> <methods> Seaside.WAUrl <category>accessing</category>
path ^ path
</methods> <methods> Seaside.WAUrl <category>printing</category>
parameterString | v | ^ parameterString ifNil: [parameterString := String streamContents: [:s | params isEmpty ifFalse: [s nextPut: $?. self orderedParameterKeys do: [:k | v := params at: k. s nextPutAll: k encodeForHTTP. v ifNotNil: [s nextPut: $=; nextPutAll: v encodeForHTTP]. s nextPut: $&]. s skip: -1]]]
</methods> <methods> Seaside.WAUrl <category>accessing</category>
parametersForHttpSocket "ugly dictionary should support some form of #collect: that creates a Dictionary, maybe #map: or so" | dictionary | dictionary := Dictionary new. self parameters keysAndValuesDo: [ :key :value | dictionary at: key put: (Array with: value) ]. ^ dictionary
</methods> <methods> Seaside.WAUrl <category>accessing</category>
scheme: aSymbol scheme := aSymbol
</methods> <methods> Seaside.WAUrl <category>copying</category>
with: pathString ^ self copy addToPath: pathString; yourself
</methods> <methods> Seaside.WAUrl <category>copying</category>
copy | copy | copy := self class new. copy hostname: host; port: port; scheme: scheme; fragment: fragment. copy addToPath: self pathString. params keysAndValuesDo: [:k :v | copy addParameter: k value: v]. ^ copy
</methods> <methods> Seaside.WAUrl <category>copying</category>
withParameter: aString ^ self copy addParameter: aString; setParameterString: (self parameterString, '&', aString); yourself
</methods> <methods> Seaside.WAUrl <category>accessing</category>
addParameter: keyString value: valueString params at: keyString put: valueString. parameterString := nil
</methods> <methods> Seaside.WAUrl <category>accessing</category>
hostname ^ host
</methods> <methods> Seaside.WAUrl <category>accessing</category>
takeServerParametersFromRequest: aRequest | httpHost | host ifNil: [ httpHost := aRequest headerAt: 'host' ifAbsent: [ ^ self ]. host := httpHost copyUpTo: $:. (httpHost includes: $:) ifTrue: [ port := (httpHost copyAfter: $:) asNumber ] ]
</methods> <methods> Seaside.WAUrl <category>printing</category>
urlWithQueryString ^ String streamContents: [:s | s nextPutAll: self serverString. s nextPutAll: self pathString. s nextPutAll: self queryString]
</methods> <methods> Seaside.WAUrl <category>printing</category>
isSeasideField: aString ^ aString notEmpty and: [ aString first = $_ or: [ aString allSatisfy: [ :each | each isDigit ] ] ]
</methods> <methods> Seaside.WAUrl <category>printing</category>
serverString host ifNil: [^ '']. ^ String streamContents: [:stream | stream nextPutAll: scheme. stream nextPutAll: '://'. stream nextPutAll: host. ((self defaultPortForScheme: scheme) = self port) ifFalse: [stream nextPutAll: ':', port displayString]]
</methods> <methods> Seaside.WAUrl <category>copying</category>
withoutParameters ^self copy removeParameters; yourself
</methods> <methods> Seaside.WAUrl <category>accessing</category>
hostname: aString host := aString
</methods> <methods> Seaside.WAUrl <category>accessing</category>
parameters ^ params
</methods> <methods> Seaside.WAUrl <category>accessing</category>
port ^ port ifNil: [self defaultPortForScheme: scheme]
</methods> <methods> Seaside.WAUrl <category>private</category>
setParameterString: aString parameterString := aString
</methods> <methods> Seaside.WAUrl <category>printing</category>
queryString ^ self parameterString, self fragmentString
</methods> <methods> Seaside.WAUrl <category>printing</category>
fragmentString ^ fragment ifNil: [''] ifNotNil: ['#', fragment]
</methods> <methods> Seaside.WAUrl <category>accessing</category>
addParameter: aString self addParameter: aString value: nil
</methods> <methods> Seaside.WAUserConfiguration <category>initialization</category>
initialize super initialize. values := Dictionary new. ancestors := OrderedCollection new.
</methods> <methods> Seaside.WAUserConfiguration <category>as yet unclassified</category>
clearValueForAttribute: anAttribute values removeKey: anAttribute key ifAbsent: []
</methods> <methods> Seaside.WAUserConfiguration <category>menu</category>
clear values := Dictionary new.
</methods> <methods> Seaside.WAUserConfiguration <category>as yet unclassified</category>
localValues | dict | dict := Dictionary new. self allAttributes do: [:attr | (self localValueAt: attr key ifAbsent: [nil]) ifNotNilDo: [:value | dict at: attr key put: (attr stringForValue: value)]]. ^ dict
</methods> <methods> Seaside.WAUserConfiguration <category>copying</category>
postCopy super postCopy. values := values copy. ancestors := ancestors collect: [ :each | each copy ]
</methods> <methods> Seaside.WAUserConfiguration <category>as yet unclassified</category>
addAncestor: aConfiguration (self inheritsFrom: aConfiguration) ifFalse: [ancestors add: aConfiguration]
</methods> <methods> Seaside.WAUserConfiguration <category>testing</category>
hasMutableAncestry ^ true
</methods> <methods> Seaside.WAUserConfiguration <category>as yet unclassified</category>
valueAt: aSymbol put: anObject ^ self takeValue: anObject forAttribute: (self attributeNamed: aSymbol)
</methods> <methods> Seaside.WAUserConfiguration <category>values</category>
localValueAt: aSymbol ifAbsent: errorBlock ^ values at: aSymbol ifAbsent: errorBlock
</methods> <methods> Seaside.WAUserConfiguration <category>as yet unclassified</category>
removeAncestor: aConfiguration ancestors remove: aConfiguration ifAbsent: []
</methods> <methods> Seaside.WAUserConfiguration <category>as yet unclassified</category>
localValues: aDictionary self allAttributes do: [:attr | (aDictionary at: attr key ifAbsent: [nil]) ifNotNilDo: [:string | self valueAt: attr key put: (attr valueFromString: string)]]
</methods> <methods> Seaside.WAUserConfiguration <category>accessing</category>
ancestors ^ ancestors
</methods> <methods> Seaside.WAUserConfiguration <category>ancestry</category>
allPotentialAncestors ^ WASystemConfiguration allSubclasses collect: [:ea | ea new]
</methods> <methods> Seaside.WAUserConfiguration <category>as yet unclassified</category>
overrideAttribute: anAttribute self takeValue: (self valueForAttribute: anAttribute) forAttribute: anAttribute
</methods> <methods> Seaside.WAUserConfiguration <category>as yet unclassified</category>
takeValue: anObject forAttribute: anAttribute ^ anObject ifNotNil: [values at: anAttribute key put: anObject]
</methods> <methods> Seaside.WAValidationDecoration <category>initialization</category>
initialize super initialize. message := WAStateHolder new
</methods> <methods> Seaside.WAValidationDecoration <category>accessing</category>
exceptionClass ^exceptionClass ifNil: [exceptionClass := WAValidationNotification]
</methods> <methods> Seaside.WAValidationDecoration <category>convenience</category>
validateWith: aBlock validationBlock := aBlock
</methods> <methods> Seaside.WAValidationDecoration <category>rendering</category>
renderContentOn: html message contents ifNotNilDo: [ :msg | html div class: 'validation-error'; with: msg]. self renderOwnerOn: html.
</methods> <methods> Seaside.WAValidationDecoration <category>call/answer</category>
handleAnswer: anObject ^(super handleAnswer: anObject) or: [(self validate: anObject) not]
</methods> <methods> Seaside.WAValidationDecoration <category>request processing</category>
handleAnswer: anObject continueWith: aBlock (self validate: anObject) ifTrue: [aBlock value]
</methods> <methods> Seaside.WAValidationDecoration <category>request processing</category>
validate: anObject [validationBlock value: anObject. message contents: nil. ^ true] on: self exceptionClass do: [:e | message contents: e messageText]. ^ false
</methods> <methods> Seaside.WAValidationDecoration <category>accessing</category>
exceptionClass: aClass exceptionClass := aClass
</methods> <methods> Seaside.WAValueCallback <category>accessing</category>
block: aOneArgBlock block := aOneArgBlock fixCallbackTemps
</methods> <methods> Seaside.WAValueCallback <category>accessing</category>
priority ^ 5
</methods> <methods> Seaside.WAValueCallback <category>evaluation</category>
evaluateWithArgument: anObject block valueWithPossibleArgs: (Array with: anObject)
</methods> <methods> Seaside.WAValueTest <category>testing</category>
originalValue: anOriginalValue input: anInputObject expectedOutput: anExpectedOutputObject | answer | (WAHtmlRenderer new fromStringConverterBlockFor: anOriginalValue callback: [:v | answer := v]) value: anInputObject. self assert: answer = anExpectedOutputObject
</methods> <methods> Seaside.WAValueTest <category>testing</category>
testFractionWithFloat self originalValue: 1 / 3 input: '3.4' expectedOutput: 3.4
</methods> <methods> Seaside.WAValueTest <category>testing</category>
testFractionWithInteger self originalValue: 1 / 3 input: '2' expectedOutput: 2
</methods> <methods> Seaside.WAValueTest <category>testing</category>
testInteger self originalValue: 123 input: '987' expectedOutput: 987
</methods> <methods> Seaside.WAValueTest <category>testing</category>
testFractionWithFraction self originalValue: 1 / 3 input: '2/5' expectedOutput: 2
</methods> <methods> Seaside.WAValueTest <category>testing</category>
testFloat self originalValue: 12.34 input: '92.6' expectedOutput: 92.6
</methods> <methods> Seaside.WAValueTest <category>testing</category>
testNilWithNonEmptyString self originalValue: nil input: '123' expectedOutput: '123'
</methods> <methods> Seaside.WAValueTest <category>testing</category>
testNilWithEmptyString self originalValue: nil input: '' expectedOutput: nil
</methods> <methods> Seaside.WAValueTest <category>testing</category>
testObject self originalValue: Object new input: '2.3' expectedOutput: '2.3'
</methods> <methods> Seaside.WAValueTest <category>testing</category>
testFractionWithOriginalValue | value | "The #deny: check is to ensure value is stringent enough. For example 1/3 is not a suitable value." value := 1 /33. self deny: value asFloat asString asNumber = value. self originalValue: value input: value asFloat asString expectedOutput: value
</methods> <methods> Seaside.WAViewer <category>accessing</category>
presenter: aPresenter presenter := aPresenter
</methods> <methods> Seaside.WAViewer <category>rendering</category>
renderCssOn: html html textArea rows: 20; columns: 80; value: presenter style; callback: [ :css | presenter class compile: 'style ^ ', css printString]
</methods> <methods> Seaside.WAViewer <category>accessing</category>
buttons ^ #(save)
</methods> <methods> Seaside.WAViewer <category>rendering</category>
renderContentOn: html html heading level: 3; with: presenter displayString. super renderContentOn: html
</methods> <methods> Seaside.WAViewer <category>accessing</category>
script ^ 'self.opener.location=self.opener.location'
</methods> <methods> Seaside.WAViewer <category>accessing</category>
rows ^ #(css)
</methods> <methods> Seaside.WAViewer <category>accessing</category>
model ^ presenter
</methods> <methods> Seaside.WAViewer <category>actions</category>
save
</methods> <methods> Seaside.WAWalkback <category>rendering</category>
renderObject: anObject labelled: aString on: html | objectString | [objectString := (SeasidePlatformSupport isProxy: anObject) ifTrue: [anObject printString] ifFalse: [anObject printStringLimitedTo: 100]] on: Error do: [:err | objectString := '<font color="FF0000">&lt;error in printStringLimitedTo:&gt;</font>']. html tableRow: [ html tableData: aString. html tableData: [ html html: objectString ] ]
</methods> <methods> Seaside.WAWalkback <category>initialization</category>
initialize super initialize. fullstack := false.
</methods> <methods> Seaside.WAWalkback <category>accessing</category>
exception: anException exception := anException
</methods> <methods> Seaside.WAWalkback <category>actions</category>
debug self answer
</methods> <methods> Seaside.WAWalkback <category>rendering</category>
renderWalkbackOn: html | context count | html heading: exception description. html unorderedList: [ context := thisContext. count := 0. [context receiver isKindOf: Exception] whileFalse: [context := context sender]. [context receiver isKindOf: Exception] whileTrue: [context := context sender]. [context notNil and: [ fullstack or: [ count < 5 ] ] ] whileTrue: [ self renderStackFrame: context on: html. context := context sender. count := count + 1]. ]
</methods> <methods> Seaside.WAWalkback <category>actions</category>
fullstack fullstack := true
</methods> <methods> Seaside.WAWalkback <category>rendering</category>
renderToolsOn: html html anchor callback: [ self debug ]; with: 'Debug'. html space. html anchor callback: [ self fullstack ]; with: 'Full Stack'
</methods> <methods> Seaside.WAWalkback <category>rendering</category>
renderStackFrame: aContext on: html | receiver | html listItem: [ html text: aContext fullPrintString. html blockquote: [ html table: [ receiver := aContext receiver. self renderObject: receiver labelled: 'self' on: html. html tableRow: [ html tableData colSpan: 2; with: [ html strong: 'temps' ]]. aContext tempNames withIndexDo: [:name :index | self renderObject: (aContext tempAt: index) labelled: name on: html]. receiver == nil ifFalse: [ ((SeasidePlatformSupport isProxy: receiver) not and: [receiver class instSize > 0]) ifTrue: [html tableRow: [ html tableData colSpan: 2; with: [html strong: 'inst vars']]. receiver class allInstVarNames withIndexDo: [:name :index | self renderObject: (receiver instVarAt: index) labelled: name on: html]]]. ]] ]
</methods> <methods> Seaside.WAWalkback <category>rendering</category>
renderContentOn: html self renderToolsOn: html. self renderWalkbackOn: html
</methods> <methods> Seaside.WAWalkbackErrorHandler <category>actions</category>
handleWarning: aWarning WARenderLoop new call: (WAFormDialog new addMessage: aWarning messageText; yourself). aWarning resume.
</methods> <methods> Seaside.WAWalkbackErrorHandler <category>actions</category>
handleError: anError WARenderLoop new call: (WAWalkback new exception: anError) withToolFrame: false. SeasidePlatformSupport openDebuggerOn: anError.
</methods> <methods> Seaside.WAWindowDecoration <category>rendering</category>
renderCloseButtonOn: html html anchor callback: [self component answer]; with: 'close'
</methods> <methods> Seaside.WAWindowDecoration <category>testing</category>
isGlobal ^ true
</methods> <methods> Seaside.WAWindowDecoration <category>accessing</category>
style ^ '.window-titlebar {background-color: #aaaaaa; padding: 5px; margin-bottom: 5px} .window-close {float: right} .window-title {} .window-content {clear: both} '
</methods> <methods> Seaside.WAWindowDecoration <category>rendering</category>
renderContentOn: html html div class: 'window-titlebar'; with: [ html span class: 'window-close'; with: [self renderCloseButtonOn: html]. html span class: 'window-title'; with: title. ]. html div class: 'window-content'; with: [self renderOwnerOn: html]
</methods> <methods> Seaside.WAWindowDecoration <category>accessing</category>
title: aString title := aString
</methods> <methods> Seaside.WAYesOrNoDialog <category>accessing</category>
yes self answer: true
</methods> <methods> Seaside.WAYesOrNoDialog <category>accessing</category>
no self answer: false
</methods> <methods> Seaside.WAYesOrNoDialog <category>accessing</category>
buttons ^ #(yes no)
</methods> <methods> Seaside.Amb class <category>instance creation</category>
new ^ self basicNew initialize
</methods> <methods> Seaside.Continuation class <category>instance creation</category>
current ^ self fromContext: thisContext sender
</methods> <methods> Seaside.Continuation class <category>instance creation</category>
currentDo: aBlock ^ aBlock value: (self fromContext: thisContext sender)
</methods> <methods> Seaside.Continuation class <category>instance creation</category>
fromContext: aStack ^self new initializeFromContext: aStack
</methods> <methods> Seaside.WAAbstractHtmlBuilder class <category>initialization</category>
initialize "WAHtmlBuilder initialize" HtmlCharacters := Array new: 256. 0 to: 255 do: [:ea | HtmlCharacters at: ea + 1 put: ea asCharacter]. #($" 'quot' $< 'lt' $& 'amp' $> 'gt') pairsDo: [:c :s | HtmlCharacters at: (c asInteger + 1) put: ('&',s,';') ]
</methods> <methods> Seaside.WAAbstractHtmlBuilder class <category>encoding</category>
encode: anObject to: aStream | charOrString | anObject displayString do: [:char | charOrString := HtmlCharacters at: char asInteger + 1 ifAbsent: [ char asCharacter ]. charOrString isString ifTrue: [ aStream nextPutAll: charOrString ] ifFalse: [ aStream nextPut: charOrString ] ]
</methods> <methods> Seaside.WAAbstractHtmlBuilder class <category>encoding</category>
encode: anObject ^ String streamContents: [ :stream | self encode: anObject to: stream ]
</methods> <methods> Seaside.WAAbstractHtmlBuilder class <category>instance creation</category>
new self deprecatedApi. ^ super new
</methods> <methods> Seaside.WAAllCanvasTests class <category>class initialization</category>
initialize self registerAsApplication: 'tests/allcanvastests'
</methods> <methods> Seaside.WAAllCanvasTests class <category>testing</category>
canBeRoot ^ true
</methods> <methods> Seaside.WAAllTests class <category>initialize</category>
initialize self registerAsApplication: 'tests/alltests'
</methods> <methods> Seaside.WAAllTests class <category>testing</category>
canBeRoot ^ true
</methods> <methods> Seaside.WAApplication class <category>accessing</category>
description ^ 'Application'
</methods> <methods> Seaside.WABatchSelection class <category>instance-creation</category>
items: aCollection link: linkSelector text: textSelector ^ self new items: aCollection; linkSelector: linkSelector; textSelector: textSelector; yourself
</methods> <methods> Seaside.WABatchedList class <category>accessing</category>
example ^self new items: (1 to: 100); yourself.
</methods> <methods> Seaside.WABrowser class <category>instance-creation</category>
fullOnClass: aClass ^ self fullOnClass: aClass selector: nil
</methods> <methods> Seaside.WABrowser class <category>initialization</category>
initialize self registerAsApplication: 'tools/classbrowser'
</methods> <methods> Seaside.WABrowser class <category>accessing</category>
description ^ 'Smalltalk Code Browser'
</methods> <methods> Seaside.WABrowser class <category>instance-creation</category>
fullOnClass: aClass selector: aSelector ^ self new model: (Browser new setClass: aClass selector: aSelector)
</methods> <methods> Seaside.WABrush class <category>instance creation</category>
new ^self basicNew initialize
</methods> <methods> Seaside.WACachedDocument class <category>initialize-release</category>
initialize self clearCache
</methods> <methods> Seaside.WACachedDocument class <category>cache</category>
clearCache "Clear the cache of instances. This will cause the files to be lazily reread from disk." Cache := Dictionary new
</methods> <methods> Seaside.WACachedDocument class <category>instance-creation</category>
fileName: aFileName "Check the cache to see if we already have this file loaded. We only rely on the local filename!" ^Cache at: aFileName ifAbsentPut: [self fullFileName: aFileName]
</methods> <methods> Seaside.WACachedDocument class <category>instance-creation</category>
fullFileName: fullFileName ^self new fullFileName: fullFileName
</methods> <methods> Seaside.WACachedDocument class <category>cache</category>
preloadCache "Load the files into the image for the currently created instances in the Cache." Cache valuesDo: [:d | d asMIMEDocument ]
</methods> <methods> Seaside.WACallbackRegistry class <category>as yet unclassified</category>
context: aContext owner: anObject ^ self basicNew initializeWithContext: aContext owner: anObject
</methods> <methods> Seaside.WACallbackStream class <category>as yet unclassified</category>
callbacks: aDictionary request: aRequest ^ self basicNew initializeWithCallbacks: aDictionary request: aRequest
</methods> <methods> Seaside.WACanvasInputTest class <category>accessing</category>
example ^ self new
</methods> <methods> Seaside.WACanvasInputTest class <category>accessing</category>
description ^'Various XHTML form input elements'
</methods> <methods> Seaside.WACanvasTableReport class <category>instance creation</category>
new self deprecatedApi. ^super new
</methods> <methods> Seaside.WAChoiceDialog class <category>examples</category>
example ^ self options: #('Smalltalk' 'Perl' 'Python' 'Ruby')
</methods> <methods> Seaside.WAChoiceDialog class <category>instance-creation</category>
options: aCollection ^ self new options: aCollection
</methods> <methods> Seaside.WAComponent class <category>utilities</category>
renderLoopConfigurationClass ^WARenderLoopConfiguration
</methods> <methods> Seaside.WAComponent class <category>testing</category>
isDeployed "When returning true, the component is to be kept in a deployed system, otherwise it is disabled" ^ false " Usage: 1. Implement #isDeployed on the class side of the deployed root components 2. Evaluate the following WADispatcher default trimForDeployment "
</methods> <methods> Seaside.WAComponent class <category>testing</category>
canBeRoot "When returning true, the component can be registered as a standalone application from the config interface." ^ false
</methods> <methods> Seaside.WAComponent class <category>utilities</category>
applicationClass ^WAApplication
</methods> <methods> Seaside.WAComponent class <category>registration</category>
registerAsAuthenticatedApplication: aString | application user password | application := self registerAsApplication: aString. application configuration addAncestor: WAAuthConfiguration new. user := SeasidePlatformSupport request: 'Please choose a username for\the application ' withCRs , aString printString. password := SeasidePlatformSupport request: 'Please enter a password for ', aString printString. application preferenceAt: #login put: user. application preferenceAt: #password put: password. ^ application
</methods> <methods> Seaside.WAComponent class <category>registration</category>
registerAsApplication: aString | path dispatcher | path := aString findTokens: '/'. dispatcher := path allButLast inject: WADispatcher default into: [ :result :each | result entryPoints at: each ifAbsent: [ result register: (WADispatcher named: each) ] ]. ^ dispatcher register: (self applicationNamed: path last)
</methods> <methods> Seaside.WAComponent class <category>instance-creation</category>
new ^ self basicNew initializeDecoration initialize
</methods> <methods> Seaside.WAComponent class <category>accessing</category>
headerForExampleBrowser ^self name = self description ifTrue: [self name] ifFalse: [self description , ' (' , self name , ')']
</methods> <methods> Seaside.WAComponent class <category>accessing</category>
description ^ self name
</methods> <methods> Seaside.WAComponent class <category>registration</category>
applicationNamed: aString | application | application := WAApplication named: aString. application configuration addAncestor: WARenderLoopConfiguration new. application preferenceAt: #rootComponent put: self. ^ application
</methods> <methods> Seaside.WAConditionalComment class <category>instance creation</category>
root: anHtmlRoot ^self new initializeWithRoot: anHtmlRoot
</methods> <methods> Seaside.WAConfiguration class <category>instance creation</category>
new ^ self basicNew initialize
</methods> <methods> Seaside.WAConfigurationAttribute class <category>as yet unclassified</category>
key: keySymbol group: groupSymbol ^ self basicNew initializeWithKey: keySymbol group: groupSymbol
</methods> <methods> Seaside.WAConfigurationAttribute class <category>accessing</category>
key: aSymbol ^ self key: aSymbol group: nil
</methods> <methods> Seaside.WACookie class <category>accessing</category>
key: keyString value: valueString ^ self new key: keyString; value: valueString; yourself
</methods> <methods> Seaside.WACounter class <category>accessing</category>
description ^ 'A very simple Seaside application'
</methods> <methods> Seaside.WACounter class <category>initialization</category>
initialize self registerAsApplication: 'examples/counter'
</methods> <methods> Seaside.WACounter class <category>examples</category>
example ^ self new
</methods> <methods> Seaside.WACounter class <category>testing</category>
canBeRoot ^ true
</methods> <methods> Seaside.WADateSelectorTest class <category>examples</category>
example ^self new.
</methods> <methods> Seaside.WADateSelectorTest class <category>class initialization</category>
initialize self registerAsApplication: 'tests/dateselector'
</methods> <methods> Seaside.WADispatcher class <category>accessing</category>
description ^ 'Directory'
</methods> <methods> Seaside.WADispatcher class <category>initialization</category>
resetAll "To have this todo list somewhere, May be used in the WADispatcher tests" default := nil. WAFileHandler initialize. WAFileHandler default. WAComponent allSubclasses do: [:ea | ea initialize].
</methods> <methods> Seaside.WADispatcher class <category>accessing</category>
default ^ default ifNil: [default := self named: SeasidePlatformSupport defaultDispatcherName]
</methods> <methods> Seaside.WADispatcherComponent class <category>instance-creation</category>
registerAsApplication: aString ^(super registerAsApplication: aString) addLibrary: WADispatcherFiles; yourself.
</methods> <methods> Seaside.WADispatcherComponent class <category>instance-creation</category>
on: aDispatcher ^ self new dispatcher: aDispatcher
</methods> <methods> Seaside.WADispatcherEditor class <category>initialization</category>
initialize self registerAsAuthenticatedApplication: 'config'
</methods> <methods> Seaside.WADispatcherEditor class <category>testing</category>
isDeployed ^ true
</methods> <methods> Seaside.WADispatcherEditor class <category>plugins</category>
editorActionsFor: anEntryPoint inEditor: anEditor ^ OrderedCollection new add: (Dictionary new at: #label put: 'configure'; at: #action put: [ anEditor configure: anEntryPoint ]; yourself); add: (Dictionary new at: #label put: 'copy'; at: #action put: [ anEditor copy: anEntryPoint ]; yourself); add: (Dictionary new at: #label put: 'remove'; at: #action put: [ anEditor remove: anEntryPoint ]; yourself); yourself
</methods> <methods> Seaside.WADispatcherEditor class <category>testing</category>
canBeRoot ^ true
</methods> <methods> Seaside.WADispatcherEditor class <category>plugins</category>
standardPlugins ^OrderedCollection with: self
</methods> <methods> Seaside.WADispatcherEditor class <category>plugins</category>
plugins ^plugins ifNil: [plugins := self standardPlugins].
</methods> <methods> Seaside.WADispatcherEditor class <category>plugins</category>
addPlugin: aClass (self plugins includes: aClass) ifFalse: [self plugins add: aClass]
</methods> <methods> Seaside.WADispatcherEditor class <category>plugins</category>
actionsFor: anEntryPoint inEditor: anEditor | actions | "Answer an OrderedCollectionn of associations" actions := OrderedCollection new. self plugins do: [:each | actions addAll: (each editorActionsFor: anEntryPoint inEditor: anEditor)]. ^actions.
</methods> <methods> Seaside.WADispatcherEditor class <category>accessing</category>
description ^ 'Dispatcher Editor'
</methods> <methods> Seaside.WADispatcherEditorPlugin class <category>initialization</category>
initialize self registerAsDispatcherEditorPlugin.
</methods> <methods> Seaside.WADispatcherEditorPlugin class <category>as yet unclassified</category>
registerAsDispatcherEditorPlugin ^ self label notEmpty ifTrue: [ WADispatcherEditor addPlugin: self ]
</methods> <methods> Seaside.WADispatcherEditorPlugin class <category>as yet unclassified</category>
editorActionsFor: anEntryPoint inEditor: anEditor (anEntryPoint isApplication and: [ anEntryPoint hasPreferenceGroup: self showForAppWithGroup]) ifFalse: [ ^ #() ]. ^(OrderedCollection new) add: ((Dictionary new) at: #label put: self label; at: #action put: [ anEditor call: (self launch: anEntryPoint) ]; yourself); yourself.
</methods> <methods> Seaside.WADispatcherEditorPlugin class <category>as yet unclassified</category>
launch: anEntryPoint | plugin | plugin := self new application: anEntryPoint. plugin addDecoration: (WAWindowDecoration new title: plugin title; yourself). ^plugin
</methods> <methods> Seaside.WADispatcherEditorPlugin class <category>testing</category>
canBeRoot ^true
</methods> <methods> Seaside.WADispatcherEditorPlugin class <category>accessing</category>
label ^ ''
</methods> <methods> Seaside.WADispatcherEditorPlugin class <category>as yet unclassified</category>
showForAppWithGroup " e.g. for all apps return #general " ^ self label
</methods> <methods> Seaside.WADispatcherViewer class <category>accessing</category>
description ^ 'Dispatcher Browser'
</methods> <methods> Seaside.WADispatcherViewer class <category>initialization</category>
initialize self registerAsApplication: 'browse'. WADispatcher default defaultName: 'browse'
</methods> <methods> Seaside.WADispatcherViewer class <category>testing</category>
isDeployed ^ true
</methods> <methods> Seaside.WADispatcherViewer class <category>testing</category>
canBeRoot ^ true
</methods> <methods> Seaside.WADocumentHandler class <category>public api</category>
document: anObject mimeType: mimeString fileName: fileString ^ self basicNew initializeWithDocument: anObject mimeType: mimeString fileName: fileString
</methods> <methods> Seaside.WADynamicVariable class <category>as yet unclassified</category>
use: anObject during: aBlock ^ aBlock on: self do: [:n | n resume: anObject]
</methods> <methods> Seaside.WADynamicVariable class <category>defaults</category>
defaultValue ^ nil
</methods> <methods> Seaside.WADynamicVariable class <category>evaluating</category>
value ^ self raiseSignal
</methods> <methods> Seaside.WAEditDialog class <category>instance creation</category>
model: anObject ^ self new model: anObject
</methods> <methods> Seaside.WAEntryPoint class <category>instance-creation</category>
named: aString ^ self new setName: aString
</methods> <methods> Seaside.WAEntryPoint class <category>accessing</category>
description ^ nil
</methods> <methods> Seaside.WAEntryPoint class <category>testing</category>
isAbstract ^ self description isNil
</methods> <methods> Seaside.WAEntryPoint class <category>accessing</category>
concreteSubclasses ^ self allSubclasses reject: [ :each | each isAbstract ]
</methods> <methods> Seaside.WAErrorHandler class <category>actions</category>
handleWarning: aWarning ^ self new handleWarning: aWarning
</methods> <methods> Seaside.WAErrorHandler class <category>actions</category>
handleError: anError ^ self new handleError: anError
</methods> <methods> Seaside.WAExampleBrowser class <category>accessing</category>
description ^'Browse through Seaside examples'
</methods> <methods> Seaside.WAExampleBrowser class <category>class initialization</category>
initialize self registerAsApplication: 'examples/examplebrowser'
</methods> <methods> Seaside.WAExampleBrowser class <category>testing</category>
canBeRoot ^ true
</methods> <methods> Seaside.WAExpirySession class <category>class initialization</category>
initialize self resetCounters
</methods> <methods> Seaside.WAExpirySession class <category>accessing</category>
unregistered ^ Unregistered
</methods> <methods> Seaside.WAExpirySession class <category>accessing</category>
created ^ Created
</methods> <methods> Seaside.WAExpirySession class <category>actions</category>
resetCounters Unregistered := 0. Created := 0.
</methods> <methods> Seaside.WAExpiryTest class <category>services</category>
install (self registerAsApplication: 'tests/expiry') preferenceAt: #sessionClass put: WAExpirySession
</methods> <methods> Seaside.WAExternalID class <category>instance creation</category>
new ^ self new: self defaultSize
</methods> <methods> Seaside.WAExternalID class <category>class initialization</category>
initialize "WAExternalID initialize" GeneratorMutex := Semaphore forMutualExclusion. SeasidePlatformSupport addToStartUpList: self. self startUp.
</methods> <methods> Seaside.WAExternalID class <category>instance creation</category>
fromString: aString | id | id := self new: aString size. aString withIndexDo: [ :each :index | id at: index put: each asInteger]. ^ id
</methods> <methods> Seaside.WAExternalID class <category>class initialization</category>
startUp Generator := Random new.
</methods> <methods> Seaside.WAExternalID class <category>instance creation</category>
new: aNumber ^ (self basicNew: aNumber) initialize
</methods> <methods> Seaside.WAExternalID class <category>defaults</category>
defaultSize ^ 8
</methods> <methods> Seaside.WAFileHandler class <category>class initialization</category>
initialize "This is just for the 2.7 version, can be removed later" default := nil
</methods> <methods> Seaside.WAFileHandler class <category>initialization</category>
registerAsHandler: aString ^ WADispatcher default register: (self named: aString)
</methods> <methods> Seaside.WAFileHandler class <category>accessing</category>
description ^ 'Files'
</methods> <methods> Seaside.WAFileHandler class <category>testing</category>
isAbstract ^ false
</methods> <methods> Seaside.WAFileHandler class <category>accessing</category>
default ^ default ifNil: [ default := self registerAsHandler: 'files' ]
</methods> <methods> Seaside.WAFileLibrary class <category>convenience</category>
unregister "no longer used"
</methods> <methods> Seaside.WAFileLibrary class <category>class initialization</category>
initialize "self initialize" MimeTypes := Dictionary new. 1 to: self defaultMimeTypes size by: 2 do: [ :index | MimeTypes at: (self defaultMimeTypes at: index) put: (self defaultMimeTypes at: index + 1) ]
</methods> <methods> Seaside.WAFileLibrary class <category>adding-files</category>
addAllFilesIn: aPathString "adds all files in the directory specified by aPathString to the current file library" (SeasidePlatformSupport filesIn: aPathString) do: [:each | [self addFileAt: each] on: Error do: [:ex |]]
</methods> <methods> Seaside.WAFileLibrary class <category>accessing</category>
mimetypeFor: aString ^ self mimetypes at: aString ifAbsent: [ self defaultMimeType ]
</methods> <methods> Seaside.WAFileLibrary class <category>private</category>
compileMimeDatabaseString self class compile: self createMimeDatabaseString classified: 'accessing-defaults'
</methods> <methods> Seaside.WAFileLibrary class <category>private</category>
isBinary: aFilename | tokens type subTypes | tokens := (self mimetypeFor: (aFilename copyAfterLast: $.)) findTokens: '/'. type := tokens first. type = 'text' ifTrue: [^false]. type = 'application' ifFalse: [^true]. tokens size = 1 ifTrue: [^true]. subTypes := tokens second findTokens: '+'. ^ subTypes noneSatisfy: [:each | #('x-javascript' 'xml' 'xhtml') includes: each]
</methods> <methods> Seaside.WAFileLibrary class <category>convenience</category>
/ aSymbol ^self urlOf: aSymbol
</methods> <methods> Seaside.WAFileLibrary class <category>adding-files</category>
addFileAt: aPath "adds the file specified by aFilename to the current file library" self addFileAt: aPath contents: (SeasidePlatformSupport contentsOfFile: aPath binary: (self isBinaryAt: aPath))
</methods> <methods> Seaside.WAFileLibrary class <category>private</category>
readMimeDatabase "reads /etc/mime.types for mime types" "self readMimeDatabase" | stream content types tokens value keys | stream := CrLfFileStream readOnlyFileNamed: '/etc/mime.types'. content := [ stream contentsOfEntireFile ] ensure: [ stream close ]. types := Dictionary new. content linesDo: [ :each | (each isEmpty or: [ each first = $# ]) ifFalse: [ tokens := each findTokens: String tab. tokens size > 1 ifTrue: [ value := tokens first. keys := tokens second findTokens: ' '. keys do: [ :key | types at: key put: value ] ] ] ]. ^types
</methods> <methods> Seaside.WAFileLibrary class <category>convenience</category>
urlOf: aSymbol ^self new urlOf: aSymbol
</methods> <methods> Seaside.WAFileLibrary class <category>vw port-squeak</category>
adjustForVisualWorks | newSource oldSource badCode goodCode | badCode := 'xxxCache := #(nil).'. goodCode := 'xxxCache := #(nil) beMutable.'. self selectors do: [:selector | oldSource := self sourceCodeAt: selector. (oldSource indexOfSubCollection: badCode startingAt: 1) > 0 ifTrue: [newSource := oldSource copyReplaceAll: badCode with: goodCode. self compile: newSource classified: self methodCategory]].
</methods> <methods> Seaside.WAFileLibrary class <category>convenience</category>
register "no longer needed left in so that code can still be loaded since it is sent in class side initialize methods"
</methods> <methods> Seaside.WAFileLibrary class <category>private</category>
compileBinary: aByteArrayOrString selector: aSymbol "compiles aByteArrayOrString into a method named aSymbol that returns aByteArrayOrString as a byte array" | code | code := SeasidePlatformSupport asMethodReturningByteArray: aByteArrayOrString named: aSymbol. SeasidePlatformSupport compile: code into: self classified: self methodCategory
</methods> <methods> Seaside.WAFileLibrary class <category>accessing-defaults</category>
defaultMimeTypes ^ #( '%' 'application/x-trash' '323' 'text/h323' 'abw' 'application/x-abiword' 'ai' 'application/postscript' 'aif' 'audio/x-aiff' 'aifc' 'audio/x-aiff' 'aiff' 'audio/x-aiff' 'alc' 'chemical/x-alchemy' 'art' 'image/x-jg' 'asc' 'text/plain' 'asf' 'video/x-ms-asf' 'asn' 'chemical/x-ncbi-asn1-spec' 'aso' 'chemical/x-ncbi-asn1-binary' 'asx' 'video/x-ms-asf' 'au' 'audio/basic' 'avi' 'video/x-msvideo' 'b' 'chemical/x-molconn-Z' 'bak' 'application/x-trash' 'bat' 'application/x-msdos-program' 'bcpio' 'application/x-bcpio' 'bib' 'text/x-bibtex' 'bin' 'application/octet-stream' 'bmp' 'image/x-ms-bmp' 'book' 'application/x-maker' 'bsd' 'chemical/x-crossfire' 'c' 'text/x-csrc' 'c++' 'text/x-c++src' 'c3d' 'chemical/x-chem3d' 'cac' 'chemical/x-cache' 'cache' 'chemical/x-cache' 'cascii' 'chemical/x-cactvs-binary' 'cat' 'application/vnd.ms-pki.seccat' 'cbin' 'chemical/x-cactvs-binary' 'cc' 'text/x-c++src' 'cdf' 'application/x-cdf' 'cdr' 'image/x-coreldraw' 'cdt' 'image/x-coreldrawtemplate' 'cdx' 'chemical/x-cdx' 'cdy' 'application/vnd.cinderella' 'cef' 'chemical/x-cxf' 'cer' 'chemical/x-cerius' 'chm' 'chemical/x-chemdraw' 'chrt' 'application/x-kchart' 'cif' 'chemical/x-cif' 'class' 'application/java-vm' 'cls' 'text/x-tex' 'cmdf' 'chemical/x-cmdf' 'cml' 'chemical/x-cml' 'cod' 'application/vnd.rim.cod' 'com' 'application/x-msdos-program' 'cpa' 'chemical/x-compass' 'cpio' 'application/x-cpio' 'cpp' 'text/x-c++src' 'cpt' 'image/x-corelphotopaint' 'crl' 'application/x-pkcs7-crl' 'crt' 'application/x-x509-ca-cert' 'csf' 'chemical/x-cache-csf' 'csh' 'text/x-csh' 'csm' 'chemical/x-csml' 'csml' 'chemical/x-csml' 'css' 'text/css' 'csv' 'text/comma-separated-values' 'ctab' 'chemical/x-cactvs-binary' 'ctx' 'chemical/x-ctx' 'cu' 'application/cu-seeme' 'cub' 'chemical/x-gaussian-cube' 'cxf' 'chemical/x-cxf' 'cxx' 'text/x-c++src' 'dat' 'chemical/x-mopac-input' 'dcr' 'application/x-director' 'deb' 'application/x-debian-package' 'dif' 'video/dv' 'diff' 'text/plain' 'dir' 'application/x-director' 'djv' 'image/vnd.djvu' 'djvu' 'image/vnd.djvu' 'dl' 'video/dl' 'dll' 'application/x-msdos-program' 'dmg' 'application/x-apple-diskimage' 'dms' 'application/x-dms' 'doc' 'application/msword' 'dot' 'application/msword' 'dv' 'video/dv' 'dvi' 'application/x-dvi' 'dx' 'chemical/x-jcamp-dx' 'dxr' 'application/x-director' 'emb' 'chemical/x-embl-dl-nucleotide' 'embl' 'chemical/x-embl-dl-nucleotide' 'ent' 'chemical/x-pdb' 'eps' 'application/postscript' 'etx' 'text/x-setext' 'exe' 'application/x-msdos-program' 'ez' 'application/andrew-inset' 'fb' 'application/x-maker' 'fbdoc' 'application/x-maker' 'fch' 'chemical/x-gaussian-checkpoint' 'fchk' 'chemical/x-gaussian-checkpoint' 'fig' 'application/x-xfig' 'flac' 'application/x-flac' 'fli' 'video/fli' 'fm' 'application/x-maker' 'frame' 'application/x-maker' 'frm' 'application/x-maker' 'gal' 'chemical/x-gaussian-log' 'gam' 'chemical/x-gamess-input' 'gamin' 'chemical/x-gamess-input' 'gau' 'chemical/x-gaussian-input' 'gcd' 'text/x-pcs-gcd' 'gcf' 'application/x-graphing-calculator' 'gcg' 'chemical/x-gcg8-sequence' 'gen' 'chemical/x-genbank' 'gf' 'application/x-tex-gf' 'gif' 'image/gif' 'gjc' 'chemical/x-gaussian-input' 'gjf' 'chemical/x-gaussian-input' 'gl' 'video/gl' 'gnumeric' 'application/x-gnumeric' 'gpt' 'chemical/x-mopac-graph' 'gsf' 'application/x-font' 'gsm' 'audio/x-gsm' 'gtar' 'application/x-gtar' 'h' 'text/x-chdr' 'h++' 'text/x-c++hdr' 'hdf' 'application/x-hdf' 'hh' 'text/x-c++hdr' 'hin' 'chemical/x-hin' 'hpp' 'text/x-c++hdr' 'hqx' 'application/mac-binhex40' 'hs' 'text/x-haskell' 'hta' 'application/hta' 'htc' 'text/x-component' 'htm' 'text/html' 'html' 'text/html' 'hxx' 'text/x-c++hdr' 'ica' 'application/x-ica' 'ice' 'x-conference/x-cooltalk' 'ico' 'image/x-icon' 'ics' 'text/calendar' 'icz' 'text/calendar' 'ief' 'image/ief' 'iges' 'model/iges' 'igs' 'model/iges' 'iii' 'application/x-iphone' 'inp' 'chemical/x-gamess-input' 'ins' 'application/x-internet-signup' 'iso' 'application/x-iso9660-image' 'isp' 'application/x-internet-signup' 'ist' 'chemical/x-isostar' 'istr' 'chemical/x-isostar' 'jad' 'text/vnd.sun.j2me.app-descriptor' 'jar' 'application/java-archive' 'java' 'text/x-java' 'jdx' 'chemical/x-jcamp-dx' 'jmz' 'application/x-jmol' 'jng' 'image/x-jng' 'jnlp' 'application/x-java-jnlp-file' 'jpe' 'image/jpeg' 'jpeg' 'image/jpeg' 'jpg' 'image/jpeg' 'js' 'application/x-javascript' 'kar' 'audio/midi' 'key' 'application/pgp-keys' 'kil' 'application/x-killustrator' 'kin' 'chemical/x-kinemage' 'kpr' 'application/x-kpresenter' 'kpt' 'application/x-kpresenter' 'ksp' 'application/x-kspread' 'kwd' 'application/x-kword' 'kwt' 'application/x-kword' 'latex' 'application/x-latex' 'lha' 'application/x-lha' 'lhs' 'text/x-literate-haskell' 'lsf' 'video/x-la-asf' 'lsx' 'video/x-la-asf' 'ltx' 'text/x-tex' 'lzh' 'application/x-lzh' 'lzx' 'application/x-lzx' 'm3u' 'audio/x-mpegurl' 'm4a' 'audio/mpeg' 'maker' 'application/x-maker' 'man' 'application/x-troff-man' 'mcif' 'chemical/x-mmcif' 'mcm' 'chemical/x-macmolecule' 'mdb' 'application/msaccess' 'me' 'application/x-troff-me' 'mesh' 'model/mesh' 'mid' 'audio/midi' 'midi' 'audio/midi' 'mif' 'application/x-mif' 'mm' 'application/x-freemind' 'mmd' 'chemical/x-macromodel-input' 'mmf' 'application/vnd.smaf' 'mml' 'text/mathml' 'mmod' 'chemical/x-macromodel-input' 'mng' 'video/x-mng' 'moc' 'text/x-moc' 'mol' 'chemical/x-mdl-molfile' 'mol2' 'chemical/x-mol2' 'moo' 'chemical/x-mopac-out' 'mop' 'chemical/x-mopac-input' 'mopcrt' 'chemical/x-mopac-input' 'mov' 'video/quicktime' 'movie' 'video/x-sgi-movie' 'mp2' 'audio/mpeg' 'mp3' 'audio/mpeg' 'mp4' 'video/mp4' 'mpc' 'chemical/x-mopac-input' 'mpe' 'video/mpeg' 'mpeg' 'video/mpeg' 'mpega' 'audio/mpeg' 'mpg' 'video/mpeg' 'mpga' 'audio/mpeg' 'ms' 'application/x-troff-ms' 'msh' 'model/mesh' 'msi' 'application/x-msi' 'mvb' 'chemical/x-mopac-vib' 'mxu' 'video/vnd.mpegurl' 'nb' 'application/mathematica' 'nc' 'application/x-netcdf' 'nwc' 'application/x-nwc' 'o' 'application/x-object' 'oda' 'application/oda' 'odb' 'application/vnd.oasis.opendocument.database' 'odc' 'application/vnd.oasis.opendocument.chart' 'odf' 'application/vnd.oasis.opendocument.formula' 'odg' 'application/vnd.oasis.opendocument.graphics' 'odi' 'application/vnd.oasis.opendocument.image' 'odm' 'application/vnd.oasis.opendocument.text-master' 'odp' 'application/vnd.oasis.opendocument.presentation' 'ods' 'application/vnd.oasis.opendocument.spreadsheet' 'odt' 'application/vnd.oasis.opendocument.text' 'ogg' 'application/ogg' 'old' 'application/x-trash' 'oth' 'application/vnd.oasis.opendocument.text-web' 'oza' 'application/x-oz-application' 'p' 'text/x-pascal' 'p7r' 'application/x-pkcs7-certreqresp' 'pac' 'application/x-ns-proxy-autoconfig' 'pas' 'text/x-pascal' 'pat' 'image/x-coreldrawpattern' 'pbm' 'image/x-portable-bitmap' 'pcf' 'application/x-font' 'pcf.Z' 'application/x-font' 'pcx' 'image/pcx' 'pdb' 'chemical/x-pdb' 'pdf' 'application/pdf' 'pfa' 'application/x-font' 'pfb' 'application/x-font' 'pgm' 'image/x-portable-graymap' 'pgn' 'application/x-chess-pgn' 'pgp' 'application/pgp-signature' 'pk' 'application/x-tex-pk' 'pl' 'text/x-perl' 'pls' 'audio/x-scpls' 'pm' 'text/x-perl' 'png' 'image/png' 'pnm' 'image/x-portable-anymap' 'pot' 'text/plain' 'ppm' 'image/x-portable-pixmap' 'pps' 'application/vnd.ms-powerpoint' 'ppt' 'application/vnd.ms-powerpoint' 'prf' 'application/pics-rules' 'prt' 'chemical/x-ncbi-asn1-ascii' 'ps' 'application/postscript' 'psd' 'image/x-photoshop' 'psp' 'text/x-psp' 'py' 'text/x-python' 'pyc' 'application/x-python-code' 'pyo' 'application/x-python-code' 'qt' 'video/quicktime' 'qtl' 'application/x-quicktimeplayer' 'ra' 'audio/x-realaudio' 'ram' 'audio/x-pn-realaudio' 'rar' 'application/rar' 'ras' 'image/x-cmu-raster' 'rd' 'chemical/x-mdl-rdfile' 'rdf' 'application/rdf+xml' 'rgb' 'image/x-rgb' 'rm' 'audio/x-pn-realaudio' 'roff' 'application/x-troff' 'ros' 'chemical/x-rosdal' 'rpm' 'application/x-redhat-package-manager' 'rss' 'application/rss+xml' 'rtf' 'text/rtf' 'rtx' 'text/richtext' 'rxn' 'chemical/x-mdl-rxnfile' 'sct' 'text/scriptlet' 'sd' 'chemical/x-mdl-sdfile' 'sd2' 'audio/x-sd2' 'sda' 'application/vnd.stardivision.draw' 'sdc' 'application/vnd.stardivision.calc' 'sdd' 'application/vnd.stardivision.impress' 'sdf' 'chemical/x-mdl-sdfile' 'sdp' 'application/vnd.stardivision.impress' 'sdw' 'application/vnd.stardivision.writer' 'ser' 'application/java-serialized-object' 'sgf' 'application/x-go-sgf' 'sgl' 'application/vnd.stardivision.writer-global' 'sh' 'text/x-sh' 'shar' 'application/x-shar' 'shtml' 'text/html' 'sid' 'audio/prs.sid' 'sik' 'application/x-trash' 'silo' 'model/mesh' 'sis' 'application/vnd.symbian.install' 'sit' 'application/x-stuffit' 'skd' 'application/x-koan' 'skm' 'application/x-koan' 'skp' 'application/x-koan' 'skt' 'application/x-koan' 'smf' 'application/vnd.stardivision.math' 'smi' 'application/smil' 'smil' 'application/smil' 'snd' 'audio/basic' 'spc' 'chemical/x-galactic-spc' 'spl' 'application/x-futuresplash' 'src' 'application/x-wais-source' 'stc' 'application/vnd.sun.xml.calc.template' 'std' 'application/vnd.sun.xml.draw.template' 'sti' 'application/vnd.sun.xml.impress.template' 'stl' 'application/vnd.ms-pki.stl' 'stw' 'application/vnd.sun.xml.writer.template' 'sty' 'text/x-tex' 'sv4cpio' 'application/x-sv4cpio' 'sv4crc' 'application/x-sv4crc' 'svg' 'image/svg+xml' 'svgz' 'image/svg+xml' 'sw' 'chemical/x-swissprot' 'swf' 'application/x-shockwave-flash' 'swfl' 'application/x-shockwave-flash' 'sxc' 'application/vnd.sun.xml.calc' 'sxd' 'application/vnd.sun.xml.draw' 'sxg' 'application/vnd.sun.xml.writer.global' 'sxi' 'application/vnd.sun.xml.impress' 'sxm' 'application/vnd.sun.xml.math' 'sxw' 'application/vnd.sun.xml.writer' 't' 'application/x-troff' 'tar' 'application/x-tar' 'taz' 'application/x-gtar' 'tcl' 'text/x-tcl' 'tex' 'text/x-tex' 'texi' 'application/x-texinfo' 'texinfo' 'application/x-texinfo' 'text' 'text/plain' 'tgf' 'chemical/x-mdl-tgf' 'tgz' 'application/x-gtar' 'tif' 'image/tiff' 'tiff' 'image/tiff' 'tk' 'text/x-tcl' 'tm' 'text/texmacs' 'torrent' 'application/x-bittorrent' 'tr' 'application/x-troff' 'ts' 'text/texmacs' 'tsp' 'application/dsptype' 'tsv' 'text/tab-separated-values' 'txt' 'text/plain' 'udeb' 'application/x-debian-package' 'uls' 'text/iuls' 'ustar' 'application/x-ustar' 'val' 'chemical/x-ncbi-asn1-binary' 'vcd' 'application/x-cdlink' 'vcf' 'text/x-vcard' 'vcs' 'text/x-vcalendar' 'vmd' 'chemical/x-vmd' 'vms' 'chemical/x-vamas-iso14976' 'vor' 'application/vnd.stardivision.writer' 'vrm' 'x-world/x-vrml' 'vrml' 'x-world/x-vrml' 'vsd' 'application/vnd.visio' 'wad' 'application/x-doom' 'wav' 'audio/x-wav' 'wax' 'audio/x-ms-wax' 'wbmp' 'image/vnd.wap.wbmp' 'wbxml' 'application/vnd.wap.wbxml' 'wk' 'application/x-123' 'wm' 'video/x-ms-wm' 'wma' 'audio/x-ms-wma' 'wmd' 'application/x-ms-wmd' 'wml' 'text/vnd.wap.wml' 'wmlc' 'application/vnd.wap.wmlc' 'wmls' 'text/vnd.wap.wmlscript' 'wmlsc' 'application/vnd.wap.wmlscriptc' 'wmv' 'video/x-ms-wmv' 'wmx' 'video/x-ms-wmx' 'wmz' 'application/x-ms-wmz' 'wp5' 'application/wordperfect5.1' 'wpd' 'application/wordperfect' 'wrl' 'x-world/x-vrml' 'wsc' 'text/scriptlet' 'wvx' 'video/x-ms-wvx' 'wz' 'application/x-wingz' 'xbm' 'image/x-xbitmap' 'xcf' 'application/x-xcf' 'xht' 'application/xhtml+xml' 'xhtml' 'application/xhtml+xml' 'xlb' 'application/vnd.ms-excel' 'xls' 'application/vnd.ms-excel' 'xlt' 'application/vnd.ms-excel' 'xml' 'application/xml' 'xpi' 'application/x-xpinstall' 'xpm' 'image/x-xpixmap' 'xsl' 'application/xml' 'xtel' 'chemical/x-xtel' 'xul' 'application/vnd.mozilla.xul+xml' 'xwd' 'image/x-xwindowdump' 'xyz' 'chemical/x-xyz' 'zip' 'application/zip' 'zmt' 'chemical/x-mopac-input' '~' 'application/x-trash' )
</methods> <methods> Seaside.WAFileLibrary class <category>accessing-defaults</category>
defaultMimeType ^ 'application/octet-stream'
</methods> <methods> Seaside.WAFileLibrary class <category>private</category>
asSelector: aFilename | mainPart extension | mainPart := (aFilename copyUpToLast: $.) reject: [:each | each isAlphaNumeric not]. [mainPart first isDigit] whileTrue: [mainPart := mainPart allButFirst]. extension := (aFilename copyAfterLast: $.) asLowercase capitalized. ^ (mainPart , extension) asSymbol
</methods> <methods> Seaside.WAFileLibrary class <category>private</category>
addFileNamed: aFilename contents: aByteArrayOrString | selector | selector := self asSelector: aFilename. (self isBinary: aFilename) ifTrue: [ self compileBinary: aByteArrayOrString selector: selector ] ifFalse: [ self compileText: aByteArrayOrString selector: selector ]
</methods> <methods> Seaside.WAFileLibrary class <category>instance-creation</category>
default ^ default ifNil: [ default := self new ]
</methods> <methods> Seaside.WAFileLibrary class <category>accessing</category>
mimetypes ^ MimeTypes
</methods> <methods> Seaside.WAFileLibrary class <category>private</category>
methodCategory "the method category for uploaded files" ^#uploaded
</methods> <methods> Seaside.WAFileLibrary class <category>private</category>
compileText: aByteArrayOrString selector: aSymbol "Compiles aByteArrayOrString into a method named aSymbol that returns aByteArrayOrString as a string literal. aSymbol ^ aByteArrayOrString" | code | code := String streamContents: [ :stream | stream nextPutAll: aSymbol; cr. stream tab; nextPutAll: '^ '''. aByteArrayOrString asString do: [ :each | each = $' ifTrue: [ stream nextPut: $' ]. stream nextPut: each ]. stream nextPutAll: '''' ]. SeasidePlatformSupport compile: code into: self classified: self methodCategory
</methods> <methods> Seaside.WAFileLibrary class <category>private</category>
createMimeDatabaseString "Teads /etc/mime.types for mime types and creates the #defaultMimeTypes method. You should not execute this method. If you still do it remember to send #initialize." ^ String streamContents: [:stream | | database | stream nextPutAll: 'defaultMimeTypes ^ #( '. database := self readMimeDatabase. database keysSortedSafely do: [:key | stream nextPut: Character tab; nextPut: Character tab; print: key; space; print: (database at: key); cr]. stream nextPutAll: ' )']
</methods> <methods> Seaside.WAFileLibrary class <category>private</category>
isBinaryAt: aPath ^self isBinary: (SeasidePlatformSupport localNameOf: aPath)
</methods> <methods> Seaside.WAFileLibrary class <category>private</category>
addFileAt: aPath contents: aByteArrayOrString self addFileNamed: (SeasidePlatformSupport localNameOf: aPath) contents: aByteArrayOrString
</methods> <methods> Seaside.WAFileLibraryExample class <category>testing</category>
description ^'A component with a static stylesheet and a static background image'
</methods> <methods> Seaside.WAFileLibraryExample class <category>testing</category>
example ^self new
</methods> <methods> Seaside.WAFileLibraryExample class <category>testing</category>
canBeRoot ^true
</methods> <methods> Seaside.WAFrameComponent class <category>instance creation</category>
on: aComponent ^ self new contents: aComponent
</methods> <methods> Seaside.WAGenericTag class <category>instance creation</category>
tag: aString ^ self new initializeWithTag: aString
</methods> <methods> Seaside.WAGlobalConfiguration class <category>initialization</category>
initialize DeploymentMode ifNil: [self setDevelopmentMode]
</methods> <methods> Seaside.WAGlobalConfiguration class <category>configuration</category>
setDevelopmentMode DeploymentMode := false
</methods> <methods> Seaside.WAGlobalConfiguration class <category>configuration</category>
setDeploymentMode DeploymentMode := true
</methods> <methods> Seaside.WAHalo class <category>class initialization</category>
initialize Halos := SeasidePlatformSupport weakDictionaryOfSize: 20.
</methods> <methods> Seaside.WAHalo class <category>plugins</category>
haloElementsFor: aTarget inHalo: aHalo ^OrderedCollection new add: ((Dictionary new) at: #image put: (WAStandardFiles urlOf: #haloDebugGif); at: #action put: [WABrowser fullOnClass: aTarget class]; at: #title put: 'System Browser'; yourself); add: ((Dictionary new) at: #image put: (WAStandardFiles urlOf: #haloViewGif); at: #action put: [WAInspector on: aTarget]; at: #title put: 'Inspector'; yourself); add: ((Dictionary new) at: #image put: (WAStandardFiles urlOf: #haloPaintGif); at: #action put: [WAViewer on: aTarget]; at: #title put: 'Style Editor'; yourself); yourself
</methods> <methods> Seaside.WAHalo class <category>plugins</category>
standardPlugins ^OrderedCollection with: self
</methods> <methods> Seaside.WAHalo class <category>plugins</category>
haloImageLinksFor: aTarget inHalo: aHalo | actions | "Answer an OrderedCollection of dictionaries" actions := OrderedCollection new. self plugins do: [:each | actions addAll: (each haloElementsFor: aTarget inHalo: aHalo)]. ^actions.
</methods> <methods> Seaside.WAHalo class <category>plugins</category>
plugins ^plugins ifNil: [plugins := self standardPlugins].
</methods> <methods> Seaside.WAHalo class <category>instance-creation</category>
for: aComponent ^ Halos at: aComponent ifAbsentPut: [self new target: aComponent]
</methods> <methods> Seaside.WAHalo class <category>plugins</category>
addPlugin: aClass (self plugins includes: aClass) ifFalse: [self plugins add: aClass]
</methods> <methods> Seaside.WAHtmlBuilder class <category>instance creation</category>
on: aDocument ^ self new document: aDocument
</methods> <methods> Seaside.WAHtmlCanvas class <category>code generation</category>
generatedCategory ^ 'html-generated'
</methods> <methods> Seaside.WAHtmlCanvas class <category>code generation</category>
generateTags "((( WAHtmlCanvas generateTags )))" self tags do: [:spec | self generateUnaryFor: spec. self generateBinaryFor: spec].
</methods> <methods> Seaside.WAHtmlCanvas class <category>accessing</category>
tags " self generateTags " ^ #( ('a' anchor) ('iframe' iframe) ('canvas' canvas canvas:) ('h1' heading) ('p' paragraph paragraph:) ('div' div div:) ('span' span span:) ('blockquote' blockquote blockquote:) ('address' address address:) ('dd' definitionData definitionData:) ('dl' definitionList definitionList:) ('dt' definitionTerm definitionTerm:) ('code' code code:) ('pre' preformatted preformatted:) ('em' emphasis emphasis:) ('small' small small:) ('big' big big:) ('strong' strong strong:) ('label' label label:) ('legend' legend legend:) ('fieldset' fieldSet fieldSet:) ('abbr' abbreviated abbreviated:) ('acronym' acronym acronym:) ('code' code code:) ('cite' citation citation:) ('dfn' definition definition:) ('samp' sampleOutput sampleOutput:) ('kbd' keyboardInput keyboardInput:) ('q' quote quote:) ('var' variable variable:) ('ul' unorderedList unorderedList:) ('ol' orderedList orderedList:) ('li' listItem listItem:) ('br' break) ('hr' horizontalRule) ('form' form form:) ('img' image image:) ('table' table table:) ('th' tableHeading tableHeading:) ('tr' tableRow tableRow:) ('td' tableData tableData:) ('tbody' tableBody tableBody:) ('thead' tableHead tableHead:) ('tfoot' tableFoot tableFoot:) ('col' tableColumn tableColumn:) ('colgroup' tableColumnGroup tableColumnGroup:) ('caption' tableCaption tableCaption:) ('script' script script:) ('ruby' ruby ruby:) ('rbc' rubyBaseContainer rubyBaseContainer:) ('rtc' rubyTextContainer rubyTextContainer:) ('rb' rubyBase rubyBase:) ('rt' rubyText rubyText:) ('rp' rubyParentheses rubyParentheses:) ('object' object object:) ('param' parameter parameter:) )
</methods> <methods> Seaside.WAHtmlCanvas class <category>code generation</category>
generateBinaryFor: aCollection (aCollection size = 3 and: [(self includesSelector: aCollection third) not]) ifTrue: [self compile: aCollection third, ' aBlock self ', aCollection second, ' with: aBlock' classified: self generatedCategory].
</methods> <methods> Seaside.WAHtmlCanvas class <category>code generation</category>
generateUnaryFor: aCollection (self includesSelector: aCollection second) ifFalse: [self compile: aCollection second, ' ^ self ', (self patternFor: aCollection first) classified: self generatedCategory]
</methods> <methods> Seaside.WAHtmlCanvas class <category>code generation</category>
patternFor: aString WATagBrush allSubclassesDo: [:each | each tag = aString ifTrue: [^ 'brush: ', each name, ' new']]. ^ 'tag: ', aString printString
</methods> <methods> Seaside.WAHtmlDocument class <category>instance creation</category>
root: anHtmlRoot ^ self basicNew initializeWithRoot: anHtmlRoot
</methods> <methods> Seaside.WAHtmlDocument class <category>instance creation</category>
new ^ self root: self newRoot
</methods> <methods> Seaside.WAHtmlDocument class <category>instance creation</category>
rootClass ^ WAHtmlRoot
</methods> <methods> Seaside.WAHtmlDocument class <category>instance creation</category>
newRoot ^ self rootClass new
</methods> <methods> Seaside.WAHtmlElement class <category>as yet unclassified</category>
named: aString ^ self named: aString attributes: (WAHtmlAttributes new)
</methods> <methods> Seaside.WAHtmlElement class <category>as yet unclassified</category>
named: aString attributes: anAttributes ^ self new initializeWithName: aString attributes: anAttributes
</methods> <methods> Seaside.WAHtmlRenderer class <category>instance creation</category>
context: aRenderingContext callbacks: aCallbackStore ^ self basicNew initializeWithContext: aRenderingContext callbacks: aCallbackStore
</methods> <methods> Seaside.WAHtmlRoot class <category>instance creation</category>
new ^ self basicNew initialize
</methods> <methods> Seaside.WAInputTest class <category>accessing</category>
example ^ self new
</methods> <methods> Seaside.WAInputTest class <category>accessing</category>
description ^'Various XHTML form input elements'
</methods> <methods> Seaside.WAInspector class <category>instance creation</category>
on: anObject ^ self new object: anObject
</methods> <methods> Seaside.WALRUCache class <category>instance creation</category>
new ^ self basicNew initialize
</methods> <methods> Seaside.WALRUCache class <category>instance creation</category>
new: max ^ self new capacity: max
</methods> <methods> Seaside.WAMiniCalendar class <category>accessing</category>
example ^self new
</methods> <methods> Seaside.WAMiniCalendar class <category>testing</category>
canBeRoot ^ true
</methods> <methods> Seaside.WAModelProxy class <category>instance creation</category>
on: anObject ^ self new setModel: anObject
</methods> <methods> Seaside.WAMultiCounter class <category>accessing</category>
description ^'Multiple Seaside components on one page'
</methods> <methods> Seaside.WAMultiCounter class <category>initialization</category>
initialize self registerAsApplication: 'examples/multicounter'
</methods> <methods> Seaside.WAMultiCounter class <category>testing</category>
canBeRoot ^true
</methods> <methods> Seaside.WAOldApiInputTest class <category>example</category>
example ^ self new
</methods> <methods> Seaside.WAOpeningConditionalComment class <category>instance creation</category>
condition: aString ^self new condition: aString; yourself
</methods> <methods> Seaside.WAPath class <category>example</category>
example ^self new pushSegment: 123 name: 'xxx'; pushSegment: 456 name: 'yyy'; pushSegment: 789 name: 'zzz'; yourself.
</methods> <methods> Seaside.WAPluggableSelectBox class <category>instance creation</category>
on: anObject list: listSelector selected: selectedSelector changeSelected: changeSelectedSelector ^ self on: anObject list: listSelector selected: selectedSelector changeSelected: changeSelectedSelector size: 10
</methods> <methods> Seaside.WAPluggableSelectBox class <category>instance creation</category>
on: anObject list: listSelector selected: selectedSelector changeSelected: changeSelectedSelector size: aNumber ^ self new model: anObject; list: listSelector; selected: selectedSelector; changeSelected: changeSelectedSelector; size: aNumber; yourself
</methods> <methods> Seaside.WAPresenter class <category>instance creation</category>
new ^ self basicNew initialize
</methods> <methods> Seaside.WAPrettyPrintedDocument class <category>as yet unclassified</category>
renderer: aRenderer ^ self basicNew initializeWithRenderer: aRenderer
</methods> <methods> Seaside.WAProcessMonitor class <category>instance creation</category>
new ^ self basicNew initialize
</methods> <methods> Seaside.WAProfiler class <category>accessing</category>
title ^ 'Profiler'
</methods> <methods> Seaside.WARadioGroup class <category>accessing</category>
canvas: aRenderCanvas ^ self basicNew initializeWithCanvas: aRenderCanvas
</methods> <methods> Seaside.WARegistry class <category>initialization</category>
clearAllHandlers self allSubInstances do: [:ea | ea clearHandlers]
</methods> <methods> Seaside.WARenderCanvas class <category>as yet unclassified</category>
context: aRenderingContext callbacks: aCallbackStore ^ self basicNew initializeWithContext: aRenderingContext callbacks: aCallbackStore
</methods> <methods> Seaside.WARenderCanvasForTest class <category>instance creation</category>
new | context doc callbacks | context := WARenderingContext new. doc := (WAHtmlTestDocument new) initializeWithRoot: (WARenderedHtmlRoot context: context); setStateToBody; yourself. context document: doc. context actionUrl: WAUrl new. callbacks := WACallbackRegistry context: context owner: nil. ^self context: context callbacks: callbacks
</methods> <methods> Seaside.WARenderedHtmlRoot class <category>accessing</category>
context: aRenderingContext ^ self basicNew initializeWithContext: aRenderingContext
</methods> <methods> Seaside.WARenderingContext class <category>instance creation</category>
new ^ self basicNew initialize
</methods> <methods> Seaside.WAReportColumn class <category>instance creation</category>
selector: aSymbol title: aString onClick: aBlock ^ self new title: aString; selector: aSymbol; clickBlock: aBlock; yourself
</methods> <methods> Seaside.WAReportColumn class <category>instance creation</category>
new ^ self basicNew initialize
</methods> <methods> Seaside.WAReportColumn class <category>instance creation</category>
selector: aSymbol ^ self selector: aSymbol title: aSymbol capitalized
</methods> <methods> Seaside.WAReportColumn class <category>instance creation</category>
selector: aSymbol title: aString ^ self selector: aSymbol title: aString onClick: nil
</methods> <methods> Seaside.WAReportColumn class <category>instance creation</category>
renderBlock: aBlock title: aString ^ self new title: aString; valueBlock: aBlock; yourself
</methods> <methods> Seaside.WARequest class <category>as yet unclassified</category>
method: methodString url: urlString headers: headDict fields: fieldDict cookies: cookieDict nativeRequest: anObject ^ (self method: methodString url: urlString headers: headDict fields: fieldDict cookies: cookieDict) nativeRequest: anObject; yourself
</methods> <methods> Seaside.WARequest class <category>as yet unclassified</category>
blankRequest ^ self method: 'GET' url: '' headers: Dictionary new fields: Dictionary new cookies: Dictionary new
</methods> <methods> Seaside.WARequest class <category>as yet unclassified</category>
method: methodString url: urlString headers: headDict fields: fieldDict cookies: cookieDict ^ self new setMethod: methodString url: urlString headers: headDict fields: fieldDict cookies: cookieDict
</methods> <methods> Seaside.WARequestHandler class <category>instance-creation</category>
new ^ self basicNew initialize
</methods> <methods> Seaside.WAResponse class <category>public api</category>
updateRoot: rootBlock render: renderBlock | root | root := WAHtmlRoot new. rootBlock value: root. ^ self root: root render: renderBlock
</methods> <methods> Seaside.WAResponse class <category>instance creation</category>
refreshWithMessage: aString location: locationString delay: aNumber ^ self new nextPutAll: ('<html> <head> <meta http-equiv="refresh" content="',aNumber displayString,';URL=',locationString,'"> <title>',aString,'</title> </head> <body> <h1>',aString,'</h1> You are being redirected to <a href="',locationString,'">',locationString,'</a> </body> </html>'); yourself
</methods> <methods> Seaside.WAResponse class <category>instance creation</category>
root: anHtmlRoot render: renderBlock | canvas | canvas := WAStaticHtmlCanvas root: anHtmlRoot. renderBlock value: canvas. ^ self new nextPutAll: canvas document stream contents
</methods> <methods> Seaside.WAResponse class <category>responding</category>
redirectTo: locationString ^ self new redirectTo: locationString
</methods> <methods> Seaside.WAResponse class <category>instance creation</category>
internalError: anError | response | response := self new internalError. response nextPutAll: '<h1> Internal Error</h1>'; nextPutAll: '<h2>'; nextPutAll: anError displayString; nextPutAll: '</h2>'. (SeasidePlatformSupport walkbackStringsFor: anError) do: [:eachLine | response nextPutAll: '<br>'; nextPutAll: eachLine]. ^ response
</methods> <methods> Seaside.WAResponse class <category>instance creation</category>
notFound: locationString ^ self new notFound; nextPutAll: '<h1> Error: "', locationString, '" not found. </h1>'; yourself
</methods> <methods> Seaside.WAResponse class <category>defaults</category>
defaultValueForContentType ^'text/html; ' , self defaultValueForCharSet
</methods> <methods> Seaside.WAResponse class <category>instance creation</category>
document: anObject mimeType: mimeString fileName: fileString ^ (self document: anObject mimeType: mimeString) attachmentWithFileName: fileString; yourself
</methods> <methods> Seaside.WAResponse class <category>instance creation</category>
new ^ self basicNew initialize
</methods> <methods> Seaside.WAResponse class <category>instance creation</category>
forbidden: locationString ^ self new forbidden; nextPutAll: '<h1> Error: you are forbidden to access "', locationString, '". </h1>'; yourself
</methods> <methods> Seaside.WAResponse class <category>defaults</category>
defaultValueForCharSet ^'charset=utf-8'
</methods> <methods> Seaside.WAResponse class <category>instance creation</category>
basicAuthWithRealm: aString ^ self new basicAuthenticationRealm: aString
</methods> <methods> Seaside.WAResponse class <category>defaults</category>
defaultHttpVersion ^'HTTP/1.0'
</methods> <methods> Seaside.WAResponse class <category>instance creation</category>
document: anObject mimeType: mimeType | document | document := anObject asMIMEDocumentType: mimeType. ^ self new contentType: (mimeType ifNil: [document contentType]); headerAt: 'Expires' put: 'Thu, 01 Jan 2095 12:00:00 GMT'; nextPutAll: document content; yourself
</methods> <methods> Seaside.WARootedElement class <category>instance creation</category>
root: anHtmlRoot ^self new setRoot: anHtmlRoot; yourself
</methods> <methods> Seaside.WARootedElement class <category>instance creation</category>
named: aString root: anHtmlRoot ^(self named: aString) setRoot: anHtmlRoot; yourself
</methods> <methods> Seaside.WASimpleNavigation class <category>example</category>
example ^self new add: WACounter example label: 'Counter'; add: WAPath example label: 'Path'; select: 'Counter'; yourself.
</methods> <methods> Seaside.WAStateHolder class <category>instance creation</category>
new |inst| inst := super new. WACurrentSession value registerObjectForBacktracking: inst. ^ inst
</methods> <methods> Seaside.WAStateRegistry class <category>instance creation</category>
new ^ self basicNew initialize
</methods> <methods> Seaside.WAStaticHtmlCanvas class <category>instance creation</category>
document: aDocument ^ self basicNew initializeWithDocument: aDocument
</methods> <methods> Seaside.WAStaticHtmlCanvas class <category>instance creation</category>
root: anHtmlRoot ^ self document: (WAHtmlStreamDocument root: anHtmlRoot)
</methods> <methods> Seaside.WAStore class <category>accessing</category>
description ^'sushiNet - Fresh, raw fish delivered to your door'
</methods> <methods> Seaside.WAStore class <category>class initialization</category>
initialize self registerAsApplication: self entryPointName
</methods> <methods> Seaside.WAStore class <category>as yet unclassified</category>
entryPointName ^'examples/store'
</methods> <methods> Seaside.WAStore class <category>testing</category>
canBeRoot ^ true
</methods> <methods> Seaside.WAStoreInventory class <category>instance creation</category>
new ^ self basicNew initialize
</methods> <methods> Seaside.WAStoreInventory class <category>defaults</category>
default ^ default ifNil: [default := self new]
</methods> <methods> Seaside.WAStoreMasterCard class <category>accessing</category>
abbreviation ^ 'MC'
</methods> <methods> Seaside.WAStoreVisaCard class <category>accessing</category>
abbreviation ^ 'VISA'
</methods> <methods> Seaside.WAStringLibrary class <category>instance-creation</category>
default ^ default ifNil: [ default := self new ]
</methods> <methods> Seaside.WASystemConfiguration class <category>instance creation</category>
new ^ self instance
</methods> <methods> Seaside.WASystemConfiguration class <category>accessing</category>
instance ^ instance ifNil: [ instance := self basicNew initialize ]
</methods> <methods> Seaside.WATableReportTest class <category>accessing</category>
example ^ self new
</methods> <methods> Seaside.WATagBrush class <category>code generation</category>
tag "WASelectTag tag" "WAGenericTag tag" ^(self selectors includes: #tag) ifTrue: [ self new tag ] ifFalse: [ nil ]
</methods> <methods> Seaside.WATool class <category>accessing</category>
title ^ self name
</methods> <methods> Seaside.WATrail class <category>instance creation</category>
on: anObject ^ self new root: anObject
</methods> <methods> Seaside.WATree class <category>instance-creation</category>
root: anObject ^ self new root: anObject; yourself
</methods> <methods> Seaside.WATree class <category>instance-creation</category>
root: anObject path: anArray ^ (self root: anObject) expandAll: anArray; selected: anArray last; yourself
</methods> <methods> Seaside.WATree class <category>examples</category>
exampleObjectExplorer ^ self new root: 'dispatcher' -> WADispatcher default; labelBlock: [ :assoc | assoc key displayString , ': ' , assoc value printString ]; childrenBlock: [ :assoc | assoc value inspectorFields ]; yourself
</methods> <methods> Seaside.WATree class <category>examples</category>
exampleCollectionClasses ^ self new root: Collection; labelBlock: [ :class | class name ]; childrenBlock: [ :class | class subclasses ]; yourself
</methods> <methods> Seaside.WAUrl class <category>instance creation</category>
new ^ self basicNew initialize
</methods> <methods> Seaside.WAUserConfiguration class <category>initialization</category>
initialize self allInstances do: [:ea | ea instVarNamed: 'ancestors' put: (ea ancestors collect: [:c | [c instVarNamed: 'parent'] ifError: [c]])]
</methods> <methods> Seaside.WAViewer class <category>instance creation</category>
on: aPresenter ^ self new presenter: aPresenter
</methods> <initialize> Seaside.WAAbstractHtmlBuilder </initialize> <initialize> Seaside.WAAllCanvasTests </initialize> <initialize> Seaside.WAAllTests </initialize> <initialize> Seaside.WABrowser </initialize> <initialize> Seaside.WACachedDocument </initialize> <initialize> Seaside.WACounter </initialize> <initialize> Seaside.WADateSelectorTest </initialize> <initialize> Seaside.WADispatcherEditor </initialize> <initialize> Seaside.WADispatcherEditorPlugin </initialize> <initialize> Seaside.WADispatcherViewer </initialize> <initialize> Seaside.WAExampleBrowser </initialize> <initialize> Seaside.WAExpirySession </initialize> <initialize> Seaside.WAExternalID </initialize> <initialize> Seaside.WAFileHandler </initialize> <initialize> Seaside.WAFileLibrary </initialize> <initialize> Seaside.WAGlobalConfiguration </initialize> <initialize> Seaside.WAHalo </initialize> <initialize> Seaside.WAMultiCounter </initialize> <initialize> Seaside.WAStore </initialize> <initialize> Seaside.WAUserConfiguration </initialize>