[Seaside] Comet and #call:
andres
andres at lifia.info.unlp.edu.ar
Thu Jul 29 20:12:46 UTC 2010
Hi list,
<Intro>
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:
aComponent
update: aDivId
with: otherComponent
and as a result the div's content will be replaced with the html
produced by "otherComponent renderContentOn:".
</Intro>
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:
MyApp>>...
self
update: #componentPane
with: Component1 new.
where:
Component1>>renderContentOn: hmtl
html anchor
callback: [self call: Component2 new];
with: 'A call'.
Component2>>renderContentOn: html
html anchor
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
an iFrame.
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,
Andrés
More information about the seaside
mailing list