[Seaside] Collecting form input
Philippe Marschall
philippe.marschall at gmail.com
Thu Oct 9 07:30:53 UTC 2008
2008/10/8 ryan <ryan at intgo.net>:
> Those instance variables, they are temporary variables.
> Instance variables are declared in the class declaration something like.
>
> WAComponent subclass: #addUserForm
> instanceVariableNames: 'newName newSalutation'
> classVariableNames: ''
> poolDictionaries: ''
> category: 'MyProject'
>
> -------------
> renderContentOn: html
> html
> form: [
> html textInput value: 'type name here';
> callback: [:name | newName := name].
> html select list: salutations;
> callback: [:userSalutation| newSalutation := userSalutation ];
> labels: [:userSalutation | userSalutation asString].
> html submitButton
> callback: [self addUserNamed: newName withSalutation: newSalutation];
> value: 'Add New User']
Since they are all instance variables you probably also want change
#addUserNamed:withSalutation: to #addUser and access them there
instead of the callback block.
Cheers
Philippe
More information about the seaside
mailing list