Re: [Lift] Re: Ajax button + submitting a form
Hello, the problem is that some form elements are updated, then the function is called, and then the rest of the form elements are updated. My code is more or less something like this: def editElement(elementTemplate: NodeSeq): NodeSeq = { container.elements.flatMap { element: Element = bind(element, elementTemplate, name - { println(bind element name + element.name); SHtml.text(element.name.is, (s: String) = {println(set element name + s); element.name(s); }) } ) } } bind(cont, containerTemplate, name - { println(bind container name + conf.name); SHtml.text(cont.name.is, (s: String) = {println(set container name + s); cont.name(s); }) }, elements - editElement _, addElement - ajaxButton(Text(Add), edit_formid, () = { println(executing function); cont.addElement; reDraw }) ) And the output, when I submit a form where 1 element is already added is: 09:04:23,450 INFO [STDOUT] set container name a 09:04:23,474 INFO [STDOUT] executing function 09:04:23,474 INFO [STDOUT] bind container name a 09:04:23,475 INFO [STDOUT] bind element name 0 09:04:23,476 INFO [STDOUT] bind element name 1 09:04:23,478 INFO [STDOUT] set element name 0a So as you can see first cont.name is set, then the button function is executed, and later the element.names are set. I can try creating a small lift app which would demo this if you'd like. Also, I'm using 1.1-M8. Maybe I should try some newer version? (2.0-SNAPSHOT? 1.1-SNAPSHOT?) Adam On Jan 12, 2010, at 6:03 PM, Marius wrote: I must have misread your post. I did test the ajaxButton above (with your corrections) and the behaviour is correct. Form field functions are invoked first and then your ajax function provided to ajaxButton. Thus this is a good way for adding submit functions for ajax form without the need of using hidden fields and I'll promote this for addition in Shtml (probably with slight modifications). I think the method name should be ajaxSubmit I don't quite get why you're saying this is a problem. What does step 3 needs to accomplish? . all form fields functions are called (except if you have a Shtml.submit because form serialization does not include submits). Then you function is invoked and the response is sent to client. You mentioned that you just need to add multiple buttons for a ajax form ... this version of ajaxButton does just that. Can you please clarify your used case for for for those 3 steps? ... Br's, Marius On Jan 12, 4:20 pm, Adam Warski a...@warski.org wrote: Hello, this *almost* works :). I modified your code a bit and now I have: def ajaxButton(text: NodeSeq, formId: String, func: () = JsCmd, attrs: (String, String)*): Elem = { attrs.foldLeft(fmapFunc(contextFuncBuilder(func))(name = button onclick={makeAjaxCall(JsRaw( LiftRules.jsArtifacts.serialize(formId).toJsCmd + + + Str( + name + =true).toJsCmd)).toJsCmd + ; return false;}{text}/button))(_ % _) } Now the form submits and the right function is executed on the server, and the form is redrawn in the browser. However, the problem is in the ordering of operations. The sequence basically is: (1) update some elements of the form (2) execute the function (3) update the rest of the elements of the form The problem of course is that (2) returns the new content of the form (a SetHtml JsCmd), generated basing on state without all fields updated. I don't quite yet get the rule deciding which fields get updated before calling the function, and which after. One thing I noticed is that if I move the field that is bound first (in bind(...)) to be the last field, it gets moved from group (1) to (3). Also, I thought that maybe the ordering of POST values matters, but swapping Str( + name + =true).toJsCmd and LiftRules.jsArtifacts.serialize(formId).toJsCmd doesn't have any effect. I tried the form many times and always get the same behaviour, so the (1) vs. (3) division seems to be deterministic :) Adam On Jan 11, 2010, at 10:58 PM, Marius wrote: Adam I was thinking of a slightly different approach that does not involve hidden fields: Say you have your current form with SHtml.text, checkboxes or whatever have you: then your ajax buttons (outside the form) like: def ajaxButton(text: NodeSeq, formId: String, func: () = JsCmd, attrs: (String, String)*): Elem = { attrs.foldLeft(fmapFunc(contextFuncBuilder(SFuncHolder(func))) (name = button onclick={makeAjaxCall(JsRaw (LiftRules.jsArtifacts.serialize(formId) + + name.encJs + =_)).toJsCmd + ; return false;}{text}/button))(_ % _) } I haven't tested though but you get the idea ... When we do the ajax call, we serialize the form and add the name parameter as well. This will cause your field functions to be called, and at the end you
[Lift] Re: Ajax button + submitting a form
Yes please a small app would be best. Please use 2.0-SNAPSHOT. Also please see this thread: http://groups.google.com/group/liftweb/browse_thread/thread/75750c42ec3a2d7d?hl=en# Br's, Marius On Jan 13, 10:07 am, Adam Warski a...@warski.org wrote: Hello, the problem is that some form elements are updated, then the function is called, and then the rest of the form elements are updated. My code is more or less something like this: def editElement(elementTemplate: NodeSeq): NodeSeq = { container.elements.flatMap { element: Element = bind(element, elementTemplate, name - { println(bind element name + element.name); SHtml.text(element.name.is, (s: String) = {println(set element name + s); element.name(s); }) } ) } } bind(cont, containerTemplate, name - { println(bind container name + conf.name); SHtml.text(cont.name.is, (s: String) = {println(set container name + s); cont.name(s); }) }, elements - editElement _, addElement - ajaxButton(Text(Add), edit_formid, () = { println(executing function); cont.addElement; reDraw }) ) And the output, when I submit a form where 1 element is already added is: 09:04:23,450 INFO [STDOUT] set container name a 09:04:23,474 INFO [STDOUT] executing function 09:04:23,474 INFO [STDOUT] bind container name a 09:04:23,475 INFO [STDOUT] bind element name 0 09:04:23,476 INFO [STDOUT] bind element name 1 09:04:23,478 INFO [STDOUT] set element name 0a So as you can see first cont.name is set, then the button function is executed, and later the element.names are set. I can try creating a small lift app which would demo this if you'd like. Also, I'm using 1.1-M8. Maybe I should try some newer version? (2.0-SNAPSHOT? 1.1-SNAPSHOT?) Adam On Jan 12, 2010, at 6:03 PM, Marius wrote: I must have misread your post. I did test the ajaxButton above (with your corrections) and the behaviour is correct. Form field functions are invoked first and then your ajax function provided to ajaxButton. Thus this is a good way for adding submit functions for ajax form without the need of using hidden fields and I'll promote this for addition in Shtml (probably with slight modifications). I think the method name should be ajaxSubmit I don't quite get why you're saying this is a problem. What does step 3 needs to accomplish? . all form fields functions are called (except if you have a Shtml.submit because form serialization does not include submits). Then you function is invoked and the response is sent to client. You mentioned that you just need to add multiple buttons for a ajax form ... this version of ajaxButton does just that. Can you please clarify your used case for for for those 3 steps? ... Br's, Marius On Jan 12, 4:20 pm, Adam Warski a...@warski.org wrote: Hello, this *almost* works :). I modified your code a bit and now I have: def ajaxButton(text: NodeSeq, formId: String, func: () = JsCmd, attrs: (String, String)*): Elem = { attrs.foldLeft(fmapFunc(contextFuncBuilder(func))(name = button onclick={makeAjaxCall(JsRaw( LiftRules.jsArtifacts.serialize(formId).toJsCmd + + + Str( + name + =true).toJsCmd)).toJsCmd + ; return false;}{text}/button))(_ % _) } Now the form submits and the right function is executed on the server, and the form is redrawn in the browser. However, the problem is in the ordering of operations. The sequence basically is: (1) update some elements of the form (2) execute the function (3) update the rest of the elements of the form The problem of course is that (2) returns the new content of the form (a SetHtml JsCmd), generated basing on state without all fields updated. I don't quite yet get the rule deciding which fields get updated before calling the function, and which after. One thing I noticed is that if I move the field that is bound first (in bind(...)) to be the last field, it gets moved from group (1) to (3). Also, I thought that maybe the ordering of POST values matters, but swapping Str( + name + =true).toJsCmd and LiftRules.jsArtifacts.serialize(formId).toJsCmd doesn't have any effect. I tried the form many times and always get the same behaviour, so the (1) vs. (3) division seems to be deterministic :) Adam On Jan 11, 2010, at 10:58 PM, Marius wrote: Adam I was thinking of a slightly different approach that does not involve hidden fields: Say you have your current form with SHtml.text, checkboxes or whatever have you: then your ajax buttons (outside the form) like: def ajaxButton(text: NodeSeq, formId: String, func: () = JsCmd, attrs: (String, String)*): Elem = { attrs.foldLeft(fmapFunc(contextFuncBuilder(SFuncHolder(func))) (name = button onclick={makeAjaxCall(JsRaw
[Lift] Re: SessionVar that loses it contents
I am using only one tab. The app itself is rather simple, it just contains forms where fields are submitted to objects stored in SessionVar. I'll try the thing you suggested later today. Is there a some way I could add some logging to sessionVar when it's value is changed? On Jan 13, 9:40 am, Marius marius.dan...@gmail.com wrote: Hmmm ... I never saw this behavior. Do you happen to use multiple browser tabs using different sessions of your app? Can you trace the sessionID in your app with (S.session.map (_.uniqueId) openOr ') or trace the HTTP session Id by S.request.map (_.request.session.sessionId) ? Br's, Marius On Jan 13, 9:01 am, Juha Syrjälä juha.syrj...@gmail.com wrote: Hello all, I am having a problem with SessionVar that keeps losing its contents. I have defined the SessionVar like this: object MyObject { object myVar extends SessionVar[Box[MyObject]](Empty) } Then I set value once for myVar: MyObject.myVar(Full(value)) My problem is that after some time (0-5 mins) myVar will lose its value, that is, it will have value Empty again. This seems not to be due inactivity since I am clicking pages constantly. My code is not setting value to Empty. During this 0-5 mins the myVar will work correctly. The logs contain no related messages. I am requesting pages that all reference the session var. Sometimes session var becomes empty in the first request, sometimes after several dozen requests. I tried to add shutdown method to myVar, but it is not getting called. override protected def onShutdown(session: CleanUpParam): Unit = { Log.error(shutdown executed + session) } I am running Lift in jetty via mvn jetty:run command. I am using 1.1- SNAPSHOT of Lift. I am not creating explicitly any kind of cookie or session. Any ideas what is happening? It could be that session expires or invalidates somehow, but why and by whom? How can I found out when session invalidates? I even tried to disable liftGC with (LiftRules.enableLiftGC = false) but that does not affect the problem. -- Juha Syrjälä -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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: SessionVar that loses it contents
I think you can override: override protected def setFunc(name: String, value: T): Unit put a trace there and then call super. Br's, Marius On Jan 13, 10:06 am, Juha Syrjälä juha.syrj...@gmail.com wrote: I am using only one tab. The app itself is rather simple, it just contains forms where fields are submitted to objects stored in SessionVar. I'll try the thing you suggested later today. Is there a some way I could add some logging to sessionVar when it's value is changed? On Jan 13, 9:40 am, Marius marius.dan...@gmail.com wrote: Hmmm ... I never saw this behavior. Do you happen to use multiple browser tabs using different sessions of your app? Can you trace the sessionID in your app with (S.session.map (_.uniqueId) openOr ') or trace the HTTP session Id by S.request.map (_.request.session.sessionId) ? Br's, Marius On Jan 13, 9:01 am, Juha Syrjälä juha.syrj...@gmail.com wrote: Hello all, I am having a problem with SessionVar that keeps losing its contents. I have defined the SessionVar like this: object MyObject { object myVar extends SessionVar[Box[MyObject]](Empty) } Then I set value once for myVar: MyObject.myVar(Full(value)) My problem is that after some time (0-5 mins) myVar will lose its value, that is, it will have value Empty again. This seems not to be due inactivity since I am clicking pages constantly. My code is not setting value to Empty. During this 0-5 mins the myVar will work correctly. The logs contain no related messages. I am requesting pages that all reference the session var. Sometimes session var becomes empty in the first request, sometimes after several dozen requests. I tried to add shutdown method to myVar, but it is not getting called. override protected def onShutdown(session: CleanUpParam): Unit = { Log.error(shutdown executed + session) } I am running Lift in jetty via mvn jetty:run command. I am using 1.1- SNAPSHOT of Lift. I am not creating explicitly any kind of cookie or session. Any ideas what is happening? It could be that session expires or invalidates somehow, but why and by whom? How can I found out when session invalidates? I even tried to disable liftGC with (LiftRules.enableLiftGC = false) but that does not affect the problem. -- Juha Syrjälä -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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.
Re: [Lift] Loc id
Naftoli Gugenheim naftoli...@gmail.com writes: The first argument to Loc is a unique id for the menu. Is it used anywhere? lift:Menu.item name=menuId/ /Jeppe -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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: binding form fields while using jquery plugin
hi marius, I tried using -% but it says value %- is not a member of java.lang.String. Actually what i am trying to achieve is to make a web page in which there are some text fields as Text1,Text2,Result so that when user types some number in Text1 and Text2 their addition appears dynamically in Result textfield(without submitting the form). I am using jquery plugin for doing this and it was working fine in simple html format but when i try to run the template using lift the calculation does'nt occurs (demo of this plugin working can be seen under interactive example heading on page http://www.pengoworks.com/workshop/jquery/calculation/calculation.plugin.htm) so Naftoli has helped me out in this and i am working on solution he suggested .If you have any suggestion or ideas they are also welcomed. madhav -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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: binding form fields while using jquery plugin
hi marius, I tried using -% but it says value -% is not a member of java.lang.String. Actually what i am trying to achieve is to make a web page in which there are some text fields as Text1,Text2,Result so that when user types some number in Text1 and Text2 their addition appears dynamically in Result textfield(without submitting the form). I am using jquery plugin for doing this and it was working fine in simple html format but when i try to run the template using lift the calculation does'nt occurs (demo of this plugin working can be seen under interactive example heading on page http://www.pengoworks.com/workshop/jquery/calculation/calculation.plu...) so Naftoli has helped me out in this and i am working on solution he suggested .If you have any suggestion or ideas they are also welcomed. madhav -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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.
Re: [Lift] Re: Ajax button + submitting a form
Hello, Yes please a small app would be best. Please use 2.0-SNAPSHOT. Here it is: http://github.com/adamw/lift-ajax-submit-test/ Steps to reproduce: 1. checkout from git :) 2. run mvn jetty:run 3. go to http://localhost:8080 4. click add once 5. fill in the two fields with some values e.g. container, room 6. click add again 7. the container value will stay, while the room value will disappear. In the logs, you can see: set container name cont executing funtion bind container name cont bind room name bind room name set room name room Also please see this thread: http://groups.google.com/group/liftweb/browse_thread/thread/75750c42ec3a2d7d?hl=en# Yeah, I saw it, as far as I understand the ajaxSubmit is more or less the same as the ajaxButton you did (and I corrected)? Thanks, Adam-- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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.
Re: [Lift] Re: Ajax button + submitting a form
Also, interestingly, if you change the order of binding from: bind(cont, containerTemplate, name - { println(bind container name + cont.name); SHtml.text(cont.name, (s: String) = {println(set container name + s); cont.name = s; }) }, rooms - editRoom _, addRoom - ajaxButton(Text(Add), cont_edit, () = { println(executing funtion); cont.rooms += new Room; reDraw }) ) to: bind(cont, containerTemplate, rooms - editRoom _, addRoom - ajaxButton(Text(Add), cont_edit, () = { println(executing funtion); cont.rooms += new Room; reDraw }), name - { println(bind container name + cont.name); SHtml.text(cont.name, (s: String) = {println(set container name + s); cont.name = s; }) } ) then the container name is also lost on submit. The log output is then: executing funtion bind container name bind room name bind room name set container name container set room name room Adam On Jan 13, 2010, at 10:13 AM, Adam Warski wrote: Hello, Yes please a small app would be best. Please use 2.0-SNAPSHOT. Here it is: http://github.com/adamw/lift-ajax-submit-test/ Steps to reproduce: 1. checkout from git :) 2. run mvn jetty:run 3. go to http://localhost:8080 4. click add once 5. fill in the two fields with some values e.g. container, room 6. click add again 7. the container value will stay, while the room value will disappear. In the logs, you can see: set container name cont executing funtion bind container name cont bind room name bind room name set room name room Also please see this thread: http://groups.google.com/group/liftweb/browse_thread/thread/75750c42ec3a2d7d?hl=en# Yeah, I saw it, as far as I understand the ajaxSubmit is more or less the same as the ajaxButton you did (and I corrected)? Thanks, Adam-- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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] Show the deprecated messages
Hello guys, I have a very silly question. when I run the mvn command to compile the classes, I receive the following message: warning: there were deprecation warnings; re-run with -deprecation for details one warning found How can I do to see the messages? I tried to add -deprecation to the mvn command but it does not recognize it. Thanks in advance, GA -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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: Show the deprecated messages
Something like: plugin groupIdorg.scala-tools/groupId artifactIdmaven-scala-plugin/artifactId version2.12.2/version configuration jvmArgs jvmArg-Xmx1024m/jvmArg /jvmArgs args arg-unchecked/arg arg-deprecation/arg arg-Xno-varargs-conversion/arg /args /configuration /executions /plugin On Jan 13, 10:01 am, GA my_li...@me.com wrote: Hello guys, I have a very silly question. when I run the mvn command to compile the classes, I receive the following message: warning: there were deprecation warnings; re-run with -deprecation for details one warning found How can I do to see the messages? I tried to add -deprecation to the mvn command but it does not recognize it. Thanks in advance, GA -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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] NGinx and sticky sessions
Hi all, Did anyone here used nginx with sticky sessions? What I'm looking for is: if a request comes in with e certain HTTP header or query string paramers the request should be dispatched to a given node. So I have a header like server_id=1 - dispatch the request to node1, if server_id=2 dispatch the request to node2 and so on. Is it possible to configure nginx like this? Br's, Marius -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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.
Re: [Lift] Scheduling the San Francisco Scala Lift Off
On Wed, Jan 13, 2010 at 3:31 AM, David Pollak feeder.of.the.be...@gmail.com wrote: For the last two years, the San Francisco Scala Lift Off has happened the day after JavaOne. It's looking like JavaOne might not happen this year, so I'm starting to think about a time in the April-June timeframe when there are a lot of Scala and/or Java folks in San Francisco. If you all have any ideas of good dates, please post them. A bit early maybe, but EclipseCon 2010 is 22nd - 25th of March. Cheers, Miles -- Miles Sabin tel: +44 (0)7813 944 528 skype: milessabin http://www.chuusai.com/ http://twitter.com/milessabin -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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.
Re: [Lift] Squid with lift?
Only if you want a caching proxy im not sure what your driving at really as the nginx wiki does a pretty good job of explaining what it is used for. We only really recommend NGINX because its what we use, however, you are free to use whatever you want... jetty standalone, some other proxy upfront like helicon or whatever. Your setup can be anything - its what works for you. Cheers, Tim On 13 Jan 2010, at 02:14, Naftoli Gugenheim wrote: Does that at all imply that it could be beneficial to use Squid instead of Nginx with Lift? -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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.
Re: [Lift] NGinx and sticky sessions
Nginx offers weighted round robin requests if memory serves... what does your config look like? The upstream module should be cool for what you want. http://wiki.nginx.org/NginxHttpUpstreamModule See that it uses class-c ip hashing to always distribute requests to the same backend node... making the query string redundant :-) Cheers, Tim On 13 Jan 2010, at 11:29, Marius wrote: Hi all, Did anyone here used nginx with sticky sessions? What I'm looking for is: if a request comes in with e certain HTTP header or query string paramers the request should be dispatched to a given node. So I have a header like server_id=1 - dispatch the request to node1, if server_id=2 dispatch the request to node2 and so on. Is it possible to configure nginx like this? Br's, Marius -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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: NGinx and sticky sessions
On Jan 13, 1:42 pm, Timothy Perrett timo...@getintheloop.eu wrote: Nginx offers weighted round robin requests if memory serves... what does your config look like? The upstream module should be cool for what you want. http://wiki.nginx.org/NginxHttpUpstreamModule See that it uses class-c ip hashing to always distribute requests to the same backend node... making the query string redundant :-) I'm not sure about that. The flow I have is this: 1. client sends a login request with not server_id info. 2. LB needs to dispatch to any node 3. The node that responds back is setting the server_id information in the HTTP response header (based on config files info from each node) 4. The next subsequent requests for this session will also include the server_id information received and here is the balancing rules I need. I'm not sure I should use client's IP address because clients may be behind NATs etc. and this may unbalance the cluster. Currently I have no config, so I'm still not sure how to config my case described here. Cheers, Tim On 13 Jan 2010, at 11:29, Marius wrote: Hi all, Did anyone here used nginx with sticky sessions? What I'm looking for is: if a request comes in with e certain HTTP header or query string paramers the request should be dispatched to a given node. So I have a header like server_id=1 - dispatch the request to node1, if server_id=2 dispatch the request to node2 and so on. Is it possible to configure nginx like this? Br's, Marius -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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.
Re: [Lift] Re: Show the deprecated messages
It worked! Thanks, GA On Jan 13, 2010, at 11:37 AM, Timothy Perrett wrote: Something like: plugin groupIdorg.scala-tools/groupId artifactIdmaven-scala-plugin/artifactId version2.12.2/version configuration jvmArgs jvmArg-Xmx1024m/jvmArg /jvmArgs args arg-unchecked/arg arg-deprecation/arg arg-Xno-varargs-conversion/arg /args /configuration /executions /plugin On Jan 13, 10:01 am, GA my_li...@me.com wrote: Hello guys, I have a very silly question. when I run the mvn command to compile the classes, I receive the following message: warning: there were deprecation warnings; re-run with -deprecation for details one warning found How can I do to see the messages? I tried to add -deprecation to the mvn command but it does not recognize it. Thanks in advance, GA -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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: NGinx and sticky sessions
Tim, Thanks SO MUCH about the info from the offline talk we've had. If other are interested, this may be helpful: http://wiki.nginx.org/NginxHttpUpstreamRequestHashModule Br's, Marius On Jan 13, 2:02 pm, Marius marius.dan...@gmail.com wrote: On Jan 13, 1:42 pm, Timothy Perrett timo...@getintheloop.eu wrote: Nginx offers weighted round robin requests if memory serves... what does your config look like? The upstream module should be cool for what you want. http://wiki.nginx.org/NginxHttpUpstreamModule See that it uses class-c ip hashing to always distribute requests to the same backend node... making the query string redundant :-) I'm not sure about that. The flow I have is this: 1. client sends a login request with not server_id info. 2. LB needs to dispatch to any node 3. The node that responds back is setting the server_id information in the HTTP response header (based on config files info from each node) 4. The next subsequent requests for this session will also include the server_id information received and here is the balancing rules I need. I'm not sure I should use client's IP address because clients may be behind NATs etc. and this may unbalance the cluster. Currently I have no config, so I'm still not sure how to config my case described here. Cheers, Tim On 13 Jan 2010, at 11:29, Marius wrote: Hi all, Did anyone here used nginx with sticky sessions? What I'm looking for is: if a request comes in with e certain HTTP header or query string paramers the request should be dispatched to a given node. So I have a header like server_id=1 - dispatch the request to node1, if server_id=2 dispatch the request to node2 and so on. Is it possible to configure nginx like this? Br's, Marius -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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.
Re: [Lift] Re: NGinx and sticky sessions
To follow up this thread for completeness, I communicated to Marius that he needs to use: http://wiki.nginx.org/NginxHttpUpstreamRequestHashModule Which should do what he wants. Cheers, Tim On 13 Jan 2010, at 12:02, Marius wrote: On Jan 13, 1:42 pm, Timothy Perrett timo...@getintheloop.eu wrote: Nginx offers weighted round robin requests if memory serves... what does your config look like? The upstream module should be cool for what you want. http://wiki.nginx.org/NginxHttpUpstreamModule See that it uses class-c ip hashing to always distribute requests to the same backend node... making the query string redundant :-) I'm not sure about that. The flow I have is this: 1. client sends a login request with not server_id info. 2. LB needs to dispatch to any node 3. The node that responds back is setting the server_id information in the HTTP response header (based on config files info from each node) 4. The next subsequent requests for this session will also include the server_id information received and here is the balancing rules I need. I'm not sure I should use client's IP address because clients may be behind NATs etc. and this may unbalance the cluster. Currently I have no config, so I'm still not sure how to config my case described here. Cheers, Tim On 13 Jan 2010, at 11:29, Marius wrote: Hi all, Did anyone here used nginx with sticky sessions? What I'm looking for is: if a request comes in with e certain HTTP header or query string paramers the request should be dispatched to a given node. So I have a header like server_id=1 - dispatch the request to node1, if server_id=2 dispatch the request to node2 and so on. Is it possible to configure nginx like this? Br's, Marius -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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: Two database are broken in 1.1-M8, works fine in 1.1-M7 .
Hi David, I'm sorry about it that i write it wrong. But I change the second DBVendor name to DBVendor_2, and it create a db file named lift_proto2.db.h2.db. And it doesn't work, I add this method to the User model to specify the default db connection. ### override def dbDefaultConnectionIdentifier = bootstrap.liftweb.OneDB ### I use this code in M7 and it's fine. How can i define a vendor for the DefaultConnectionIdentifier in M8? Thank you very much! Cheers, Neil On Jan 13, 1:35 pm, David Pollak feeder.of.the.be...@gmail.com wrote: The problem with this code is you are using the same connection vendor for both connection identifiers *and* you're not defining a vendor for the DefaultConnectionIdentifier On Jan 11, 7:05 am, Neil.Lv anim...@gmail.com wrote: Hi all, There is a problem when i upgrading the 1.1-M7 to 1.1-M8, the db connection is broken. I use two database connection in my app, it's broken in 1.1-M8. ### object OneDB extends ConnectionIdentifier { override def jndiName = lift_proto} object TwoDB extends ConnectionIdentifier { override def jndiName = lift_proto2} ### The error message is: ### HTTP ERROR 500 Problem accessing /. Reason: Looking for Connection Identifier ConnectionIdentifier(lift) but failed to find either a JNDI data source with the name lift or a lift connection manager with the correct name ### Maybe I missing something else configure in M8 that it's different from M7. The test demo address is :http://github.com/anim510/two_db_demo Thanks for any help very much! Cheers, Neil -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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] Recommendations for a Web Designer familiar with Lift?
Can anyone in the group recommend someone from the creative side (Web Design, User Experience, etc.) who is comfortable working with Lift? I understand that the Lift philosophy allows designers to work their magic in the webapps directory, but I would appreciate working with someone on the design side who already knows the lay of the land. Alternatively, what materials would you recommend that a designer review before embarking on a Lift project? Thanks, Maciej -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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.
Re: [Lift] Re: NGinx and sticky sessions
I'm not sure if you discussed this but based on my experience, the JSESSIONID cookie is used most often in Jetty/Tomcat/J2EE environments for load balancing (over using client IP). I haven't used nginx for load balancing yet but I've used both HAProxy and Varnish in the past. http://haproxy.1wt.eu/download/1.2/doc/architecture.txt alex On Wed, Jan 13, 2010 at 4:22 AM, Timothy Perrett timo...@getintheloop.euwrote: To follow up this thread for completeness, I communicated to Marius that he needs to use: http://wiki.nginx.org/NginxHttpUpstreamRequestHashModule Which should do what he wants. Cheers, Tim On 13 Jan 2010, at 12:02, Marius wrote: On Jan 13, 1:42 pm, Timothy Perrett timo...@getintheloop.eu wrote: Nginx offers weighted round robin requests if memory serves... what does your config look like? The upstream module should be cool for what you want. http://wiki.nginx.org/NginxHttpUpstreamModule See that it uses class-c ip hashing to always distribute requests to the same backend node... making the query string redundant :-) I'm not sure about that. The flow I have is this: 1. client sends a login request with not server_id info. 2. LB needs to dispatch to any node 3. The node that responds back is setting the server_id information in the HTTP response header (based on config files info from each node) 4. The next subsequent requests for this session will also include the server_id information received and here is the balancing rules I need. I'm not sure I should use client's IP address because clients may be behind NATs etc. and this may unbalance the cluster. Currently I have no config, so I'm still not sure how to config my case described here. Cheers, Tim On 13 Jan 2010, at 11:29, Marius wrote: Hi all, Did anyone here used nginx with sticky sessions? What I'm looking for is: if a request comes in with e certain HTTP header or query string paramers the request should be dispatched to a given node. So I have a header like server_id=1 - dispatch the request to node1, if server_id=2 dispatch the request to node2 and so on. Is it possible to configure nginx like this? Br's, Marius -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group athttp:// groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to lift...@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.
Re: [Lift] Recommendations for a Web Designer familiar with Lift?
Hello Maceij As I see it desgining and creating the acctual template is two completely different tasks which rarely are done by the same person. When i work on projects the designer usally works his/her magic and creates a stunning Photoshop file which is then handed to a front-end developer who in turn slices the photoshop file into appropiate sprites and creates the xhtml templates. So you find a designer who is able to design a site to your satisfaction and find a front-end developer to implement it after. Any think that any front-end developer would do acctualy so just do a google search (http://www.google.dk/search?hl=darlz=1G1GGLQ_DADK251ei=899NS5uiC9S_-Qb9paGBDQsa=Xoi=spellresnum=0ct=resultcd=1ved=0CAYQBSgAq=freelance+frontend+developerspell=1) - I recommend that the front-end developer reads this http://wiki.github.com/dpp/liftweb/how-to-binding-view-content-to-code and probably a few other articles on the wiki to get a grasp of what is expected of him/her :) Hope this is to some help On 13/01/2010, at 15.07, Matyjas wrote: Can anyone in the group recommend someone from the creative side (Web Design, User Experience, etc.) who is comfortable working with Lift? I understand that the Lift philosophy allows designers to work their magic in the webapps directory, but I would appreciate working with someone on the design side who already knows the lay of the land. Alternatively, what materials would you recommend that a designer review before embarking on a Lift project? Thanks, Maciej -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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: Recommendations for a Web Designer familiar with Lift?
Sorry I got your name wrong, wasn't my intention :) On Jan 13, 4:00 pm, Mads Hartmann Jensen mads...@gmail.com wrote: Hello Maceij As I see it desgining and creating the acctual template is two completely different tasks which rarely are done by the same person. When i work on projects the designer usally works his/her magic and creates a stunning Photoshop file which is then handed to a front-end developer who in turn slices the photoshop file into appropiate sprites and creates the xhtml templates. So you find a designer who is able to design a site to your satisfaction and find a front-end developer to implement it after. Any think that any front-end developer would do acctualy so just do a google search (http://www.google.dk/search?hl=darlz=1G1GGLQ_DADK251ei=899NS5uiC9S_...) - I recommend that the front-end developer reads thishttp://wiki.github.com/dpp/liftweb/how-to-binding-view-content-to-codeand probably a few other articles on the wiki to get a grasp of what is expected of him/her :) Hope this is to some help On 13/01/2010, at 15.07, Matyjas wrote: Can anyone in the group recommend someone from the creative side (Web Design, User Experience, etc.) who is comfortable working with Lift? I understand that the Lift philosophy allows designers to work their magic in the webapps directory, but I would appreciate working with someone on the design side who already knows the lay of the land. Alternatively, what materials would you recommend that a designer review before embarking on a Lift project? Thanks, Maciej -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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: Externalizing log4j configuration
(Apologies for the very late reply.) -Dlog4j.configuration={file URL} ? Thanks! This seems to do pretty much exactly what I need (that is: full control over logging). Mark. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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.
Re: [Lift] Re: Binding a snippet in a comet actor?
The problem was using Google Chrome to see this page. On firefox it shows up normally. Alex Boisvert wrote: Yes. The issue is here: http://github.com/dpp/liftweb/issues/closed/#issue/93 It was fixed in 1.1M7 and later. alex On Tue, Jan 12, 2010 at 1:47 PM, Felipe Rodrigues felipero.maill...@gmail.com wrote: I have a similar problem here. I didn't find this issue on github. Is this issue solved? Thanks, Felipe On Oct 9 2009, 5:17 pm, David Pollak feeder.of.the.be...@gmail.com wrote: This is a defect. I've opened a ticket:http://github.com/dpp/liftweb/issues#issue/93 I'll have a fix checked in later today On Fri, Oct 9, 2009 at 1:02 AM, Somindra Bhattacharya somind...@gmail.comwrote: David, Thanks for responding. I have hosted the example athttp://174.129.214.150:8080/ The code is athttp://174.129.214.150:8080/dynamicForm.tar.gz Here are the steps to reproduce the issue: 1. Openhttp://174.129.214.150:8080/in a browser window. This starts a comet actor which listens for messages. There is no form present on this page. 2. Openhttp://174.129.214.150:8080/testdriverin another browser window. Juxtapose these two windows. 3. Click on the "Click here" button in the window opened in (2). Submitting this form results into a lift:Snippet block being sent to the actor on the index page. This makes the index page show a form that was not previously present. 4. Click on the button that has appeared on the index page. This does not result into calling the handler at the server end. Please let me know if you need more information. Thanks again... Regards, Som On Oct 8, 9:40 pm, David Pollak feeder.of.the.be...@gmail.com wrote: The chat example in demo.liftweb.net (source in examples/example) has a form that is presented after the initial form is rendered. It works just fine. Please put together a small example of the failure so I can see the running code. On Wed, Oct 7, 2009 at 9:13 PM, Somindra Bhattacharya somind...@gmail.comwrote: Apologies for bumping this. Is there a way to get the submit button (or an ajaxButton) to work if the snippet which was not originally part of the page is bound by a comet actor? Thanks, Som On Oct 7, 12:32 pm, Somindra Bhattacharya somind...@gmail.com wrote: Thanks for responding, Naftoli. I tried changing the code to: def handleSubmit() = { Log.info("GOT A SUBMIT IN INVITE") net.liftweb.http.js.JsCmds.Run("alert('Hey')") } ajaxForm( bind("elem", xhtml, "submit" - submit("Click", () = handleSubmit() ), ) ++ hidden(() = handleSubmit()) ) The handleSubmit method is still not called. I tried using ajaxButton instead of submit but that did not help either. What am I doing wrong? On Oct 7, 5:06 am, Naftoli Gugenheim naftoli...@gmail.com wrote: What about an Ajax form? On Tue, Oct 6, 2009 at 9:52 AM, Somindra Bhattacharya somind...@gmail.com wrote: Hi Everyone, I have a comet actor that binds XHTML. The XHTML corresponds to a snippet: XHTML for comet actor - lift:comet type="RCActor" Act:act / /lift:comet When the comet actor receives a certain message, the render method of the comet actor binds the following XHTML - lift:Discuss.invite form="post" elem:submit / /lift:Discuss.invite The Discuss snippet's "invite" method definition is: def invite(xhtml: NodeSeq): NodeSeq = { def handleSubmit() = { Log.info("GOT A SUBMIT IN INVITE") } bind("elem", xhtml, "submit" - submit("Click", () = handleSubmit())) } The page does not contain this form when it is first loaded. When the actor receives a certain message, it binds the XHTML (Discuss.invite) to the page and the form and the "submit" button are rendered properly. However, when I click on the submit button, the "handleSubmit" method is not called. Instead, the browser displays a page with the text "window.location=/". If I use the browser back button and re-visit the page with the comet actor, the submit button works (i.e., handleSubmit() is called and I can see the info log). Is this approach "legal"? Is there a way to make a form submit if it was not originally part of the page? Thanks, Som -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Surf the
[Lift] Re: binding form fields while using jquery plugin
Thanks Naftoli and Marius . I got it working using both of your suggestions. Madhav On Jan 13, 2:00 pm, Madhav mail.madhavsha...@gmail.com wrote: hi marius, I tried using -% but it says value -% is not a member of java.lang.String. Actually what i am trying to achieve is to make a web page in which there are some text fields as Text1,Text2,Result so that when user types some number in Text1 and Text2 their addition appears dynamically in Result textfield(without submitting the form). I am using jquery plugin for doing this and it was working fine in simple html format but when i try to run the template using lift the calculation does'nt occurs (demo of this plugin working can be seen under interactive example heading on pagehttp://www.pengoworks.com/workshop/jquery/calculation/calculation.plu...) so Naftoli has helped me out in this and i am working on solution he suggested .If you have any suggestion or ideas they are also welcomed. madhav -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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] MappedForeignKey compared to Hibernate relationships
hi all, stupid question about MappedForeignKey - it seems that it must be interacted with by setting the value with the actual key (as opposed to the 'object' that the key belongs to). is there an equivalent so that the value can be set with the actual object (a la Hibernate)? i arrived at this in a roundabout way - i'm trying to validate a form field against another form field that maps to an object - both fields are being updated. during the validation phase, the key value in the MappedForeignKey has been updated (x.is) but x.obj is still caching the 'old' value. is there a way around this (apart from just doing a lookup against the new key)? cheers -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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.
Re: [Lift] MappedForeignKey compared to Hibernate relationships
On Wed, Jan 13, 2010 at 8:06 AM, Guy dnd1...@gmail.com wrote: hi all, stupid question about MappedForeignKey - it seems that it must be interacted with by setting the value with the actual key (as opposed to the 'object' that the key belongs to). is there an equivalent so that the value can be set with the actual object (a la Hibernate)? i arrived at this in a roundabout way - i'm trying to validate a form field against another form field that maps to an object - both fields are being updated. during the validation phase, the key value in the MappedForeignKey has been updated (x.is) but x.obj is still caching the 'old' value. is there a way around this (apart from just doing a lookup against the new key)? Sounds like you're using Lift 1.0 This behavior was changed around Lift 1.1 M6. cheers -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://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 lift...@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.
Re: [Lift] MappedForeignKey compared to Hibernate relationships
Is LongMappedMapper now superfluous? - David Pollakfeeder.of.the.be...@gmail.com wrote: On Wed, Jan 13, 2010 at 8:06 AM, Guy dnd1...@gmail.com wrote: hi all, stupid question about MappedForeignKey - it seems that it must be interacted with by setting the value with the actual key (as opposed to the 'object' that the key belongs to). is there an equivalent so that the value can be set with the actual object (a la Hibernate)? i arrived at this in a roundabout way - i'm trying to validate a form field against another form field that maps to an object - both fields are being updated. during the validation phase, the key value in the MappedForeignKey has been updated (x.is) but x.obj is still caching the 'old' value. is there a way around this (apart from just doing a lookup against the new key)? Sounds like you're using Lift 1.0 This behavior was changed around Lift 1.1 M6. cheers -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://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 lift...@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. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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: Scheduling the San Francisco Scala Lift Off
Or Edinburgh? :-) On Jan 13, 12:22 pm, Mads Hartmann mads...@gmail.com wrote: Was is 'Scala Lift Off' ? I live in Denmark so i might be able to make it in either London or Norway :) On Jan 13, 12:32 pm, Miles Sabin mi...@milessabin.com wrote: On Wed, Jan 13, 2010 at 3:31 AM, David Pollak feeder.of.the.be...@gmail.com wrote: For the last two years, the San Francisco Scala Lift Off has happened the day after JavaOne. It's looking like JavaOne might not happen this year, so I'm starting to think about a time in the April-June timeframe when there are a lot of Scala and/or Java folks in San Francisco. If you all have any ideas of good dates, please post them. A bit early maybe, but EclipseCon 2010 is 22nd - 25th of March. Cheers, Miles -- Miles Sabin tel: +44 (0)7813 944 528 skype: milessabinhttp://www.chuusai.com/http://twitter.com/milessabin -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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.
Re: [Lift] Re: Scheduling the San Francisco Scala Lift Off
There is an EU meet-up at EPFL in April... thats as good as we are going to get (until there is more UK lift following)! Cheers, Tim On 13 Jan 2010, at 17:35, Stuart Roebuck wrote: Or Edinburgh? :-) On Jan 13, 12:22 pm, Mads Hartmann mads...@gmail.com wrote: Was is 'Scala Lift Off' ? I live in Denmark so i might be able to make it in either London or Norway :) On Jan 13, 12:32 pm, Miles Sabin mi...@milessabin.com wrote: On Wed, Jan 13, 2010 at 3:31 AM, David Pollak feeder.of.the.be...@gmail.com wrote: For the last two years, the San Francisco Scala Lift Off has happened the day after JavaOne. It's looking like JavaOne might not happen this year, so I'm starting to think about a time in the April-June timeframe when there are a lot of Scala and/or Java folks in San Francisco. If you all have any ideas of good dates, please post them. A bit early maybe, but EclipseCon 2010 is 22nd - 25th of March. Cheers, Miles -- Miles Sabin tel: +44 (0)7813 944 528 skype: milessabinhttp://www.chuusai.com/http://twitter.com/milessabin -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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.
Re: [Lift] Recommendations for a Web Designer familiar with Lift?
As far as materials to review you can try this Exploring Lift at http://the-lift-book.googlegroups.com/web/master.pdf?gda=-mLbBTwAAACbVhWZrDVxSOOuy5kZIfXd2VaDqLm8NPJJpAcwXMSJpphQBWRFAWHsPl_3piZ--U79Wm-ajmzVoAFUlE7c_fAt or you can also buy the book. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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. attachment: paksegu.vcf
[Lift] Choose template in a custom Loc
I'm writing a custom Loc for a page and want to choose a different template in lift:surround if a certain URL parameter is present. Basically, I have a template like this: lift:surround with=t1 at=content ... /lift:surround And at runtime I want to substitute t1 for t2 if necessary and leave everything inside lift:surround intact. How can I do this? Misha -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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.
Re: [Lift] Choose template in a custom Loc
I believe you might be able to solve your problem with a snippet :) Like so; lift:MySnippet.dynamicTemplatePicking lift:surround dynamic:template= at=content /lift:surround /lift:MySnippet.dynamicTemplatePicking and in you snippet Class MySnippet { def dynamicTemplatePicking(xhtml :NodeSeq) :NodeSeq = { bind(dynamic, xhtml, AttrBindParam(template, Text(t1 or t2 would go here), with)) } } Disclaimer: This code was written in mail.app and is pretty likely to contain errors ;) On 13/01/2010, at 20.37, Misha Korablin wrote: I'm writing a custom Loc for a page and want to choose a different template in lift:surround if a certain URL parameter is present. Basically, I have a template like this: lift:surround with=t1 at=content ... /lift:surround And at runtime I want to substitute t1 for t2 if necessary and leave everything inside lift:surround intact. How can I do this? Misha -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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.
Re: [Lift] Choose template in a custom Loc
Didn't David answer your question the first time you asked it? - Mads Hartmann Jensenmads...@gmail.com wrote: I believe you might be able to solve your problem with a snippet :) Like so; lift:MySnippet.dynamicTemplatePicking lift:surround dynamic:template= at=content /lift:surround /lift:MySnippet.dynamicTemplatePicking and in you snippet Class MySnippet { def dynamicTemplatePicking(xhtml :NodeSeq) :NodeSeq = { bind(dynamic, xhtml, AttrBindParam(template, Text(t1 or t2 would go here), with)) } } Disclaimer: This code was written in mail.app and is pretty likely to contain errors ;) On 13/01/2010, at 20.37, Misha Korablin wrote: I'm writing a custom Loc for a page and want to choose a different template in lift:surround if a certain URL parameter is present. Basically, I have a template like this: lift:surround with=t1 at=content ... /lift:surround And at runtime I want to substitute t1 for t2 if necessary and leave everything inside lift:surround intact. How can I do this? Misha -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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: Recommendations for a Web Designer familiar with Lift?
Provided they know (and care) about XHTML, any designer can learn lift templates... its one of its major selling points IMHO. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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: Parcing Json
I assume I use the save method but am stumbling on implementing it... On Jan 11, 5:49 pm, Joni Freeman freeman.j...@gmail.com wrote: Hi, I'm sorry but I'm not totally sure what you are trying to accomplish. What would be the key in that map and what would be its values? Cheers Joni On 11 tammi, 03:14, Randinn rand...@gmail.com wrote: I should explain what we are planning, the idea is to get the json file into a string, parse it and save the caught information into a Observation map. On Jan 11, 11:23 am, Randinn rand...@gmail.com wrote: Forgive my ignorance but I was wondering why (json \ observations).extract[Observation], is it to save as a flat file? On Jan 4, 7:13 am, Randinn rand...@gmail.com wrote: I tried some of the changes you made but not all of them, and (json\ observations).extract[Observation], I had no idea about that one. Thank you very much for your help, it is appreciated. On Jan 4, 1:00 am, Joni Freeman freeman.j...@gmail.com wrote: Google Groups does not shine in formatting code snippets. Here's nicer version: http://paste.pocoo.org/show/161578/ Cheers Joni On 3 tammi, 12:20, Joni Freeman freeman.j...@gmail.com wrote: Hi, That's almost correct. I did following changes after looking intoJSON content. 1. 'notice' and 'header' areJSONarrays just like 'data'. Therefore: case class Observation(notice: List[Notice], header: List[Header], data: List[Data]) 2. There's optional data inJSON(some datapoints are nulls and Scala Int or Double can't take null values). This can be fixed by extracting into Option. 3. The extracted Observation is inJSONfield 'observations'. Therefore: (json\ observations).extract[Observation] Your error stack trace suggests that you have an old version of lift- json. Please upgrade to M8, there was a critical bug in case class extraction in older versions. Full example which works for me: implicit val formats = net.liftweb.json.DefaultFormats case class Notice(copyright: String, copyright_url: String, disclaimer_url: String) case class Header(refresh_message: String, ID: String, main_ID: String, name: String, state_time_zone: String, time_zone: String, product_name: String, state: String) case class Data(sort_order: Int, wmo: Int, history_product: String, local_date_time: String, local_date_time_full: String, air_temp: Option [Double], dewpt: Option[Double], apparent_t: Option[Double], rel_hum: Option[Int], delta_t: Option[Double], wind_dir: String, wind_spd_kt: Option[Double], gust_kt: Option [Double], wind_spd_kmh: Option[Double], press: Option[Double], rain_trace: String) case class Observation(notice: List[Notice], header: List[Header], data: List[Data]) (json\ observations).extract[Observation] Cheers Joni On 3 tammi, 09:17, Randinn rand...@gmail.com wrote: I'm having a bit of trouble with LiftJsonparcing, I know I'm not doing it correctly but looking at the examples I cannot figure out what, anyway, here is the code in question. If someone could point me in the right direction that would be great, thanks in advance. class HelloWorld { def howdy = spanWelcome to hello-lift at {new _root_.java.util.Date}/span val http = new Http val bos = new ByteArrayOutputStream val myRequest = new Request(http://www.bom.gov.au/fwo/IDV60901/ IDV60901.94868.json) val rawdata = http(myRequest bos) val bs = bos.toString val db = :/(www.bom.gov.au) valjson= parse(bs) implicit val formats = net.liftweb.json.DefaultFormats case class Notice(copyright: String, copyright_url: String, disclaimer_url: String) case class Header(refresh_message: String, ID: String, main_ID: String, name: String, state_time_zone: String, time_zone: String, product_name: String, state: String) case class Data(sort_order: Int, wmo: Int, history_product: String, local_date_time: String, local_date_time_full: Int, air_temp: Double, dewpt: Double, apparent_t: Double, rel_hum: Double, delta_t: Double, wind_dir: Double, wind_spd_kt: Double, gust_kt: Double, wind_spd_kmh: Double, press: Double, rain_trace: Double) case class Observation(notice: Notice, header: Header, data: List [Data]) json.extract[Observation] -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to
[Lift] Lift - GAE Version
Introduction: I apologize in advanced for I am naive about Scala, Lift and elegant design decisions in Lift. I am a C#/ASP.NET/Windows Application developer. I played with Scala and it was the C# I was looking for! My job is on .NET platform. But for enjoying something (and maybe put into real use later) Scala and Lift are really nice choices (IMHO). Could there be an official GAE (Google App Engine) version of Lift? It appears that - for some reason I can not figure out; one of them for sure is elegance - Lift and Scala are attracting to those who want to use GAE/J. This can be a winning/dominated playground for both of them (even if we put aside concurrency features in GRE) for those who want to use GRE/J. Regards -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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: Backbutton for Ajax
Hello, I would really would like to have this type of support from lift. I looked at GWT and think this is a nice way. They use url parameters after a '#'. I dont understand the process because I have very little javascript knowledge. But I am thinking, lift is creating unique function names and is calling them with ajax. Maybe there is a way to have the functions be called over a way like GWT? Just creating some thoughts... best regards On 12 Jan., 13:23, greekscala hellectro...@gmail.com wrote: Hello Timothy, there is nothing stoping me from using it. But when I think of a framework it would be nice to activate backbutton support. I think this is somethink a lot of people would appreciate to have and not everybody should have to build this from the ground up. I do not have to deal with this now but in near future. I will have to search what ways are avalable. And if I can intergrate this im my app, maybe we can find a way to abstract it. with best regards On 12 Jan., 00:35, Timothy Perrett timo...@getintheloop.eu wrote: I'm not sure what is stopping you using something like this in conjunction with lift? If you want something baked in, can you be specific with what and how you might want it to work? Cheers, Tim Sent from my iPhone On 11 Jan 2010, at 23:13, greekscala hellectro...@gmail.com wrote: Hello Alex! I will take a look at sammy.js . I would like to have some way for this in Lift too. Since with Lift it is easy to do alot of ajax. with best regards On 11 Jan., 23:05, Alex Boisvert alex.boisv...@gmail.com wrote: I've been playing with sammy.js http://code.quirkey.com/sammy/ recently and I like the way they update the URL fragment identifier (hash) when doing AJAX which makes apps more back-button friendly, in a manner that's similar to GMail. It would be nice to have something similar in Lift. alex On Mon, Jan 11, 2010 at 4:55 PM, greekscala hellectro...@gmail.com wrote: Hello Lift people! I would like to know how experienced lift devs think and what they do about ajax backbutton support. with best regards -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb %2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com . For more options, visit this group athttp://groups.google.com/group/liftweb?hl=en . -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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.
Re: [Lift] Re: Lift - GAE Version
This is correct - many part of lift don't work on GAe... So far, we've seen little need for it as the vast majority of users simply want more than GAE can offer. Cheers, Tim Sent from my iPhone On 13 Jan 2010, at 22:51, Randinn rand...@gmail.com wrote: The problem as far as I know is the GAE sandboxing inhibits most of what makes lift, lift. On Jan 14, 8:56 am, __kaveh__ kaveh.shahbaz...@gmail.com wrote: Introduction: I apologize in advanced for I am naive about Scala, Lift and elegant design decisions in Lift. I am a C#/ASP.NET/Windows Application developer. I played with Scala and it was the C# I was looking for! My job is on .NET platform. But for enjoying something (and maybe put into real use later) Scala and Lift are really nice choices (IMHO). Could there be an official GAE (Google App Engine) version of Lift? It appears that - for some reason I can not figure out; one of them for sure is elegance - Lift and Scala are attracting to those who want to use GAE/J. This can be a winning/dominated playground for both of them (even if we put aside concurrency features in GRE) for those who want to use GRE/J. Regards -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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 . -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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 - GAE Version
Agreed; things like Comet Style request processing; yet Lift model for separating concerns and it's powerful template system can really makes a complete web application ecosystem on GAE. On Jan 14, 1:51 am, Randinn rand...@gmail.com wrote: The problem as far as I know is the GAE sandboxing inhibits most of what makes lift, lift. On Jan 14, 8:56 am, __kaveh__ kaveh.shahbaz...@gmail.com wrote: Introduction: I apologize in advanced for I am naive about Scala, Lift and elegant design decisions in Lift. I am a C#/ASP.NET/Windows Application developer. I played with Scala and it was the C# I was looking for! My job is on .NET platform. But for enjoying something (and maybe put into real use later) Scala and Lift are really nice choices (IMHO). Could there be an official GAE (Google App Engine) version of Lift? It appears that - for some reason I can not figure out; one of them for sure is elegance - Lift and Scala are attracting to those who want to use GAE/J. This can be a winning/dominated playground for both of them (even if we put aside concurrency features in GRE) for those who want to use GRE/J. Regards -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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: Default Schema for DefaultConnectionIdentifier
I found DB.globalDefaultSchemaName, but the Schemifier is still breaking: java.util.NoSuchElementException: key not found: mytablename at scala.collection.Map$class.default(Map.scala:169) [scala- library-2.7.7.jar:na] at scala.collection.mutable.HashMap.default(HashMap.scala:33) [scala-library-2.7.7.jar:na] at scala.collection.Map$class.apply(Map.scala:80) [scala- library-2.7.7.jar:na] at scala.collection.mutable.HashMap.apply(HashMap.scala:33) [scala-library-2.7.7.jar:na] at net.liftweb.mapper.Schemifier$$anonfun$6$$anonfun$apply $8.apply(Schemifier.scala:193) [lift-mapper-1.1-M8.jar:1.1-M8] at net.liftweb.mapper.Schemifier$$anonfun$6$$anonfun$apply $8.apply(Schemifier.scala:193) [lift-mapper-1.1-M8.jar:1.1-M8] at net.liftweb.mapper.Schemifier$.net$liftweb$mapper$Schemifier $$using(Schemifier.scala:44) [lift-mapper-1.1-M8.jar:1.1-M8] at net.liftweb.mapper.Schemifier$$anonfun$6.apply (Schemifier.scala:193)[lift-mapper-1.1-M8.jar:1.1-M8] at net.liftweb.mapper.Schemifier$$anonfun$6.apply (Schemifier.scala:187)[lift-mapper-1.1-M8.jar:1.1-M8] -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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] Submenu disappeared
For some reason all of a sudden all the menus under Home do not display. Any idea where to look? Thanks. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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] Developing with IntelliJ IDEA 9.0?
Hello all -- I have tried to compile the quickstart project with the latest Scala plugin for IntelliJ 0.3.385, not very successfully: it either complains about LIFT libraries compiled with the wrong version of the compiler (the plugin comes with 2.8) or if I set the plugin to use the 2.7 compiler it doesn't work at all. Even posted the question to the plugin page (http://www.jetbrains.net/ confluence/display/SCA/Scala+Plugin+for+IntelliJ+IDEA) but no response yet. Did anybody manage to make this setup work? Any insight? Thanks, -- Sasha -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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.
Re: [Lift] Developing with IntelliJ IDEA 9.0?
I am working with IDEA Maia-IU-90.122 . it works very well - mawei...@gmail.com 13585201588 http://maweis.com On Thu, Jan 14, 2010 at 9:41 AM, Sasha Ovsankin sa...@codebistro.com wrote: Hello all -- I have tried to compile the quickstart project with the latest Scala plugin for IntelliJ 0.3.385, not very successfully: it either complains about LIFT libraries compiled with the wrong version of the compiler (the plugin comes with 2.8) or if I set the plugin to use the 2.7 compiler it doesn't work at all. Even posted the question to the plugin page (http://www.jetbrains.net/ confluence/display/SCA/Scala+Plugin+for+IntelliJ+IDEA) but no response yet. Did anybody manage to make this setup work? Any insight? Thanks, -- Sasha -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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.
Re: [Lift] Re: Backbutton for Ajax
Just thinking out loud as to how this could work... On modern browsers, it's possible to monitor the state change of the browser's URL hash (aka window.location.hash / '#' / document fragment) in the browser with the 'onhashchange' DOM event. It gets fired whenever the location.hash changes. On older browsers, it's also possible to poll for change which is less efficient but that's life. So the idea would be to: 1) add a snippet or utility method to set up a listener on onhashchange that would callback Scala functions associated with given hash (e.g. #foo, #bar, ...). Hashes could support parameters too (e.g., #foo/:param1/:param2) 2) add a method S.ajaxHash(hashPath, callback): JsCmd that would bind a hash path/pattern to a Scala function (by registering the path/pattern with the listener) 3) add a method S.changeHash(hashPath, params): JsCmd to programmatically change the browser's hash as a result of some AJAX processing. I don't have time to work on this yet but I'd be happy to hear what others think of the idea. alex On Wed, Jan 13, 2010 at 2:45 PM, greekscala hellectro...@gmail.com wrote: Hello, I would really would like to have this type of support from lift. I looked at GWT and think this is a nice way. They use url parameters after a '#'. I dont understand the process because I have very little javascript knowledge. But I am thinking, lift is creating unique function names and is calling them with ajax. Maybe there is a way to have the functions be called over a way like GWT? Just creating some thoughts... best regards On 12 Jan., 13:23, greekscala hellectro...@gmail.com wrote: Hello Timothy, there is nothing stoping me from using it. But when I think of a framework it would be nice to activate backbutton support. I think this is somethink a lot of people would appreciate to have and not everybody should have to build this from the ground up. I do not have to deal with this now but in near future. I will have to search what ways are avalable. And if I can intergrate this im my app, maybe we can find a way to abstract it. with best regards On 12 Jan., 00:35, Timothy Perrett timo...@getintheloop.eu wrote: I'm not sure what is stopping you using something like this in conjunction with lift? If you want something baked in, can you be specific with what and how you might want it to work? Cheers, Tim Sent from my iPhone On 11 Jan 2010, at 23:13, greekscala hellectro...@gmail.com wrote: Hello Alex! I will take a look at sammy.js . I would like to have some way for this in Lift too. Since with Lift it is easy to do alot of ajax. with best regards On 11 Jan., 23:05, Alex Boisvert alex.boisv...@gmail.com wrote: I've been playing with sammy.js http://code.quirkey.com/sammy/ recently and I like the way they update the URL fragment identifier (hash) when doing AJAX which makes apps more back-button friendly, in a manner that's similar to GMail. It would be nice to have something similar in Lift. alex On Mon, Jan 11, 2010 at 4:55 PM, greekscala hellectro...@gmail.com wrote: Hello Lift people! I would like to know how experienced lift devs think and what they do about ajax backbutton support. with best regards -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com liftweb %2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group athttp:// groups.google.com/group/liftweb?hl=en . -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to lift...@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.
Re: [Lift] Re: Backbutton for Ajax
I haven't really used Ajax much but it seems to me there are two kinds of changes. 1. Modifying the view, e.g., clicking an emal in Gmail, or Expand All. One can make an analogy to a GET request, in that there's no permanent change. 2. Taking actions, e.g., invoking an action on the server, or deleting the viewed email in Gmail. The analogy would be to a POST. It seems to me that Lift's Ajax is often used for #2. However backbutton support doesn't really make sense in that scenario. - Alex Boisvertalex.boisv...@gmail.com wrote: Just thinking out loud as to how this could work... On modern browsers, it's possible to monitor the state change of the browser's URL hash (aka window.location.hash / '#' / document fragment) in the browser with the 'onhashchange' DOM event. It gets fired whenever the location.hash changes. On older browsers, it's also possible to poll for change which is less efficient but that's life. So the idea would be to: 1) add a snippet or utility method to set up a listener on onhashchange that would callback Scala functions associated with given hash (e.g. #foo, #bar, ...). Hashes could support parameters too (e.g., #foo/:param1/:param2) 2) add a method S.ajaxHash(hashPath, callback): JsCmd that would bind a hash path/pattern to a Scala function (by registering the path/pattern with the listener) 3) add a method S.changeHash(hashPath, params): JsCmd to programmatically change the browser's hash as a result of some AJAX processing. I don't have time to work on this yet but I'd be happy to hear what others think of the idea. alex On Wed, Jan 13, 2010 at 2:45 PM, greekscala hellectro...@gmail.com wrote: Hello, I would really would like to have this type of support from lift. I looked at GWT and think this is a nice way. They use url parameters after a '#'. I dont understand the process because I have very little javascript knowledge. But I am thinking, lift is creating unique function names and is calling them with ajax. Maybe there is a way to have the functions be called over a way like GWT? Just creating some thoughts... best regards On 12 Jan., 13:23, greekscala hellectro...@gmail.com wrote: Hello Timothy, there is nothing stoping me from using it. But when I think of a framework it would be nice to activate backbutton support. I think this is somethink a lot of people would appreciate to have and not everybody should have to build this from the ground up. I do not have to deal with this now but in near future. I will have to search what ways are avalable. And if I can intergrate this im my app, maybe we can find a way to abstract it. with best regards On 12 Jan., 00:35, Timothy Perrett timo...@getintheloop.eu wrote: I'm not sure what is stopping you using something like this in conjunction with lift? If you want something baked in, can you be specific with what and how you might want it to work? Cheers, Tim Sent from my iPhone On 11 Jan 2010, at 23:13, greekscala hellectro...@gmail.com wrote: Hello Alex! I will take a look at sammy.js . I would like to have some way for this in Lift too. Since with Lift it is easy to do alot of ajax. with best regards On 11 Jan., 23:05, Alex Boisvert alex.boisv...@gmail.com wrote: I've been playing with sammy.js http://code.quirkey.com/sammy/ recently and I like the way they update the URL fragment identifier (hash) when doing AJAX which makes apps more back-button friendly, in a manner that's similar to GMail. It would be nice to have something similar in Lift. alex On Mon, Jan 11, 2010 at 4:55 PM, greekscala hellectro...@gmail.com wrote: Hello Lift people! I would like to know how experienced lift devs think and what they do about ajax backbutton support. with best regards -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com liftweb %2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group athttp:// groups.google.com/group/liftweb?hl=en . -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to
[Lift] Schemifier broken for Oracle
I'm pretty sure that I discovered that a bug was introduced that breaks Schemifier with Oracle... First of all, Oracle's JDBC driver has the odd behavior of being case sensitive when it comes to acquiring metadata. For example: DatabaseMetaData.getColumns(null, MYSCHEMA, MYTABLE, null) is not the same as DatabaseMetaData.getColumns(null, MYSCHEMA, myTable, null)... In fact, the latter option yields no results... Well, looking at 1.0 Schemifier source, see line 189: http://scala-tools.org/scaladocs/liftweb/1.0/net/liftweb/mapper/Schemifier.scala.htm You can see that it used: table.dbTableName If you look at the latest source, see line 193: http://github.com/dpp/liftweb/blob/master/framework/lift-persistence/lift-mapper/src/main/scala/net/liftweb/mapper/Schemifier.scala#L193 You can see that it uses: table._dbTableNameLC This change broke ensureColumns for Oracle. As a side note -- there was no useful error message explaining that no column metadata was found for table X. This took a while to trace. I must admit that I am surprised by Oracle's behavior. Since the database isn't case sensitive, the table name parameter should not be case sensitive -- but it certainly is by my testing (and I am using 11g). Why was the code changed to specify a lower case value? -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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] Lift app memory cost
Hello everyone: I have a questions confused me right now. today i try to publish my lift website by using mvn package, and got a war package sized more than 10M, the lib folder is the largest. i put this package in a jetty server found out it takes considerable memory cost. if there are lots lift web application in one jetty server, the cost maybe a disaster... any idea for lower down the lift app memory cost? I thought a idea that put these lib files to the jetty lib folder, but only suitable for the libs like scala-library and H2 library. When put lift-webkit lib in jetty lib folder, there must be logic errors i think, because different apps shared one LiftRules obj... so any good idea ? thanks guys -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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: Developing with IntelliJ IDEA 9.0?
I use IntelliJ IDEA IU-93.13 with Lift. I don't typically run and debug in the IDE too much yet. I know what's the point? I actually like the editor. For build and run I use mvn clean install to build non-web modules and mvn jetty:run for web modules. I'm hoping as the Scala plugin improves code insight completion will as well. I expect that will help me learn Scala and features of Lift too. Steve -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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.
Re: [Lift] Submenu disappeared
On Wed, Jan 13, 2010 at 5:28 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: For some reason all of a sudden all the menus under Home do not display. Any idea where to look? What version of Lift? Do you have a repro case? There was a bug introduced 3 weeks ago and fixed last week related to this, but it should be fine in 2.0-SNAPSHOT and 2.0 M1 (did M1 happen today?) Thanks. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://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 lift...@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.
Re: [Lift] Re: Lift - GAE Version
On Wed, Jan 13, 2010 at 3:13 PM, __kaveh__ kaveh.shahbaz...@gmail.comwrote: Agreed; things like Comet Style request processing; yet Lift model for separating concerns and it's powerful template system can really makes a complete web application ecosystem on GAE. The all of the standard parts of Lift work on GAE except Comet and Mapper. Comet doesn't work because of the ban in GAE of creating threads (Actors) and Mapper doesn't work because there's no JDBC source on GAE. With that being said, I personally think GAE is the worst of all possible worlds. GAE has a severely limited run-time (the idea of not being able to have asynchronous messages is a huge limitation). BigTable is good for a limited number of things, but even the most trivial apps (e.g., yet another Twitter Clone) is going to require a relational database or some other model beyond what BigTable offers. GAE nominally scales well, but if you're moving to Twitter-like traffic, you're not going to want to be tied to Google's infrastructure... it's just too scaring from a business perspective. For $10/mo, you can rent a slice at SliceHost or prgmr.com that will run a nice app and allow it to scale to hundreds or maybe thousands of users. So, if you have an actual need for Lift on GAE for an actual production site and Lift is not offering a particular something you need, please tell us about it and we'll see about scheduling a fix. Thanks, David On Jan 14, 1:51 am, Randinn rand...@gmail.com wrote: The problem as far as I know is the GAE sandboxing inhibits most of what makes lift, lift. On Jan 14, 8:56 am, __kaveh__ kaveh.shahbaz...@gmail.com wrote: Introduction: I apologize in advanced for I am naive about Scala, Lift and elegant design decisions in Lift. I am a C#/ASP.NET/Windows Application developer. I played with Scala and it was the C# I was looking for! My job is on .NET platform. But for enjoying something (and maybe put into real use later) Scala and Lift are really nice choices (IMHO). Could there be an official GAE (Google App Engine) version of Lift? It appears that - for some reason I can not figure out; one of them for sure is elegance - Lift and Scala are attracting to those who want to use GAE/J. This can be a winning/dominated playground for both of them (even if we put aside concurrency features in GRE) for those who want to use GRE/J. Regards -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://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 lift...@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.
Re: [Lift] Schemifier broken for Oracle
Please try with Lift 2.0-SNAPSHOT. We made a number of significant fixes to Schemifier over the course of the year including improving support for case-sensitive RDBMS. On Wed, Jan 13, 2010 at 6:54 PM, aw anth...@whitford.com wrote: I'm pretty sure that I discovered that a bug was introduced that breaks Schemifier with Oracle... First of all, Oracle's JDBC driver has the odd behavior of being case sensitive when it comes to acquiring metadata. For example: DatabaseMetaData.getColumns(null, MYSCHEMA, MYTABLE, null) is not the same as DatabaseMetaData.getColumns(null, MYSCHEMA, myTable, null)... In fact, the latter option yields no results... Well, looking at 1.0 Schemifier source, see line 189: http://scala-tools.org/scaladocs/liftweb/1.0/net/liftweb/mapper/Schemifier.scala.htm You can see that it used: table.dbTableName If you look at the latest source, see line 193: http://github.com/dpp/liftweb/blob/master/framework/lift-persistence/lift-mapper/src/main/scala/net/liftweb/mapper/Schemifier.scala#L193 You can see that it uses: table._dbTableNameLC This change broke ensureColumns for Oracle. As a side note -- there was no useful error message explaining that no column metadata was found for table X. This took a while to trace. I must admit that I am surprised by Oracle's behavior. Since the database isn't case sensitive, the table name parameter should not be case sensitive -- but it certainly is by my testing (and I am using 11g). Why was the code changed to specify a lower case value? -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://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 lift...@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.
Re: [Lift] Re: Two database are broken in 1.1-M8, works fine in 1.1-M7 .
On Wed, Jan 13, 2010 at 6:18 AM, Neil.Lv anim...@gmail.com wrote: Hi David, I'm sorry about it that i write it wrong. But I change the second DBVendor name to DBVendor_2, and it create a db file named lift_proto2.db.h2.db. And it doesn't work, I add this method to the User model to specify the default db connection. ### override def dbDefaultConnectionIdentifier = bootstrap.liftweb.OneDB ### I use this code in M7 and it's fine. How can i define a vendor for the DefaultConnectionIdentifier in M8? The same way you define it in every version of Lift: DB.defineConnectionManager(DefaultConnectionIdentifier, DBVendor) Thank you very much! Cheers, Neil On Jan 13, 1:35 pm, David Pollak feeder.of.the.be...@gmail.com wrote: The problem with this code is you are using the same connection vendor for both connection identifiers *and* you're not defining a vendor for the DefaultConnectionIdentifier On Jan 11, 7:05 am, Neil.Lv anim...@gmail.com wrote: Hi all, There is a problem when i upgrading the 1.1-M7 to 1.1-M8, the db connection is broken. I use two database connection in my app, it's broken in 1.1-M8. ### object OneDB extends ConnectionIdentifier { override def jndiName = lift_proto} object TwoDB extends ConnectionIdentifier { override def jndiName = lift_proto2} ### The error message is: ### HTTP ERROR 500 Problem accessing /. Reason: Looking for Connection Identifier ConnectionIdentifier(lift) but failed to find either a JNDI data source with the name lift or a lift connection manager with the correct name ### Maybe I missing something else configure in M8 that it's different from M7. The test demo address is :http://github.com/anim510/two_db_demo Thanks for any help very much! Cheers, Neil -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://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 lift...@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.
Re: [Lift] Submenu disappeared
1.1-SNAPSHOT, and I don't think it's very up to date. This bug would hide even active submenus? - David Pollakfeeder.of.the.be...@gmail.com wrote: On Wed, Jan 13, 2010 at 5:28 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: For some reason all of a sudden all the menus under Home do not display. Any idea where to look? What version of Lift? Do you have a repro case? There was a bug introduced 3 weeks ago and fixed last week related to this, but it should be fine in 2.0-SNAPSHOT and 2.0 M1 (did M1 happen today?) Thanks. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://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 lift...@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. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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.
Re: [Lift] Submenu disappeared
On Wed, Jan 13, 2010 at 8:53 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: 1.1-SNAPSHOT, and I don't think it's very up to date. This bug would hide even active submenus? Yes. - David Pollakfeeder.of.the.be...@gmail.com wrote: On Wed, Jan 13, 2010 at 5:28 PM, Naftoli Gugenheim naftoli...@gmail.com wrote: For some reason all of a sudden all the menus under Home do not display. Any idea where to look? What version of Lift? Do you have a repro case? There was a bug introduced 3 weeks ago and fixed last week related to this, but it should be fine in 2.0-SNAPSHOT and 2.0 M1 (did M1 happen today?) Thanks. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://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 lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://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 lift...@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.
Re: [Lift] Lift app memory cost
On Wed, Jan 13, 2010 at 8:00 PM, XiaomingZheng xiaomingzhen...@gmail.comwrote: Hello everyone: I have a questions confused me right now. today i try to publish my lift website by using mvn package, and got a war package sized more than 10M, the lib folder is the largest. i put this package in a jetty server found out it takes considerable memory cost. if there are lots lift web application in one jetty server, the cost maybe a disaster... any idea for lower down the lift app memory cost? I thought a idea that put these lib files to the jetty lib folder, but only suitable for the libs like scala-library and H2 library. When put lift-webkit lib in jetty lib folder, there must be logic errors i think, because different apps shared one LiftRules obj... so any good idea ? thanks guys I routinely run low-traffic Lift-based web sites in Jetty with a 32MB heap size on the JVM. I doubt you're going to get it smaller than that. What are your constraints? -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://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 lift...@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.
Re: [Lift] Re: Code generation plugin for SBT
Oh I just started using SBT as well and love it. Looking forward to serious Lift support in SBT! On Mon, Jan 11, 2010 at 8:43 PM, Brian Hsu brianhsu@gmail.com wrote: Hello, I'm interested in this project. Just in case that there are someone eles is working on this too. Currently I have started working on the part of generate Lift website skeleton corresponding to lift-archetype-blank / lift-archetype-basic in mvn repo. I've not finished it yet, but as soon as I finished and tested it works, I will send a pull request on GitHub. On 1月11日, 上午2時22分, Timothy Perrett timo...@getintheloop.eu wrote: Hi all, I've started a little project to add code-generation to SBT and I would like to hear from anyone who wants to collaborate (and has time to). This could be very important for the lift community, and my aim is to make something like thus: generate lift snippet WhateverName where generate is the sbt plugin command, lift is the library defined in the plugin/project def, snippet is the action/template and WhateverName is the args* that the action or template takes. Im thinking of producing template libraries as JARs and then they could just be distributed via the maven repository system. So, if you want to help out on this, id love to hear from you. If would be an extra bonus if you are an SBT master or have written other plugins as that is where my knowledge is weakest. Cheers, Tim -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://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 lift...@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] [netbeans] getting lift-archetype-blank to work inside netbeans
Hi, I followed the instructions here http://wiki.netbeans.org/Scala68v1 to install the 6.8 plugin for Scala. Problem is that the lift-archetype-blank says scala-version 2.7.7. And the netbeans plugin comes with its own version (scala-compiler.jar/ compiler.properties version.number=2.8.0.r19918-b20091128085106) Whereas the latest - which I installed as per instructions - is 2.8.0.r20436-b20100111020117 Well, I modified the pom.xml generated by the archetype and put the latest available version of scala according to mavensearch.net 2.8.0.r18462-b20090811081019. But when using netbeans to download the Lift classes I'm getting: [ERROR]error: error while loading Loc, Scala signature Loc has wrong version expected: 5.0 found: 4.1 in C:\Documents and Settings\carlos\.m2\repository\net \liftweb\lift-webkit\0.8\lift-webkit-0.8.jar(net/liftweb/sitemap/ Loc.class) .. among others .. .. Hum, the modern nightmare of open source is versioning between IDE, compilers and frameworks ... I am guessing it's because the Lift framework was compiled against 2.7 and the scala 2.8 compiler doesn't like them. Any ideas on how to move forward? I know some people prefer not to use IDEs, but I want to give it a good try. regards Carlos -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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.
Re: [Lift] [netbeans] getting lift-archetype-blank to work inside netbeans
Either use an older version of Netbeans or another IDE, or checkout the unsupported 280_port branch from git and mvn clean install. - carlosayamcarlosa...@gmail.com wrote: Hi, I followed the instructions here http://wiki.netbeans.org/Scala68v1 to install the 6.8 plugin for Scala. Problem is that the lift-archetype-blank says scala-version 2.7.7. And the netbeans plugin comes with its own version (scala-compiler.jar/ compiler.properties version.number=2.8.0.r19918-b20091128085106) Whereas the latest - which I installed as per instructions - is 2.8.0.r20436-b20100111020117 Well, I modified the pom.xml generated by the archetype and put the latest available version of scala according to mavensearch.net 2.8.0.r18462-b20090811081019. But when using netbeans to download the Lift classes I'm getting: [ERROR]error: error while loading Loc, Scala signature Loc has wrong version expected: 5.0 found: 4.1 in C:\Documents and Settings\carlos\.m2\repository\net \liftweb\lift-webkit\0.8\lift-webkit-0.8.jar(net/liftweb/sitemap/ Loc.class) .. among others .. .. Hum, the modern nightmare of open source is versioning between IDE, compilers and frameworks ... I am guessing it's because the Lift framework was compiled against 2.7 and the scala 2.8 compiler doesn't like them. Any ideas on how to move forward? I know some people prefer not to use IDEs, but I want to give it a good try. regards Carlos -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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 app memory cost
my colleagues and i develop portals and other web apps for lots of small companies. One portal is low-traffic, so we put many small portals in one jetty server. we hope each portal cost as lower memory as better, because there are many portals in only single one server. In Lift framework, each web app must have its stuffs like LiftRules obj and S obj, can we shall them in different apps for saving memory? could you give me some advice? On Jan 14, 5:01 am, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Jan 13, 2010 at 8:00 PM, XiaomingZheng xiaomingzhen...@gmail.comwrote: Hello everyone: I have a questions confused me right now. today i try to publish my lift website by using mvn package, and got a war package sized more than 10M, the lib folder is the largest. i put this package in a jetty server found out it takes considerable memory cost. if there are lots lift web application in one jetty server, the cost maybe a disaster... any idea for lower down the lift app memory cost? I thought a idea that put these lib files to the jetty lib folder, but only suitable for the libs like scala-library and H2 library. When put lift-webkit lib in jetty lib folder, there must be logic errors i think, because different apps shared one LiftRules obj... so any good idea ? thanks guys I routinely run low-traffic Lift-based web sites in Jetty with a 32MB heap size on the JVM. I doubt you're going to get it smaller than that. What are your constraints? -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- 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 lift...@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.
Re: [Lift] Re: Lift app memory cost
On Wed, Jan 13, 2010 at 9:52 PM, XiaomingZheng xiaomingzhen...@gmail.comwrote: my colleagues and i develop portals and other web apps for lots of small companies. One portal is low-traffic, so we put many small portals in one jetty server. we hope each portal cost as lower memory as better, because there are many portals in only single one server. In Lift framework, each web app must have its stuffs like LiftRules obj and S obj, can we shall them in different apps for saving memory? could you give me some advice? If memory size is your prime concern, PHP is probably your best bet. Lift is not going to give you the memory efficiencies you sound like you're looking for. Sorry. On Jan 14, 5:01 am, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Jan 13, 2010 at 8:00 PM, XiaomingZheng xiaomingzhen...@gmail.comwrote: Hello everyone: I have a questions confused me right now. today i try to publish my lift website by using mvn package, and got a war package sized more than 10M, the lib folder is the largest. i put this package in a jetty server found out it takes considerable memory cost. if there are lots lift web application in one jetty server, the cost maybe a disaster... any idea for lower down the lift app memory cost? I thought a idea that put these lib files to the jetty lib folder, but only suitable for the libs like scala-library and H2 library. When put lift-webkit lib in jetty lib folder, there must be logic errors i think, because different apps shared one LiftRules obj... so any good idea ? thanks guys I routinely run low-traffic Lift-based web sites in Jetty with a 32MB heap size on the JVM. I doubt you're going to get it smaller than that. What are your constraints? -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- 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 lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://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 lift...@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 app memory cost
got it, thanks David On Jan 14, 6:00 am, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Jan 13, 2010 at 9:52 PM, XiaomingZheng xiaomingzhen...@gmail.comwrote: my colleagues and i develop portals and other web apps for lots of small companies. One portal is low-traffic, so we put many small portals in one jetty server. we hope each portal cost as lower memory as better, because there are many portals in only single one server. In Lift framework, each web app must have its stuffs like LiftRules obj and S obj, can we shall them in different apps for saving memory? could you give me some advice? If memory size is your prime concern, PHP is probably your best bet. Lift is not going to give you the memory efficiencies you sound like you're looking for. Sorry. On Jan 14, 5:01 am, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Jan 13, 2010 at 8:00 PM, XiaomingZheng xiaomingzhen...@gmail.comwrote: Hello everyone: I have a questions confused me right now. today i try to publish my lift website by using mvn package, and got a war package sized more than 10M, the lib folder is the largest. i put this package in a jetty server found out it takes considerable memory cost. if there are lots lift web application in one jetty server, the cost maybe a disaster... any idea for lower down the lift app memory cost? I thought a idea that put these lib files to the jetty lib folder, but only suitable for the libs like scala-library and H2 library. When put lift-webkit lib in jetty lib folder, there must be logic errors i think, because different apps shared one LiftRules obj... so any good idea ? thanks guys I routinely run low-traffic Lift-based web sites in Jetty with a 32MB heap size on the JVM. I doubt you're going to get it smaller than that. What are your constraints? -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- 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 lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- 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 lift...@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: Two database are broken in 1.1-M8, works fine in 1.1-M7 .
David, Thank you very much! It works now, I'm so sorry about that I didn't see the yak demo yesterday . :) Cheers, Neil On Jan 14, 12:43 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Jan 13, 2010 at 6:18 AM, Neil.Lv anim...@gmail.com wrote: Hi David, I'm sorry about it that i write it wrong. But I change the second DBVendor name to DBVendor_2, and it create a db file named lift_proto2.db.h2.db. And it doesn't work, I add this method to the User model to specify the default db connection. ### override def dbDefaultConnectionIdentifier = bootstrap.liftweb.OneDB ### I use this code in M7 and it's fine. How can i define a vendor for the DefaultConnectionIdentifier in M8? The same way you define it in every version of Lift: DB.defineConnectionManager(DefaultConnectionIdentifier, DBVendor) Thank you very much! Cheers, Neil On Jan 13, 1:35 pm, David Pollak feeder.of.the.be...@gmail.com wrote: The problem with this code is you are using the same connection vendor for both connection identifiers *and* you're not defining a vendor for the DefaultConnectionIdentifier On Jan 11, 7:05 am, Neil.Lv anim...@gmail.com wrote: Hi all, There is a problem when i upgrading the 1.1-M7 to 1.1-M8, the db connection is broken. I use two database connection in my app, it's broken in 1.1-M8. ### object OneDB extends ConnectionIdentifier { override def jndiName = lift_proto} object TwoDB extends ConnectionIdentifier { override def jndiName = lift_proto2} ### The error message is: ### HTTP ERROR 500 Problem accessing /. Reason: Looking for Connection Identifier ConnectionIdentifier(lift) but failed to find either a JNDI data source with the name lift or a lift connection manager with the correct name ### Maybe I missing something else configure in M8 that it's different from M7. The test demo address is :http://github.com/anim510/two_db_demo Thanks for any help very much! Cheers, Neil -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- 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 lift...@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.
Re: [Lift] Ajax forms and (multiple) submit buttons
I would of course be very +1 to include the ajaxSubmit :). Thanks for the work. This looks a bit different to the button I tried before, maybe you have a patch so that I can try it out on the test app? Adam On Jan 12, 2010, at 8:39 PM, Marius wrote: Dear all, Recently (and not only) there have been discussions about ajax forms and their submit Scala functions not being called and that's because JQuery's form serialization doesn't serialize the input submits (for pertinent reasons). The workaround is as you know to use hidden fields. Adam also wanted an ajax form with multiple submit buttons taking different actions depending on which button is being called. This is also *doable* using hidden fields but not quite from elegant. I've experimented a way to allow ajax form submission but after all form field functions are being called your own ajax Scala function is being called (with no hidden fields). the idea is this: 1. I added an SHtml.ajaxSubmit which has the same signature with SHtml.submit 2. At js level I added a liftAjax.lift_uriSuffix 3. When clicking the ajaxSubmit button we set the liftAjax.lift_uriSuffix with the function name value. This is the function name of your scala function. Hence your scala function for ajaxSubmit will be called after form field functions are called. In short we piggy back the Scala function info on top of the serialized form info. I tested it and it works just fine for me: Using it looks something like like: ajaxForm(bind(hello, xhtml, field1 - text(, (s) = {println(field1 = + s)}), field2 - text(, (s) = {println(field2 = + s)}), field3 - text(, (s) = {println(field3 = + s)}), submit - ajaxSubmit(Press me, () = { println(my ajax func called.) Noop })) ... you got the idea. This of course allows putting virtually any number of ajax submit buttons and the right function will be called on server side. I'm thinking to add this to Lift but first I'd like to know your thoughts. Br's, Marius -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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.