[Seaside] "Login" page
apaulavicius at gmail.com
Sun Jul 29 16:33:16 UTC 2007
Pass a callback block [self call: GSServiceCentre new] from you main to login component, and evaluate it with its method "value" when you want it executed.
----- Original Message -----
From: Richard K Eng
To: Seaside - general discussion
Sent: Sunday, July 29, 2007 5:15 PM
Subject: [Seaside] "Login" page
I have a login form in which you enter your username and password. Once this information is validated, I want to go to another webpage. How do I do this?
Here's my problem code...
I render the login form in #renderContentOn: of my main page like so...
html render: login.
My login form has the following #renderContentOn: ...
html paragraph: 'Your email address is your username.'.
self renderStatusMessageOn: html.
with: [html text: 'your username'].
with: [html textInput on: #emailAddress of: user]].
with: [html text: 'your password'].
with: [(html textInput type: 'password') on: #password of: user]].
with: ' '.
with: [html text: ''].
class: 'submit') on: #save of: self) text: 'submit']]]
On "save" I want to go to another page represented by class #GSServiceCentre. Right now, I have a test statement to verify that this GSServiceCentre page renders correctly:
html anchor callback: [self call: GSServiceCentre new]; with: 'service centre']].
I click on "service centre" and it brings me to my desired page. But I want to do this on "save" in my login form. I don't know how to do that. If I simply make a call to #GSServiceCentre like so:
self call: GSServiceCentre new
it renders the desired page as a component replacing the login form, which is not what I want.
Anyway, I hope I made myself clear. Can anyone help?
More information about the Seaside