6.0 news: element stubs before Ajax showing them

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

6.0 news: element stubs before Ajax showing them

Janko Mivšek
Dear all,

6.0 is in full action and here is one more "goodie", this one for easier
ajaxification of your web apps.

Element stubs are empty elements, which are then extended with real
content when you ajax update that element. You'll see a stub in HTML
like this:

        <div id=id23><!-- stub --></div>

From class comment: WebStubElement is an element which will be replaced
with a real one after Ajax update


        u := WebStubElement newFor: #ajaxShowElement.
        (e addNilLinkText: 'update') onClickUpdate: u.
        e add: u.

This will show the element 'u' at the click to link by updating the
empty stub element.

Note that a method to generate a real element is as a symbol argument in
stub creation method.

Best regards

Janko Mivšek
Smalltalk Web Application Server
Aida mailing list
[hidden email]