[Seaside] Login process
wallenberg at gmail.com
Mon Jun 18 15:17:33 UTC 2007
I have some troubles with
"I then store it in my session (I subclassed WASession and
added an instance variable called 'user')."
How do you subclass WASession for storing username ?
Any hint :D
On 6/18/07, Squeak Smalltalk <wallenberg at gmail.com> wrote:
> Done ;)
> On 6/17/07, Michael Gorsuch <michael.gorsuch at gmail.com> wrote:
> > > Can someone give me a hint how create a login process for a site ?
> > >
> > > Login process have :
> > > - New user registration.
> > > - Old user login.
> > I have been building my sites with a subclass of WATask as the root
> > component. I implement the workflow in it's 'go' method.
> > The first task in my workflow is to build a new Welcome component
> > (subclass of WAComponent) and #call it.
> > The Welcome component has two child components that it displays during
> > #renderContentOn. One child is the registration form, the other is
> > the login form. When these components were initialized, I defined
> > onAnswer for each one, so that when they #answer, it sends it back to
> > Welcome, which will then #answer the original #call from my workflow.
> > Both of those subcomponents validate the input, and if all is well,
> > they #answer with a User object. If something went wrong, the stuff
> > the message into an instance variable called 'errors' that is always
> > checked when the components are rendered.
> > When one of the forms suceeds, and the user object is sent back with
> > #answer, I then store it in my session (I subclassed WASession and
> > added an instance variable called 'user').
> > I hope that gives you a rough idea as to how something like this could work.
> > -
> > Michael Gorsuch
> > Styled Bits 2.0: They're Mostly Broken, But I Try
> > http://www.styledbits.com
> > _______________________________________________
> > Seaside mailing list
> > Seaside at lists.squeakfoundation.org
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
More information about the Seaside