[Seaside] How do i make a link in Seaside which do a redirect ?

Lukas Renggli renggli at gmail.com
Tue Nov 1 22:42:06 CET 2005

> html
>     anchorWithCallback: [
>         self answer.
>         self session redirectTo: 'www.google.com' ]
>     do: 'click me'

That won't work, since #answer/#answer: evaluates a continuation and
won't let the next statement to be executed. You can think of "self
answer: anObject" as something similar to "^ anObject", but that does
not simply return to the caller of the method but to the caller
(#call:) or your component. "^ anObject" wouldn't evaluate (if the
compiler would allow this) the next line as well.

Maybe you should elaborate what you want to do exactly. The question
seems to me rather strange, I can't see a reason why you want to
answer and redirect at the same time? Probably there is something
wrong with your desing ...

You could try to call #redirectTo: after the line from where you are
calling your component, but probably you want something else ...

      self call: MyComponentWithAnswer new.
      self session redirectTo: 'bla'.


Lukas Renggli

More information about the Seaside mailing list