[Seaside] Significant differences between Continuation Class &
WAContinuation Class?
Julian Fitzell
jfitzell at gmail.com
Thu Sep 10 06:43:01 UTC 2009
On Wed, Sep 9, 2009 at 8:59 PM, Paul DeBruicker <pdebruic at gmail.com> wrote:
> On Tue, 2009-09-08 at 21:15 +0200, Lukas Renggli wrote:
>
>> renderContentOn: html
>> html render: 'Click the button to generate a continuation Url'.
>> html form: [
>> html submitButton
>> callback: [ self generateUrlOn: html ];
>> with: 'Go' ]
>>
>> generateUrlOn: html
>> | url |
>> url := html context actionUrl
>> withParameter: (html callbacks
>> store: (WAActionCallback on: [ self inform: 'Got Me' ])).
>> Transcript show: url asString.
>> self inform: 'The url is: ' , url asString
>
> OK but if I change the generateUrlOn: html to
>
> generateUrlOn: html
> | url |
> url := html context actionUrl
> withParameter: (html callbacks
> store: (WAActionCallback on: [ hmtl render: 'Got
> Me' ])).
> Transcript show: url asString.
> self inform: 'The url is: ' , url asString
>
> When I access the link I get this error:
>
> MessageNotUnderstood: receiver of "print:" is nil
When the callback is evaluated, you are in a new request and the
renderer pointed to by html is thus no longer valid.
> So I still do not know/understand how to display a component when the
> created link is clicked. What do I change to do that? I've tried
> several combinations of things that create different errors.
"self call: aComponent" (or "self show: aComponent" since you don't
need the control flow to return back to the callback afterwards).
That's all #inform: does if you trace its implementation.
Julian
More information about the seaside
mailing list