[Seaside] "Login" page
Richard K Eng
richard.eng at rogers.com
Sun Jul 29 14:15:38 UTC 2007
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: ...
renderContentOn: html
html paragraph: 'Your email address is your username.'.
self renderStatusMessageOn: html.
html form:
[html div
class: 'row';
with:
[html span
class: 'formlabel';
with: [html text: 'your username'].
html span
class: 'forminput';
with: [html textInput on: #emailAddress of: user]].
html div
class: 'row';
with:
[html span
class: 'formlabel';
with: [html text: 'your password'].
html span
class: 'forminput';
with: [(html textInput type: 'password') on: #password of: user]].
html div
class: 'spacer';
with: ' '.
html div
class: 'row';
with:
[html span
class: 'formlabel';
with: [html text: ''].
html span
class: 'forminput';
with:
[((html submitButton
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?
Thanks.
Regards,
Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20070729/fb5632d8/attachment.htm
More information about the Seaside
mailing list