[Seaside] question about callbacks in listboxes.

Lukas Renggli renggli at gmail.com
Mon May 3 19:20:05 UTC 2010


On 3 May 2010 20:31, Timothy James Ziebart <timothy at churchmilitant.org> wrote:
> Ok, so the callback, in this case,
>
>         callback: [ :value | self citySelectionChanged: value ];
>         onChange: ((html jQuery id: self liveHoodId) load html: [:r | self
> renderHoodListOn: r] );
>         onChange: ((html jQuery id: 's_results')  load serializeThis;
>                 html: [ :r | self renderStatusPanelOn: r. self
> renderResultsOn: r ] )
>
> will only be executed when the "serializeThis"  is fired?

Yes.

Lukas

>
> Tim
>
> On 10-05-03 11:21 AM, Lukas Renggli wrote:
>
> Thanks Lukas,  I understand that about AJAX and in this case the rendering
> order does not matter.  I was expecting the callback to complete before
> either AJAX request is fired.  Is this not correct?
>
>
> Seaside only controls the order within a *single* AJAX request. In
> your code you do two requests, but only serializes the list in one.
>
> Lukas
>
>
>
>
> On 10-05-03 11:12 AM, Lukas Renggli wrote:
>
>
>        onChange: ((html jQuery id: self liveHoodId) load html: [:r | self
> renderHoodListOn: r] );
>        onChange: ((html jQuery id: 's_results')  load serializeThis;
>                html: [ :r | self renderStatusPanelOn: r. self
> renderResultsOn: r ] )
>
>
>
> AJAX is asynchronous. You trigger off two AJAX requests concurrently
> that arrive in an undefined order at the server. Combine them to one
> request (I strongly suggest that, this is much more efficient) to get
> deterministic behavior. Alternatively you can also keep the two
> requests, but only start the second one when the first completed.
>
> Lukas
>
>
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
>
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>



-- 
Lukas Renggli
www.lukas-renggli.ch


More information about the seaside mailing list