[Seaside] Collecting form input
Sebastian Nozzi
sebnozzi at googlemail.com
Wed Oct 8 08:28:37 UTC 2008
Hi Phillipe,
thanks for your reply.
> You could also use ValueHolders but that gets quite ugly. I'd use
> instance variables and split it up.
I'll look into ValueHolders (never heard of them; but I'm a newbie... so...)
What do you mean by the latter? Because it was with instance variables
that I first tried, but as I said it didn't work:
| newName newSalutation |
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']
When the callback in the submitButton was called, "newName" and
"newSalutation" were nil.
What I was trying to do is to avoid creating a temporary user
instance, and only create it when the user submits the data (the user
could instead opt to go back).
But I think I might be overcomplicating things and I might just create
the temporary instance, since I'm creating a Dictionary anyway...
Greetings,
Sebastian
More information about the seaside
mailing list