Wow, this is great stuff!  setupComet was a very thoughtful addition.
Thanks, David.

Regards,
Bryan

On May 12, 6:13 pm, David Pollak <[email protected]>
wrote:
> Bryan,
>
> I've reworked your example... and based on my re-work, I added a method to
> LiftSession that allows you to send messages to a CometActor referenced
> later on.
>
> I hope you like it.
>
> Thanks,
>
> David
>
>
>
> On Mon, May 11, 2009 at 7:08 PM, Bryan. <[email protected]> wrote:
>
> > Yes, the alerts were there just to illustrate that I am trying to push
> > some JavaScript objects over the wire.  In my project code I also have
> > additional methods that will be called on these objects (i.e. sorting,
> > pagination, etc...) that make it faster for the client end if I just
> > use these objects instead of traversing the HTML; it also makes it
> > easier for me to implement and is independent of any changes made to
> > the markup.
>
> > If the example I provided is some one-off implementation, then let me
> > know and I will start looking into some comet alternatives or try to
> > come up with some "hack".  Is there a way to currently check if the
> > page is ready for the partialUpdate?  If so, then I can just add some
> > guard to the cases in my partial function passed to lowPriority.
>
> > Thanks,
> > Bryan
>
> > On May 11, 6:31 pm, David Pollak <[email protected]>
> > wrote:
> > > On Mon, May 11, 2009 at 3:08 PM, Bryan. <[email protected]> wrote:
>
> > > > Hi David,
>
> > > > Is it possible that the partialUpdate is being called before the page
> > > > is ready?
>
> > > Yes.
>
> > > Doing alerts in partial updates is not optimal.  I'd suggest doing all
> > the
> > > drawing via HTML.  You can do a partial update in a way that it will
> > modify
> > > the HTML.
>
> > > When a CometActor is rendered on a new page, its render method is called
> > if
> > > there have been partial updates to the component since the component was
> > > last rendered.
>
> > > >  It works fine if I put Thread.sleep(1000) after the case
> > > > Results.
>
> > > > Thanks,
> > > > Bryan
>
> > > > On May 11, 5:21 pm, David Pollak <[email protected]>
> > > > wrote:
> > > > > Try putting the "this.start" at the end of the Actor body... I think
> > the
> > > > > start method is being called prematurely.
>
> > > > > On Mon, May 11, 2009 at 1:14 PM, Bryan. <[email protected]> wrote:
>
> > > > > > I posted this message through the Google Groups interface and was
> > > > > > forced to upload tohttp://
> > groups.google.com/group/liftweb/files?hl=en.
> > > > > > Sorry about the confusion.
>
> > > > > > --Bryan
>
> > > > > > On May 11, 4:01 pm, David Pollak <[email protected]>
> > > > > > wrote:
> > > > > > > You didn't include the code... :-(
>
> > > > > > > On Mon, May 11, 2009 at 12:18 PM, Bryan <[email protected]>
> > wrote:
>
> > > > > > > > This could be a result of my strange usage of comet actors, but
> > I'm
> > > > > > > > getting incosistent comet behavior.  When run in windows +
> > jetty I
> > > > > > > > have no problems.  In linux + jetty, subsequent requests fail.
> > > >  I'll
> > > > > > > > explain.
>
> > > > > > > > I have attached comet-test.tar.gz to the files page as an
> > example.
> > > > > > > > When you enter in a search term and click on submit it should
> > popup
> > > > up
> > > > > > > > 2 JS alert messages.  This seems to work everytime upon first
> > > > request
> > > > > > > > (when you restart jetty).  On all susequent tries of the Jetty
> > > > > > > > instance, the comet requests fail when you click back to the
> > home
> > > > page
> > > > > > > > and search again.  I've tried clearing my browser cache,
> > cookies,
> > > > and
> > > > > > > > even trying on a remote windows browser with no luck.  If I add
> > > > > > > > Thread.sleep(1000) to the comet actor's localSetup, then
> > everything
> > > > > > > > appears to work OK.
>
> > > > > > > > Please see the sample code and let me know if I'm doing
> > something
> > > > > > > > wrong.
>
> > > > > > > > Thanks,
> > > > > > > > Bryan
>
> > > > > > > --
> > > > > > > Lift, the simply functional web frameworkhttp://liftweb.net
> > > > > > > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > > > > > > Follow me:http://twitter.com/dpp
> > > > > > > Git some:http://github.com/dpp
>
> > > > > --
> > > > > Lift, the simply functional web frameworkhttp://liftweb.net
> > > > > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > > > > Follow me:http://twitter.com/dpp
> > > > > Git some:http://github.com/dpp
>
> > > --
> > > Lift, the simply functional web frameworkhttp://liftweb.net
> > > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > > Follow me:http://twitter.com/dpp
> > > Git some:http://github.com/dpp
>
> --
> Lift, the simply functional web frameworkhttp://liftweb.net
> Beginning Scalahttp://www.apress.com/book/view/1430219890
> Follow me:http://twitter.com/dpp
> Git some:http://github.com/dpp
>
>  comet-test.tgz
> 6KViewDownload

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to