[Seaside] action method cause independent redirect

Julian Fitzell julian at beta4.com
Mon Mar 31 12:56:07 CEST 2003



Avi Bryant wrote:
> On Sat, 29 Mar 2003, Nevin Pratt wrote:
> 
> 
>>process: request
>>    ^ request redirectTo: 'http://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?
> 
> 
> This should do the trick:
> 
> someActionMethod
>   session returnResponse:
>    (WARedirectResponse location: 'http://www.anywhere.com/somepath')
> 

Except that redirecting a form submission brings up a warning dialog in 
many browsers.  You'd be better to generate a form with the action 
attribute set to the right url and just use a non-seaside static submit 
button to trigger the action if you are able to.

Julian



More information about the Seaside mailing list