[Seaside] question about callbacks in listboxes.
Lukas Renggli
renggli at gmail.com
Mon May 3 18:21:06 UTC 2010
> 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
>
--
Lukas Renggli
www.lukas-renggli.ch
More information about the seaside
mailing list