Hello,
im Playing around with Lift Snippets and die Ajax Examples provided in
the Demo.
I've learned from the FAQ the a Snippet default lives for a request
time.
Now i have following Ajax example:
class HelloFormAjax {
def sample = {
var cnt = 0
<span>
{
a(() => {cnt = cnt + 1; SetHtml("cnt_id", Text( cnt.toString))},
<span>Click me to increase the count
(currently <span id='cnt_id'>0</span>)</span>)
}</span>
}
}
Here is what i observed using Java Remote Debugger connecting my
Eclipse to Jetty:
The cnt = 0 expression is executed once a request (Reload of the
Browser Page).
Now I wonder where the cnt var lives during the Ajax calls.
Thanks
Christian
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---