[Seaside] [ENH] Several extensions

Tibben, Andre andre.tibben at eds.com
Thu May 19 16:36:55 CEST 2005


This fileout contains some extensions I made for Seaside.

1. Send XML replies to XMLHttpRequest. Besides replacing the innerHtml of en
element one of the implemented return values allows for generic changes to
the DOM model. For example you can change the position of an element with

	html elementId: anId 
		dom: [html tag: 'style'
				do: [html left: left px; top: top px]]

2. Use callbacks for live requests instead of making a new continuation.

3. An override on WARenderLoop to respond to a LiveRenderNotification by
walking the component-tree calling renderLiveUpdateOn:.

4. More CSS Style support:
	html cssStyle: [:s | s origin: 100 @ 200; backgroundColor: 'red';
otherStyleAttribute: 'solid'];
		someElement.

The result is: <someElement style="position: absolute; left: 100px; top:
200px; background-color: red; other-style-attribute: solid" ... 
I find it mostly useful to provide program defined colors and for
positioning absolute elements.

5. Some code from LiveWeb (modified to be a bit more generic useable) to
place a callback on an element. Use with:
	self 
		installCallbacks: #('callback1' ...)
		for: elementId
		on: html.
After this you can call element.callback1(args) from javascript. This will
result in a method called on self that starts with 'callback1' and has the
right number of arguments to match the number used in the call. After this
method has finished a LiveRenderNotification is raised so every component
has a change to add something to the update in renderLiveUpdateOn:.


Andre Tibben
 <<SeasideExtensions.st>> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SeasideExtensions.st
Type: application/octet-stream
Size: 14318 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/seaside/attachments/20050519/9c106fea/SeasideExtensions-0001.obj


More information about the Seaside mailing list