Thanks.
--
Andreas Joseph Krogh<and...@officenet.no> - mob: +47 909 56 963
Senior Software Developer / CTO - OfficeNet AS - http://www.officenet.no
Public key: http://home.officenet.no/~andreak/public_key.asc
> I have a comet-component and when receiving a special message (in
> lowPriority) I'd like to install a new comet-component on the existing
> page without reloading (and insert it using jQuery above the existing
> comet-component). Is this possible?
I haven't tried, but how about just SetHtml("myId", S.eval(<lift:comet>...</lift:comet>))
/Jeppe
I see that comet-actors spits out markup in the initial page-rendering
which declares JS-functions in the global-scope like:
function F421886944904COY31Q(obj) {liftAjax.lift_ajaxHandler('F421886944904COY31Q='+ encodeURIComponent(JSON.stringify(obj)), null,null);}
var destroy_F421886944901IWNRAP = function() {}
, which doesn't work using JS (AJAX) afaik. That's why I didn't bother
to try what you suggested, which I assume will fail according to my
knowledge of how JS works.
If my assumptions are correct the situation might be improved tho.
Instead of declaring these functions/variables in the globa-scope we
could have a Lift.Comet JS-object and we could register/de-register
JS-functions in that object more dynamically and make installing new
CometActors work using AJAX.
Can you elaborate how such a REST-comet-actor behaves and is configured?
> I have a good use case for that, also in David's github repo you will
> find the london_calling project, there is something like it. not sure
> if it fits your case, just an idea :)
Without new ideas the world would stop:-)
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
Can you point me to the relevant code so I can get a grip on how
difficult it is to implement that ticket (#933)?
I have a system with dynamic content panels. To make them work, the
area where the panels go is a comet actor that is part of the original
page. Inside that page, I have a block that I regularly swap out and I
have a "CometHelper" class that is affiliated with an HTML file. The
html file is loaded with an "embed" tag in a comet update. The
CometHelper class is created using reflection.
When the panel needs an update, it sends a message to the CometActor
which calls the CometHelper function that generates the actual update.
It might not be quite as pretty as being able to dynamically load
CometActors but it works just fine.
Donald
On 02/13/2012 03:39 PM, David Pollak wrote:Can you point me to the relevant code so I can get a grip on how difficult it is to implement that ticket (#933)?
Andreas,
Lift doesn't allow adding a CometActor/Comet Component to an already rendered page. There's an open ticket for the issue..
Thanks.
--
Andreas Joseph Krogh<and...@officenet.no> - mob: +47 909 56 963
Senior Software Developer / CTO - OfficeNet AS - http://www.officenet.no
Public key: http://home.officenet.no/~andreak/public_key.asc
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
On Mon, Feb 13, 2012 at 6:44 AM, Andreas Joseph Krogh <and...@officenet.no> wrote:
On 02/13/2012 03:39 PM, David Pollak wrote:Can you point me to the relevant code so I can get a grip on how difficult it is to implement that ticket (#933)?
Andreas,
Lift doesn't allow adding a CometActor/Comet Component to an already rendered page. There's an open ticket for the issue..
Some of the code is in LiftMerge.scala (the merge method) and some of the code is in ScriptRenderer.scala in the cometScript method.
The key is to update the list of CometActors to watch.