Opening the book…
- The easiest way to get started is to download the Seaside One-Click Experience from http://seaside.st
- Turn the server on and off by evaluating
ZnZincServerAdaptor startOn: 8080andZnZincServerAdaptor stop. Toggle Halosto directly view application source code, run-time objects, CSS and HTML.- Remove the root decoration class
WAToolDecorationin the application configuration, to disable the toolbar - Send
WAAdmin applicationDefaults removeParent: WADevelopmentConfiguration instance, to disable toolbar for new Components - Seaside web applications are composed of components, each of which is an instance of a subclass of
WAComponent. - Only a root component may be registered as an application. It should implement
canBeRooton the class side. Alternatively it may register itself as an application in its class-sideinitializemethod by sendingWAAdmin register: self asApplicationAt: application path. If you overridedescriptionit is possible to return a descriptive application name that will be displayed in the configuration editor. - To backtrack state, a component must implement the
statesmethod to answer an array of objects whose state will be restored if the user clicks the browser’s Back button. - A component renders itself by implementing
renderContentOn:. The argument to this method is an HTML rendering canvas (usually calledhtml). - A component can render a subcomponent by sending
self render: subcomponent. - HTML is generated programmatically by sending messages to brushes. A brush is obtained by sending a message, such as
paragraphordiv, to the HTML canvas. - If you send a cascade of messages to a brush that includes the message
with:, thenwith:should be the last message sent. Thewith:message sets the contents and renders the result. - Actions should appear only in callbacks. You should not change the state of the application while you are rendering it.
- You can bind various form widgets and anchors to instance variables with accessors by sending the message
on: instance variable of:objectto the brush. - You can define the CSS for a component hierarchy by defining the method
style, which should return a string containing the style sheet. (For deployed applications, it is more usual to refer to a style sheet located at a static URL.) - Control flows can be programmed by sending
x call: y, in which case componentxwill be replaced byyuntilyanswers by sendinganswer:with a result in a callback. The receiver ofcall:is usuallyself, but may in general be any visible component. - A control flow can also be specified as a task — a instance of a subclass of
WATask. It should implement the methodgo, which shouldcall:a series of components in a workflow. - Use
WAComponents’s convenience methodsrequest:,inform:,confirm:andchooseFrom:caption:for basic interactions. - To prevent the user from using the browser’s Back button to access a previous execution state of the web application, you can declare portions of the workflow to be a transaction by enclosing them in an
isolate:block.
This page titled 14.9: Chapter Summary was last modified on Sat, 19 Dec 2020 08:13:49 GMT and is shared under a CC BY-SA 3.0 license and was authored, remixed, and/or curated by via source content that was edited to the style and standards of the LibreTexts platform.
The book could not be loaded just now.