logo

Make web development powerful & efficient

Iliad allows you to trigger Smalltalk code when the user clicks on a link or submit a form. These block closures, called actions, are similar to traditional GUI callbacks or signals.

contents [
    ^[:e |
        e a
            action: [self doSomething];
            text: 'do something']
]

With some form fields, action blocks can take a parameter:

contents [
    ^[:e || form |
        form := e form.
        form input
            action: [:string | self doSomethingWith: string].
        form button
            action: [self doSomethingOnFormSubmission]]
]

In the example above, the string entered by the user in the input field will be sent as a parameter to the action block.