[Seaside] supressing rendering
Avi Bryant
avi at beta4.com
Thu Sep 16 11:22:26 CEST 2004
On Sep 16, 2004, at 2:01 AM, radoslav hodnicak wrote:
>> WARedirectDecoration>>renderContentOn: html
>> self remove. "we only want to do this once"
>> self session redirectTo: (html urlForAction: callback)
>>
>
> This is a nice idea, but I can't get this redirect decoration to work
> - I
> always get "Error: Components not found while processing callbacks: #(a
> WARedirectDecoration)" - I guess because the callback from the above
> code
> belongs to the decoration which is no longer there? (been trying this
> out
> in normal component code, not from wa main)
Ah, yes, of course. So we need another way to make it one-shot. Maybe
something like this?
renderContentOn: html
|url|
callback
ifNil: [super renderContentOn: html]
ifNotNil:
[url := html urlForAction: callback.
callback := nil.
self session redirectTo: url]
More information about the Seaside
mailing list