[Seaside] self call: not working
Stefan Schmiedl
s at xss.de
Fri Jan 25 17:50:15 UTC 2008
On Fri, 25 Jan 2008 17:25:13 +0000
John Thornborrow <john at pinesoft.co.uk> wrote:
> To follow this up... It doesn't quite work as I had hoped.
I'll try an answer here ... mind you, I'm no expert, you're
lucky if I know what I'm talking about :-)
>
> MyRootComponent>>renderContentOn: html
> html render: LoginTask new.
Does render: execute LoginTask>>go ?
> LoginTask>>go
> self isolate: [ answers := self call: LoginForm new ]
> model loginWith: (answers at: 1) password: (answers at: 2)
the task is finished after the user has entered data once.
Where's the logic requiring a task for this linear flow?
How about
LoginTask>>go
[ self isolate: [ answers := self call: LoginForm new ] ]
repeatUntil: [model loginWithAll: answers]
where loginWithAll: would return true if the authentication is
successful.
>
> LoginForm>>renderContentOn: html
> html form with: [
> html textInput
> id: 'username';
> callback: [ :x | username := x ].
> html textInput
> id: 'password';
> callback: [ :x | password := x ].
> html submitButton callback: [ self answer: answer ]
> ]
Shouldn't that be [ self answer: (Array with: username with: password) ]
to fit the LoginTask?
s.
More information about the seaside
mailing list