[Lift] Re: Comet request exception
How can I share my sources? By the way, I use 1.1-SNAPSHOT version of Lift On 4 июн, 02:15, David Pollak feeder.of.the.be...@gmail.com wrote: I just tested against 6.1.18 and it works just fine. Can you post the source of your failing app and a link to your version of Jetty and I'll track it down? Thanks, David On Wed, Jun 3, 2009 at 12:19 PM, feelgood asseliva...@gmail.com wrote: I just copied comet sample named Clock from the p. 142 of the liftbook into my app. It doesn't work. First time it renders timestamp normally, but since 10 seconds: WARN - Request for /comet_request/58946720417/1ha35q9iqp4el failed Bail java.lang.Exception: Bail at net.liftweb.http.LiftRules$.doContinuation(LiftRules.scala:436) at net.liftweb.http.LiftServlet.setupContinuation(LiftServlet.scala: 352) at net.liftweb.http.LiftServlet.handleComet(LiftServlet.scala:363) at net.liftweb.http.LiftServlet.net$liftweb$http$LiftServlet$ $dispatchStatefulRequest(LiftServlet.scala:232) at net.liftweb.http.LiftServlet$$anonfun$2.apply(LiftServlet.scala: 155) at net.liftweb.http.LiftServlet$$anonfun$2.apply(LiftServlet.scala: 155) at net.liftweb.http.S$.net$liftweb$http$S$$wrapQuery(S.scala:908) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_nest2InnerInit$1$ $anonfun$apply$18.apply(S.scala:1026) at net.liftweb.http.S$.net$liftweb$http$S$$doAround(S.scala:845) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$doAround$1.apply (S.scala:846) at net.liftweb.mapper.DB$$anon$1.net $liftweb$mapper$DB$$anon$$doWith (DB.scala:117) at net.liftweb.mapper.DB$$anon$1$$anonfun$net$liftweb$mapper$DB$$anon$ $doWith$1.apply(DB.scala:118) at net.liftweb.mapper.DB$$anon$1$$anonfun$net$liftweb$mapper$DB$$anon$ $doWith$1.apply(DB.scala:118) at net.liftweb.mapper.DB$.use(DB.scala:305) at net.liftweb.mapper.DB$$anon$1.net $liftweb$mapper$DB$$anon$$doWith (DB.scala:118) at net.liftweb.mapper.DB$$anon$1.apply(DB.scala:124) at net.liftweb.http.S$.net$liftweb$http$S$$doAround(S.scala:846) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_nest2InnerInit $1.apply(S.scala:1024) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:65) at net.liftweb.http.S$.net$liftweb$http$S$$_nest2InnerInit(S.scala: 1023) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$ $anonfun$apply$21$$anonfun$apply$22$$anonfun$apply$23$$anonfun$apply $24$$anonfun$apply$25$$anonfun$apply$26.apply(S.scala:1044) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:65) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$ $anonfun$apply$21$$anonfun$apply$22$$anonfun$apply$23$$anonfun$apply $24$$anonfun$apply$25.apply(S.scala:1043) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:65) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$ $anonfun$apply$21$$anonfun$apply$22$$anonfun$apply$23$$anonfun$apply $24.apply(S.scala:1042) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:65) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$ $anonfun$apply$21$$anonfun$apply$22$$anonfun$apply$23.apply(S.scala: 1041) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:65) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$ $anonfun$apply$21$$anonfun$apply$22.apply(S.scala:1040) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:65) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$ $anonfun$apply$21.apply(S.scala:1039) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:65) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1.apply (S.scala:1038) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:65) at net.liftweb.http.S$.net$liftweb$http$S$$_innerInit(S.scala:1037) at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$29$$anonfun $apply$30$$anonfun$apply$31$$anonfun$apply$32.apply(S.scala:1068) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:65) at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$29$$anonfun $apply$30$$anonfun$apply$31.apply(S.scala:1067) at net.liftweb.http.RequestVarHandler$.apply(Vars.scala:191) at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$29$$anonfun $apply$30.apply(S.scala:1066) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:65) at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$29.apply (S.scala:1065) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:65) at net.liftweb.http.S$$anonfun$_init$1.apply(S.scala:1064) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:65) at net.liftweb.http.S
[Lift] Comet request exception
I just copied comet sample named Clock from the p. 142 of the liftbook into my app. It doesn't work. First time it renders timestamp normally, but since 10 seconds: WARN - Request for /comet_request/58946720417/1ha35q9iqp4el failed Bail java.lang.Exception: Bail at net.liftweb.http.LiftRules$.doContinuation(LiftRules.scala:436) at net.liftweb.http.LiftServlet.setupContinuation(LiftServlet.scala: 352) at net.liftweb.http.LiftServlet.handleComet(LiftServlet.scala:363) at net.liftweb.http.LiftServlet.net$liftweb$http$LiftServlet$ $dispatchStatefulRequest(LiftServlet.scala:232) at net.liftweb.http.LiftServlet$$anonfun$2.apply(LiftServlet.scala: 155) at net.liftweb.http.LiftServlet$$anonfun$2.apply(LiftServlet.scala: 155) at net.liftweb.http.S$.net$liftweb$http$S$$wrapQuery(S.scala:908) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_nest2InnerInit$1$ $anonfun$apply$18.apply(S.scala:1026) at net.liftweb.http.S$.net$liftweb$http$S$$doAround(S.scala:845) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$doAround$1.apply (S.scala:846) at net.liftweb.mapper.DB$$anon$1.net$liftweb$mapper$DB$$anon$$doWith (DB.scala:117) at net.liftweb.mapper.DB$$anon$1$$anonfun$net$liftweb$mapper$DB$$anon$ $doWith$1.apply(DB.scala:118) at net.liftweb.mapper.DB$$anon$1$$anonfun$net$liftweb$mapper$DB$$anon$ $doWith$1.apply(DB.scala:118) at net.liftweb.mapper.DB$.use(DB.scala:305) at net.liftweb.mapper.DB$$anon$1.net$liftweb$mapper$DB$$anon$$doWith (DB.scala:118) at net.liftweb.mapper.DB$$anon$1.apply(DB.scala:124) at net.liftweb.http.S$.net$liftweb$http$S$$doAround(S.scala:846) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_nest2InnerInit $1.apply(S.scala:1024) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:65) at net.liftweb.http.S$.net$liftweb$http$S$$_nest2InnerInit(S.scala: 1023) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$ $anonfun$apply$21$$anonfun$apply$22$$anonfun$apply$23$$anonfun$apply $24$$anonfun$apply$25$$anonfun$apply$26.apply(S.scala:1044) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:65) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$ $anonfun$apply$21$$anonfun$apply$22$$anonfun$apply$23$$anonfun$apply $24$$anonfun$apply$25.apply(S.scala:1043) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:65) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$ $anonfun$apply$21$$anonfun$apply$22$$anonfun$apply$23$$anonfun$apply $24.apply(S.scala:1042) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:65) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$ $anonfun$apply$21$$anonfun$apply$22$$anonfun$apply$23.apply(S.scala: 1041) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:65) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$ $anonfun$apply$21$$anonfun$apply$22.apply(S.scala:1040) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:65) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$ $anonfun$apply$21.apply(S.scala:1039) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:65) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1.apply (S.scala:1038) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:65) at net.liftweb.http.S$.net$liftweb$http$S$$_innerInit(S.scala:1037) at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$29$$anonfun $apply$30$$anonfun$apply$31$$anonfun$apply$32.apply(S.scala:1068) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:65) at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$29$$anonfun $apply$30$$anonfun$apply$31.apply(S.scala:1067) at net.liftweb.http.RequestVarHandler$.apply(Vars.scala:191) at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$29$$anonfun $apply$30.apply(S.scala:1066) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:65) at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$29.apply (S.scala:1065) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:65) at net.liftweb.http.S$$anonfun$_init$1.apply(S.scala:1064) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:65) at net.liftweb.http.S$._init(S.scala:1063) at net.liftweb.http.S$.init(S.scala:779) at net.liftweb.http.LiftServlet.doService(LiftServlet.scala:154) at net.liftweb.http.LiftServlet$$anonfun$doIt$1$1.apply (LiftServlet.scala:83) at net.liftweb.http.LiftServlet$$anonfun$doIt$1$1.apply (LiftServlet.scala:83) at net.liftweb.util.TimeHelpers$class.calcTime(TimeHelpers.scala:241) at net.liftweb.util.Helpers$.calcTime(Helpers.scala:29) at
[Lift] Prevent direct access to templates
In my webapp directory I have template called login_ru.xhtml. If I type http://localhost:8080/login; in my browser I see processed template. But if I type http://localhost:8080/login_ru.xhtml; I see not processed template. Why lift do not process template? --~--~-~--~~~---~--~~ 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: Prevent direct access to templates
SiteMap contains login only. On 1 июн, 19:21, marius d. marius.dan...@gmail.com wrote: What do you have in your SiteMap? .. only login or both login and login_ru. Normally you should only have login and login_ru would be picked up automatically by lift depending on what Locale the LiftRules.localeCalculator returns. Br's, Marius On Jun 1, 9:52 am, feelgood asseliva...@gmail.com wrote: In my webapp directory I have template called login_ru.xhtml. If I type http://localhost:8080/login; in my browser I see processed template. But if I type http://localhost:8080/login_ru.xhtml; I see not processed template. Why lift do not process template? --~--~-~--~~~---~--~~ 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: Snippet name clashes
What is about: lift:path.Snippet.action / Where there is following exclusive cases for path: 1 path is a relative path from one of the packages denoted by LiftRules.addToPackages to a Snippet class 2 path is a path from the _root_ to the Snippet class. And the Lift can sequentially try each case for resolve Snippet to use. On 21 май, 03:45, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, May 20, 2009 at 12:02 PM, Alex Boisvert boisv...@intalio.comwrote: 2009/5/20 David Pollak feeder.of.the.be...@gmail.com On Wed, May 20, 2009 at 9:38 AM, Alex Boisvert boisv...@intalio.comwrote: Maybe an optional package attribute? e.g., lift:snippet package=com.example type=Foo.bar form=POST ... /lift:snippet Dude... you're so 2008 with that syntax... :-) Yes, I know... I just couldn't come to terms with using dots in my XML elements. I guess I have issues ;) The current syntax is: lift:Foo.bar form=Post.../lift:Foo.bar I guess we can add a package attribute anyway, although it breaks the whole Snippet lookup mechanism (not the reflection code, but the partial functions). It seems it would be natural to use XML namespaces for mapping to Scala packages. LiftRules.mapNamespaceToPackage(http://com.example.myapp.widgets; - com.example.myapp.widgets) and then, html ... xmlns:example=http://com.example.myapp.snippets; example:Foo.bar ... /example:Foo.bar ? Interesting... it might impact rendering performance, but it's nice and flexible. alex -- 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] Strange behavior of RequestVar
Compare two cases. First: class SnippetName { object oVar extends RequestVar(O.create) def processAdd(o: O) { ... } def add(xml: NodeSeq): NodeSeq = { bind (f, xml, field - SHtml.text(oVar.is.field, oVar.is.field(_)), submit - SHtml.submit(Submit, () = processAdd(oVar.is) ) } } And the second case: class SnippetName { object oVar extends RequestVar(O.create) def processAdd(o: O) { ... } def add(xml: NodeSeq): NodeSeq = { val o = oVar.is // CHANGES STARTS HERE bind (f, xml, field - SHtml.text(o.field, o.field(_)), submit - SHtml.submit(Submit, () = processAdd(o) ) } } In firts case all works fine, but in second case data not retained across submit trying. Why? --~--~-~--~~~---~--~~ 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] Dependent fields in form
Is it real to create form with dependent field? Suppose whe have two select boxes: for the country and for the city. It would be quite good, if country selection trigger updating of the cities list. --~--~-~--~~~---~--~~ 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] Encoding of property files used for localization
First, I tried to use UTF-8 encoded property files to localize my app. I saw Неверно указан идентификатор. AIUI this is ISO 8859-1 encoded representation of my UTF-8 string. I also tried to use native2ascii tool to decode UTF-8 strings in ASCII string like \u0420\u045c\u0420\u00b5\u0420... . But it's not help. Any idea? --~--~-~--~~~---~--~~ 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: Encoding of property files used for localization
Thanx a lot. On 27 май, 21:17, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, May 27, 2009 at 7:55 AM, feelgood asseliva...@gmail.com wrote: First, I tried to use UTF-8 encoded property files to localize my app. I saw Неверно указан идентификатор. AIUI this is ISO 8859-1 encoded representation of my UTF-8 string. I also tried to use native2ascii tool to decode UTF-8 strings in ASCII string like \u0420\u045c\u0420\u00b5\u0420... . But it's not help. Any idea? I just enhanced the Props stuff to first try to use the properties XML format (seehttp://java.sun.com/javase/6/docs/api/java/util/Properties.html#loadF...)) and I also forced the input stream into UTF-8 format so there's no platform character set issues. The changes should be available in Hudson within the hour. -- 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: Encoding of property files used for localization
But it's still doesn't work with plain properties. I think the problem is in the ResourceBundle class and getBundle method. ? method of S object comes to using ResourceBundle. On 27 май, 22:02, feelgood asseliva...@gmail.com wrote: Thanx a lot. On 27 май, 21:17, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, May 27, 2009 at 7:55 AM, feelgood asseliva...@gmail.com wrote: First, I tried to use UTF-8 encoded property files to localize my app. I saw Неверно указан идентификатор. AIUI this is ISO 8859-1 encoded representation of my UTF-8 string. I also tried to use native2ascii tool to decode UTF-8 strings in ASCII string like \u0420\u045c\u0420\u00b5\u0420... . But it's not help. Any idea? I just enhanced the Props stuff to first try to use the properties XML format (seehttp://java.sun.com/javase/6/docs/api/java/util/Properties.html#loadF...)) and I also forced the input stream into UTF-8 format so there's no platform character set issues. The changes should be available in Hudson within the hour. -- 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 -~--~~~~--~~--~--~---