<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="" dir="auto">Joachim,<div class=""><br class=""></div><div class=""><div><blockquote type="cite" class=""><div class="">On 20 Nov 2015, at 09:16, <a href="mailto:jtuchel@objektfabrik.de" class="">jtuchel@objektfabrik.de</a> wrote:</div><div class=""><blockquote cite="mid:CAB59807-25DC-4982-94C3-328051AE73E0@inceptive.be" type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);" class=""><div class=""><br class=""></div></blockquote><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); float: none; display: inline !important;" class="">The link does a show:, so the browser navigates away from the page the very instant the longest running ajax request is done. The dev toos in Firefox are cleared in that moment, so I cannot see anything of that "normal" request. While the two Ajax requests are being processed, I cannot see that "normal" request being sent to the server (but I should, even if the server doesn't react).</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);" class=""></div></blockquote><div><br class=""></div><div>The Chrome devtools have an option to “preserve log” in the network tab. This will not clear the tab on a page load.</div><br class=""><blockquote type="cite" class=""><div class=""><blockquote cite="mid:CAB59807-25DC-4982-94C3-328051AE73E0@inceptive.be" type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);" class=""><div class="">Seaside requires all requests for the same session to be processed sequentially.</div><div class="">So, callbacks will not execute as long as the server is processing any other callback for the same session.</div><div class=""><br class=""></div></blockquote><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); float: none; display: inline !important;" class="">So this explains a lot. This means we can cheat a little by showing the page earlier, but it won't be reacting to menu selections any sooner. Unless we do some "use another session (or even server) to collect the data" magic.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);" class=""></div></blockquote><div><br class=""></div><div>The best solution for this is to fork a background process to collect the data in your component and only render the component when the data is present.&nbsp;</div><div>Instead of using a ‘long running ajax request’ you poll the server with short requests until the data is ready and the component can be rendered.</div><div><br class=""></div><div>This is exactly what we do for tasks that take a long time to fetch data (e.g. rendering documents, long-running database queries, etc…). A spinner is shown on the webpage and the server is polled at seconds intervals until it effectively returns a rendered component. The data for that component is generated by a background process.</div><div><br class=""></div><div>This perfectly fits your decoration implementation. Something along these lines (disclaimer: untested code written in email client :) :</div><div><br class=""></div><div><span class="Apple-tab-span" style="white-space: pre;">        </span>replaced<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span><span class="Apple-tab-span" style="white-space: pre;">        </span>ifTrue: [div with: [self renderNextOn: html]]<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span><span class="Apple-tab-span" style="white-space: pre;">        </span>ifFalse: [<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span><span class="Apple-tab-span" style="white-space: pre;">        </span><span class="Apple-tab-span" style="white-space: pre;">        </span>html document addLoadScript: (self loadScriptOn: html).<br class=""></div><div><span class="Apple-tab-span" style="white-space: pre;">        </span><span class="Apple-tab-span" style="white-space: pre;">        </span><span class="Apple-tab-span" style="white-space: pre;">        </span>div with: [<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span><span class="Apple-tab-span" style="white-space: pre;">        </span><span class="Apple-tab-span" style="white-space: pre;">        </span><span class="Apple-tab-span" style="white-space: pre;">        </span>html image src: someSpinnerImage<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span><span class="Apple-tab-span" style="white-space: pre;">        </span><span class="Apple-tab-span" style="white-space: pre;">        </span><span class="Apple-tab-span" style="white-space: pre;">        </span>html space; text: self message]]</div><div><br class=""></div><span class="Apple-tab-span" style="white-space:pre">        </span>loadScriptOn: html</div><div><br class=""></div><div><div><span class="Apple-tab-span" style="white-space:pre">                </span>(html jQuery: self idSelector) load html: [:r |</div><div><span class="Apple-tab-span" style="white-space: pre;">                                        </span>self isDataReady</div><div><span class="Apple-tab-span" style="white-space: pre;">                                                </span>ifTrue:[&nbsp;replaced := true.<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span><span class="Apple-tab-span" style="white-space: pre;">        </span><span class="Apple-tab-span" style="white-space: pre;">        </span><span class="Apple-tab-span" style="white-space: pre;">        </span><span class="Apple-tab-span" style="white-space: pre;">                        </span>&nbsp; &nbsp;&nbsp;self renderNextOn: html]</div><div><span class="Apple-tab-span" style="white-space: pre;">                                                </span>ifFalse: [ r addLoadScript: (self loadScriptOn: r)&nbsp;]).</div><div><br class=""></div><div>Of course, this is a very simple and naive implementation and you might want to add more features to the decorator code (such as a limit to the number of retries, or handling errors, etc…). But I think you get the basic idea.</div><div><br class=""></div><div>Hope this helps!</div><div>Johan</div></div><br class=""></div></body></html>