[Seaside] accessing event information

Chris Muller ma.chris.m at gmail.com
Thu Oct 1 03:50:57 UTC 2015


I am still learning.  I want to make a desktop-like app in the
browser.  Seaside lets me use Ajax to respond to individual widget
clicks and update my model in the server, as well as update the DOM in
the client accordingly, all in one step:

        html button
            onClick: ((html jQuery: #idOfElementToReplace) load
                html:
                    [ : resultOfClickHtml | model doTheAppropriateUpdates.
                    resultOfClickHtml render: model ]);
            with: 'click to update the model'.

I also tested onMouseOver: and onMouseOut:, they worked.  It feels a
little strange to be updating my model within html rendering, but it
gives me near desktop-app-like development capability for the browser
with efficient event / response transfer, using Seaside.  Wonderful!

I also need to handle onKeyUp and onKeyDown:, but I'm not sure the
proper way to access the Event information by this approach.  I
couldn't find any examples I could learn from.  How could I do it?


More information about the seaside mailing list