[Seaside] HTML/Javascript list and Comet updating it's contents.
Lukas Renggli
renggli at gmail.com
Sat Oct 9 20:49:59 UTC 2010
> So, what is (script jQuery: #messages) doing?
This is the same as
script jQuery: '#messages'
a query on the DOM element with the ID messages.
> What type of object is the
> result?
On the Smalltalk side an instance of JQueryInstance.
On the Javascript side a jQuery instance of the matching DOM elements.
> Is the server getting the list of messages from the client?
No, #append: just appends a new item to the list. The list of messages
is not stored on the server.
> Or is
> aBlock (a String) and aString being sent to the client and this script is
> running on the client?
The block is a Seaside render block. It happens on the server, the
resulting HTML string is sent to the client.
> I am not clear on the sequence of cascaded messages
> sent: (#children; #sliceFrom:to:, #remove, #end, #append:, #end,
> #scrollTop:).
#jQuery: defines the query. #children, #sliceFrom:to: refines the
query. #remove performs the action on the resulting DOM elements. #end
resets to the original query. Each single method has a detailed method
comment, look at the implementor (or display it with eCompletion).
These is basic jQuery knowledge, do some of the Javascript/HTML
tutorials listed here: <http://docs.jquery.com/Tutorials>.
You might also be interested in my jQuery tutorial of ESUG last year
in Brest. The slides and the video are linked here
<http://www.seaside.st/documentation/videos>.
Lukas
--
Lukas Renggli
www.lukas-renggli.ch
More information about the seaside
mailing list