Dynamic Web Development with Seaside

Buy PDF Buy Print

20.2.1Instantiate a Brush

The Prototype and Scriptaculous package extends the Seaside class WARenderCanvas with the methods prototype and scriptaculous that both return a factory object for JavaScript brushes. These factories are instances of PTFactory. These brushes are responsible for creating well defined snippets of JavaScript code. A full listing of the available brushes is presented below.

JavaScript Class Factory Selector Smalltalk Class
$ (Element) element PTElement
$ (Form) form PTForm
$ (Form.Element) formElement PTFormElement
$$ (Selector) selector PTSelector
Ajax.Autocompleter autocompleter SUAutocompleter
Ajax.InPlaceCollectionEditor inPlaceCollectionEditor SUInPlaceCollectionEditor
Ajax.InPlaceEditor inPlaceEditor SUInPlaceEditor
Ajax.PeriodicalUpdater periodical PTPeriodical
Ajax.Responders responders PTResponders
Ajax.Request evaluator PTEvaluator
Ajax.Request request PTRequest
Ajax.Updater updater PTUpdater
Control.Slider slider SUSlider
Draggable draggable SUDraggable
Droppables droppable SUDroppable
Effec effect SUEffect
Event event PTEvent
Insertion insertion PTInsertion
Sortable sortable SUSortable
Sound sound SUSound

For some Prototype and script.aculo.us functionality there are several aliases available. Seaside always tries to generate the shortest possible variation, however for reference it is often useful to know the long form as well. For example writing $('foo').toggle() is a synonym for the slightly longer version Element.toggle('foo').

Copyright © 30 May 2017 Stéphane Ducasse, Lukas Renggli, C. David Shaffer, Rick Zaccone
This book is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 license.

This book is published using Seaside, Magritte and the Pier book publishing engine.