[Seaside] Seaside Login and so on
Julian Fitzell
julian at beta4.com
Tue Aug 5 17:34:59 CEST 2003
Brian Brown wrote:
> I've been using a subclass of WATask as my app entry point; so in MyWATask>>go I
> have something like:
>
> self hasLoggedIn ifFalse: [
> self session client: (self call: MyLoginComponent new)].
>
> The MyLoginComponent has the renderContentOn: that displays the login and
> password prompt, as well as checks the validity of the entered data.
>
> Next in the MyWATask>>go I would call the real component I wanted to display and
> be the interface for my application.
>
> WATask is a wonderful thing ;) - everything in the WATask>>go method is
> processed as a big loop, which in this has the effect of not letting someone go
> on to the main web app without valid login information. As soon as their session
> expires, they will automattically be sent back to the WATask component entry
> point, so you site will always be protected from invalid logins.
>
> I hope that makes sense...
I was confused by what you were saying until you made the comment that
#go loops, which I had forgotten. I found that behaviour pretty
surprising and Avi said it does it "because he couldn't think of
anything better to do". I personally think that if there is somewhere
to return to, the end of a #go method should trigger an implicit #answer
call. In the case where a task is your entry point, I guess you can
make an argument for making the method loop, but I find the behaviour
kind of non-intuitive.
I'd be curious what others' opinions are...
Julian
More information about the Seaside
mailing list