| foo |
foo
ifNil: [html form: [html textInput callback: [:t | foo := t]]]
ifNotNil: [html anchor callback: [self inform: 'You said ', foo]; with: 'click here'] renderContentOn: html
said
ifNil:
[html form: [html textInput callback: [:v | said := v].
html submitButton]]
ifNotNil:
[clicked
ifNil: [html anchor callback: [clicked := true]; with: 'click here']
ifNotNil: [html text: 'You said: ', said]].
A more elegant implementation might use the lower levels of Seaside directly, and dispense with components completely. But Arc is about brevity, not elegance, right?-----
I agree that mine isn't precisely by the spec -- you have to press 'enter' to submit the form, and there's an ok button on the last page -- but these are fairly trivial differences in presentation due to the behaviour of the built-in libraries.
(also, minor footnote: I'm assuming that "foo", "said" and "clicked" are instance variables in each example.)
-----