[Seaside] Bicephale + call: + redirect

Dmitry Dorofeev dima-sender-3c337a at yasp.com
Fri Dec 2 18:16:32 CET 2005


Hi all,

I asked this question:
http://lists.squeakfoundation.org/pipermail/seaside/2005-November/005971.html
"How do i make a link in Seaside which do a redirect ?"
sometime ago and people felt like it was a strange question.

I will try to explain what the problem is, as I still have no solution.
Note that it is related to Bicephale and not to Seaside (I solved it on seaside app).

I have a Bicephale application which has static links, like
/tv
/about_us

etc.
Just normal navigation.
Let's say I am on /about_us page and pressed a link, which makes a call:
to a Seasdie component where user can do a registration. At any page with
forms I still show site navigation. Links to static pages are still displayed.
If I click on any 'static' link I still see a form, becouse I am inside a call:

And this is a problem for a user. Now I hack it, so when a static link is clicked,
answer is invoked on a called component. That works, but not quite.
Whatever link i click, I see page from which original call: was invoked. I.e. /about_us
in my example. I want the correct page to be shown and have no idea where to do a
redirect or plug correct page into Bicephale rendering.

Links are generated with the following code:

(html isKindOf: WABicephaleHtml) ifTrue: [
     html anchorWithUrl: (
        html currentComponent application basePath , '/', aPage pathURL) do: aText.
] ifFalse: [
	"call was made to Seaside component"
    html anchorWithAction: [WACurrentSession value calledComponent answer: aPage] text: aText.
]

session redirectTo: can not be used here, becouse it involves a continuation as I understand.
I do not use anchorWithUrl: inside a call stage becouse it will left call: unanswered when
such link will be clicked. But if no solution will arrive, i will do it paying the cost of
growing memory size of the image :-(


Thank you for your help,
-Dmitry.


More information about the Seaside mailing list