Seaside - Gadgets
Last published: March 26, 2009 by 'tkogan'
Defines 20 Classes
Extends 22 Classes
More gadgets will be added to this package on an as-needed basis.
The various gadgets are added to the canvas, so you can use them by calling a method and they work like regular HTML elements, however by design the gadgets are generally ajax driven, using the CommunicationGadget behavior to drive interaction between Seaside and the web browser.
^Timestamp now printString, ' - ', message
alert(this.ping("from the client!"))
There are a few variations on what you can do with the pragma, where the parameter specifies which type of function callback you want to perform. The list is here:
#send -- this is the default
#async -- don't expect a result at all, fork it off and forget about it
When the Smalltalk method is called, it does not have a HTMLCanvas to render on to - however it is a Seaside Brush and has access to the last canvas. From that, you can create a new canvas to render on, then serialize the response out as the result to the ajax call. This sounds more complex than it is:
^self newRendererDo: [:html | html text: 'Hello!']