[Seaside] Comet and #call:
andres at lifia.info.unlp.edu.ar
Thu Jul 29 20:12:46 UTC 2010
we have a comet implementation (based on Luka's work) that
allows us to push components from the server to the client. Details
aside, we can basically do something like:
and as a result the div's content will be replaced with the html
produced by "otherComponent renderContentOn:".
Now consider a scenario where an application (say MyApp) has a div whose
id is #componentPane:. As a result of a server-generated event I can
evaluate something like:
with: Component1 new.
callback: [self call: Component2 new];
with: 'A call'.
callback: [self answer];
with: 'An answer'
The problem I'm facing right now is that when the the #call is issued
the whole page is refreshed (which I know is the expected behaviour).
What I need is a new type of call (something like #call: aComponent
inside: aDivId) that has the same #call / #answer semantic but that only
changes the contents of that specific div, without requesting the whole
page. So, in a sense, I need the #componentPane div to behave partly as
AFAICS the displaying problem can be solved in different ways (by the
comet #update:with: message or with an AJAX update maybe), where I'm
completely lost is in the management of the continuation. I've been
trying to adapt the code in WAComponent>>call: without any luck :(. So,
do you think this can be done? Am I missing something important about
the way Seaside works? Any hints are very much appreciated!
Thanks in advance,
More information about the seaside