<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Could you try emulating a WATask type thing with ajax?<div><br></div><div>For example... re-render an element on the page with the component you want to call, and have that component return a script based on what happens to itself. So, if you would normally be answering true, return the old component, or, if answering false, either do nothing or re-render itself.</div><div><br></div><div>Hope that helps</div><div>RS</div><div><span class="Apple-tab-span" style="white-space:pre">        </span></div><div><div><br>&gt; From: jfitzell@gmail.com<br>&gt; Date: Sat, 31 Jul 2010 14:30:11 +0100<br>&gt; Subject: Re: [Seaside] Comet and #call:<br>&gt; To: seaside@lists.squeakfoundation.org<br>&gt; <br>&gt; I'm afraid I don't really understand the semantics you are trying to<br>&gt; achieve. But yes, obviously any response you return will replace the<br>&gt; whole page. If you don't want the browser to replace the page, I know<br>&gt; of no solution other than using Ajax.<br>&gt; <br>&gt; It would be quite straightforward to have a callback that does a<br>&gt; #show: and then returns just the new component's HTML for the JS to<br>&gt; put in the DOM. But you have to know where to put it in the DOM. This<br>&gt; isn't too hard if you're doing it on a case by case basis, but I'm not<br>&gt; sure how you would do it easily in a generic way.<br>&gt; <br>&gt; There's no good documentation of the render loop (which I think is<br>&gt; what you're asking about). I discussed it a bit in my talk at ESUG in<br>&gt; 2008 and the slides are available online, but I don't think they'd be<br>&gt; much help really. The concept is quite simple though: there are two<br>&gt; subclasses, one which processes callbacks and one which renders the<br>&gt; page. Each does its work and invokes an instance of the other,<br>&gt; creating a loop.<br>&gt; <br>&gt; Julian<br>&gt; <br>&gt; On Fri, Jul 30, 2010 at 4:41 PM, andres &lt;andres@lifia.info.unlp.edu.ar&gt; wrote:<br>&gt; &gt; Hi Julian, thanks for the response. I tried working with "self session<br>&gt; &gt; returnResponse:" but the problem remains since the response I send replaces<br>&gt; &gt; the whole page. I guess that if that behaviour is wired in the render loop I<br>&gt; &gt; would need to go deeper and somehow change the way callbacks are handled. I<br>&gt; &gt; am thinking two alternatives here:<br>&gt; &gt;<br>&gt; &gt; 1. Create a new call mechanism that somehow cancels the response, so that<br>&gt; &gt; the web client stays unaltered (is this possible?). Then push the page via<br>&gt; &gt; comet to update the required id. The question here is: can I cancel the<br>&gt; &gt; response but let the continuation keep its flow?<br>&gt; &gt;<br>&gt; &gt; 2. Use an ajax update, which works ok from the rendering point of view and<br>&gt; &gt; emulate the continuation flow. Can this be done? Is something in Seaside as<br>&gt; &gt; "forking" a new continuation (like a child process)?<br>&gt; &gt;<br>&gt; &gt; Also, could you recommend any readings on seaside internals to understand<br>&gt; &gt; how the control loop works? Again, any hints are much appreciated!<br>&gt; &gt;<br>&gt; &gt; Best regards,<br>&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp;Andrés<br>&gt; &gt;<br>&gt; &gt; Julian Fitzell escribió:<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; That's because the Render Loop, after processing callbacks, then<br>&gt; &gt;&gt; returns the rendered page as the response. If you want to return<br>&gt; &gt;&gt; something else, either you don't want to be using the Render Loop, or<br>&gt; &gt;&gt; you need to manually return a response in the callback (in 2.8: "self<br>&gt; &gt;&gt; session returnResponse: ..."<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; On Thu, Jul 29, 2010 at 10:01 PM, andres &lt;andres@lifia.info.unlp.edu.ar&gt;<br>&gt; &gt;&gt; wrote:<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; I guess I must be missing something because I see no difference between<br>&gt; &gt;&gt;&gt; #call: and #show:, except for the fact that #call blocks and #show does<br>&gt; &gt;&gt;&gt; not.<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; When I do<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; MyApp&gt;&gt;...<br>&gt; &gt;&gt;&gt; &nbsp; &nbsp; &nbsp; self<br>&gt; &gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; update: #componentPane<br>&gt; &gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; with: Component1 new.<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; The network traces in firebug shows that only the required resources for<br>&gt; &gt;&gt;&gt; Component1 are requested to the server. On the other hand when I hit the<br>&gt; &gt;&gt;&gt; link rendered by:<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; Component1&gt;&gt;renderContentOn: hmtl<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; html anchor<br>&gt; &gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; callback: [self show: Component2 new];<br>&gt; &gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; with: 'A call'.<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; firebug shows that everything that belongs to the page is requested again<br>&gt; &gt;&gt;&gt; to<br>&gt; &gt;&gt;&gt; the server (all the .css, .js, etc).<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; Thanks,<br>&gt; &gt;&gt;&gt; Andrés<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; Lukas Renggli escribió:<br>&gt; &gt;&gt;&gt;&gt;&gt;<br>&gt; &gt;&gt;&gt;&gt;&gt; code in WAComponent&gt;&gt;call: without any luck :(. So, do you think this<br>&gt; &gt;&gt;&gt;&gt;&gt; can<br>&gt; &gt;&gt;&gt;&gt;&gt; be<br>&gt; &gt;&gt;&gt;&gt;&gt; done? Am I missing something important about the way Seaside works? Any<br>&gt; &gt;&gt;&gt;&gt;&gt; hints are very much appreciated!<br>&gt; &gt;&gt;&gt;&gt;<br>&gt; &gt;&gt;&gt;&gt; Did you look at #show:/#show:onAnswer:? This is the #call:/#answer:<br>&gt; &gt;&gt;&gt;&gt; without continuations and without the forced full-page refresh.<br>&gt; &gt;&gt;&gt;&gt;<br>&gt; &gt;&gt;&gt;&gt; Lukas<br>&gt; &gt;&gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; _______________________________________________<br>&gt; &gt;&gt;&gt; seaside mailing list<br>&gt; &gt;&gt;&gt; seaside@lists.squeakfoundation.org<br>&gt; &gt;&gt;&gt; http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt; _______________________________________________<br>&gt; &gt;&gt; seaside mailing list<br>&gt; &gt;&gt; seaside@lists.squeakfoundation.org<br>&gt; &gt;&gt; http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside<br>&gt; &gt;&gt;<br>&gt; &gt; _______________________________________________<br>&gt; &gt; seaside mailing list<br>&gt; &gt; seaside@lists.squeakfoundation.org<br>&gt; &gt; http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside<br>&gt; &gt;<br>&gt; _______________________________________________<br>&gt; seaside mailing list<br>&gt; seaside@lists.squeakfoundation.org<br>&gt; http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside<br></div></div>                                               </body>
</html>