[Seaside] action method cause independent redirect
Nevin Pratt
nevin at smalltalkpro.com
Sat Mar 29 23:38:49 CET 2003
I am using Seaside 2.3b.
I have a component that has a button with an action method. That action
method needs to be able to redirect the web request to a completely
different web site. How do you do that?
In case I'm not being clear, I will explain again, but using a Comanche
module to illustrate. As you know, any registered Comanche module will
execute the #process: method of the module when a web request comes in.
The argument to the #process: method is an instance of HttpRequest (you
will see that the argument is typically named 'request' if you browse
implementers of #process:). Anyway, to redirect the HttpRequest coming
into a Comanche module, you would do this from the #process: method of
your Comanche module:
process: request
^ request redirectTo: 'http://www.anywhere.com/somepath'
For the Comanche module, you can also just as easily redirect to a
secure port of some web site thus (just by specifying https instead of
http):
process: request
^ request redirectTo: 'https://www.anywhere.com/somepath'
And in reality, this is what I really want to do from the action method
of the button for a Seaside component-- redirect the request to a secure
port of an arbitrary web URL via an 'https' redirect.
How do I do that?
Nevin
More information about the Seaside
mailing list