[Lift] Re: Lifecycle of a Lift Snippet Class

2008-10-22 Thread David Pollak
On Wed, Oct 22, 2008 at 3:20 PM, Derek Chen-Becker [EMAIL PROTECTED]wrote: Technically it lives in your session. The closure (not 100% sure that's the correct term): () = {cnt = cnt + 1; SetHtml(cnt_id, Text( cnt.toString))} Creates a function object (of type

[Lift] Re: Lifecycle of a Lift Snippet Class

2008-10-22 Thread Jorge Ortiz
To add to Derek's explanation, if you want to keep some server-side state that gets updated with AJAX calls, take a look at some of the stuff in liftweb/sites/example. You can use a SessionVar (as in Count.scala) or a StatefulSnippet (as in CountGame.scala or ArcChallenge.scala). --j On Wed, Oct

[Lift] Re: Lifecycle of a Lift Snippet Class

2008-10-22 Thread Derek Chen-Becker
On Wed, Oct 22, 2008 at 4:41 PM, David Pollak [EMAIL PROTECTED] wrote: Awesome! Couldn't have explained it better myself. I've learned from the master ;) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift