[Lift] Re: Trouble getting lift up and running
Found the following command which solves the problem for me: mvn archetype:generate -DarchetypeCatalog=http://scala-tools.org/ Would still be great to know what went wrong. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: How to stop validations if previous validator returns error.
Hi. I have found StopValidationOnError trait in Mapper.scala, But I couldn't understand how to use it. Please show me a example. thanks. On 9月15日, 午前4:08, David Pollak feeder.of.the.be...@gmail.com wrote: I'll check code in after it passes the reviewboard process that let's you mix in: trait StopValidationOnError[T] extends Function1[T, List[FieldError]] to a validation function such that the validator will stop processing a given field if a validator that has that trait mixed in returns a validation error. On Sun, Sep 6, 2009 at 3:02 PM, ishiijp yoshinori.is...@gmail.com wrote: I'm looking for a way to stop MappedField validations if prefvious validator returns error. For example: object Alphabets extends MappedString(this, 20) { override def validations = valMinLen(1, Alphabets is required) _ :: valRegex(Pattern.compile(^[a-zA-Z]+$, It's not alphabets!) _ :: super.validations } if valMinLen returns error, I don't want to process valRegex. My solutions are (1) define custom validator which works as I want. (2) override MappedField#validate() If you have other ideas, please help me. Thanks in advance. -- 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 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: How to share request scope data among snippets in Lift
Thank you for your example, David. It will work in my purpose. It seems that my poor English and less information let some people confused. I need just a request scope data. It means I want to share information between snippets across a request. (Is the expression request scope not good for in this case...?) Thank all responsed my post, and your suggestions are informative. I think very nice community is here. On 9月26日, 午後10:33, David Pollak feeder.of.the.be...@gmail.com wrote: To share information between snippets during a request, use a RequestVar: object MyInfo extends RequestVar(calculate_value) so object MyInfo extends RequestVar[Box[Invoice]](Empty) in one snippet, you may calculate the Invoice and put it in the MyInfo: MyInfo.set(Full(invoice)) In another snippet, you can extract: for { invoice - MyInfo.is } yield ... Note that the calculate_value is a call-by-name parameter, so it will be invoked each time the RequestVar is uninitialized. You can place lazy calculation logic in here. On Sat, Sep 26, 2009 at 12:14 AM, ishiijp yoshinori.is...@gmail.com wrote: Hi. If my lift application have some data that cost to create, and I want to share it among snippets, how to do in Lift? if such data are shared inside one snippet, I may use lazy val. But I have no nice idea to share it among different snippts. Thanks much. -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Surf the harmonics --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Lift with JavaRebel, Jetty: Can I add views and/or modify Boot.scala without restarting Jetty?
Boot is just executed at webapp init, hence the observed behavior. Changing this is a tricky thing On Oct 4, 2009 4:35 AM, Alex Black a...@alexblack.ca wrote: I'm just getting started with Lift and Scala, and I'm excited about using JavaRebel to avoid waiting to restart Jetty every time I make a change. It seems to be working well: I can see changes made to snippets for example right away, I'm running mvn scala:cc: and I see it pick up the changes. However, if I add a new view say test2.html, then modify the sitemap Boot.scala, I can't access test2 until I restart Jetty, even though I saw that scala.cc picked up the change and recompiled Boot.scala. Should this be possible? Thanks! - Alex --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: lift-json's extract and Mapper
I don't know how hard would it be to add this feature, so I don't know if this is a reasonable request. This would make making JSON API endpoints really easy for me and I hope for other people too. This certainly sounds like a reasonable feature request, I will take a deeper look at it. Meanwhile, you can use tmp case class as Kevin noted, or use for- comprehension to query the json. Something like: { packet: { node: 00:1D:C9:00:04:9F, dt: 1254553581405, temp: 27.5 } } val json = parse(s) for { JField(node, JString(node)) - json JField(dt, JInt(dt)) - json JField(temp, JDouble(temp)) - json } yield // construct Packet here That's a bit verbose but quite flexible. This test case contains more query examples: http://github.com/dpp/liftweb/blob/master/lift-json/src/test/scala/net/liftweb/json/QueryExamples.scala Cheers Joni --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Lift with JavaRebel, Jetty: Can I add views and/or modify Boot.scala without restarting Jetty?
Agreed - changes that modify lifts enviroment require restarting jetty. It's not ideal perhaps, but it's with good reason. Cheers, Tim Sent from my iPhone On 4 Oct 2009, at 11:24, Viktor Klang viktor.kl...@gmail.com wrote: Boot is just executed at webapp init, hence the observed behavior. Changing this is a tricky thing On Oct 4, 2009 4:35 AM, Alex Black a...@alexblack.ca wrote: I'm just getting started with Lift and Scala, and I'm excited about using JavaRebel to avoid waiting to restart Jetty every time I make a change. It seems to be working well: I can see changes made to snippets for example right away, I'm running mvn scala:cc: and I see it pick up the changes. However, if I add a new view say test2.html, then modify the sitemap Boot.scala, I can't access test2 until I restart Jetty, even though I saw that scala.cc picked up the change and recompiled Boot.scala. Should this be possible? Thanks! - Alex --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] comet
How can assure that every time a comet page is loaded, it starts again fresh? I.e. as if the page were being loaded for the first time? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Lift with JavaRebel, Jetty: Can I add views and/or modify Boot.scala without restarting Jetty?
Thanks Tim and Viktor.. Thats disappointing, I was hoping I wouldn't have to restart the jetty server if when I added a new view. Maybe there is a creative way around this? E.g. is there a way to get a new view/page into lift without modifying Boot.scala? - Alex On Oct 4, 11:09 am, Timothy Perrett timo...@getintheloop.eu wrote: Agreed - changes that modify lifts enviroment require restarting jetty. It's not ideal perhaps, but it's with good reason. Cheers, Tim Sent from my iPhone On 4 Oct 2009, at 11:24, Viktor Klang viktor.kl...@gmail.com wrote: Boot is just executed at webapp init, hence the observed behavior. Changing this is a tricky thing On Oct 4, 2009 4:35 AM, Alex Black a...@alexblack.ca wrote: I'm just getting started with Lift and Scala, and I'm excited about using JavaRebel to avoid waiting to restart Jetty every time I make a change. It seems to be working well: I can see changes made to snippets for example right away, I'm running mvn scala:cc: and I see it pick up the changes. However, if I add a new view say test2.html, then modify the sitemap Boot.scala, I can't access test2 until I restart Jetty, even though I saw that scala.cc picked up the change and recompiled Boot.scala. Should this be possible? Thanks! - Alex --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Lift with JavaRebel, Jetty: Can I add views and/or modify Boot.scala without restarting Jetty?
Well this is not Lift's fault ... Lift application is initialized only once as the servlet filter is. Running boot more then once per context may lead to unexpected behaviors and in LiftRules we have a guard for RuleSeq that they can not be changed after boot is executed. You could however dynamically re-set the SiteMap ... something like LiftRules.siteMap.map(sm = LiftRules.setSiteMap(SiteMap((sm.menus ++ some_otherMenus):_*)) where some_otherMenus is a List[Menu] (I haven't actually compiled the code but you get the idea) But this is not quite what you want and I'm not even convinced that we should allow things like this. Br's, Marius On Oct 4, 6:11 pm, Alex Black a...@alexblack.ca wrote: Thanks Tim and Viktor.. Thats disappointing, I was hoping I wouldn't have to restart the jetty server if when I added a new view. Maybe there is a creative way around this? E.g. is there a way to get a new view/page into lift without modifying Boot.scala? - Alex On Oct 4, 11:09 am, Timothy Perrett timo...@getintheloop.eu wrote: Agreed - changes that modify lifts enviroment require restarting jetty. It's not ideal perhaps, but it's with good reason. Cheers, Tim Sent from my iPhone On 4 Oct 2009, at 11:24, Viktor Klang viktor.kl...@gmail.com wrote: Boot is just executed at webapp init, hence the observed behavior. Changing this is a tricky thing On Oct 4, 2009 4:35 AM, Alex Black a...@alexblack.ca wrote: I'm just getting started with Lift and Scala, and I'm excited about using JavaRebel to avoid waiting to restart Jetty every time I make a change. It seems to be working well: I can see changes made to snippets for example right away, I'm running mvn scala:cc: and I see it pick up the changes. However, if I add a new view say test2.html, then modify the sitemap Boot.scala, I can't access test2 until I restart Jetty, even though I saw that scala.cc picked up the change and recompiled Boot.scala. Should this be possible? Thanks! - Alex --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: comet
Well render will be called for sure ... but if you build your comet component to rely only with partial updates when updating coment's real estate and don't call re-render then render should be called only when page is loaded, meaning that you can reset any state there. ... of course unless something escapes me :) Br's, Marius On Oct 4, 6:12 pm, jack jack.wid...@gmail.com wrote: How can assure that every time a comet page is loaded, it starts again fresh? I.e. as if the page were being loaded for the first time? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: 1.1-SNAPSHOT and Snippet problems?
Anyways, I was definitely screwed up ... forcing maven to actually do what it was supposed to fixed my problem. Thanks for the pointer Marius. ~Thomas On Sat, Oct 3, 2009 at 5:39 PM, Thomas Rampelberg pyronic...@gmail.com wrote: I thought that I'd just updated all the versions . from that stack trace, how do you tell which version lift-util is? On Sat, Oct 3, 2009 at 1:39 PM, marius d. marius.dan...@gmail.com wrote: What verions of lift are you using? It appears that lift-util is a different version than lift ? Br's, Marius On Oct 3, 11:11 pm, Thomas Rampelberg pyronic...@gmail.com wrote: I just synced up to main this morning and now whenever I try and use one of my snippets, I'm getting the traceback below. Any hints on what I'm doing wrong? The snippet in question is just the basic Util.in/Util.out that the tutorial has you write. div class=column span-17 last lift:Util.in lift:bind name=content / /lift:Util.in lift:Util.out h3 class=alt You must be logged in to view this content. lift:menu.item name=LoginLogin/lift:menu.item /h3 /lift:Util.out /div class Util { def in(html: NodeSeq) = if (User.loggedIn_?) html else NodeSeq.Empty def out(html: NodeSeq) = if (!User.loggedIn_?) html else NodeSeq.Empty } Message: java.lang.AbstractMethodError: net.liftweb.util.Helpers$.tryo(Lscala/PartialFunction;Lscala/Function0;)Lnet/liftweb/util/Box; net.liftweb.http.LiftSession.net$liftweb$http$LiftSession$$instantiateOrRedirect(LiftSession.scala:862) net.liftweb.http.LiftSession$$anonfun$net$liftweb$http$LiftSession$$findSnippetInstance$1$$anonfun$apply$41.apply(LiftSession.scala:911) net.liftweb.http.LiftSession$$anonfun$net$liftweb$http$LiftSession$$findSnippetInstance$1$$anonfun$apply$41.apply(LiftSession.scala:911) net.liftweb.util.Full.flatMap(Box.scala:332) net.liftweb.http.LiftSession$$anonfun$net$liftweb$http$LiftSession$$findSnippetInstance$1.apply(LiftSession.scala:911) net.liftweb.http.LiftSession$$anonfun$net$liftweb$http$LiftSession$$findSnippetInstance$1.apply(LiftSession.scala:911) net.liftweb.util.EmptyBox.or(Box.scala:374) net.liftweb.http.LiftSession.net$liftweb$http$LiftSession$$findSnippetInstance(LiftSession.scala:910) net.liftweb.http.LiftSession$$anonfun$locateAndCacheSnippet$1$1$$anonfun$17.apply(LiftSession.scala:967) net.liftweb.http.LiftSession$$anonfun$locateAndCacheSnippet$1$1$$anonfun$17.apply(LiftSession.scala:967) net.liftweb.util.EmptyBox.or(Box.scala:374) net.liftweb.http.LiftSession$$anonfun$locateAndCacheSnippet$1$1.apply(LiftSession.scala:967) net.liftweb.http.LiftSession$$anonfun$locateAndCacheSnippet$1$1.apply(LiftSession.scala:966) net.liftweb.util.EmptyBox.or(Box.scala:374) net.liftweb.http.LiftSession.locateAndCacheSnippet$1(LiftSession.scala:966) net.liftweb.http.LiftSession$$anonfun$18$$anonfun$apply$45$$anonfun$apply$48$$anonfun$apply$50.apply(LiftSession.scala:978) net.liftweb.http.LiftSession$$anonfun$18$$anonfun$apply$45$$anonfun$apply$48$$anonfun$apply$50.apply(LiftSession.scala:976) net.liftweb.util.EmptyBox.openOr(Box.scala:372) net.liftweb.http.LiftSession$$anonfun$18$$anonfun$apply$45$$anonfun$apply$48.apply(LiftSession.scala:976) net.liftweb.http.LiftSession$$anonfun$18$$anonfun$apply$45$$anonfun$apply$48.apply(LiftSession.scala:976) net.liftweb.util.EmptyBox.openOr(Box.scala:372) net.liftweb.http.LiftSession$$anonfun$18$$anonfun$apply$45.apply(LiftSession.scala:975) net.liftweb.http.LiftSession$$anonfun$18$$anonfun$apply$45.apply(LiftSession.scala:975) net.liftweb.http.S$.doSnippet(S.scala:1586) net.liftweb.http.LiftSession$$anonfun$18.apply(LiftSession.scala:973) net.liftweb.http.LiftSession$$anonfun$18.apply(LiftSession.scala:972) net.liftweb.util.Full.map(Box.scala:330) net.liftweb.http.LiftSession.net$liftweb$http$LiftSession$$processSnippet(LiftSession.scala:972) net.liftweb.http.LiftSession$$anonfun$_defaultLiftTagProcessing$1.apply(LiftSession.scala:1073) net.liftweb.http.LiftSession$$anonfun$_defaultLiftTagProcessing$1.apply(LiftSession.scala:1061) net.liftweb.util.NamedPF.apply(NamedPartialFunction.scala:30) net.liftweb.util.NamedPF$.apply(NamedPartialFunction.scala:76) net.liftweb.http.LiftSession$$anonfun$processSurroundAndInclude$1$$anonfun$apply$57$$anonfun$apply$58$$anonfun$apply$59.apply(LiftSession.scala:1094) net.liftweb.http.LiftSession$$anonfun$processSurroundAndInclude$1$$anonfun$apply$57$$anonfun$apply$58$$anonfun$apply$59.apply(LiftSession.scala:1094) net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:65)
[Lift] Re: Lift with JavaRebel, Jetty: Can I add views and/or modify Boot.scala without restarting Jetty?
Marius, I'm not trying to lay blame :) I'm sure I'll get by, restarting jetty when pages are added.. I was hoping for more though given what I'd read about JavaRebel and Lift integration. - Alex On Oct 4, 11:40 am, marius d. marius.dan...@gmail.com wrote: Well this is not Lift's fault ... Lift application is initialized only once as the servlet filter is. Running boot more then once per context may lead to unexpected behaviors and in LiftRules we have a guard for RuleSeq that they can not be changed after boot is executed. You could however dynamically re-set the SiteMap ... something like LiftRules.siteMap.map(sm = LiftRules.setSiteMap(SiteMap((sm.menus ++ some_otherMenus):_*)) where some_otherMenus is a List[Menu] (I haven't actually compiled the code but you get the idea) But this is not quite what you want and I'm not even convinced that we should allow things like this. Br's, Marius On Oct 4, 6:11 pm, Alex Black a...@alexblack.ca wrote: Thanks Tim and Viktor.. Thats disappointing, I was hoping I wouldn't have to restart the jetty server if when I added a new view. Maybe there is a creative way around this? E.g. is there a way to get a new view/page into lift without modifying Boot.scala? - Alex On Oct 4, 11:09 am, Timothy Perrett timo...@getintheloop.eu wrote: Agreed - changes that modify lifts enviroment require restarting jetty. It's not ideal perhaps, but it's with good reason. Cheers, Tim Sent from my iPhone On 4 Oct 2009, at 11:24, Viktor Klang viktor.kl...@gmail.com wrote: Boot is just executed at webapp init, hence the observed behavior. Changing this is a tricky thing On Oct 4, 2009 4:35 AM, Alex Black a...@alexblack.ca wrote: I'm just getting started with Lift and Scala, and I'm excited about using JavaRebel to avoid waiting to restart Jetty every time I make a change. It seems to be working well: I can see changes made to snippets for example right away, I'm running mvn scala:cc: and I see it pick up the changes. However, if I add a new view say test2.html, then modify the sitemap Boot.scala, I can't access test2 until I restart Jetty, even though I saw that scala.cc picked up the change and recompiled Boot.scala. Should this be possible? Thanks! - Alex --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Lift with JavaRebel, Jetty: Can I add views and/or modify Boot.scala without restarting Jetty?
I know Alex :) ... It's just when you change a class and it is immediately exposed by JavaRebel a call flow must imply thechanged class in order to see the changes in action and for Boot it is not applicable as it's executed only once. But you already know that ... Br's, Marius On Oct 4, 6:48 pm, Alex Black a...@alexblack.ca wrote: Marius, I'm not trying to lay blame :) I'm sure I'll get by, restarting jetty when pages are added.. I was hoping for more though given what I'd read about JavaRebel and Lift integration. - Alex On Oct 4, 11:40 am, marius d. marius.dan...@gmail.com wrote: Well this is not Lift's fault ... Lift application is initialized only once as the servlet filter is. Running boot more then once per context may lead to unexpected behaviors and in LiftRules we have a guard for RuleSeq that they can not be changed after boot is executed. You could however dynamically re-set the SiteMap ... something like LiftRules.siteMap.map(sm = LiftRules.setSiteMap(SiteMap((sm.menus ++ some_otherMenus):_*)) where some_otherMenus is a List[Menu] (I haven't actually compiled the code but you get the idea) But this is not quite what you want and I'm not even convinced that we should allow things like this. Br's, Marius On Oct 4, 6:11 pm, Alex Black a...@alexblack.ca wrote: Thanks Tim and Viktor.. Thats disappointing, I was hoping I wouldn't have to restart the jetty server if when I added a new view. Maybe there is a creative way around this? E.g. is there a way to get a new view/page into lift without modifying Boot.scala? - Alex On Oct 4, 11:09 am, Timothy Perrett timo...@getintheloop.eu wrote: Agreed - changes that modify lifts enviroment require restarting jetty. It's not ideal perhaps, but it's with good reason. Cheers, Tim Sent from my iPhone On 4 Oct 2009, at 11:24, Viktor Klang viktor.kl...@gmail.com wrote: Boot is just executed at webapp init, hence the observed behavior. Changing this is a tricky thing On Oct 4, 2009 4:35 AM, Alex Black a...@alexblack.ca wrote: I'm just getting started with Lift and Scala, and I'm excited about using JavaRebel to avoid waiting to restart Jetty every time I make a change. It seems to be working well: I can see changes made to snippets for example right away, I'm running mvn scala:cc: and I see it pick up the changes. However, if I add a new view say test2.html, then modify the sitemap Boot.scala, I can't access test2 until I restart Jetty, even though I saw that scala.cc picked up the change and recompiled Boot.scala. Should this be possible? Thanks! - Alex --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Model Events
I have been looking for Web frameworks that will take advantage of an Event Driven programming model. Some Frameworks like Python's Zope and Grails manage to subscribe to Model Events. E.g. one can subscribe to a notification message, whenever a domain model gets changed, added, deleted, etc. (like explained here http://bit.ly/2AkVBy) Can the Lift Framework throw such events too? Similar to the way Grails and Zope do it? Or is there another way in Lift to do the same? I must say that I preety much do like the Lift Framework and it's fresh approach on important tasks like Comet, Templating, Active Record, Web Services, Localization... However one of my key requirements would be simple handling of events and notifications. Thank you Gregor --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Concurrency control of database access in Lift/Comet
I have read that the Lift framework supports the CometActor model. As far as I understand this is achieved by creating many threads out of some thread pool, each of which handles one or more client socket connection to a client. My question is, what kind of approach Lift takes to handle access from such threads to a shared object, e.g. a database? Many thread based applications use locks to access shared data, which however won't scale well. I read that better models would be timestamp ordering or multiversion concurrency control like e.g. used by CouchDB. Perhaps this is also handled automatically by the database and I don't have to bother about it at all from my application? Is it save to use a database connection from different threads? A simple example that came to my mind would be a Comet chat application, where one wants to save the communication to a database. How would the concurrent write requests from two threads to the database be handled in such case? Best regards Gregor --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Model Events
Scala has a natural support for events notifications = Scala Actors. It's a very natural fit for building event driven systems. In Lift we're moving CometActors to LiftActors instead of Scala Actors due to some memory consumption problems with current Scala actors implementation which are probably fixed now in Scala 2.7.7 RC1. So definitely yes, event driven programming is quite fitful in Lift. Br's, Marius On Oct 4, 8:25 pm, donfranciscodequevedo donfranciscodequev...@gmail.com wrote: I have been looking for Web frameworks that will take advantage of an Event Driven programming model. Some Frameworks like Python's Zope and Grails manage to subscribe to Model Events. E.g. one can subscribe to a notification message, whenever a domain model gets changed, added, deleted, etc. (like explained here http://bit.ly/2AkVBy) Can the Lift Framework throw such events too? Similar to the way Grails and Zope do it? Or is there another way in Lift to do the same? I must say that I preety much do like the Lift Framework and it's fresh approach on important tasks like Comet, Templating, Active Record, Web Services, Localization... However one of my key requirements would be simple handling of events and notifications. Thank you Gregor --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Concurrency control of database access in Lift/Comet
In my experience, the database engine itself does a pretty good job of managing concurrent connections like this out of the box, which is much of the reason why connection pooling is so effective. Of course, thinks can be a bit interesting on the database side if you want to get really obsessive about performance, with possibilities such as tinkering with page sizes, locking strategies, and such like, but it's extremely rare for this to be a bottleneck in an application. However... For the example you've given, I'd just run a dedicated actor to persist chat messages. There's no need to wait for a message to be persisted before displaying it to the user, so asynchronous messages can really help out here. On Sun, Oct 4, 2009 at 6:41 PM, donfranciscodequevedo donfranciscodequev...@gmail.com wrote: I have read that the Lift framework supports the CometActor model. As far as I understand this is achieved by creating many threads out of some thread pool, each of which handles one or more client socket connection to a client. My question is, what kind of approach Lift takes to handle access from such threads to a shared object, e.g. a database? Many thread based applications use locks to access shared data, which however won't scale well. I read that better models would be timestamp ordering or multiversion concurrency control like e.g. used by CouchDB. Perhaps this is also handled automatically by the database and I don't have to bother about it at all from my application? Is it save to use a database connection from different threads? A simple example that came to my mind would be a Comet chat application, where one wants to save the communication to a database. How would the concurrent write requests from two threads to the database be handled in such case? Best regards Gregor --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] How do you deploy yours?
Guys, Of late i've been having several discussions with people about how they deploy there lift apps... So, how do you deploy yours? Specifically, how are people managing multiple apps in one install of jetty? Or, alternatively, how are you embedded jetty so you have an executable JAR? Im using Winstone for apps that dont use Comet because the package is so slick (thanks DavidB), but now, I really really want to be able to embed jetty so I have an executable JAR in the same vein as Winstone. As time moves on, I feel like this is more and more important and we dont current have a defined path for n00bs. Cheers, Tim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Overriding superclass member objects (specifically mapped fields)
In reference to this problem: http://www.nabble.com/-scala--Overriding-superclass-object-member...-td15344451.html This use case in specific: trait Bar { self: Mapper = object barField extends StringField } class Foo extends Mapper with Bar { override barField { override def dbTableName = fruit_bat } } Did this problem ever get solved? Is there a way to override the defined fields of a superclass? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Model Events
Hi Marius, Thanks for your fast response. As an app developer, if I would like to get notified from the persistence layer, that some changes to my domain model have happened, how could I get such functionality with a Scala actor? By subclassing the persistence class? Or is such functionality already integrated in the persistence layer? Let's say I would like to get notified before some data is inserted in the database. How would I achieve that? Thanks again On 4 Okt., 20:37, marius d. marius.dan...@gmail.com wrote: Scala has a natural support for events notifications = Scala Actors. It's a very natural fit for building event driven systems. In Lift we're moving CometActors to LiftActors instead of Scala Actors due to some memory consumption problems with current Scala actors implementation which are probably fixed now in Scala 2.7.7 RC1. So definitely yes, event driven programming is quite fitful in Lift. Br's, Marius On Oct 4, 8:25 pm, donfranciscodequevedo donfranciscodequev...@gmail.com wrote: I have been looking for Web frameworks that will take advantage of an Event Driven programming model. Some Frameworks like Python's Zope and Grails manage to subscribe to Model Events. E.g. one can subscribe to a notification message, whenever a domain model gets changed, added, deleted, etc. (like explained here http://bit.ly/2AkVBy) Can the Lift Framework throw such events too? Similar to the way Grails and Zope do it? Or is there another way in Lift to do the same? I must say that I preety much do like the Lift Framework and it's fresh approach on important tasks like Comet, Templating, Active Record, Web Services, Localization... However one of my key requirements would be simple handling of events and notifications. Thank you Gregor --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: How do you deploy yours?
Just some more fuel for this debate: http://technically.us/code/x/to-jettison-geronimo/ Cheers, Tim On Oct 4, 8:46 pm, Timothy Perrett timo...@getintheloop.eu wrote: Guys, Of late i've been having several discussions with people about how they deploy there lift apps... So, how do you deploy yours? Specifically, how are people managing multiple apps in one install of jetty? Or, alternatively, how are you embedded jetty so you have an executable JAR? Im using Winstone for apps that dont use Comet because the package is so slick (thanks DavidB), but now, I really really want to be able to embed jetty so I have an executable JAR in the same vein as Winstone. As time moves on, I feel like this is more and more important and we dont current have a defined path for n00bs. Cheers, Tim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: comet
Well the way I have it render is being called multiple times so I can put initial code there. I have some code near the top of my Comet class and thats the code I want to run every time I load the page. Currently, it is only run the first time. On Oct 4, 11:50 am, marius d. marius.dan...@gmail.com wrote: Well render will be called for sure ... but if you build your comet component to rely only with partial updates when updating coment's real estate and don't call re-render then render should be called only when page is loaded, meaning that you can reset any state there. ... of course unless something escapes me :) Br's, Marius On Oct 4, 6:12 pm, jack jack.wid...@gmail.com wrote: How can assure that every time a comet page is loaded, it starts again fresh? I.e. as if the page were being loaded for the first time? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: How do you deploy yours?
Thanks for the linky, mate! Was a good read :) On Sun, Oct 4, 2009 at 11:45 PM, Timothy Perrett timo...@getintheloop.euwrote: Just some more fuel for this debate: http://technically.us/code/x/to-jettison-geronimo/ Cheers, Tim On Oct 4, 8:46 pm, Timothy Perrett timo...@getintheloop.eu wrote: Guys, Of late i've been having several discussions with people about how they deploy there lift apps... So, how do you deploy yours? Specifically, how are people managing multiple apps in one install of jetty? Or, alternatively, how are you embedded jetty so you have an executable JAR? Im using Winstone for apps that dont use Comet because the package is so slick (thanks DavidB), but now, I really really want to be able to embed jetty so I have an executable JAR in the same vein as Winstone. As time moves on, I feel like this is more and more important and we dont current have a defined path for n00bs. Cheers, Tim -- Viktor Klang Blog: klangism.blogspot.com Twttr: viktorklang Lift Committer - liftweb.com AKKA Committer - akkasource.org Cassidy - github.com/viktorklang/Cassidy.git SoftPub founder: http://groups.google.com/group/softpub --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] a very simple question
I put the line println(dude) in a Comet class write under the class declaration. i.e. class JoopComet extends CometActor with CometListenee { println(INSIDE COMET CLASS) When the class runs and all the activity is complete, I hit the back button and that loads the JoopComet class again. But I do not see dude printed. Why not? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: How do you deploy yours?
Viktor, you and I should not be up this late on a sunday! ;-) You have to see this: http://blogs.webtide.com/janb/entry/jetty_runner Im going to hash this together as a maven assembly; if it works, then i'll write a blog and stuff it on the wiki... this could really make self deploying apps very nice indeed. I'll check with DavidB, but im fairly sure it would also be trivial to make a little maven plugin that builds a single JAR output... Cheers, Tim On Oct 4, 11:10 pm, Viktor Klang viktor.kl...@gmail.com wrote: Thanks for the linky, mate! Was a good read :) On Sun, Oct 4, 2009 at 11:45 PM, Timothy Perrett timo...@getintheloop.euwrote: Just some more fuel for this debate: http://technically.us/code/x/to-jettison-geronimo/ Cheers, Tim On Oct 4, 8:46 pm, Timothy Perrett timo...@getintheloop.eu wrote: Guys, Of late i've been having several discussions with people about how they deploy there lift apps... So, how do you deploy yours? Specifically, how are people managing multiple apps in one install of jetty? Or, alternatively, how are you embedded jetty so you have an executable JAR? Im using Winstone for apps that dont use Comet because the package is so slick (thanks DavidB), but now, I really really want to be able to embed jetty so I have an executable JAR in the same vein as Winstone. As time moves on, I feel like this is more and more important and we dont current have a defined path for n00bs. Cheers, Tim -- Viktor Klang Blog: klangism.blogspot.com Twttr: viktorklang Lift Committer - liftweb.com AKKA Committer - akkasource.org Cassidy - github.com/viktorklang/Cassidy.git SoftPub founder:http://groups.google.com/group/softpub --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: a very simple question
If memory serves, the comet actor lives on in the session scope until its either sent the ShutDown message explicitly, or it times out (you can set the timeout). Does that help? Cheers, Tim On 4 Oct 2009, at 23:17, jack wrote: I put the line println(dude) in a Comet class write under the class declaration. i.e. class JoopComet extends CometActor with CometListenee { println(INSIDE COMET CLASS) When the class runs and all the activity is complete, I hit the back button and that loads the JoopComet class again. But I do not see dude printed. Why not? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: a very simple question
Well my app is a search application. You search for certain web pages and I do some processing after the results are displayed. Thats why I am using Comet. Certain information is added to each result link. I want the user to be able to either hit the back button or click on alink that goes to the search page again. When they enter a search term and click submit, I want to load the CometActor class again. Do you think sending a ShutDown message will accomplish this? After the session is killed, how do I get the CometActor to automatically load again. Do I send the message and then redirect to the page? I am just not comfortable yet with the mechanics of how Lift handles comet. Thanks in advance. Jack On Sun, Oct 4, 2009 at 6:50 PM, Timothy Perrett timo...@getintheloop.euwrote: If memory serves, the comet actor lives on in the session scope until its either sent the ShutDown message explicitly, or it times out (you can set the timeout). Does that help? Cheers, Tim On 4 Oct 2009, at 23:17, jack wrote: I put the line println(dude) in a Comet class write under the class declaration. i.e. class JoopComet extends CometActor with CometListenee { println(INSIDE COMET CLASS) When the class runs and all the activity is complete, I hit the back button and that loads the JoopComet class again. But I do not see dude printed. Why not? -- Jack --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: lift-json's extract and Mapper
Thanks, Joni. I've been playing with just that for comprehension syntax over the weekend. How would I do it if I had multiple packets? { packets: [ { node: 00:1D:C9:00:04:9F, dt: 1254553581405, temp: 27.5 }, { node: 00:1D:C9:00:04:9E, dt: 1254553582405, temp: 24.3 } ] } I've had some problems iterating across the parsed results. If I do: for { json - parse(s) JField(node, JString(node)) - json JField(dt, JInt(dt)) - json JField(temp, JDouble(temp)) - json } yield // construct Packet here I will end up with 8 Packets. Should I be doing something like JArray (json) - parse(s)? Thanks for your help, Peter On Oct 4, 3:08 pm, Joni Freeman freeman.j...@gmail.com wrote: I don't know how hard would it be to add this feature, so I don't know if this is a reasonable request. This would make making JSON API endpoints really easy for me and I hope for other people too. This certainly sounds like a reasonable feature request, I will take a deeper look at it. Meanwhile, you can use tmp case class as Kevin noted, or use for- comprehension to query the json. Something like: { packet: { node: 00:1D:C9:00:04:9F, dt: 1254553581405, temp: 27.5 } } val json = parse(s) for { JField(node, JString(node)) - json JField(dt, JInt(dt)) - json JField(temp, JDouble(temp)) - json } yield // construct Packet here That's a bit verbose but quite flexible. This test case contains more query examples:http://github.com/dpp/liftweb/blob/master/lift-json/src/test/scala/ne... Cheers Joni --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: CometActor timeout problem
Atsuhiko, With the code exactly as you wrote it, how would you modify it to do this? Whenver the Comet Page gets loaded, it resets itself. On Oct 3, 12:47 am, Atsuhiko Yamanaka atsuhiko.yaman...@gmail.com wrote: Hi, On Sat, Oct 3, 2009 at 1:05 PM, jack jack.wid...@gmail.com wrote: Atsuhiko, The way I have modified the code, each thread is returning its Package object at different times. But its seems the screen updates only when they all have completed. Could you tell me what piece of the code makes the screen update? Can you show your code? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Model Events
Hi Gregor, For my Mapper model called Packet, my companion object looks like this: object Packet extends Packet with LongKeyedMetaMapper[Packet] { override def dbTableName = packets // define the DB table name /* register callback to send the new packet */ override def afterCreate = createdRow _ :: super.afterCreate private def createdRow(packet: Packet) { DatacenterBroker.createdPacket(packet) } } As you can see, after a Packet is created it is sent to an Actor (using the broker object as an intermediary). The Scaladocs for MetaMapper show many before and after events that you can override like I've done with afterCreate: http://scala-tools.org/mvnsites-snapshots/liftweb/lift-mapper/scaladocs/net/liftweb/mapper/MetaMapper.html Peter Robinett On Oct 4, 10:47 pm, donfranciscodequevedo donfranciscodequev...@gmail.com wrote: Hi Marius, Thanks for your fast response. As an app developer, if I would like to get notified from the persistence layer, that some changes to my domain model have happened, how could I get such functionality with a Scala actor? By subclassing the persistence class? Or is such functionality already integrated in the persistence layer? Let's say I would like to get notified before some data is inserted in the database. How would I achieve that? Thanks again On 4 Okt., 20:37, marius d. marius.dan...@gmail.com wrote: Scala has a natural support for events notifications = Scala Actors. It's a very natural fit for building event driven systems. In Lift we're moving CometActors to LiftActors instead of Scala Actors due to some memory consumption problems with current Scala actors implementation which are probably fixed now in Scala 2.7.7 RC1. So definitely yes, event driven programming is quite fitful in Lift. Br's, Marius On Oct 4, 8:25 pm, donfranciscodequevedo donfranciscodequev...@gmail.com wrote: I have been looking for Web frameworks that will take advantage of an Event Driven programming model. Some Frameworks like Python's Zope and Grails manage to subscribe to Model Events. E.g. one can subscribe to a notification message, whenever a domain model gets changed, added, deleted, etc. (like explained here http://bit.ly/2AkVBy) Can the Lift Framework throw such events too? Similar to the way Grails and Zope do it? Or is there another way in Lift to do the same? I must say that I preety much do like the Lift Framework and it's fresh approach on important tasks like Comet, Templating, Active Record, Web Services, Localization... However one of my key requirements would be simple handling of events and notifications. Thank you Gregor --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: a very simple question
Maybe you could put a snppet on the page whose job is to reset the comet? - Jack Widmanjack.wid...@gmail.com wrote: Well my app is a search application. You search for certain web pages and I do some processing after the results are displayed. Thats why I am using Comet. Certain information is added to each result link. I want the user to be able to either hit the back button or click on alink that goes to the search page again. When they enter a search term and click submit, I want to load the CometActor class again. Do you think sending a ShutDown message will accomplish this? After the session is killed, how do I get the CometActor to automatically load again. Do I send the message and then redirect to the page? I am just not comfortable yet with the mechanics of how Lift handles comet. Thanks in advance. Jack On Sun, Oct 4, 2009 at 6:50 PM, Timothy Perrett timo...@getintheloop.euwrote: If memory serves, the comet actor lives on in the session scope until its either sent the ShutDown message explicitly, or it times out (you can set the timeout). Does that help? Cheers, Tim On 4 Oct 2009, at 23:17, jack wrote: I put the line println(dude) in a Comet class write under the class declaration. i.e. class JoopComet extends CometActor with CometListenee { println(INSIDE COMET CLASS) When the class runs and all the activity is complete, I hit the back button and that loads the JoopComet class again. But I do not see dude printed. Why not? -- Jack --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: CometActor timeout problem
Hi, On Mon, Oct 5, 2009 at 8:16 AM, jack jack.wid...@gmail.com wrote: With the code exactly as you wrote it, how would you modify it to do this? Whenver the Comet Page gets loaded, it resets itself. How about wrapping your CometActor page with the snippet? Please refer to attached diff file. Sincerely, -- Atsuhiko Yamanaka JCraft,Inc. 1-14-20 HONCHO AOBA-KU, SENDAI, MIYAGI 980-0014 Japan. Tel +81-22-723-2150 +1-415-578-3454 Skype callto://jcraft/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~--- diff -Naur src/main/scala/com/authoritude/snippet/JoopCometWrapper.scala src.new/main/scala/com/authoritude/snippet/JoopCometWrapper.scala --- src/main/scala/com/authoritude/snippet/JoopCometWrapper.scala 1970-01-01 00:00:00.0 + +++ src.new/main/scala/com/authoritude/snippet/JoopCometWrapper.scala 2009-10-05 04:06:00.0 + @@ -0,0 +1,12 @@ +package com.authoritude.snippet + +import _root_.scala.xml.NodeSeq + +class JoopCometWrapper { + def render(node:NodeSeq) = { +TSGetterLauncher.tick +node + } +} + + diff -Naur src/main/webapp/test.html src.new/main/webapp/test.html --- src/main/webapp/test.html 2009-09-29 21:09:18.0 + +++ src.new/main/webapp/test.html 2009-10-05 04:01:42.0 + @@ -1,7 +1,9 @@ lift:surround with=default at=content - lift:comet type=JoopComet name=Other -auth:joop/auth:joop - /lift:comet + lift:JoopCometWrapper + lift:comet type=JoopComet name=Other + auth:joop/auth:joop + /lift:comet + /lift:JoopCometWrapper /lift:surround
[Lift] Re: CometActor timeout problem
Excellent. Thanks. On Oct 5, 12:14 am, Atsuhiko Yamanaka atsuhiko.yaman...@gmail.com wrote: Hi, On Mon, Oct 5, 2009 at 8:16 AM, jack jack.wid...@gmail.com wrote: With the code exactly as you wrote it, how would you modify it to do this? Whenver the Comet Page gets loaded, it resets itself. How about wrapping your CometActor page with the snippet? Please refer to attached diff file. Sincerely, -- Atsuhiko Yamanaka JCraft,Inc. 1-14-20 HONCHO AOBA-KU, SENDAI, MIYAGI 980-0014 Japan. Tel +81-22-723-2150 +1-415-578-3454 Skype callto://jcraft/ diff.txt 1KViewDownload --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] execute code when browser is closed
I would like to call a function when the browser is closed. How do I do this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---