[Lift] Re: binding form fields while using jquery plugin
i tried to put custom attributes in scala code but still its nt working. Auto calculation is'nt happening yet. my view source in browser shows form method=post action=/mop fieldset legendAddition/legend preptext1 :input name=F567656735301UY5 type=text value= /: 1/p/pre prepText2 :input name=F567656735302UA4 type=text value= / /p/pre prepresult :input name=F567656735303ZCZ type=text value= //p/pre input name=F567656735306I01 type=submit value=ADD / /fieldset /form and my modified snippet code is : bind(form, xhtml, text1 - SHtml.text(text1, text1= _,name- sum), text2 - SHtml.text(text2,text2 = _,id- sum), result -SHtml.text(result, result = _, id- totalsum,name-totalsum), submit - SHtml.submit(add, addition)) any ideas where am i going wrong or missing something?? -- 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
i tried to put custom attributes in scala code but still its nt working. Auto calculation is'nt happening yet. my view source in browser shows form method=post action=/addition fieldset legendAddition/legend preptext1 :input name=F567656735301UY5 type=text value= / : 1/p/pre prepText2 :input name=F567656735302UA4 type=text value= / /p/pre prepresult :input name=F567656735303ZCZ type=text value= //p/pre input name=F567656735306I01 type=submit value=ADD / /fieldset /form and my modified snippet code is : bind(form, xhtml, text1 - SHtml.text(text1, text1= _,name- sum), text2 - SHtml.text(text2,text2 = _,id- sum), result -SHtml.text(result, result = _, id- totalsum,name-totalsum), submit - SHtml.submit(add, addit)) any ideas where am i going wrong or missing something?? On Jan 12, 11:34 am, Madhav mail.madhavsha...@gmail.com wrote: Thanks Naftoli i will just try your solution and come back. 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: API-Doc generation help, pls
Please do mvn clean scala:doc. That should work. - Indrajit On 12/01/10 4:10 AM, joe wrote: I am receiving the same error as posted above attempting to build the scala docs. d:\dev\liftprojects\liftwebmvn -version Apache Maven 2.2.1 (r801777; 2009-08-06 13:16:01-0600) Java version: 1.6.0_12 Java home: D:\Program Files\Java\jdk1.6.0_12\jre Default locale: en_US, platform encoding: Cp1252 OS name: windows vista version: 6.0 arch: x86 Family: windows d:\dev\liftprojects\liftwebscala -version Scala code runner version 2.7.7.final -- Copyright 2002-2009, LAMP/ EPFL d:\dev\liftprojects\liftwebmvn scala:doc [INFO] Scanning for projects... [INFO] Reactor build order: [INFO] Lift Web Framework [INFO] Lift Base Components [INFO] Lift Common [INFO] Lift Actor [INFO] Lift Json [INFO] Lift Util [INFO] Lift WebKit [INFO] Lift Persistence Components [INFO] Lift Mapper [INFO] Lift JPA [INFO] Lift Record [INFO] Lift Modules [INFO] Lift TestKit [INFO] Lift OSGi [INFO] Lift Wizard [INFO] Lift Widgets [INFO] Lift Machine [INFO] Lift Textile [INFO] Lift Facebook [INFO] Lift AMQP [INFO] Lift XMPP [INFO] Lift OpenID [INFO] Lift OAuth [INFO] Lift PayPal [INFO] Lift JTA [INFO] Lift Archetypes [INFO] lift-archetype-blank [INFO] lift-archetype-basic [INFO] lift-archetype-jpa-blank-single [INFO] lift-archetype-jpa-blank [INFO] lift-archetype-jpa-basic [INFO] Lift Core (full lift) [INFO] Lift Sites [INFO] Lift Example [INFO] OSGi Examples for Lift [INFO] OSGi Examples for Lift - Hello [INFO] Skittr Example [INFO] HelloLift example application [INFO] HelloDarwin tutorial application [INFO] JPA Demo Master [INFO] JPADemo-spa [INFO] JPADemo-web [INFO] Lift Flot widget example [INFO] HTTP Authentication example [INFO] [INFO] Building Lift Web Framework [INFO]task-segment: [scala:doc] [INFO] [INFO] [scala:doc {execution: default-cli}] [INFO] Checking for multiple versions of scala [INFO] [INFO] Building Lift Base Components [INFO]task-segment: [scala:doc] [INFO] [INFO] [scala:doc {execution: default-cli}] [INFO] Checking for multiple versions of scala [WARNING] No source files found in D:\dev\liftprojects\liftweb\lift- base\src\main\scala [INFO] [INFO] Building Lift Common [INFO]task-segment: [scala:doc] [INFO] [INFO] [scala:doc {execution: default-cli}] [INFO] Checking for multiple versions of scala [INFO] Checking for multiple versions of scala load packageLinkDefs from :file://D:/dev/liftprojects/liftweb/lift- base/lift-common/target/packageLinkDefs.properties failed to load PackageLinkDefs(file://D:/dev/liftprojects/liftweb/lift- base/lift-common/target/packageLinkDefs.properties) :D Jan 11, 2010 3:38:09 PM org.scala_tools.vscaladoc.HtmlRenderer render INFO: write page for overview Jan 11, 2010 3:38:09 PM org.scala_tools.vscaladoc.HtmlRenderer render INFO: write page for all-classes (list) Jan 11, 2010 3:38:09 PM org.scala_tools.vscaladoc.HtmlRenderer render INFO: write index.html Jan 11, 2010 3:38:09 PM org.scala_tools.vscaladoc.HtmlRenderer render INFO: write doc for each classes [INFO] [INFO] Building Lift Actor [INFO]task-segment: [scala:doc] [INFO] [INFO] [scala:doc {execution: default-cli}] [INFO] Checking for multiple versions of scala [INFO] Checking for multiple versions of scala load packageLinkDefs from :file://D:/dev/liftprojects/liftweb/lift- base/lift-actor/target/packageLinkDefs.properties failed to load PackageLinkDefs(file://D:/dev/liftprojects/liftweb/lift- base/lift-actor/target/packageLinkDefs.properties) :D Jan 11, 2010 3:38:14 PM org.scala_tools.vscaladoc.HtmlRenderer render INFO: write page for overview Jan 11, 2010 3:38:14 PM org.scala_tools.vscaladoc.HtmlRenderer render INFO: write page for all-classes (list) Jan 11, 2010 3:38:14 PM org.scala_tools.vscaladoc.HtmlRenderer render INFO: write index.html Jan 11, 2010 3:38:14 PM org.scala_tools.vscaladoc.HtmlRenderer render INFO: write doc for each classes failed to find baseUri for (net.liftweb.common, GenericActor, false failed to find baseUri for (net.liftweb.common, ForwardableActor, false failed to find baseUri for (net.liftweb.common, Box, false failed to find baseUri for (net.liftweb.common, Box, false failed to find baseUri for (net.liftweb.common, Box, false failed to find baseUri for (net.liftweb.common, TypedActor, false failed to find baseUri for (net.liftweb.common,
[Lift] Re: Problem with validation
Yes i have tired, but it was the same problem. First validation is presented on form, but then is function actionConfirm() called (and there is redirection). And the bad thing is that redirection is not stoped. -- 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] Using Lift to Build stand alone multi threaded (multi actor?) apps. (was Lift based backend server subscribing via amqp)
Reposting since this seemed to have gotten lost in the stream :) I'm trying to build a stand alone application where I have multiple threads or actors that subscribe to a queueing system and persist stuff on a database. Does it make sense to use mapper here? I ask because of this stack overflow post.http://stackoverflow.com/questions/1140448/what-orms-work-well-with-scalaIn terms of our requirements, what we want from an orm is fairly basic. Since we are not building a web application, we would want it decoupled from any other parts of such a stack. (I heard mapper depends on the http module?). We need most of the basic orm operations with ACID compliance, preferably one that requires us to write as little code as possible and includes transactionality as something we can depend upon. The database we're currently looking at is Postgresql, so ideally the ORM should be oblivious of whether or not the database is distributed. On Tue, Jan 5, 2010 at 6:39 PM, Timothy Perrett timo...@getintheloop.euwrote: In what way do you mean is mapper worth it? What kind of system is it? do you need ACID or BASE? What kind of load will the system be under? Do you need it to be distributed? You are not restricted to Mapper, you could use JPA or whatever persistence you want with lift. If you just want to make a pretty simple service tier, then sure, Lift will be fine. Akka works well when you need fault tolerance or distributed nodes etc etc Cheers, Tim On Jan 5, 3:34 am, vishnu path...@gmail.com wrote: well I'm not sure how to describe it differently. As you said it's only service tier. The truth is I dont know anything about Lift yet and Im just now running through some basic Scala books. I need a library with which to talk to rabbitmq as a subscriber that might work at a higher level than the default java api that comes with rabbitmq and ideally something that provides the same service for me talk to a database via scala. I haven't seen Akka before, so I'll take a look at that :). Would you say mapper is worth it? On Tue, Jan 5, 2010 at 2:23 AM, Timothy Perrett timo...@getintheloop.euwrote: It depends on your use case... you don't really describe exactly what you want to do. Perhaps start by providing more detail? If you want service teir *only* though, its quite probable that akka would be a better fix. Cheers, Tim On 4 Jan 2010, at 20:30, Channing Walton wrote: Maybe Akka would be better for you?http://akkasource.org/ Akka has an AMQP module which abstracts AMQP Producer and Consumer as Actors. Channing vishnu-11 wrote: Hi I'm trying to use lift to right a back end for a system that communicates via AMQP. The idea is to have a bunch of (threads?, processes? actors?) that subscribe to some queues on a queueing system and react to various messages by contacting various third party systems and persisting messages to a database. I was wondering firstly if it makes sense to use lift, or if it makes more sense to pull various parts out of lift and use them? Additionally, looking at the lift amqp code, it seems to be a little out of date, especially with regard to amqp. Does anyone know if there has been any active work on this segment? -- 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. -- View this message in context: http://old.nabble.com/Lift-based-backend-server-subscribing-via-amqp-. .. Sent from the liftweb mailing list archive at Nabble.com. -- 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. -- 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. -- You received this message because you are
[Lift] TextileParser
Playing around with the TextileParser code, I am using paraFixer. I noticed that bbold/b yields bold HTML. Similarly, emitalic/em yields italic HTML. But strongbold/strong does NOT yield bold HTML... Looks like we need to add some extra tags to the function isValidTag. I'd like to see tags like strong, i, and u added for consistency. See: http://github.com/dpp/liftweb/blob/master/framework/lift-modules/lift-textile/src/main/scala/net/liftweb/textile/TextileParser.scala#L530 How complete is the Textile support? Is there a wiki page that describes what is supported? The closest thing I could find was wikipedia: http://en.wikipedia.org/wiki/Textile_(markup_language) I am interested in some basic wiki-markup to HTML translation, like *bold* and _italic_, but not the more advanced stuff like embedded images or links to other pages. For security reasons, I am interested in a layer that escapes offending HTML like script or img or something that could be dangerous. Is that what I would get if I called TextileParser.toHtml(toParse: String, disableLinks: true)? -- 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] Using Lift to Build stand alone multi threaded (multi actor?) apps. (was Lift based backend server subscribing via amqp)
OK, so i'll try again to answer your question. Use lift-amqp for the service subscription. Then you have a choice between mapper and JPA... mapper should do what you want however and is probably simpler. Job done. The best advice is to actually try this stuff out... I get the impression you are currently not even attempting trial and error to see what works best for you, and that ultimately is what matters. Cheers, Tim On 12 Jan 2010, at 08:31, vishnu wrote: Reposting since this seemed to have gotten lost in the stream :) I'm trying to build a stand alone application where I have multiple threads or actors that subscribe to a queueing system and persist stuff on a database. Does it make sense to use mapper here? I ask because of this stack overflow post. http://stackoverflow.com/questions/1140448/what-orms-work-well-with-scala In terms of our requirements, what we want from an orm is fairly basic. Since we are not building a web application, we would want it decoupled from any other parts of such a stack. (I heard mapper depends on the http module?). We need most of the basic orm operations with ACID compliance, preferably one that requires us to write as little code as possible and includes transactionality as something we can depend upon. The database we're currently looking at is Postgresql, so ideally the ORM should be oblivious of whether or not the database is distributed. On Tue, Jan 5, 2010 at 6:39 PM, Timothy Perrett timo...@getintheloop.eu wrote: In what way do you mean is mapper worth it? What kind of system is it? do you need ACID or BASE? What kind of load will the system be under? Do you need it to be distributed? You are not restricted to Mapper, you could use JPA or whatever persistence you want with lift. If you just want to make a pretty simple service tier, then sure, Lift will be fine. Akka works well when you need fault tolerance or distributed nodes etc etc Cheers, Tim On Jan 5, 3:34 am, vishnu path...@gmail.com wrote: well I'm not sure how to describe it differently. As you said it's only service tier. The truth is I dont know anything about Lift yet and Im just now running through some basic Scala books. I need a library with which to talk to rabbitmq as a subscriber that might work at a higher level than the default java api that comes with rabbitmq and ideally something that provides the same service for me talk to a database via scala. I haven't seen Akka before, so I'll take a look at that :). Would you say mapper is worth it? On Tue, Jan 5, 2010 at 2:23 AM, Timothy Perrett timo...@getintheloop.euwrote: It depends on your use case... you don't really describe exactly what you want to do. Perhaps start by providing more detail? If you want service teir *only* though, its quite probable that akka would be a better fix. Cheers, Tim On 4 Jan 2010, at 20:30, Channing Walton wrote: Maybe Akka would be better for you?http://akkasource.org/ Akka has an AMQP module which abstracts AMQP Producer and Consumer as Actors. Channing vishnu-11 wrote: Hi I'm trying to use lift to right a back end for a system that communicates via AMQP. The idea is to have a bunch of (threads?, processes? actors?) that subscribe to some queues on a queueing system and react to various messages by contacting various third party systems and persisting messages to a database. I was wondering firstly if it makes sense to use lift, or if it makes more sense to pull various parts out of lift and use them? Additionally, looking at the lift amqp code, it seems to be a little out of date, especially with regard to amqp. Does anyone know if there has been any active work on this segment? -- 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. -- View this message in context: http://old.nabble.com/Lift-based-backend-server-subscribing-via-amqp-... Sent from the liftweb mailing list archive at Nabble.com. -- 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
Re: [Lift] Re: problems with file upload inside modal
I just looked at it. Your getting this problem because you are literally doing a hard post to /ajax_request/.. its no wonder its dumping the response to the browser. I see you have two options; one is to just stuff the normal form in an element hidden within the page and then display that form within the box using javascript (thus giving the form the correct action). Otherwise, just submit the form via AJAX. Does that help? Cheers, Tim On 12 Jan 2010, at 05:50, stephanos wrote: I don't want to appear pushy but this thing is really show stopper for me and I bet it's pretty obvious/easy for you to fix. If not I apologize for my impatience :-) On Jan 9, 10:15 am, stephanos stephan.beh...@googlemail.com wrote: Okay, this took my a while (new to git/github) - but here is my stripped down version of the problem:http://github.com/stephanos/liftweb-fileupload-modal-issue/ Hope it helps :-) On Jan 7, 8:14 pm, David Pollak feeder.of.the.be...@gmail.com wrote: Stephanos, It would be ideal if you could put up a quick project on GitHub that demonstrates the problem. Having reproducible code helps us solve problems faster. Any chance you could do that? Thanks, David On Wed, Jan 6, 2010 at 11:17 PM, stephanos stephan.beh...@googlemail.comwrote: Hi guys, I'm stuck with this problem for a few days now and need help. I want users to be able touploada ZIPfile. When I embed this functionality directly in the page it works flawlessly - but I need to put it into a modal and that's were the trouble starts. When I submit the form it executes correctly but it prints (!) the response to the browser: try{jQuery(#lift__noticesContainer__).each(function(i) {this.innerHTML = div class=\success\ulliThanks for the upload!/li/ul /div;});} catch (e) {} The code looks right but it shouldn't print to the screen. What am I doing wrong? # My current progress (using M8): HTML: lift:SourceUpload form=post multipart=true fieldset style=width: 90%; margin: 0 auto strongAt first/strong select the zipfileupload:file/ br/br/ and strongthen/strong push input type=submit value=upload!/ /fieldset /lift:SourceUpload CODE: def request(in: NodeSeq) = // opensfileuploadmodal ajaxButton(in, () = S.runTemplate(List(/katas/share)). map(ns = ModalDialog(ns)) openOr Alert(Internal error: Couldn't find template!)) def render(in: NodeSeq): NodeSeq = bind(upload, file - SHtml.fileUpload(processFile _)) Cheers, Stephan -- 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. -- 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: **IMPORTANT** Lift 2.0 Milestone1 is coming and it's time to test the SNAPSHOT in master
Its changed quite considerably - however, git should be clever enough to track the functions / changes themselves rather than files. At worst, it might just ask you if what its doing is right or whatever. Should be fine. Cheers, Tim On 11 Jan 2010, at 21:31, Naftoli Gugenheim wrote: To what exent has the git folder structure changed? - Timothy Perretttimo...@getintheloop.eu wrote: There might be an element of manual merge, but as your working on a local branch (you are working on a branch, right?) then it should be fine. Cheers, Tim On 11 Jan 2010, at 17:14, Naftoli Gugenheim wrote: It's not out yet, until Wednesday. Indrajit or anyone, if I have changes in my local git working directory and do a git pull, will that cause problems? How has the git layout changed? - Yuanyuan.w0...@gmail.com wrote: Hi Indrajit, I cannot find 2.0-M1 in http://scala-tools.org/repo-snapshots, only 2.0-SNAPSHOT . and the building command should be: mvn archetype:generate \ -DarchetypeRepository=http://scala-tools.org/repo-snapshots \ -DremoteRepositories=http://scala-tools.org/repo-snapshots \ -DarchetypeGroupId=net.liftweb \ -DarchetypeArtifactId=lift-archetype-blank \ -DarchetypeVersion=2.0-SNAPSHOT \ -DgroupId=com.mypackage \ -DartifactId=myproject \ -Dversion=1.0-SNAPSHOT when I change the -DarchetypeVersion into 2.0-M1, the maven cannot find the archetype. I am using maven 2.2.1 Thanks On Jan 11, 7:52 am, Indrajit Raychaudhuri indraj...@gmail.com wrote: Folks, Lift master branch is on 2.0 series now and a milestone release is coming soon! Please refer to the original discussion/announcement for Lift 2.0 [1] and the subsequent announcement of Lift 2.0 branch [2] for the requisite backdrop. Here is a quick rundown of the key points that you should be aware of: 1. The artifacts would carry 2.0 series version numbers instead of 1.1 series. This means: (a) The snapshot build series would be renamed from 1.1-SNAPSHOT to 2.0-SNAPSHOT (b) The stable build series would move from 1.1-M8 to 2.0-M1 (we preferred making it 2.0-M1 instead of 2.0-M9 to avoid the confusion about 2.0-M8, 2.0-M7 etc.) Therefore, for all of you who enjoy being on the bleeding edge (recommended!), you have to update your snapshot dependencies from 1.1- SNAPSHOT to 2.0-SNAPSHOT. For the rest, who prefer a stable build and are on 1.1-M8, you should be able to move to 2.0-M1. 2. We are still on Scala 2.7.7. No excitement :) Lift is very sensitive to Scala version and the stability of Lift (and it's dependencies including Scala) is very important for those who are critically dependent on Lift. That said, Heiko maintains Lift's port on Scala 2.8.0 280_port actively. But that's not yet ready - you have been warned :) 3. The whole Lift codebase is split into three top level projects: (a) Framework: The whole of Lift Framework that matter most to most. The usual modules (viz., lift-base, lift-persistence and lift-modules) have got nested within. Therefore, from now on, building Lift framework would mean just that. Doing a git pull or git clone as usual, changing to framework directory and running mvn install. (b) Archetypes: The standard distributed archetypes. The archetypes help you get quick started with a Lift based project. If you are not into building maven archetypes, you can stay clear of this. But a quick probe is welcome. (c) Examples: All the Lift examples are grouped into this project. If you are generally interested in learning different techniques from examples you don't have to build the whole of Lift anymore. Well that was still the case earlier, but now it's even more obvious. And it's true the other way round too, if you have to build Lift framework from source, you don't have to build the examples along with it. Another point: the examples won't be deployed on scala-tools maven repo anymore. Those war files up there serve no good purpose. 4. Lift now has the OAuth integration for real! Plough through framework/lift-modules/lift-oauth and framework/lift-modules/lift- oauth-mapper for the juicy stuff. Please do a mvn -U clean install for framework, archetypes and examples and do intense test on SNAPSHOT as much as possible. And report any defect [3] that you come across. This would help us close them before now and the actual release of 2.0-M1. Your help in testing is necessary in getting a great release (first in 2.0 series, first in 2010)! Enjoy, Indrajit [1]:http://groups.google.com/group/liftweb/browse_thread/thread/479edef77... [2]:http://groups.google.com/group/liftweb/browse_thread/thread/30cb33ba1... [3]:http://github.com/dpp/liftweb/issues -- 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
[Lift] Re: TextileParser
The textile support is fairly complete, there are some cases that are not covered though. If you just want simple bolden, italics etc the sure, TextileParser.toHtml will deal with that for you with no problems. Cheers, Tim On Jan 12, 8:35 am, aw anth...@whitford.com wrote: Playing around with the TextileParser code, I am using paraFixer. I noticed that bbold/b yields bold HTML. Similarly, emitalic/em yields italic HTML. But strongbold/strong does NOT yield bold HTML... Looks like we need to add some extra tags to the function isValidTag. I'd like to see tags like strong, i, and u added for consistency. See:http://github.com/dpp/liftweb/blob/master/framework/lift-modules/lift... How complete is the Textile support? Is there a wiki page that describes what is supported? The closest thing I could find was wikipedia: http://en.wikipedia.org/wiki/Textile_(markup_language) I am interested in some basic wiki-markup to HTML translation, like *bold* and _italic_, but not the more advanced stuff like embedded images or links to other pages. For security reasons, I am interested in a layer that escapes offending HTML like script or img or something that could be dangerous. Is that what I would get if I called TextileParser.toHtml(toParse: String, disableLinks: true)? -- 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 on Stack Overflow
I gathered some stats on number of question by tag: java x 30950 asp.net x 26451 php x 24854 asp.net-mvc x 8670 ruby-on-rails x 8513 ruby x 6620 -- just to contrast with ruby-on-rails django x 4550 flash x 3828 silverlight x 3365 spring x 1468 forms x 1339 jsp x 1326 wordpress x 1004 j2ee x 844 gwt x 779 grails x 763 SCALA x 698 coldfusion x 686 groovy x 607 -- just to contrast with grails That's from the first 5 pages of tags, and I'm left out forks from the main tag, such as php5. lift is on page 43, with, coincidentally, 43 questions. There's also lift-1.1 with 2 questions. (PS, I noticed one of the questions tagged Lift has nothing whatsoever to do with it -- I'll be editting that question to remove that tag). I worry that the visibility of Lift is is way below that of other frameworks, particularly when one takes into account that Rails and Grails have more questions than Ruby and Groovy respectively. Also, the answer rate on these questions is not very good. I think visibility on Stack Overflow is important, so I ask you to consider dedicating a little bit of time to it. Questions tagged with Lift can be found with the link http://stackoverflow.com/questions/tagged/lift. One can also get RSS, for newest questions http://stackoverflow.com/feeds/tag?tagnames=liftsort=newest, or active questions (recent activity) http://stackoverflow.com/feeds/tag?tagnames=liftsort=hot. -- Daniel C. Sobral I travel to the future all the time. -- 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] Using Lift to Build stand alone multi threaded (multi actor?) apps. (was Lift based backend server subscribing via amqp)
Mapper works standalone, but you'll need to include some other lift jars (if you use maven it will take care of that) because some mapper features reference classes in webkit etc. and if you don't classloading will fail. But it can be used in a non-Lift application fine. - Timothy Perretttimo...@getintheloop.eu wrote: OK, so i'll try again to answer your question. Use lift-amqp for the service subscription. Then you have a choice between mapper and JPA... mapper should do what you want however and is probably simpler. Job done. The best advice is to actually try this stuff out... I get the impression you are currently not even attempting trial and error to see what works best for you, and that ultimately is what matters. Cheers, Tim On 12 Jan 2010, at 08:31, vishnu wrote: Reposting since this seemed to have gotten lost in the stream :) I'm trying to build a stand alone application where I have multiple threads or actors that subscribe to a queueing system and persist stuff on a database. Does it make sense to use mapper here? I ask because of this stack overflow post. http://stackoverflow.com/questions/1140448/what-orms-work-well-with-scala In terms of our requirements, what we want from an orm is fairly basic. Since we are not building a web application, we would want it decoupled from any other parts of such a stack. (I heard mapper depends on the http module?). We need most of the basic orm operations with ACID compliance, preferably one that requires us to write as little code as possible and includes transactionality as something we can depend upon. The database we're currently looking at is Postgresql, so ideally the ORM should be oblivious of whether or not the database is distributed. On Tue, Jan 5, 2010 at 6:39 PM, Timothy Perrett timo...@getintheloop.eu wrote: In what way do you mean is mapper worth it? What kind of system is it? do you need ACID or BASE? What kind of load will the system be under? Do you need it to be distributed? You are not restricted to Mapper, you could use JPA or whatever persistence you want with lift. If you just want to make a pretty simple service tier, then sure, Lift will be fine. Akka works well when you need fault tolerance or distributed nodes etc etc Cheers, Tim On Jan 5, 3:34 am, vishnu path...@gmail.com wrote: well I'm not sure how to describe it differently. As you said it's only service tier. The truth is I dont know anything about Lift yet and Im just now running through some basic Scala books. I need a library with which to talk to rabbitmq as a subscriber that might work at a higher level than the default java api that comes with rabbitmq and ideally something that provides the same service for me talk to a database via scala. I haven't seen Akka before, so I'll take a look at that :). Would you say mapper is worth it? On Tue, Jan 5, 2010 at 2:23 AM, Timothy Perrett timo...@getintheloop.euwrote: It depends on your use case... you don't really describe exactly what you want to do. Perhaps start by providing more detail? If you want service teir *only* though, its quite probable that akka would be a better fix. Cheers, Tim On 4 Jan 2010, at 20:30, Channing Walton wrote: Maybe Akka would be better for you?http://akkasource.org/ Akka has an AMQP module which abstracts AMQP Producer and Consumer as Actors. Channing vishnu-11 wrote: Hi I'm trying to use lift to right a back end for a system that communicates via AMQP. The idea is to have a bunch of (threads?, processes? actors?) that subscribe to some queues on a queueing system and react to various messages by contacting various third party systems and persisting messages to a database. I was wondering firstly if it makes sense to use lift, or if it makes more sense to pull various parts out of lift and use them? Additionally, looking at the lift amqp code, it seems to be a little out of date, especially with regard to amqp. Does anyone know if there has been any active work on this segment? -- 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. -- View this message in context: http://old.nabble.com/Lift-based-backend-server-subscribing-via-amqp-... Sent from the liftweb mailing list archive at Nabble.com. -- 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
Re: [Lift] Re: Ajax button + submitting a form
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 ajaxButton function to be called. Inside func function your RequestVar should be preserved due to contextFuncBuilde call. Please let me know if this works. If it does we should probably add it to SHtml. Br's, Marius On Jan 11, 10:54 pm, Adam Warski a...@warski.org wrote: Hello, trying the solution a bit more I came into another problem which I can't solve elegantly. The solution below works nicely for an add button, but a delete button causes more problems: the problem is that with delete, you must know which element should get deleted. In a no-ajax solution, it is enough to do: elements.flatMap { element: Element = bind(element, element Template, name - element.name.toForm, delete - submit(Delete, () = { elements -= element }) ) } which is very nice and easy, as the element to delete gets captured in a closure. But with ajax, and a hidden field used to hold the name of the operation to dispatch, this gets pretty complex: I now need to somehow encode the element to delete (or create a map from some unique identifier to closures which hold the delete methods), so that I can set this as a value of the hidden field. Then in the function passed to SHtml.hidden, I need to decode it back to find the right element. Isn't it a bit of what Lift already does when creating forms? But I still have the feeling that maybe I'm approaching the whole problem from the wrong end, after all, I just want to create an ajax-enabled list of input fields with add and delete operations :) Adam On Jan 11, 1:09 pm, Adam Warski a...@warski.org wrote: Hello, this almost works :). Right now in my form I have a hidden element where the type of the operation to execute will be set: input type=hidden id=operation_id name=operation_id value= / (the name is needed for jquery to set the value, and the id so that I can later read the value using S). I bind the button as following: addElement - button onclick={((JqId(Str(operation_id)) JqAttr(value, Str(add))) SHtml.submitAjaxForm(elements_edit)).toJsCmd+ return false;}{Text(Add element)}/button, and add a hidden field to the whole form to do the processing: bind( ... ) ++ SHtml.hidden(() = { val operationId = S.param(operation_id) operationId.map { opId = opId match { case add = elements += new Element case _ = println(Unknown operation: + opId) } } reDraw }) where elements is a RequestVar object. However for some reason, when I click the button, in the callback I get a new elements RequestVar (so it's
Re: [Lift] Re: binding form fields while using jquery plugin
Why are you specifying some by name and some by id? Do not use name. SHtml.text works by using an autogenerated name. If you're doing id and it doesn't work, does, say 'size' work? - Madhavmail.madhavsha...@gmail.com wrote: i tried to put custom attributes in scala code but still its nt working. Auto calculation is'nt happening yet. my view source in browser shows form method=post action=/addition fieldset legendAddition/legend preptext1 :input name=F567656735301UY5 type=text value= / : 1/p/pre prepText2 :input name=F567656735302UA4 type=text value= / /p/pre prepresult :input name=F567656735303ZCZ type=text value= //p/pre input name=F567656735306I01 type=submit value=ADD / /fieldset /form and my modified snippet code is : bind(form, xhtml, text1 - SHtml.text(text1, text1= _,name- sum), text2 - SHtml.text(text2,text2 = _,id- sum), result -SHtml.text(result, result = _, id- totalsum,name-totalsum), submit - SHtml.submit(add, addit)) any ideas where am i going wrong or missing something?? On Jan 12, 11:34 am, Madhav mail.madhavsha...@gmail.com wrote: Thanks Naftoli i will just try your solution and come back. 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. -- 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: Ajax button + submitting a form
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 :) I think there is a sorting involved when execution the user function but I'm not sure why. I need to give a second look into Lift's guts. I agree ordering is important here as you want your function executed after all form functions have been executed. 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 ajaxButton function to be called. Inside func function your RequestVar should be preserved due to contextFuncBuilde call. Please let me know if this works. If it does we should probably add it to SHtml. Br's, Marius On Jan 11, 10:54 pm, Adam Warski a...@warski.org wrote: Hello, trying the solution a bit more I came into another problem which I can't solve elegantly. The solution below works nicely for an add button, but a delete button causes more problems: the problem is that with delete, you must know which element should get deleted. In a no-ajax solution, it is enough to do: elements.flatMap { element: Element = bind(element, element Template, name - element.name.toForm, delete - submit(Delete, () = { elements -= element }) ) } which is very nice and easy, as the element to delete gets captured in a closure. But with ajax, and a hidden field used to hold the name of the operation to dispatch, this gets pretty complex: I now need to somehow encode the element to delete (or create a map from some unique identifier to closures which hold the delete methods), so that I can set this as a value of the hidden field. Then in the function passed to SHtml.hidden, I need to decode it back to find the right element. Isn't it a bit of what Lift already does when creating forms? But I still have the feeling that maybe I'm approaching the whole problem from the wrong end, after all, I just want to create an ajax-enabled list of input fields with add and delete operations :) Adam On Jan 11, 1:09 pm, Adam Warski a...@warski.org wrote: Hello, this almost works :). Right now in my form I have a hidden element where the type of the operation to execute will be set: input type=hidden id=operation_id name=operation_id value= / (the name is needed for jquery to set the value, and the id so that I can later read the value using S). I bind the button as following: addElement - button onclick={((JqId(Str(operation_id)) JqAttr(value, Str(add))) SHtml.submitAjaxForm(elements_edit)).toJsCmd+ return false;}{Text(Add element)}/button, and add a hidden field to the whole form to do the processing: bind( ... ) ++ SHtml.hidden(() = {
[Lift] Re: **IMPORTANT** Lift 2.0 Milestone1 is coming and it's time to test the SNAPSHOT in master
Hi all, Maybe the mapper is broken in M8 ? I use only one database in M8 ( upgrade from M7) it works fine, but use two db connection and it doesn't work. (works fine in M7). Here is the topic about this issue. Thank you very much for any help! 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] Re: Ajax button + submitting a form
actually the sorting is per owner which should be fine. I'll give it a try and get back to you. Br's, marius On Jan 12, 4:46 pm, Marius marius.dan...@gmail.com wrote: 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 :) I think there is a sorting involved when execution the user function but I'm not sure why. I need to give a second look into Lift's guts. I agree ordering is important here as you want your function executed after all form functions have been executed. 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 ajaxButton function to be called. Inside func function your RequestVar should be preserved due to contextFuncBuilde call. Please let me know if this works. If it does we should probably add it to SHtml. Br's, Marius On Jan 11, 10:54 pm, Adam Warski a...@warski.org wrote: Hello, trying the solution a bit more I came into another problem which I can't solve elegantly. The solution below works nicely for an add button, but a delete button causes more problems: the problem is that with delete, you must know which element should get deleted. In a no-ajax solution, it is enough to do: elements.flatMap { element: Element = bind(element, element Template, name - element.name.toForm, delete - submit(Delete, () = { elements -= element }) ) } which is very nice and easy, as the element to delete gets captured in a closure. But with ajax, and a hidden field used to hold the name of the operation to dispatch, this gets pretty complex: I now need to somehow encode the element to delete (or create a map from some unique identifier to closures which hold the delete methods), so that I can set this as a value of the hidden field. Then in the function passed to SHtml.hidden, I need to decode it back to find the right element. Isn't it a bit of what Lift already does when creating forms? But I still have the feeling that maybe I'm approaching the whole problem from the wrong end, after all, I just want to create an ajax-enabled list of input fields with add and delete operations :) Adam On Jan 11, 1:09 pm, Adam Warski a...@warski.org wrote: Hello, this almost works :). Right now in my form I have a hidden element where the type of the operation to execute will be set: input type=hidden id=operation_id name=operation_id value= / (the name is needed for jquery to set the value, and the id so that I can later read the value using S). I bind the button as following: addElement - button
Re: [Lift] Lift on Stack Overflow
My 2 cents (and maybe this is 'cause I'm an old guy), but I don't see the value of supporting yet another Lift support forum. This list is highly visible and the folks on this list of very helpful. The list is searchable (although not taggable). We don't do support on Twitter. We don't officially do support on IRC (although a fair number of Lift committers hang out there). We try to keep the energy and focus on this mailing list. Please tell me what the advantage to Stack Overflow is vs. a list like this one? What kind of better experience would the asker of a question have on Stack Overflow? On Tue, Jan 12, 2010 at 5:27 AM, Daniel Sobral dcsob...@gmail.com wrote: I gathered some stats on number of question by tag: java x 30950 asp.net x 26451 php x 24854 asp.net-mvc x 8670 ruby-on-rails x 8513 ruby x 6620 -- just to contrast with ruby-on-rails django x 4550 flash x 3828 silverlight x 3365 spring x 1468 forms x 1339 jsp x 1326 wordpress x 1004 j2ee x 844 gwt x 779 grails x 763 SCALA x 698 coldfusion x 686 groovy x 607 -- just to contrast with grails That's from the first 5 pages of tags, and I'm left out forks from the main tag, such as php5. lift is on page 43, with, coincidentally, 43 questions. There's also lift-1.1 with 2 questions. (PS, I noticed one of the questions tagged Lift has nothing whatsoever to do with it -- I'll be editting that question to remove that tag). I worry that the visibility of Lift is is way below that of other frameworks, particularly when one takes into account that Rails and Grails have more questions than Ruby and Groovy respectively. Also, the answer rate on these questions is not very good. I think visibility on Stack Overflow is important, so I ask you to consider dedicating a little bit of time to it. Questions tagged with Lift can be found with the link http://stackoverflow.com/questions/tagged/lift. One can also get RSS, for newest questions http://stackoverflow.com/feeds/tag?tagnames=liftsort=newest, or active questions (recent activity) http://stackoverflow.com/feeds/tag?tagnames=liftsort=hot. -- Daniel C. Sobral I travel to the future all the time. -- 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 on Stack Overflow
StackOverflow tends to be peer to peer IMO; I dont believe that MUST be committers or whatever, as DPP says, this is the official forum, if other users or committers use stack overflow, then sure, but i doubt I'll be hanging out there massively. Cheers, Tim On 12 Jan 2010, at 16:41, David Pollak wrote: My 2 cents (and maybe this is 'cause I'm an old guy), but I don't see the value of supporting yet another Lift support forum. This list is highly visible and the folks on this list of very helpful. The list is searchable (although not taggable). We don't do support on Twitter. We don't officially do support on IRC (although a fair number of Lift committers hang out there). We try to keep the energy and focus on this mailing list. Please tell me what the advantage to Stack Overflow is vs. a list like this one? What kind of better experience would the asker of a question have on Stack Overflow? On Tue, Jan 12, 2010 at 5:27 AM, Daniel Sobral dcsob...@gmail.com wrote: I gathered some stats on number of question by tag: java x 30950 asp.net x 26451 php x 24854 asp.net-mvc x 8670 ruby-on-rails x 8513 ruby x 6620 -- just to contrast with ruby-on-rails django x 4550 flash x 3828 silverlight x 3365 spring x 1468 forms x 1339 jsp x 1326 wordpress x 1004 j2ee x 844 gwt x 779 grails x 763 SCALA x 698 coldfusion x 686 groovy x 607 -- just to contrast with grails That's from the first 5 pages of tags, and I'm left out forks from the main tag, such as php5. lift is on page 43, with, coincidentally, 43 questions. There's also lift-1.1 with 2 questions. (PS, I noticed one of the questions tagged Lift has nothing whatsoever to do with it -- I'll be editting that question to remove that tag). I worry that the visibility of Lift is is way below that of other frameworks, particularly when one takes into account that Rails and Grails have more questions than Ruby and Groovy respectively. Also, the answer rate on these questions is not very good. I think visibility on Stack Overflow is important, so I ask you to consider dedicating a little bit of time to it. Questions tagged with Lift can be found with the link http://stackoverflow.com/questions/tagged/lift. One can also get RSS, for newest questions http://stackoverflow.com/feeds/tag?tagnames=liftsort=newest, or active questions (recent activity) http://stackoverflow.com/feeds/tag?tagnames=liftsort=hot. -- Daniel C. Sobral I travel to the future all the time. -- 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, 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: Ajax button + submitting a form
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 ajaxButton function to be called. Inside func function your RequestVar should be preserved due to contextFuncBuilde call. Please let me know if this works. If it does we should probably add it to SHtml. Br's, Marius On Jan 11, 10:54 pm, Adam Warski a...@warski.org wrote: Hello, trying the solution a bit more I came into another problem which I can't solve elegantly. The solution below works nicely for an add button, but a delete button causes more problems: the problem is that with delete, you must know which element should get deleted. In a no-ajax solution, it is enough to do: elements.flatMap { element: Element = bind(element, element Template, name - element.name.toForm, delete - submit(Delete, () = { elements -= element }) ) } which is very nice and easy, as the element to delete gets captured in a closure. But with ajax, and a hidden field used to hold the name of the operation to dispatch, this gets pretty complex: I now need to somehow encode the element to delete (or create a map from some unique identifier to closures which hold the delete methods), so that I can set this as a value of the hidden field. Then in the function passed to SHtml.hidden, I need to decode it back to find the right element. Isn't it a bit of what Lift already does when creating forms? But I still have the feeling that maybe I'm approaching the whole problem from the wrong end, after all, I just want to create an ajax-enabled list of input fields with add and delete operations :) Adam On Jan 11, 1:09 pm, Adam Warski
Re: [Lift] Lift on Stack Overflow
What would be really neat is if someone would make a Lift app that would be a front end for this mailing list, and add the ability to organize threads into categories, and tag them, etc. :) - Timothy Perretttimo...@getintheloop.eu wrote: StackOverflow tends to be peer to peer IMO; I dont believe that MUST be committers or whatever, as DPP says, this is the official forum, if other users or committers use stack overflow, then sure, but i doubt I'll be hanging out there massively. Cheers, Tim On 12 Jan 2010, at 16:41, David Pollak wrote: My 2 cents (and maybe this is 'cause I'm an old guy), but I don't see the value of supporting yet another Lift support forum. This list is highly visible and the folks on this list of very helpful. The list is searchable (although not taggable). We don't do support on Twitter. We don't officially do support on IRC (although a fair number of Lift committers hang out there). We try to keep the energy and focus on this mailing list. Please tell me what the advantage to Stack Overflow is vs. a list like this one? What kind of better experience would the asker of a question have on Stack Overflow? On Tue, Jan 12, 2010 at 5:27 AM, Daniel Sobral dcsob...@gmail.com wrote: I gathered some stats on number of question by tag: java x 30950 asp.net x 26451 php x 24854 asp.net-mvc x 8670 ruby-on-rails x 8513 ruby x 6620 -- just to contrast with ruby-on-rails django x 4550 flash x 3828 silverlight x 3365 spring x 1468 forms x 1339 jsp x 1326 wordpress x 1004 j2ee x 844 gwt x 779 grails x 763 SCALA x 698 coldfusion x 686 groovy x 607 -- just to contrast with grails That's from the first 5 pages of tags, and I'm left out forks from the main tag, such as php5. lift is on page 43, with, coincidentally, 43 questions. There's also lift-1.1 with 2 questions. (PS, I noticed one of the questions tagged Lift has nothing whatsoever to do with it -- I'll be editting that question to remove that tag). I worry that the visibility of Lift is is way below that of other frameworks, particularly when one takes into account that Rails and Grails have more questions than Ruby and Groovy respectively. Also, the answer rate on these questions is not very good. I think visibility on Stack Overflow is important, so I ask you to consider dedicating a little bit of time to it. Questions tagged with Lift can be found with the link http://stackoverflow.com/questions/tagged/lift. One can also get RSS, for newest questions http://stackoverflow.com/feeds/tag?tagnames=liftsort=newest, or active questions (recent activity) http://stackoverflow.com/feeds/tag?tagnames=liftsort=hot. -- Daniel C. Sobral I travel to the future all the time. -- 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, 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. -- 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 on Stack Overflow
As someone who answers questions, I prefer email because of the unified inbox. I can organize many things in a single location and refer to them easily. (I know I can use RSS with SO but I have yet to find a satisfying way to organize question feeds into my existing stream of emails) As someone who looks for or simply reads answers (I've never asked a question on SO yet), I prefer the experience of Stack Overflow. The answers are ranked, organized, filtered, etc. The main drawback for me there is there's possibly too much stuff that draws me away from actual work ;) alex On Tue, Jan 12, 2010 at 11:55 AM, Timothy Perrett timo...@getintheloop.euwrote: StackOverflow tends to be peer to peer IMO; I dont believe that MUST be committers or whatever, as DPP says, this is the official forum, if other users or committers use stack overflow, then sure, but i doubt I'll be hanging out there massively. Cheers, Tim On 12 Jan 2010, at 16:41, David Pollak wrote: My 2 cents (and maybe this is 'cause I'm an old guy), but I don't see the value of supporting yet another Lift support forum. This list is highly visible and the folks on this list of very helpful. The list is searchable (although not taggable). We don't do support on Twitter. We don't officially do support on IRC (although a fair number of Lift committers hang out there). We try to keep the energy and focus on this mailing list. Please tell me what the advantage to Stack Overflow is vs. a list like this one? What kind of better experience would the asker of a question have on Stack Overflow? On Tue, Jan 12, 2010 at 5:27 AM, Daniel Sobral dcsob...@gmail.com wrote: I gathered some stats on number of question by tag: java x 30950 asp.net x 26451 php x 24854 asp.net-mvc x 8670 ruby-on-rails x 8513 ruby x 6620 -- just to contrast with ruby-on-rails django x 4550 flash x 3828 silverlight x 3365 spring x 1468 forms x 1339 jsp x 1326 wordpress x 1004 j2ee x 844 gwt x 779 grails x 763 SCALA x 698 coldfusion x 686 groovy x 607 -- just to contrast with grails That's from the first 5 pages of tags, and I'm left out forks from the main tag, such as php5. lift is on page 43, with, coincidentally, 43 questions. There's also lift-1.1 with 2 questions. (PS, I noticed one of the questions tagged Lift has nothing whatsoever to do with it -- I'll be editting that question to remove that tag). I worry that the visibility of Lift is is way below that of other frameworks, particularly when one takes into account that Rails and Grails have more questions than Ruby and Groovy respectively. Also, the answer rate on these questions is not very good. I think visibility on Stack Overflow is important, so I ask you to consider dedicating a little bit of time to it. Questions tagged with Lift can be found with the link http://stackoverflow.com/questions/tagged/lift. One can also get RSS, for newest questions http://stackoverflow.com/feeds/tag?tagnames=liftsort=newest, or active questions (recent activity) http://stackoverflow.com/feeds/tag?tagnames=liftsort=hot. -- Daniel C. Sobral I travel to the future all the time. -- 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.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.
[Lift] User Presence Heartbeat
I'm looking to implement a user presence feature (think: Facebook or Gmail chat) in a Lift 1.0 application. Ideally, I would like to avoid adding extraneous connections. Is it possible to hook into the Lift Comet heartbeat which is already in use across our system? I've looked at the source for CometActor, and it's just a little too obfuscated for me to figure this one out on my own. :-) Alternatively, has anyone else implemented this sort of system in Lift? If so, how did you go about it? Any tips from the well- informed? Daniel -- 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] User Presence Heartbeat
You are already using Comet, or just Lift? - Daniel Spiewakdjspie...@gmail.com wrote: I'm looking to implement a user presence feature (think: Facebook or Gmail chat) in a Lift 1.0 application. Ideally, I would like to avoid adding extraneous connections. Is it possible to hook into the Lift Comet heartbeat which is already in use across our system? I've looked at the source for CometActor, and it's just a little too obfuscated for me to figure this one out on my own. :-) Alternatively, has anyone else implemented this sort of system in Lift? If so, how did you go about it? Any tips from the well- informed? Daniel -- 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: User Presence Heartbeat
We're already using the Comet support within Lift quite extensively across the board. There are very, very few pages in our application which do not have a CometActor embedded in them at some level of nesting. Daniel On Jan 12, 12:08 pm, Naftoli Gugenheim naftoli...@gmail.com wrote: You are already using Comet, or just Lift? - Daniel Spiewakdjspie...@gmail.com wrote: I'm looking to implement a user presence feature (think: Facebook or Gmail chat) in a Lift 1.0 application. Ideally, I would like to avoid adding extraneous connections. Is it possible to hook into the Lift Comet heartbeat which is already in use across our system? I've looked at the source for CometActor, and it's just a little too obfuscated for me to figure this one out on my own. :-) Alternatively, has anyone else implemented this sort of system in Lift? If so, how did you go about it? Any tips from the well- informed? Daniel -- 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: User Presence Heartbeat
Whilst, I dont have an answer just yet, I wanted to say that the below statement is very, very cool! Cheers, Tim On 12 Jan 2010, at 18:25, Daniel Spiewak wrote: We're already using the Comet support within Lift quite extensively across the board. There are very, very few pages in our application which do not have a CometActor embedded in them at some level of nesting. -- 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: User Presence Heartbeat
Tim, ask him if he's using ScalaQuery with Lift! - Timothy Perretttimo...@getintheloop.eu wrote: Whilst, I dont have an answer just yet, I wanted to say that the below statement is very, very cool! Cheers, Tim On 12 Jan 2010, at 18:25, Daniel Spiewak wrote: We're already using the Comet support within Lift quite extensively across the board. There are very, very few pages in our application which do not have a CometActor embedded in them at some level of nesting. -- 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] User Presence Heartbeat
The current GC liveliness entrypoint is in LiftServlet.handleAjax() which calls liftSession.updateFuncByOwner(). There's no extension point for what you want at the moment although it would be fairly easy to add something to LiftSession. The closest thing right now is LiftSession.onBeginServicing where you can add you own function and correlate the request session id with the objects in your own application. Hope this helps, alex On Tue, Jan 12, 2010 at 1:02 PM, Daniel Spiewak djspie...@gmail.com wrote: I'm looking to implement a user presence feature (think: Facebook or Gmail chat) in a Lift 1.0 application. Ideally, I would like to avoid adding extraneous connections. Is it possible to hook into the Lift Comet heartbeat which is already in use across our system? I've looked at the source for CometActor, and it's just a little too obfuscated for me to figure this one out on my own. :-) Alternatively, has anyone else implemented this sort of system in Lift? If so, how did you go about it? Any tips from the well- informed? Daniel -- 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: User Presence Heartbeat
I'm kind swamped today, but the simplest thing you can do is: private def notifyListen = { MyUserThingy.gotAListenEventFor(User.currentUser) false } private def notifyUnlisten = { MyUserThingy.gotAnUnlistenEventFor(User.currentUser) false } override def highPriority = { case Listen(_, _, _) if notifyListen = () case Unlisten(_) if notifyUnlisten = () } Each time the browser registers as a listener, you'll get a notification (the beginning of the long poll). Each time the browser unregisters as a listener (the end of the long poll), you'll get a notification. This stuff is kinda internal and may change (although there's no plans to change the Listen/Unlisten logic). On Tue, Jan 12, 2010 at 10:25 AM, Daniel Spiewak djspie...@gmail.comwrote: We're already using the Comet support within Lift quite extensively across the board. There are very, very few pages in our application which do not have a CometActor embedded in them at some level of nesting. Daniel On Jan 12, 12:08 pm, Naftoli Gugenheim naftoli...@gmail.com wrote: You are already using Comet, or just Lift? - Daniel Spiewakdjspie...@gmail.com wrote: I'm looking to implement a user presence feature (think: Facebook or Gmail chat) in a Lift 1.0 application. Ideally, I would like to avoid adding extraneous connections. Is it possible to hook into the Lift Comet heartbeat which is already in use across our system? I've looked at the source for CometActor, and it's just a little too obfuscated for me to figure this one out on my own. :-) Alternatively, has anyone else implemented this sort of system in Lift? If so, how did you go about it? Any tips from the well- informed? Daniel -- 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. -- 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: **IMPORTANT** Lift 2.0 Milestone1 is coming and it's time to test the SNAPSHOT in master
On Tue, Jan 12, 2010 at 6:47 AM, Neil.Lv anim...@gmail.com wrote: Hi all, Maybe the mapper is broken in M8 ? I'm in meetings for most of today, but I will look at the DB issues you've reported tonight. I use only one database in M8 ( upgrade from M7) it works fine, but use two db connection and it doesn't work. (works fine in M7). Here is the topic about this issue. Thank you very much for any help! 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.
[Lift] Ajax forms and (multiple) submit buttons
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.
Re: [Lift] Ajax forms and (multiple) submit buttons
I like it a lot. Eliminates recent confusion about submit() in ajaxForm, prettier and semantically more correct than hidden fields and supports multiple actions. What's not to like? alex On Tue, Jan 12, 2010 at 2:39 PM, Marius marius.dan...@gmail.com 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.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.
[Lift] Dynamic sorting of Javascript dependencies
Hello everyone Is there any way to tell Lift if a javascript file (or just script tag) is dependent of another one? - this would allow lift to order the script tags correctly Example: The AutcoComplete widget adds the '/classpath/autocomplete/ jquery.autocomplete.js' javascript file to the header - If I want to include a static JS file where I bind some JS functions to the autocomplete text-field I can't select it using it's class as the css selector unless my static file is loaded after the script tag - This is because the class is added dynamically when the script tag that calls the autocomplete method executes N.B: This is not really a big problem in my case because i can just select the text-field using another css selector, but i could imagine that in larger projects this would be a handy thing to have :) Cheers, Mads Hartmann Jensen -- 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: User Presence Heartbeat
Sweet, that looks like exactly what I need! I'll post back here if that doesn't work properly. Daniel On Jan 12, 12:46 pm, David Pollak feeder.of.the.be...@gmail.com wrote: I'm kind swamped today, but the simplest thing you can do is: private def notifyListen = { MyUserThingy.gotAListenEventFor(User.currentUser) false } private def notifyUnlisten = { MyUserThingy.gotAnUnlistenEventFor(User.currentUser) false } override def highPriority = { case Listen(_, _, _) if notifyListen = () case Unlisten(_) if notifyUnlisten = () } Each time the browser registers as a listener, you'll get a notification (the beginning of the long poll). Each time the browser unregisters as a listener (the end of the long poll), you'll get a notification. This stuff is kinda internal and may change (although there's no plans to change the Listen/Unlisten logic). On Tue, Jan 12, 2010 at 10:25 AM, Daniel Spiewak djspie...@gmail.comwrote: We're already using the Comet support within Lift quite extensively across the board. There are very, very few pages in our application which do not have a CometActor embedded in them at some level of nesting. Daniel On Jan 12, 12:08 pm, Naftoli Gugenheim naftoli...@gmail.com wrote: You are already using Comet, or just Lift? - Daniel Spiewakdjspie...@gmail.com wrote: I'm looking to implement a user presence feature (think: Facebook or Gmail chat) in a Lift 1.0 application. Ideally, I would like to avoid adding extraneous connections. Is it possible to hook into the Lift Comet heartbeat which is already in use across our system? I've looked at the source for CometActor, and it's just a little too obfuscated for me to figure this one out on my own. :-) Alternatively, has anyone else implemented this sort of system in Lift? If so, how did you go about it? Any tips from the well- informed? Daniel -- 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. -- 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: Dynamic sorting of Javascript dependencies
Glad you like it Marius :) I think I saw this feature in wordpress, but I'm not sure :) On Jan 12, 9:07 pm, Marius marius.dan...@gmail.com wrote: No we don't have that but I find it quite interesting and useful in practice. I think it worth opening a ticket (http://github.com/dpp/ liftweb/issues) as a feature request. Br's, Marius On Jan 12, 9:52 pm, Mads Hartmann mads...@gmail.com wrote: Hello everyone Is there any way to tell Lift if a javascript file (or just script tag) is dependent of another one? - this would allow lift to order the script tags correctly Example: The AutcoComplete widget adds the '/classpath/autocomplete/ jquery.autocomplete.js' javascript file to the header - If I want to include a static JS file where I bind some JS functions to the autocomplete text-field I can't select it using it's class as the css selector unless my static file is loaded after the script tag - This is because the class is added dynamically when the script tag that calls the autocomplete method executes N.B: This is not really a big problem in my case because i can just select the text-field using another css selector, but i could imagine that in larger projects this would be a handy thing to have :) Cheers, Mads Hartmann Jensen -- 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: Dynamic sorting of Javascript dependencies
Ups forgot - I created an issue on github here: http://github.com/dpp/liftweb/issues/#issue/281 On Jan 12, 9:07 pm, Marius marius.dan...@gmail.com wrote: No we don't have that but I find it quite interesting and useful in practice. I think it worth opening a ticket (http://github.com/dpp/ liftweb/issues) as a feature request. Br's, Marius On Jan 12, 9:52 pm, Mads Hartmann mads...@gmail.com wrote: Hello everyone Is there any way to tell Lift if a javascript file (or just script tag) is dependent of another one? - this would allow lift to order the script tags correctly Example: The AutcoComplete widget adds the '/classpath/autocomplete/ jquery.autocomplete.js' javascript file to the header - If I want to include a static JS file where I bind some JS functions to the autocomplete text-field I can't select it using it's class as the css selector unless my static file is loaded after the script tag - This is because the class is added dynamically when the script tag that calls the autocomplete method executes N.B: This is not really a big problem in my case because i can just select the text-field using another css selector, but i could imagine that in larger projects this would be a handy thing to have :) Cheers, Mads Hartmann Jensen -- 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: problems with file upload inside modal
ah - that explains it :-) On Jan 12, 6:56 am, Naftoli Gugenheim naftoli...@gmail.com wrote: If you mean David I think he's off the list until Wednesday. Maybe one of the other committers or knowledgable users can help though. - stephanosstephan.beh...@googlemail.com wrote: I don't want to appear pushy but this thing is really show stopper for me and I bet it's pretty obvious/easy for you to fix. If not I apologize for my impatience :-) On Jan 9, 10:15 am, stephanos stephan.beh...@googlemail.com wrote: Okay, this took my a while (new to git/github) - but here is my stripped down version of the problem:http://github.com/stephanos/liftweb-fileupload-modal-issue/ Hope it helps :-) On Jan 7, 8:14 pm, David Pollak feeder.of.the.be...@gmail.com wrote: Stephanos, It would be ideal if you could put up a quick project on GitHub that demonstrates the problem. Having reproducible code helps us solve problems faster. Any chance you could do that? Thanks, David On Wed, Jan 6, 2010 at 11:17 PM, stephanos stephan.beh...@googlemail.comwrote: Hi guys, I'm stuck with this problem for a few days now and need help. I want users to be able touploada ZIPfile. When I embed this functionality directly in the page it works flawlessly - but I need to put it into a modal and that's were the trouble starts. When I submit the form it executes correctly but it prints (!) the response to the browser: try{jQuery(#lift__noticesContainer__).each(function(i) {this.innerHTML = div class=\success\ulliThanks for the upload!/li/ul /div;});} catch (e) {} The code looks right but it shouldn't print to the screen. What am I doing wrong? # My current progress (using M8): HTML: lift:SourceUpload form=post multipart=true fieldset style=width: 90%; margin: 0 auto strongAt first/strong select the zipfileupload:file/ br/br/ and strongthen/strong push input type=submit value=upload!/ /fieldset /lift:SourceUpload CODE: def request(in: NodeSeq) = // opensfileuploadmodal ajaxButton(in, () = S.runTemplate(List(/katas/share)). map(ns = ModalDialog(ns)) openOr Alert(Internal error: Couldn't find template!)) def render(in: NodeSeq): NodeSeq = bind(upload, file - SHtml.fileUpload(processFile _)) Cheers, Stephan -- 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 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: problems with file upload inside modal
Thanks for your feedback! I knew I was doing sth. obviously wrong. The idea with the hidden form element is cool - didn't think of that before. When I try/tried to submit the form via AJAX myself I fail: -I tried to use an ajaxButton - but then the processFile() method wasn't called anymore. -and when I try to use an ajaxForm (for which I can't find any documentation in the book) the response is empty for some reason def render(in: NodeSeq): NodeSeq = ajaxForm(Helpers.bind(upload, in, file - SHtml.fileUpload (processFile _))) ( unfortunately the lift demo is down right now so I can't look up examples for ajaxForm :-/ ) Can you give me a hint? ...or maybe I will look into the other option more closely Cheers, Stephan On Jan 12, 11:31 am, Timothy Perrett timo...@getintheloop.eu wrote: I just looked at it. Your getting this problem because you are literally doing a hard post to /ajax_request/.. its no wonder its dumping the response to the browser. I see you have two options; one is to just stuff the normal form in an element hidden within the page and then display that form within the box using javascript (thus giving the form the correct action). Otherwise, just submit the form via AJAX. Does that help? Cheers, Tim On 12 Jan 2010, at 05:50, stephanos wrote: I don't want to appear pushy but this thing is really show stopper for me and I bet it's pretty obvious/easy for you to fix. If not I apologize for my impatience :-) On Jan 9, 10:15 am, stephanos stephan.beh...@googlemail.com wrote: Okay, this took my a while (new to git/github) - but here is my stripped down version of the problem:http://github.com/stephanos/liftweb-fileupload-modal-issue/ Hope it helps :-) On Jan 7, 8:14 pm, David Pollak feeder.of.the.be...@gmail.com wrote: Stephanos, It would be ideal if you could put up a quick project on GitHub that demonstrates the problem. Having reproducible code helps us solve problems faster. Any chance you could do that? Thanks, David On Wed, Jan 6, 2010 at 11:17 PM, stephanos stephan.beh...@googlemail.comwrote: Hi guys, I'm stuck with this problem for a few days now and need help. I want users to be able touploada ZIPfile. When I embed this functionality directly in the page it works flawlessly - but I need to put it into a modal and that's were the trouble starts. When I submit the form it executes correctly but it prints (!) the response to the browser: try{jQuery(#lift__noticesContainer__).each(function(i) {this.innerHTML = div class=\success\ulliThanks for the upload!/li/ul /div;});} catch (e) {} The code looks right but it shouldn't print to the screen. What am I doing wrong? # My current progress (using M8): HTML: lift:SourceUpload form=post multipart=true fieldset style=width: 90%; margin: 0 auto strongAt first/strong select the zipfileupload:file/ br/br/ and strongthen/strong push input type=submit value=upload!/ /fieldset /lift:SourceUpload CODE: def request(in: NodeSeq) = // opensfileuploadmodal ajaxButton(in, () = S.runTemplate(List(/katas/share)). map(ns = ModalDialog(ns)) openOr Alert(Internal error: Couldn't find template!)) def render(in: NodeSeq): NodeSeq = bind(upload, file - SHtml.fileUpload(processFile _)) Cheers, Stephan -- 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 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: Ajax forms and (multiple) submit buttons
Cool. Br's, Marius On Jan 12, 9:50 pm, Alex Boisvert alex.boisv...@gmail.com wrote: I like it a lot. Eliminates recent confusion about submit() in ajaxForm, prettier and semantically more correct than hidden fields and supports multiple actions. What's not to like? alex On Tue, Jan 12, 2010 at 2:39 PM, Marius marius.dan...@gmail.com 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.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.
[Lift] Re: Binding a snippet in a comet actor?
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 harmonics -- 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 -- 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
[Lift] Meaning of message
What does this output message mean? Msgs: Default Error is not rendered as the default title is now empty string It's repeated for Warning and Notice. -- 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?
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 harmonics -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning
[Lift] Re: Lift on Stack Overflow
Stack Overflow may not be so much better a way of delivering support to someone who already has a Lift question, but presence there would be a great way to publicize Lift to the many developers who go there without Lift in mind but have problems that Lift could be applied to. -- 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] 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. 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.
[Lift] Nginx question
I have nginx set up as a frontend. How can I have it display Down for maintenance instead of pointing to jetty? -- 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 question
follow this thread for a few suggestions: http://nginx.org/pipermail/nginx/2009-February/009791.html On Tue, Jan 12, 2010 at 4:33 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: I have nginx set up as a frontend. How can I have it display Down for maintenance instead of pointing to jetty? -- 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.
[Lift] Re: **IMPORTANT** Lift 2.0 Milestone1 is coming and it's time to test the SNAPSHOT in master
Oh, I'm sorry about that I forget pasting the topic url. Here is : http://groups.google.com/group/liftweb/browse_thread/thread/6ca3fd7deb41b1f9 Thank you very much! Cheers, Neil On Jan 13, 2:48 am, David Pollak feeder.of.the.be...@gmail.com wrote: On Tue, Jan 12, 2010 at 6:47 AM, Neil.Lv anim...@gmail.com wrote: Hi all, Maybe the mapper is broken in M8 ? I'm in meetings for most of today, but I will look at the DB issues you've reported tonight. I use only one database in M8 ( upgrade from M7) it works fine, but use two db connection and it doesn't work. (works fine in M7). Here is the topic about this issue. Thank you very much for any help! 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.
[Lift] Squid with lift?
I saw this on http://wiki.nginx.org/NginxFaq For which general use cases is Nginx more appropriate than Squid? (And vice versa...) Nginx is generally deployed as a reverse proxy, not as a caching proxy (like Squid). The key advantage with Nginx is its nominal RAM and CPU usage under heavy load. Squid is best applied to cache dynamic content for applications that cannot do it themselves. The proxy module http://wiki.nginx.org/NginxHttpProxyModule offers configurations for caching upstream servers. 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.
[Lift] Re: Lift on Stack Overflow
I'm a huge SO fan and have used it to ask a lot of my stupid Scala questions but I've been asking my Lift questions here. Perhaps the reason there are so few Lift questions is because others are doing the same? Note that Scala has a respectable 698 questions. Peter On Jan 12, 2:28 pm, joseph b. boyle.jos...@gmail.com wrote: Stack Overflow may not be so much better a way of delivering support to someone who already has a Lift question, but presence there would be a great way to publicize Lift to the many developers who go there without Lift in mind but have problems that Lift could be applied to. -- 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] Scheduling the San Francisco Scala Lift Off
Folks, 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. We will be having a Summer Scala Lift Off in London, a fall Scala Lift Off on the east coast of the US and a Scala Lift Off in Norway around the same time as JavaZone. Looking forward to 2010 being a Scala-Lift-tastic year. Thanks, David -- 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: binding form fields while using jquery plugin
hi Actually i was using name for text1 and text2 and id for result because the plugin page (http://www.pengoworks.com/workshop/jquery/ calculation/calculation.plugin.htm) says to use this name syntax.I tried with using only id also but no use . But yes the size attribute works. I was initially doubting whether js files are accessible by lift or not but they are also accessible as the lift console shows me Service request (GET) /scripts/jquery.calculation.min.js took 1 Milliseconds is there any possibility yet that files are not accessible. -- 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 Actually i was using name for text1 and text2 and id for result because the plugin page (http://www.pengoworks.com/workshop/jquery/ calculation/calculation.plugin.htm) says to use this name syntax.I tried with using only id also but no use . But yes the size attribute works. I was initially doubting whether js files are accessible by lift or not but they are also accessible as the lift console shows me Service request (GET) /scripts/jquery.calculation.min.js took 1 Milliseconds is there any possibility yet that files are not accessible. -- 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 Actually i was using name for text1 and text2 and id for result because the plugin page (http://www.pengoworks.com/workshop/jquery/ calculation/calculation.plugin.htm) says to use this name syntax.I tried with using only id also but no use . But yes the size attribute works. I was initially doubting whether js files are accessible by lift or not but they are also accessible as the lift console shows me Service request (GET) /scripts/jquery.calculation.min.js took 1 Milliseconds is there any possibility yet that files are not accessible. -- 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 form fields while using jquery plugin
That's you're problem. SHtml.text needs to set name to its own autogenerated value. If you need a custom name then you have to handle processing it manually. Use S.param in e.g. the SHtml.submit callback to read the query params. For example, S.param(text1) returns a Box that is Full if the URL or POST contains a text1 query parameter. On Tue, Jan 12, 2010 at 11:41 PM, Madhav mail.madhavsha...@gmail.comwrote: hi Actually i was using name for text1 and text2 and id for result because the plugin page (http://www.pengoworks.com/workshop/jquery/ calculation/calculation.plugin.htm) says to use this name syntax.I tried with using only id also but no use . But yes the size attribute works. I was initially doubting whether js files are accessible by lift or not but they are also accessible as the lift console shows me Service request (GET) /scripts/jquery.calculation.min.js took 1 Milliseconds is there any possibility yet that files are not accessible. -- 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.
[Lift] Re: Two database are broken in 1.1-M8, works fine in 1.1-M7 .
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] Re: binding form fields while using jquery plugin
I got your point this makes sense and can be the cause of problem i am facing. but i have one more doubt as for example my use case of application is that user enters one number in text1 and second in text2 and immediately addition result is shown in result box without pressing submit button , but query params will be available only with submit callback so is there any way i can get query parameter without submitting the form?? Thanks for your help and patience. 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] Default Schema for DefaultConnectionIdentifier
I specify my database by specifying a jndiName for DefaultConnectionIdentifier: DefaultConnectionIdentifier.jndiName = jdbc/myOracleDb I really need to specify a default schema too... (For Hibernate, I would specify this in persistence.xml.) Is there a way to specify a default schema? -- 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] SessionVar that loses it contents
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
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: binding form fields while using jquery plugin
You can get query params with JavaScript with something like: var url = window.location.toString(); and then split it up ... if that is what you're looking for. One small thing, with bind, if you want to preserve the node attributes specified in your markup and not put then from scala you can use -% instead of - ... if I recall correctly. Br's, Marius On Jan 13, 8:50 am, Madhav mail.madhavsha...@gmail.com wrote: I got your point this makes sense and can be the cause of problem i am facing. but i have one more doubt as for example my use case of application is that user enters one number in text1 and second in text2 and immediately addition result is shown in result box without pressing submit button , but query params will be available only with submit callback so is there any way i can get query parameter without submitting the form?? Thanks for your help and patience. 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.