[Lift] How much Scala knowledge is needed to start coding a simple blog with Lift?
Hi, I have experience with Rails and Java. I'm new to Scala and Lift. I want to ask how much Scala knowledge is needed to start coding a simple blog with Lift? Rails is easy to learn because it require little Ruby knowledge to get started. Having read the Lift book, I feel one must have some advanced Scala knowledge to get started. Could anyone provide some kind of guideline or curriculum of Scala and Lift to get started with Lift? I would like to write a simple blog to learn Lift. But don't know how much Scala knowledge I should have to jump in Lift. Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: edit: What happened to JsonCmd?
I get error: Misc is not a member of net.liftweb.util when I try that. I don't see the Misc class/object in the API docs either. Is there anything else I should try? Thanks On Oct 14, 7:26 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Oct 14, 2009 at 7:09 PM, Chris coldfusio...@gmail.com wrote: Ack...that should have been case JsonCmd(processForm, _, p: Map[String, String], _) = import net.liftweb.util.Misc On Oct 14, 6:53 pm, Chris coldfusio...@gmail.com wrote: Hi all, I'm trying to get 1.1-M6 working, and I am unable to compile as JsonCmd seems to have disappeared. It isn't in the scaladoc, and AFAICT was deleted in this commit http://github.com/dpp/liftweb/commit/4dce48dfe938b92ae2ed50445dab1f4c... and it doesn't seem to have been replaced anywhere. I note that JsonCmd is still referenced in S.scala at line 1720 in what seems to be the latest version at http://github.com/dpp/liftweb/blob/6c0b8fcdcdcd7c8d13611965704ae67bd2... I'm using some code from the Lift book: object json extends JsonHandler { def apply(in: Any): JsCmd = { in match { case JsonCall(processForm, _, p: Map[String, String], _) = { /* etc */ How do I fix this? Thanks Chris -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Surf the harmonics --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: What is going to be in Lift 1.1
That is great for lift 1.1. but I suggest to improve doc. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: net.liftweb.http.LiftFilter is not a javax.servlet.Filter
Hey Ross, Just to close up this thread - you were exactly right. As it turns out, the dependency tree was pulling in a special jetty servlet implementation that I didn't know about. After some dependency management everything worked perfectly! Cheers, Tim On 13 Oct 2009, at 15:25, Ross Mellgren wrote: The only reason I could think of is that something is pulling a servlet API into scope that you're not expecting -- I use JSW myself and I know that I've never seen this kind of thing happen. I'd be glad to poke around if you throw up a sample, I confess I didn't have enough time last night to put it together using your gist post. -Ross On Oct 13, 2009, at 3:08 AM, Timothy Perrett wrote: Sorry Ross, I meant Java Service Wrapper! It was late and I must have typed it wrong :-( Any thoughts? Would it help if put together a rough sample? Cheers Tim Sent from my iPhone On 13 Oct 2009, at 02:21, Ross Mellgren dri...@gmail.com wrote: Before I go barking up the wrong tree, by JWS you mean Java Web Start or Java Web Services? I must confess, Im running a fairly specific config. Essentially I have an executable WAR file that has a jetty launcher class inside - its pretty sweet, and it works from the command line doing: java -jar myapp.war However, when I go to implement it with JWS I get this error. -Ross On Oct 12, 2009, at 9:05 PM, Timothy Perrett wrote: I cant really post the war im afraid, as its calling all manner of services on some internal systems. The strange thing with all of this is that it works when you execute: java -jar myapp.war Here's what you should need to just make a similar demo project: https://gist.github.com/3ad5cd900bbe0012b147 - the first being the maven build and the 2nd being the launcher im using for jetty. Cheers, Tim On Oct 13, 1:47 am, Ross Mellgren dri...@gmail.com wrote: Especially since it prints out the valid class name in the log message. I suppose you can't post the WAR somewhere so I can have a poke? -Ross --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: edit: What happened to JsonCmd?
Giving a shot here. I had browsed lift-util-1.1-M6.jar and has located JsonCmd. import net.liftweb.util.{JsonCmd} Cheers On Thu, Oct 15, 2009 at 12:15 PM, Chris coldfusio...@gmail.com wrote: I get error: Misc is not a member of net.liftweb.util when I try that. I don't see the Misc class/object in the API docs either. Is there anything else I should try? Thanks On Oct 14, 7:26 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Oct 14, 2009 at 7:09 PM, Chris coldfusio...@gmail.com wrote: Ack...that should have been case JsonCmd(processForm, _, p: Map[String, String], _) = import net.liftweb.util.Misc On Oct 14, 6:53 pm, Chris coldfusio...@gmail.com wrote: Hi all, I'm trying to get 1.1-M6 working, and I am unable to compile as JsonCmd seems to have disappeared. It isn't in the scaladoc, and AFAICT was deleted in this commit http://github.com/dpp/liftweb/commit/4dce48dfe938b92ae2ed50445dab1f4c... and it doesn't seem to have been replaced anywhere. I note that JsonCmd is still referenced in S.scala at line 1720 in what seems to be the latest version at http://github.com/dpp/liftweb/blob/6c0b8fcdcdcd7c8d13611965704ae67bd2... I'm using some code from the Lift book: object json extends JsonHandler { def apply(in: Any): JsCmd = { in match { case JsonCall(processForm, _, p: Map[String, String], _) = { /* etc */ How do I fix this? Thanks Chris -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Surf the harmonics --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: How much Scala knowledge is needed to start coding a simple blog with Lift?
Hi there, Personally, when I came to Lift over 2 years ago I knew no scala what- so-ever. Knowing scala is a real bonus, but everyone has to start somewhere right? I would suggest just wading in, and see how you get on - there will be a learning curve but this is a very friendly group and has some rich archives full of information to help you on your way. Good luck! Cheers, Tim On 15 Oct 2009, at 06:07, ngocdaothanh wrote: Hi, I have experience with Rails and Java. I'm new to Scala and Lift. I want to ask how much Scala knowledge is needed to start coding a simple blog with Lift? Rails is easy to learn because it require little Ruby knowledge to get started. Having read the Lift book, I feel one must have some advanced Scala knowledge to get started. Could anyone provide some kind of guideline or curriculum of Scala and Lift to get started with Lift? I would like to write a simple blog to learn Lift. But don't know how much Scala knowledge I should have to jump in Lift. Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Extracting FieldIdentifer names from a list of FieldErrors
sunanda sunanda.pa...@gmail.com writes: Hi David, Thanks for your reply. I need to find out the fieldnames that causes the error from the list of FieldErrors resulted from the validation. But I find all the FieldIdentifier names as Empty. Looking at the code for e.g. MappedInt, it seems like it is not being initialized. So you need to override uniqueFieldId and set it to some value. I would think that this could have a better default value, e.g. the same of the mapped field for instance /Jeppe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Sending a XML message to a Lift server
Hello Jon, your code is giving me two errors in the last two lines. (fragment of Main.scala):52: error: ambiguous reference to overloaded definition, both method fromInputStream in object Source of type (java.io.InputStream)scala.io.Source and method fromInputStream in object Source of type (java.io.InputStream,String)scala.io.Source match expected type ? scala.io.Source.fromInputStream ^ (fragment of Main.scala):53: error: value getLines is not a member of java.io.InputStream (conn.getInputStream).getLines.mkString ^ two errors found !!! discarding script preamble !!! discarding script preamble Any suggestions? Thanks, GA On Oct 14, 2009, at 8:35 PM, jon wrote: oh, if you want to parse directly into xml replace Source.fromInputStream(conn.getInputStream).getLines.mkString with XML.load(conn.getInputStream) On Oct 14, 2:32 pm, jon jonhoff...@gmail.com wrote: this should work: def post(url:URL, toPost:String):String = url.openConnection match { case conn: HttpURLConnection = { conn.setRequestMethod(POST) conn.setDoOutput(true) conn.connect conn.getOutputStream.write(toPost.getBytes()) scala.io.Source.fromInputStream (conn.getInputStream).getLines.mkString } } On Oct 14, 2:22 pm, GA my_li...@me.com wrote: Hello guys, I have created a small web service in Lift. It has two services: One reads a row from a table in a database and the other writes one. To test the API I am writing a small client application in scala to read and write from the Lift API. Since I am new to scala and lift, I am thinking the code in Java and writing in scala, and of course I am having some problems because of that. When I read from the Lift service, the service answers correctly, but my client method reads one line and ends the loop. I believe that the syntax of my for comprehension is not correct. This is my reader code: import java.net._ import java.io._ def read { val url = new URL(http://localhost:8080/api/getPerson/myrow ) var connection = url.openConnection connection.setDoOutput(true); var in = new BufferedReader(new InputStreamReader (connection.getInputStream())); var incomingMsg = **Loop with the problem*** for (decodedString - in.readLine) { incomingMsg = incomingMsg + decodedString } in.close(); println(incomingMsg) } My second problem is when i try to send a message to the API i receive the following java error: java.io.FileNotFoundException:http://localhost:8080/api/getPerson The error happens when the method tries to read the answers from the API. This is the code: def send { val message = root action/action person userNameJose/userName firstNameJose/firstName lastNamePerez/lastName passworda/password emaila...@.com/email createdon10/12/2009/createdon createdbyJose/createdby updatedon10/12/2009/updatedon updatedbyJose/updatedby /person /root val url = new URL(http://localhost:8080/api/getPerson;) var connection = url.openConnection connection.setDoOutput(true); var outgoingMsg = message.toString var out = new OutputStreamWriter (connection.getOutputStream()); out.write(string= + outgoingMsg); out.close(); ***The error happens in the next line** var in = new BufferedReader(new InputStreamReader (connection.getInputStream())); //var decodedString = for (decodedString - in.readLine) println(decodedString) in.close(); } Any ideas? and, by the way, are there scala packages to replace java.net and java.io? Thanks in advance, GA --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: What is going to be in Lift 1.1
Hi David, That sounds like a great list, especially (in my case) the Record, lift-json, OAuth, and REST support. Peter Robinett On Oct 14, 11:27 pm, David Pollak feeder.of.the.be...@gmail.com wrote: Folks, I'd like to get everyone's input on what Lift 1.1 will contain. Here's my list: - Wizard working to the same quality that SiteMap works - Record become the primary persistence vehicle in Lift - Lift runs on Scala 2.8 - Full support for Oracle and MS SQL Server - Integrate lift-json into Lift's JavaScript libraries - OAuth server support - Improved REST support Please let me know what your list looks like. Once we get to consensus, I'll post tickets for each of the items. Thanks, David -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Surf the harmonics --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: The quality of the Lift list [was: Don't shoot the non-XML messenger ...]
I've been recently really surprised (in positive way) by the Lift community. I also have some experience in maintaining a community and its spirit and i absolutely agree with and support David and his ideas and decisions. Would be really nice to keep the spirit! On Oct 14, 10:49 pm, David Pollak feeder.of.the.be...@gmail.com wrote: Folks, It is not lightly that I ban someone from the group... this is only the second time I've banned a substantive poster. I'm going to discuss some of the process and then touch on some of the substance of the questions that the poster was getting at. The Lift community, reflected on this list, is an inquisitive, friendly place where people who have a passion for building great web apps converge and contribute to making Lift a really great open source framework. Newbies are the lifeblood of the group because they come with fresh perspectives and new ways of looking at things. Questions from newbies help us refine and enhance Lift and the associated documentation. Folks who are building production apps on Lift receive the fastest turn-around because these folks are betting their careers and their enterprises (even enterprises of one) on Lift and they deserve the best support in the industry for taking this risk. A big part of why this community is successful (in terms of size, quality of discussion, and quality of results) is because we keep the quality of discussion high. How do we do this? The folks who have been on the list generally keep the level of discussion to the Lift ideals. We reward newbies with quick answers and encourage friendly discourse. We are generally slower to respond to those that are less reflective of the list ideals. I warn folks who are pushing boundaries (usually privately, but every once in a while publicly) and where the line is. In this case, nothing worked. The poster was neither asking questions, giving usable feedback, or being polite in his engagement with the folks on the list. I received a substantial number of private communications about this poster (which is pretty rare), and I took action. In terms of the substance, let me address to threat issue first. I threatened to ban the poster from the list. Perhaps DHH or Martin would not make such a threat. I am very sure that the quality of discussion on the Lift list is higher than that on the Rails list (one of the reasons I started Lift was to be part of a nicer community.) One cost of having a nicer place is excluding those who do not fit. The second threat I made was to relay a tongue-in-cheek private communication I received about the poster to the list (after receiving the okay from the guy that made the communication to me.) This threat was obvious, using video game rating language http://www.esrb.org/ratings/ratings_guide.jsp, Comic mischief and Cartoon violence. It was something that even a 6 year old can distinguish from reality. Put another way, the poster was talking about Kafkaesque experiences with using Lift and I responded with Jonesianhttp://www.youtube.com/watch?v=CrupqdGvsocfeature=PlayListp=62FED00...language. In terms of the broader issue of Lift's HTML templating system being XHTML only, yes, that's true. Lift treats HTML templates as XML. Lift's templating system is not a String templating system but an XML templating system. This satisfies the needs to render content to HTML browsers. If there are needs for generating other kinds of content, Lift is not as good, but in many cases there are better libraries for doing so. Lift makes it very simple to integrate other rendering/templating engines into Lift, usually with a single line of code the dispatches the HTTP request to an alternate provider of a LiftResponse. If the poster had simply said, I want to template non-HTML output, can you show me how? he would have gotten a nice example (and I might have even rolled it into demo.liftweb.net or maybe Tim might have blogged about it. Keeping things in XML has a number of advantages and a few disadvantages. First, the disadvantages: (1) you can't template non-XHTML responses and (2) everything must be well formed XML. The advantages are (1) security (2) performance (it's easier to cache XML and the cost of mutating XML trees is O(log N)), (3) there is better separation of logic from the view (perhaps Terrance Parr's String Template library achieves this level of separation), and (4) the ability to mutate the resulting page (rewrite tags, move stuff to head/tail, consolidate scripts) is more performant and less error-prone than doing the same with a String-based representation. I will address Bill's security question. For String-based rendering systems that emit HTML, the developer is the one who must make a decision at each insertion point as to whether the incoming String needs to be escaped. Because Strings are untyped, you don't know what they mean, if they're safe to
[Lift] error: not found: type IdPK in Lift 1.1
Hello guys, I have a Lift project working perfectly in version 1.0, but when I moved it to Lift 1.1 I am having errors with the Modeler with the type IdPK. Any ideas? Thanks, GA --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: How much Scala knowledge is needed to start coding a simple blog with Lift?
Hello, I bought the Scala book in PDF format (Odersky/Spoon/Venners) and pretty much jumped around it (benefit of PDF is the hyperlinks) for about a week. I am probably proficient with everything in chapters 1-18 which is still pretty much beginner/novice level, but I need the web/book before I tackle most other concepts. But I just wanted to get my hands dirty with a couple of apps and dived straight in. You learn by doing. You learn by reading someone else's code, which is what I've been doing a lot with the Lift sources (I have a local Git clone, and set it up in Eclipse). So, in a nutshell: learn the Scala basics, and get your hands dirty. Open a console and faff about, then start writing apps! :-) What I've done so far can be found here: http://github.com/opyate/Ken http://github.com/opyate/yauser Happy coding! Juan On Oct 15, 6:07 am, ngocdaothanh ngocdaoth...@gmail.com wrote: Hi, I have experience with Rails and Java. I'm new to Scala and Lift. I want to ask how much Scala knowledge is needed to start coding a simple blog with Lift? Rails is easy to learn because it require little Ruby knowledge to get started. Having read the Lift book, I feel one must have some advanced Scala knowledge to get started. Could anyone provide some kind of guideline or curriculum of Scala and Lift to get started with Lift? I would like to write a simple blog to learn Lift. But don't know how much Scala knowledge I should have to jump in Lift. Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: What is going to be in Lift 1.1
Being able to unit test record/mapper classes and the code that depends on them would be wonderful. Cheers Jono 2009/10/15 David Pollak feeder.of.the.be...@gmail.com On Wed, Oct 14, 2009 at 4:51 PM, Timothy Perrett timo...@getintheloop.euwrote: Agreed on all fronts. Points 1 - 4 are pretty key for me and the projects that run on lift at work. So, the million dollar question: ETA's of this stuff? Scala 2.8.2 (based on our previous conversation about not using 2.8.0) is still some time off right? Scala 2.8 is crystalizing. I'm expecting a release this year. I'm also more confident that EPFL will have a solid 2.8 rather than a 2.8 quickly followed by a 2.8.1. Cheers, Tim On 14 Oct 2009, at 22:27, David Pollak wrote: Folks, I'd like to get everyone's input on what Lift 1.1 will contain. Here's my list: - Wizard working to the same quality that SiteMap works - Record become the primary persistence vehicle in Lift - Lift runs on Scala 2.8 - Full support for Oracle and MS SQL Server - Integrate lift-json into Lift's JavaScript libraries - OAuth server support - Improved REST support Please let me know what your list looks like. Once we get to consensus, I'll post tickets for each of the items. 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 -- 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 liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Sending a XML message to a Lift server
Guys, Dont use scala.io.Source its very broken under the hood in current versions of Scala (according to paulp). Its already fixed in the trunk of 2.8 however (again, according to paulp). Cheers, Tim On 15 Oct 2009, at 11:09, GA wrote: Hello Jon, your code is giving me two errors in the last two lines. (fragment of Main.scala):52: error: ambiguous reference to overloaded definition, both method fromInputStream in object Source of type (java.io.InputStream)scala.io.Source and method fromInputStream in object Source of type (java.io.InputStream,String)scala.io.Source match expected type ? scala.io.Source.fromInputStream ^ (fragment of Main.scala):53: error: value getLines is not a member of java.io.InputStream (conn.getInputStream).getLines.mkString ^ two errors found !!! discarding script preamble !!! discarding script preamble Any suggestions? Thanks, GA On Oct 14, 2009, at 8:35 PM, jon wrote: oh, if you want to parse directly into xml replace Source.fromInputStream(conn.getInputStream).getLines.mkString with XML.load(conn.getInputStream) On Oct 14, 2:32 pm, jon jonhoff...@gmail.com wrote: this should work: def post(url:URL, toPost:String):String = url.openConnection match { case conn: HttpURLConnection = { conn.setRequestMethod(POST) conn.setDoOutput(true) conn.connect conn.getOutputStream.write(toPost.getBytes()) scala.io.Source.fromInputStream (conn.getInputStream).getLines.mkString } } On Oct 14, 2:22 pm, GA my_li...@me.com wrote: Hello guys, I have created a small web service in Lift. It has two services: One reads a row from a table in a database and the other writes one. To test the API I am writing a small client application in scala to read and write from the Lift API. Since I am new to scala and lift, I am thinking the code in Java and writing in scala, and of course I am having some problems because of that. When I read from the Lift service, the service answers correctly, but my client method reads one line and ends the loop. I believe that the syntax of my for comprehension is not correct. This is my reader code: import java.net._ import java.io._ def read { val url = new URL(http://localhost:8080/api/getPerson/ myrow ) var connection = url.openConnection connection.setDoOutput(true); var in = new BufferedReader(new InputStreamReader (connection.getInputStream())); var incomingMsg = **Loop with the problem*** for (decodedString - in.readLine) { incomingMsg = incomingMsg + decodedString } in.close(); println(incomingMsg) } My second problem is when i try to send a message to the API i receive the following java error: java.io.FileNotFoundException:http://localhost:8080/api/getPerson The error happens when the method tries to read the answers from the API. This is the code: def send { val message = root action/action person userNameJose/userName firstNameJose/firstName lastNamePerez/lastName passworda/password emaila...@.com/email createdon10/12/2009/createdon createdbyJose/createdby updatedon10/12/2009/updatedon updatedbyJose/updatedby /person /root val url = new URL(http://localhost:8080/api/getPerson;) var connection = url.openConnection connection.setDoOutput(true); var outgoingMsg = message.toString var out = new OutputStreamWriter (connection.getOutputStream()); out.write(string= + outgoingMsg); out.close(); ***The error happens in the next line** var in = new BufferedReader(new InputStreamReader (connection.getInputStream())); //var decodedString = for (decodedString - in.readLine) println(decodedString) in.close(); } Any ideas? and, by the way, are there scala packages to replace java.net and java.io? Thanks in advance, GA --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: How much Scala knowledge is needed to start coding a simple blog with Lift?
I started Scala 2 years ago by reading the Lift code. so DPPs basically responsible for my Scala code... ;) On Thu, Oct 15, 2009 at 10:58 AM, opyate opy...@gmail.com wrote: Hello, I bought the Scala book in PDF format (Odersky/Spoon/Venners) and pretty much jumped around it (benefit of PDF is the hyperlinks) for about a week. I am probably proficient with everything in chapters 1-18 which is still pretty much beginner/novice level, but I need the web/book before I tackle most other concepts. But I just wanted to get my hands dirty with a couple of apps and dived straight in. You learn by doing. You learn by reading someone else's code, which is what I've been doing a lot with the Lift sources (I have a local Git clone, and set it up in Eclipse). So, in a nutshell: learn the Scala basics, and get your hands dirty. Open a console and faff about, then start writing apps! :-) What I've done so far can be found here: http://github.com/opyate/Ken http://github.com/opyate/yauser Happy coding! Juan On Oct 15, 6:07 am, ngocdaothanh ngocdaoth...@gmail.com wrote: Hi, I have experience with Rails and Java. I'm new to Scala and Lift. I want to ask how much Scala knowledge is needed to start coding a simple blog with Lift? Rails is easy to learn because it require little Ruby knowledge to get started. Having read the Lift book, I feel one must have some advanced Scala knowledge to get started. Could anyone provide some kind of guideline or curriculum of Scala and Lift to get started with Lift? I would like to write a simple blog to learn Lift. But don't know how much Scala knowledge I should have to jump in Lift. Thanks. -- Viktor Klang Blog: klangism.blogspot.com Twttr: viktorklang Wave: viktor.kl...@googlewave.com Code: github.com/viktorklang AKKA Committer - akkasource.org Lift Committer - liftweb.com Atmosphere Committer - atmosphere.dev.java.net SoftPub founder: http://groups.google.com/group/softpub --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: How much Scala knowledge is needed to start coding a simple blog with Lift?
+1 Although i've also learnt a lot from n8han's dispatch library - that thing is freaking immense. Cheers, Tim On 15 Oct 2009, at 12:18, Viktor Klang wrote: I started Scala 2 years ago by reading the Lift code. so DPPs basically responsible for my Scala code... ;) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] ajaxForm and onSubmit
Hi, I want to use 'def ajaxForm(onSubmit: JsCmd, body: NodeSeq)' and update a hidden fields value on submit with some value. The problem is that the generated javascript for the onsubmit event first executes the serialize on the form and then uses my code for onSubmit. E.g. ajaxForm(bind(editor, xhtml, hidden - hidden(updateContent _, , (id, hidden)), save - submit(Save, () = {})), SetValById(hidden, Str(This should be the content of hidden This updates the hidden field value after the submit and updateContent gets only the old value from the last submit. With a normal form it works without problems with the update code triggered by onSubmit. Is there a way to update the hidden field before transferring its value? Thanks, Tobias --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: What is going to be in Lift 1.1
Will REST support include integrated JAX-RS and JAXB? Or are you planning to not use those existing stacks and replace them with something Scala/Lift-specific? I personally like both of them as they take care of a lot of plumbing transparently (.e.g. switching output from JSON to XML depending on whether the service is called from a browser or via curl), --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: DB logging logs statements twice?
OK, I found what's happening. Logging is getting called in the private DB.runPreparedStatement, and also in the DB.exec method. Mapper uses exec within the runPreparedStatement call. It seems like exec is the more appropriate place to be running the logging, since you could have multiple execs on a prepared statement but you generally wouldn't prepare a statement without executing it. Thoughts on removing the logging from runPreparedStatement? Derek On Wed, Oct 14, 2009 at 11:42 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: I don't think so. In this case I'm seeing a ResultSet in both log entries, which shouldn't show up in the part where it's being prepared. Derek On Tue, Oct 13, 2009 at 6:09 PM, Jonathan Ferguson j...@spiralarm.comwrote: Is this related to a previous query dated 15 Sept, the title was [Lift] Mapper: Why is every SQL query sent twice? (second time with NULL parameters) The response from @dpp was The SQL is not being sent twice. There are two different points (when the Statement is created and after the Statement is executed) that the same query is logged. Cheers Jono 2009/10/14 Derek Chen-Becker dchenbec...@gmail.com OK, I'm seeing the same thing here. I'll open an issue and work on it. Derek On Tue, Oct 13, 2009 at 10:07 AM, harryh har...@gmail.com wrote: I'm also seeing this double logging behavior (using PostgreSQL. I was under the impression that it was happening because the SQL statement is first prepared, and then executed (each of which cause a log entry). It's not critical or anything, but it would be nice if this could be fixed at some point. -harryh On Oct 13, 10:28 am, Derek Chen-Becker dchenbec...@gmail.com wrote: I'm not sure how that could be getting logged twice, especially since it's the exact same ResultSet being returned. When I tested this on my local app (against both PG and MySQL) I didn't get this behavior, but I'll try pulling from master and testing again just in case something changed. Derek On Tue, Oct 13, 2009 at 6:56 AM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote: Hi, Just wanted to update to the new db logging by adding the following to boot: DB.addLogFunc { case (query:DBLog, time) = { LogBoot.loggerByName(query).info( All queries took + time + ms: ) query.statementEntries.foreach({ case DBLogEntry(stmt, duration) = LogBoot.loggerByName(query).info(+stmt + took + duration + ms)}) LogBoot.loggerByName(query).info( End queries) } } But it seems all executed statements are logged twice. I have this snippet: def currentUser(xhtml: Group): NodeSeq = Text(User.currentUser.dmap(S.?(Anonym))(user = user.firstName + + user.lastName)) This logs: 14:46:09.068 [tp-1029120287-4] INFO query - All queries took 5ms: 14:46:09.068 [tp-1029120287-4] INFO query - Exec query SELECT users.id, users.firstname, users.lastname, users.email, users.locale, users.timezone, users.password_pw, users.password_slt, users.account_id, users.superuser, users.uniqueid, users.validated FROM users WHERE id = 2 (scale -5) : org.postgresql.jdbc4.jdbc4result...@77f31432 took 4ms 14:46:09.069 [tp-1029120287-4] INFO query - End queries 14:46:09.069 [tp-1029120287-4] INFO query - All queries took 8ms: 14:46:09.069 [tp-1029120287-4] INFO query - Exec query SELECT users.id, users.firstname, users.lastname, users.email, users.locale, users.timezone, users.password_pw, users.password_slt, users.account_id, users.superuser, users.uniqueid, users.validated FROM users WHERE id = 2 (scale -5) : org.postgresql.jdbc4.jdbc4result...@77f31432 took 4ms 14:46:09.069 [tp-1029120287-4] INFO query - End queries Note the same resultset. The postgres logs also shows that only a single statement is executed So, what did I miss? /Jeppe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: DB logging logs statements twice?
Another option that I just thought of would be to add a logged flag on the PreparedStatement wrapper so that it knows not to print a dup. Derek On Thu, Oct 15, 2009 at 8:09 AM, Derek Chen-Becker dchenbec...@gmail.comwrote: OK, I found what's happening. Logging is getting called in the private DB.runPreparedStatement, and also in the DB.exec method. Mapper uses exec within the runPreparedStatement call. It seems like exec is the more appropriate place to be running the logging, since you could have multiple execs on a prepared statement but you generally wouldn't prepare a statement without executing it. Thoughts on removing the logging from runPreparedStatement? Derek On Wed, Oct 14, 2009 at 11:42 PM, Derek Chen-Becker dchenbec...@gmail.com wrote: I don't think so. In this case I'm seeing a ResultSet in both log entries, which shouldn't show up in the part where it's being prepared. Derek On Tue, Oct 13, 2009 at 6:09 PM, Jonathan Ferguson j...@spiralarm.comwrote: Is this related to a previous query dated 15 Sept, the title was [Lift] Mapper: Why is every SQL query sent twice? (second time with NULL parameters) The response from @dpp was The SQL is not being sent twice. There are two different points (when the Statement is created and after the Statement is executed) that the same query is logged. Cheers Jono 2009/10/14 Derek Chen-Becker dchenbec...@gmail.com OK, I'm seeing the same thing here. I'll open an issue and work on it. Derek On Tue, Oct 13, 2009 at 10:07 AM, harryh har...@gmail.com wrote: I'm also seeing this double logging behavior (using PostgreSQL. I was under the impression that it was happening because the SQL statement is first prepared, and then executed (each of which cause a log entry). It's not critical or anything, but it would be nice if this could be fixed at some point. -harryh On Oct 13, 10:28 am, Derek Chen-Becker dchenbec...@gmail.com wrote: I'm not sure how that could be getting logged twice, especially since it's the exact same ResultSet being returned. When I tested this on my local app (against both PG and MySQL) I didn't get this behavior, but I'll try pulling from master and testing again just in case something changed. Derek On Tue, Oct 13, 2009 at 6:56 AM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote: Hi, Just wanted to update to the new db logging by adding the following to boot: DB.addLogFunc { case (query:DBLog, time) = { LogBoot.loggerByName(query).info( All queries took + time + ms: ) query.statementEntries.foreach({ case DBLogEntry(stmt, duration) = LogBoot.loggerByName(query).info(+stmt + took + duration + ms)}) LogBoot.loggerByName(query).info( End queries) } } But it seems all executed statements are logged twice. I have this snippet: def currentUser(xhtml: Group): NodeSeq = Text(User.currentUser.dmap(S.?(Anonym))(user = user.firstName + + user.lastName)) This logs: 14:46:09.068 [tp-1029120287-4] INFO query - All queries took 5ms: 14:46:09.068 [tp-1029120287-4] INFO query - Exec query SELECT users.id, users.firstname, users.lastname, users.email, users.locale, users.timezone, users.password_pw, users.password_slt, users.account_id, users.superuser, users.uniqueid, users.validated FROM users WHERE id = 2 (scale -5) : org.postgresql.jdbc4.jdbc4result...@77f31432 took 4ms 14:46:09.069 [tp-1029120287-4] INFO query - End queries 14:46:09.069 [tp-1029120287-4] INFO query - All queries took 8ms: 14:46:09.069 [tp-1029120287-4] INFO query - Exec query SELECT users.id, users.firstname, users.lastname, users.email, users.locale, users.timezone, users.password_pw, users.password_slt, users.account_id, users.superuser, users.uniqueid, users.validated FROM users WHERE id = 2 (scale -5) : org.postgresql.jdbc4.jdbc4result...@77f31432 took 4ms 14:46:09.069 [tp-1029120287-4] INFO query - End queries Note the same resultset. The postgres logs also shows that only a single statement is executed So, what did I miss? /Jeppe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: DB logging logs statements twice?
I vote for DB.exec On Thu, Oct 15, 2009 at 4:09 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: OK, I found what's happening. Logging is getting called in the private DB.runPreparedStatement, and also in the DB.exec method. Mapper uses exec within the runPreparedStatement call. It seems like exec is the more appropriate place to be running the logging, since you could have multiple execs on a prepared statement but you generally wouldn't prepare a statement without executing it. Thoughts on removing the logging from runPreparedStatement? Derek On Wed, Oct 14, 2009 at 11:42 PM, Derek Chen-Becker dchenbec...@gmail.com wrote: I don't think so. In this case I'm seeing a ResultSet in both log entries, which shouldn't show up in the part where it's being prepared. Derek On Tue, Oct 13, 2009 at 6:09 PM, Jonathan Ferguson j...@spiralarm.comwrote: Is this related to a previous query dated 15 Sept, the title was [Lift] Mapper: Why is every SQL query sent twice? (second time with NULL parameters) The response from @dpp was The SQL is not being sent twice. There are two different points (when the Statement is created and after the Statement is executed) that the same query is logged. Cheers Jono 2009/10/14 Derek Chen-Becker dchenbec...@gmail.com OK, I'm seeing the same thing here. I'll open an issue and work on it. Derek On Tue, Oct 13, 2009 at 10:07 AM, harryh har...@gmail.com wrote: I'm also seeing this double logging behavior (using PostgreSQL. I was under the impression that it was happening because the SQL statement is first prepared, and then executed (each of which cause a log entry). It's not critical or anything, but it would be nice if this could be fixed at some point. -harryh On Oct 13, 10:28 am, Derek Chen-Becker dchenbec...@gmail.com wrote: I'm not sure how that could be getting logged twice, especially since it's the exact same ResultSet being returned. When I tested this on my local app (against both PG and MySQL) I didn't get this behavior, but I'll try pulling from master and testing again just in case something changed. Derek On Tue, Oct 13, 2009 at 6:56 AM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote: Hi, Just wanted to update to the new db logging by adding the following to boot: DB.addLogFunc { case (query:DBLog, time) = { LogBoot.loggerByName(query).info( All queries took + time + ms: ) query.statementEntries.foreach({ case DBLogEntry(stmt, duration) = LogBoot.loggerByName(query).info(+stmt + took + duration + ms)}) LogBoot.loggerByName(query).info( End queries) } } But it seems all executed statements are logged twice. I have this snippet: def currentUser(xhtml: Group): NodeSeq = Text(User.currentUser.dmap(S.?(Anonym))(user = user.firstName + + user.lastName)) This logs: 14:46:09.068 [tp-1029120287-4] INFO query - All queries took 5ms: 14:46:09.068 [tp-1029120287-4] INFO query - Exec query SELECT users.id, users.firstname, users.lastname, users.email, users.locale, users.timezone, users.password_pw, users.password_slt, users.account_id, users.superuser, users.uniqueid, users.validated FROM users WHERE id = 2 (scale -5) : org.postgresql.jdbc4.jdbc4result...@77f31432 took 4ms 14:46:09.069 [tp-1029120287-4] INFO query - End queries 14:46:09.069 [tp-1029120287-4] INFO query - All queries took 8ms: 14:46:09.069 [tp-1029120287-4] INFO query - Exec query SELECT users.id, users.firstname, users.lastname, users.email, users.locale, users.timezone, users.password_pw, users.password_slt, users.account_id, users.superuser, users.uniqueid, users.validated FROM users WHERE id = 2 (scale -5) : org.postgresql.jdbc4.jdbc4result...@77f31432 took 4ms 14:46:09.069 [tp-1029120287-4] INFO query - End queries Note the same resultset. The postgres logs also shows that only a single statement is executed So, what did I miss? /Jeppe -- Viktor Klang Blog: klangism.blogspot.com Twttr: viktorklang Wave: viktor.kl...@googlewave.com Code: github.com/viktorklang AKKA Committer - akkasource.org Lift Committer - liftweb.com Atmosphere Committer - atmosphere.dev.java.net SoftPub founder: http://groups.google.com/group/softpub --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: URL in PlainMailBodyType to BlackBerry
In the deep dark recesses of my memory, I think we originally did text-only messages and there was some complaint about that... sigh. On Wed, Oct 14, 2009 at 10:36 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: The way that Lift uses the API we don't support sending non-multipart messages. I suppose that this could be refactored to support single part MIME messages, but I really have trouble believing that a BlackBerry can't handle it. Derek On Mon, Oct 12, 2009 at 9:38 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: True, I may have to do that at some point, although I'm not super confident I'll find such specs. What do you say to Ross's comment? Why is it multipart? - David Pollakfeeder.of.the.be...@gmail.com wrote: On Mon, Oct 12, 2009 at 6:17 PM, Naftoli Gugenheim naftoli...@gmail.com wrote: Does this help? It's from GMail / Show original GMail munges things, so I don't know if that's the original message. You might want to figure out what the specs are for blackberry to convert messages and see why this kind of message is not being converted. Delivered-To: naftoli...@gmail.com Received: by 10.86.30.11 with SMTP id d11cs12302fgd; Wed, 7 Oct 2009 12:28:57 -0700 (PDT) Received: by 10.229.19.149 with SMTP id a21mr391667qcb.29.1254943736364; Wed, 07 Oct 2009 12:28:56 -0700 (PDT) Return-Path: yehu...@lrbcol.org Received: from lrbcol (174-143-236-122.static.slicehost.net [174.143.236.122]) by mx.google.com with ESMTP id 1si71430296yxe.11.2009.10.07.12.28.55; Wed, 07 Oct 2009 12:28:56 -0700 (PDT) Received-SPF: neutral (google.com: 174.143.236.122 is neither permitted nor denied by best guess record for domain of yehu...@lrbcol.org) client-ip=174.143.236.122; Authentication-Results: mx.google.com; spf=neutral (google.com: 174.143.236.122 is neither permitted nor denied by best guess record for domain of yehu...@lrbcol.org) smtp.mail=yehu...@lrbcol.org Received: from lrbcol (localhost [127.0.0.1]) by lrbcol (Postfix) with ESMTP id CDB51A0055 for naftoli...@gmail.com; Wed, 7 Oct 2009 15:28:56 -0400 (EDT) From: yehu...@lrbcol.org To: naftoli...@gmail.com Message-ID: 2107786874.01254943736214.javamail.r...@lrbcol Subject: Detail of Transportation #843 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary==_Part_0_1227069312.1254943735894 Date: Wed, 7 Oct 2009 15:28:56 -0400 (EDT) --=_Part_0_1227069312.1254943735894 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit naftuli gugenheim; 617 6st ; M: 7325342893; From : ; To : 39 hearth ct; Request URL: [TODO] --=_Part_0_1227069312.1254943735894-- On Mon, Oct 12, 2009 at 6:15 PM, David Pollak feeder.of.the.be...@gmail.com wrote: Please send some test email to an account you can access using Thunderbird. Open the message and look at the message source. Is it really plain text? What do the headers say it is? On Mon, Oct 12, 2009 at 1:11 PM, Naftoli Gugenheim naftoli...@gmail.com wrote: Hi. I'm sending an email using PlainMailBodyType that contains a URL. Normally when a BlackBerry receives a plain text email it automatically hyperlinks URLS and potential phone numbers. For some reason this email is not being hyperlinked on the BlackBerry. Is it possible that it's somehow not purely plain text? How would I solve this? I don't want to send HTML messages because some recipients may not be able to view it. Thanks. -- 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 -- 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 -- 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 liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: net.liftweb.http.LiftFilter is not a javax.servlet.Filter
Hooray! Three cheers for working code! -Ross On Oct 15, 2009, at 4:45 AM, Timothy Perrett wrote: Hey Ross, Just to close up this thread - you were exactly right. As it turns out, the dependency tree was pulling in a special jetty servlet implementation that I didn't know about. After some dependency management everything worked perfectly! Cheers, Tim On 13 Oct 2009, at 15:25, Ross Mellgren wrote: The only reason I could think of is that something is pulling a servlet API into scope that you're not expecting -- I use JSW myself and I know that I've never seen this kind of thing happen. I'd be glad to poke around if you throw up a sample, I confess I didn't have enough time last night to put it together using your gist post. -Ross On Oct 13, 2009, at 3:08 AM, Timothy Perrett wrote: Sorry Ross, I meant Java Service Wrapper! It was late and I must have typed it wrong :-( Any thoughts? Would it help if put together a rough sample? Cheers Tim Sent from my iPhone On 13 Oct 2009, at 02:21, Ross Mellgren dri...@gmail.com wrote: Before I go barking up the wrong tree, by JWS you mean Java Web Start or Java Web Services? I must confess, Im running a fairly specific config. Essentially I have an executable WAR file that has a jetty launcher class inside - its pretty sweet, and it works from the command line doing: java -jar myapp.war However, when I go to implement it with JWS I get this error. -Ross On Oct 12, 2009, at 9:05 PM, Timothy Perrett wrote: I cant really post the war im afraid, as its calling all manner of services on some internal systems. The strange thing with all of this is that it works when you execute: java -jar myapp.war Here's what you should need to just make a similar demo project: https://gist.github.com/3ad5cd900bbe0012b147 - the first being the maven build and the 2nd being the launcher im using for jetty. Cheers, Tim On Oct 13, 1:47 am, Ross Mellgren dri...@gmail.com wrote: Especially since it prints out the valid class name in the log message. I suppose you can't post the WAR somewhere so I can have a poke? -Ross --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: edit: What happened to JsonCmd?
You might want to double check that you have 1.1-M6 for all lift-* dependencies in your POM, assuming you use Maven. -Ross On Oct 15, 2009, at 12:15 AM, Chris wrote: I get error: Misc is not a member of net.liftweb.util when I try that. I don't see the Misc class/object in the API docs either. Is there anything else I should try? Thanks On Oct 14, 7:26 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Oct 14, 2009 at 7:09 PM, Chris coldfusio...@gmail.com wrote: Ack...that should have been case JsonCmd(processForm, _, p: Map[String, String], _) = import net.liftweb.util.Misc On Oct 14, 6:53 pm, Chris coldfusio...@gmail.com wrote: Hi all, I'm trying to get 1.1-M6 working, and I am unable to compile as JsonCmd seems to have disappeared. It isn't in the scaladoc, and AFAICT was deleted in this commit http://github.com/dpp/liftweb/commit/4dce48dfe938b92ae2ed50445dab1f4c ... and it doesn't seem to have been replaced anywhere. I note that JsonCmd is still referenced in S.scala at line 1720 in what seems to be the latest version at http://github.com/dpp/liftweb/blob/6c0b8fcdcdcd7c8d13611965704ae67bd2 ... I'm using some code from the Lift book: object json extends JsonHandler { def apply(in: Any): JsCmd = { in match { case JsonCall(processForm, _, p: Map[String, String], _) = { /* etc */ How do I fix this? Thanks Chris -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Surf the harmonics --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: edit: What happened to JsonCmd?
Ying-Kwang's got it right. On Wed, Oct 14, 2009 at 9:15 PM, Chris coldfusio...@gmail.com wrote: I get error: Misc is not a member of net.liftweb.util when I try that. I don't see the Misc class/object in the API docs either. Is there anything else I should try? Thanks On Oct 14, 7:26 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Oct 14, 2009 at 7:09 PM, Chris coldfusio...@gmail.com wrote: Ack...that should have been case JsonCmd(processForm, _, p: Map[String, String], _) = import net.liftweb.util.Misc On Oct 14, 6:53 pm, Chris coldfusio...@gmail.com wrote: Hi all, I'm trying to get 1.1-M6 working, and I am unable to compile as JsonCmd seems to have disappeared. It isn't in the scaladoc, and AFAICT was deleted in this commit http://github.com/dpp/liftweb/commit/4dce48dfe938b92ae2ed50445dab1f4c... and it doesn't seem to have been replaced anywhere. I note that JsonCmd is still referenced in S.scala at line 1720 in what seems to be the latest version at http://github.com/dpp/liftweb/blob/6c0b8fcdcdcd7c8d13611965704ae67bd2... I'm using some code from the Lift book: object json extends JsonHandler { def apply(in: Any): JsCmd = { in match { case JsonCall(processForm, _, p: Map[String, String], _) = { /* etc */ How do I fix this? Thanks Chris -- 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 Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Extracting FieldIdentifer names from a list of FieldErrors
On Thu, Oct 15, 2009 at 2:48 AM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote: sunanda sunanda.pa...@gmail.com writes: Hi David, Thanks for your reply. I need to find out the fieldnames that causes the error from the list of FieldErrors resulted from the validation. But I find all the FieldIdentifier names as Empty. Looking at the code for e.g. MappedInt, it seems like it is not being initialized. So you need to override uniqueFieldId and set it to some value. I would think that this could have a better default value, e.g. the same of the mapped field for instance Yep. Please open a ticket. /Jeppe -- 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 liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: error: not found: type IdPK in Lift 1.1
Here you have the complete model file. It is just a test class. The error I have is Not found: Type IdPK. I get it when I try to compile the file. Also NetBeans is showing the error. The same file was working fine in Lift 1.0. I have created a new project based on the Lift snapshot 1.1 archetype- blank and then copied all my files from the previous project. The original 1.0 project was created with the archetype-basic, could this be the source of the error? Thanks, package com.tribes.ga.model import net.liftweb._ import mapper._ import util._ import scala.xml.{NodeSeq,Text} import _root_.java.text.{DateFormat,SimpleDateFormat} class Person extends LongKeyedMapper[Person] with IdPK { def getSingleton = Person object userName extends MappedString(this, 30) object password extends MappedString(this, 30) object firstName extends MappedString(this, 30) object lastName extends MappedString(this, 30) object email extends MappedString(this, 255) object deviceName extends MappedString(this, 30) object createdOn extends MappedDateTime(this) object updatedOn extends MappedDateTime(this) object createdBy extends MappedString(this, 25) object updatedBy extends MappedString(this, 25) def toXML: NodeSeq = { val id = http://www.gatribes.com/api/expense/; + this.id val formatter = new SimpleDateFormat(-MM- dd'T'HH:mm:ss'Z') person id{id}/id accountname{getUserName(userName.is)}/accountname firstName{firstName.is}/firstName lastName{lastName.is}/lastName /person } private def getUserName(userName: String): String = { Person.find(By(Person.userName, userName)) match { case Full(a) = a.userName case _ = No Account Name } } } object Person extends Person with LongKeyedMetaMapper[Person] On Oct 15, 2009, at 5:04 PM, David Pollak wrote: Can you post an example (complete file) of something's not working? On Thu, Oct 15, 2009 at 3:21 AM, GA my_li...@me.com wrote: Hello guys, I have a Lift project working perfectly in version 1.0, but when I moved it to Lift 1.1 I am having errors with the Modeler with the type IdPK. Any ideas? Thanks, GA -- 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 liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: What is going to be in Lift 1.1
On Thu, Oct 15, 2009 at 7:08 AM, Jacek Furmankiewicz jace...@gmail.comwrote: Will REST support include integrated JAX-RS and JAXB? Or are you planning to not use those existing stacks and replace them with something Scala/Lift-specific? This thread is the discussion of the what is going to be in 1.1, not the specifics of design or implementation. Feel encouraged to start a new thread discussing how you'd like to see particular features implemented. I personally like both of them as they take care of a lot of plumbing transparently (.e.g. switching output from JSON to XML depending on whether the service is called from a browser or via curl), -- 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 liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: error: not found: type IdPK in Lift 1.1
I'm not sure what's going on. This code worked for me in a brand new archetype-basic 1.1-SNAPSHOT project. Please make sure the following entry is in your pom.xml file: dependency groupIdnet.liftweb/groupId artifactIdlift-mapper/artifactId version1.1-SNAPSHOT/version /dependency Thanks, David On Thu, Oct 15, 2009 at 8:27 AM, GA my_li...@me.com wrote: Here you have the complete model file. It is just a test class. The error I have is Not found: Type IdPK. I get it when I try to compile the file. Also NetBeans is showing the error. The same file was working fine in Lift 1.0. I have created a new project based on the Lift snapshot 1.1 archetype-blank and then copied all my files from the previous project. The original 1.0 project was created with the archetype-basic, could this be the source of the error? Thanks, package com.tribes.ga.model import net.liftweb._ import mapper._ import util._ import scala.xml.{NodeSeq,Text} import _root_.java.text.{DateFormat,SimpleDateFormat} class Person extends LongKeyedMapper[Person] with IdPK { def getSingleton = Person object userName extends MappedString(this, 30) object password extends MappedString(this, 30) object firstName extends MappedString(this, 30) object lastName extends MappedString(this, 30) object email extends MappedString(this, 255) object deviceName extends MappedString(this, 30) object createdOn extends MappedDateTime(this) object updatedOn extends MappedDateTime(this) object createdBy extends MappedString(this, 25) object updatedBy extends MappedString(this, 25) def toXML: NodeSeq = { val id = http://www.gatribes.com/api/expense/; + this.id val formatter = new SimpleDateFormat(-MM-dd'T'HH:mm:ss'Z') person id{id}/id accountname{getUserName(userName.is)}/accountname firstName{firstName.is}/firstName lastName{lastName.is}/lastName /person } private def getUserName(userName: String): String = { Person.find(By(Person.userName, userName)) match { case Full(a) = a.userName case _ = No Account Name } } } object Person extends Person with LongKeyedMetaMapper[Person] On Oct 15, 2009, at 5:04 PM, David Pollak wrote: Can you post an example (complete file) of something's not working? On Thu, Oct 15, 2009 at 3:21 AM, GA my_li...@me.com wrote: Hello guys, I have a Lift project working perfectly in version 1.0, but when I moved it to Lift 1.1 I am having errors with the Modeler with the type IdPK. Any ideas? Thanks, GA -- 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 -- 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 liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: MappedString holding null
On Wed, Oct 14, 2009 at 8:40 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: On Wed, Oct 14, 2009 at 11:08 PM, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Oct 14, 2009 at 7:45 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: 1. Why does MappedString have members such as nonNull(in: String) which don't depend on the MappedString's state? Shouldn't they be in a singleton somewhere? Maybe they should be, but are they hurting anything where they are? Nope! Not complaining, just mentioning it. Are they meant to be public? Are they used with any value for 'in' other than the field's own value? In other words, would it make sense to take off the 'in' parameter, satisfying #1 and #2. If you change their signatures, it will break existing code. I probably added them when I needed some helper methods. You're welcome to add companions that read the current is value of the MappedString 2. It would be nice if there was a method like 'is' that would return null as . Actually for my particular use case where I'm testing field.is.isEmpty it would be nice if it would have a method like isEmpty that would return true if value==null || value.isEmpty. You can (1) write a trait and mix it in or (2) write a subclass of MappedString and use that. -- 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 -- 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 liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: ajaxForm and onSubmit
Sounds like a defect to me. Please open a ticket. On Thu, Oct 15, 2009 at 6:41 AM, Tobias Hauth tobias.ha...@gmail.comwrote: Hi, I want to use 'def ajaxForm(onSubmit: JsCmd, body: NodeSeq)' and update a hidden fields value on submit with some value. The problem is that the generated javascript for the onsubmit event first executes the serialize on the form and then uses my code for onSubmit. E.g. ajaxForm(bind(editor, xhtml, hidden - hidden(updateContent _, , (id, hidden)), save - submit(Save, () = {})), SetValById(hidden, Str(This should be the content of hidden This updates the hidden field value after the submit and updateContent gets only the old value from the last submit. With a normal form it works without problems with the update code triggered by onSubmit. Is there a way to update the hidden field before transferring its value? Thanks, Tobias -- 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 liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Welcome Dirk Louwers to the Lift committers
Folks, Please join me in welcoming Dirk to the Lift committers. Dirk is going to integrate Ext.Js (the MIT licensed part of it) into Lift. Welcome Dirk and we look forward to your contributions! 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 liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Using CalendarMonthView for an Appointment System
Hi all- I am currently attempting to build an appointment calendar in Lift. I'm having a lot of trouble getting everything working correctly (partially i think because of my ignorance of what functionality is available through the js and widgets packages. Currently, on cell click, I open a new window (since for some reason ModalWindow isnt working) that holds an appt template. When that form is submitted, it makes an ajax call to the server, creates an appt and responds. Then the window closes. Then the main page needs to reload, or I need to update the main page's calendar. Nonetheless I have two questions: 1) Has anyone experimented with getting a work appt. system up with this object? Is there an easier way to do this? 2) Would it be easier just to integrate a jQuery plugin into the system and use that (and if so, how would one do that?) Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] binding bug inside of select elements
This seems very strange to me, and I don't have a minimal test case yet, but I'm seeing a problem where elements are not being properly bound when they appear inside of a select in my view. So, for example: select stats:options /select stats:options isn't being bound. But div stats:options /div gets bound find (but then I, obviously, don't have proper HTML since the options are inside of a div instead of a select). Has anyone else seen this? Is it possible that this is what is really going on here? It seems like a very strange bug (if I have, in fact, hit a bug). -harryh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: binding bug inside of select elements
Not seeing how to mark it high priority, but here is the ticket: http://github.com/dpp/liftweb/issues/#issue/102 will attach additional information as I figure it out. -harryh On Oct 15, 12:37 pm, David Pollak feeder.of.the.be...@gmail.com wrote: Weird. When you have a repro case, please file a ticket and mark it as high priority. On Thu, Oct 15, 2009 at 9:28 AM, harryh har...@gmail.com wrote: This seems very strange to me, and I don't have a minimal test case yet, but I'm seeing a problem where elements are not being properly bound when they appear inside of a select in my view. So, for example: select stats:options /select stats:options isn't being bound. But div stats:options /div gets bound find (but then I, obviously, don't have proper HTML since the options are inside of a div instead of a select). Has anyone else seen this? Is it possible that this is what is really going on here? It seems like a very strange bug (if I have, in fact, hit a bug). -harryh -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Surf the harmonics --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Welcome Dirk Louwers to the Lift committers
Welcome to the team dude - care to give some information about yourself and background? Cheers, Tim On Oct 15, 4:46 pm, David Pollak feeder.of.the.be...@gmail.com wrote: Folks, Please join me in welcoming Dirk to the Lift committers. Dirk is going to integrate Ext.Js (the MIT licensed part of it) into Lift. Welcome Dirk and we look forward to your contributions! Thanks, David -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Surf the harmonics --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Welcome Dirk Louwers to the Lift committers
Hi Dirk! Heiko On Thursday, October 15, 2009, David Pollak feeder.of.the.be...@gmail.com wrote: Folks, Please join me in welcoming Dirk to the Lift committers. Dirk is going to integrate Ext.Js (the MIT licensed part of it) into Lift. Welcome Dirk and we look forward to your contributions! 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 -- Heiko Seeberger My job: weiglewilczek.com My blog: heikoseeberger.name Follow me: twitter.com/hseeberger OSGi on Scala: scalamodules.org Lift, the simply functional web framework: liftweb.net --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Using CalendarMonthView for an Appointment System
Marius, I have looked at the docs, and the method I described seemed the best way to do it. I was just curious if there were any other ideas out there. Thanks for the reply. Dave On Oct 15, 12:22 pm, Marius marius.dan...@gmail.com wrote: Calendar Widgets work with JQuery. You can see the demo by going in the lift-widgets project and do a mvn jetty:run. ClaendarMonthView currently handles 3 types of events: itemClick, dayClick, weekClick. Please see the scaladocs of the render method. You can add any JS function for those events. MonthView doesn't have yet a built in system to manage calendars items from javaScript, but we can/should definitely add this. You can open a ticket for this. Other types of calendars like DayView or WeekView have this support. If you have suggestions for improvements please do let us know. Br's, Marius On Oct 15, 6:56 pm, Dave davidtgoldb...@gmail.com wrote: Hi all- I am currently attempting to build an appointment calendar in Lift. I'm having a lot of trouble getting everything working correctly (partially i think because of my ignorance of what functionality is available through the js and widgets packages. Currently, on cell click, I open a new window (since for some reason ModalWindow isnt working) that holds an appt template. When that form is submitted, it makes an ajax call to the server, creates an appt and responds. Then the window closes. Then the main page needs to reload, or I need to update the main page's calendar. Nonetheless I have two questions: 1) Has anyone experimented with getting a work appt. system up with this object? Is there an easier way to do this? 2) Would it be easier just to integrate a jQuery plugin into the system and use that (and if so, how would one do that?) Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Another Newbie Question (Last one for a while, Promise!)
After checking the table editor example, I was keen to try it out, and it works GREAT. So thanks for all of your hard work. Here is my problem though. I want to filter the table so that only entries linked to a certain user are displayed. So for instance say I have class foo: class Foo extends LongKeyedMapper[Foo] with IdPK { ... object owner extends MappedLongForeignKey(this, Owner) } I want the table to only display the Foo if (Foo.owner == CurrentUser.id). I figure I can override the reload (to something like current = metaMapper.findAll(By) and save methods (to include the currentUserId) in the ItemList implementation, but then I'm having trouble conceptually figuring out how to inject my new extended type back into the TableEditor code, or if this is possible at all. Any help would be much appreciated. Thanks in advance. Dave --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Using CalendarMonthView for an Appointment System
If you open that ticket the fix will allow you to submit the Ajax request and populate the Calendar without having to reload the page. Page reload for such cases is not very good experience. I opened issue http://github.com/dpp/liftweb/issues#issue/104 to address this. Br's, Marius On Oct 15, 8:47 pm, Dave davidtgoldb...@gmail.com wrote: Marius, I have looked at the docs, and the method I described seemed the best way to do it. I was just curious if there were any other ideas out there. Thanks for the reply. Dave On Oct 15, 12:22 pm, Marius marius.dan...@gmail.com wrote: Calendar Widgets work with JQuery. You can see the demo by going in the lift-widgets project and do a mvn jetty:run. ClaendarMonthView currently handles 3 types of events: itemClick, dayClick, weekClick. Please see the scaladocs of the render method. You can add any JS function for those events. MonthView doesn't have yet a built in system to manage calendars items from javaScript, but we can/should definitely add this. You can open a ticket for this. Other types of calendars like DayView or WeekView have this support. If you have suggestions for improvements please do let us know. Br's, Marius On Oct 15, 6:56 pm, Dave davidtgoldb...@gmail.com wrote: Hi all- I am currently attempting to build an appointment calendar in Lift. I'm having a lot of trouble getting everything working correctly (partially i think because of my ignorance of what functionality is available through the js and widgets packages. Currently, on cell click, I open a new window (since for some reason ModalWindow isnt working) that holds an appt template. When that form is submitted, it makes an ajax call to the server, creates an appt and responds. Then the window closes. Then the main page needs to reload, or I need to update the main page's calendar. Nonetheless I have two questions: 1) Has anyone experimented with getting a work appt. system up with this object? Is there an easier way to do this? 2) Would it be easier just to integrate a jQuery plugin into the system and use that (and if so, how would one do that?) Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Attributes question
Im using -% in production code and personally i think it looks fine! Cheers, Tim On 15 Oct 2009, at 19:12, Derek Chen-Becker wrote: Did this discussion ever lead to anything concrete? I just had to update part of the book that talks about this and I added a note to follow-up in case we need to document a change in 1.1. In particular, if people have 1.1 code that uses the current (according to David, broken) functionality, it's going to be a big surprise if the attributes suddenly disappear between releases. Can we at least do a deprecation and log a warning if we want to change the behavior? Derek On Mon, Aug 17, 2009 at 2:16 PM, Naftoli Gugenheim naftoli...@gmail.com wrote: What's the advantage of -? That it looks more like an arrow? Personally I'm fine either way, but I think the important question is what most people find conveys the intent. I wish I would get more responses to the question! :) One the one hand - goes hand in hand with - for regular binds, while % doesn't look like an arrow but it does say attribute in it! Maybe %- ? -% ? %% ? Not sure what happened to the formatting! How do I make sure it stays? (I'm using GMail now.) Here's a screenshot :) tmp.jpg On Mon, Aug 17, 2009 at 4:07 PM, marius d. marius.dan...@gmail.com wrote: One small advice ... your code would probably be be read by more people if some minimal formatting is applied :) ... I can imagine you didn't do it on purpose though :) Actually I like it. Just something really unimportant and subjective: how do you feel about - instead of % ? (I understood your rationale of choosing %) Br's, Marius On Aug 17, 10:02 pm, Naftoli Gugenheim naftoli...@gmail.com wrote: Hi, sorry, not sure why I didn't see your message earlier. Strange... Has anyone written any code to address this topic in the meantime? In case not, here's all the code I've written for such purposes; tell me what you think. def keepAttrs(elem: Elem) = (ns: NodeSeq) = BindHelpers.currentNode match { case Full(inElem) = elem % inElem.attributes case other = elem } protected class Keepable(elem: Elem) { def %% = keepAttrs(elem) } implicit def elemToKeepable(elem: Elem): Keepable = new Keepable(elem) protected class KeepBind(name: String) { val emptyFn: NodeSeq=NodeSeq = _ = NodeSeq.Empty import scala.xml.{Node, Text} import net.liftweb.util.Bindable def %(in: Elem) = FuncBindParam(name, keepAttrs(in)) def %(in: Box[Elem]) = FuncBindParam(name, in.map(keepAttrs) openOr emptyFn) def %(in: Option[Elem]) = FuncBindParam(name, in.map(keepAttrs) getOrElse emptyFn) } implicit def strToKeepAssoc(name: String): KeepBind = new KeepBind (name) keepAttrs could actually be implemented shorter: elem currentNode.map(_.attributes).openOr(scala.xml.Null)) etc. On Fri, Aug 14, 2009 at 4:50 PM, marius d. marius.dan...@gmail.com wrote: IMHO: The problem with name some_new_operator_beside_- expr would lead to a handful of overloading as - in SuperArrowAssoc. Looks a little messy to me. Looks like we already have a way to do this: import Helpers._ name - {node: NodeSeq = mixinAttributes(expr _that_yields_an_Elem) (node)} Would that be too ... boilerplate for you? Br's, Marius On Aug 14, 11:18 pm, Naftoli Gugenheim naftoli...@gmail.com wrote: As I mentioned, I wrote some code that allows you to use % instead of - to preserve the attributes. (I chose it because the % symbol is used to merge attributes to an Elem.) The right side can be an Elem or a Box/Option of an Elem. What do people think of this syntax? P.S. Another way is to append .%% to an Elem making it into a NodeSeq function. - marius d.marius.dan...@gmail.com wrote: The book exposes current functionality for Lift 1.0. If functionality X was not intended to be there is a different story, but regardless it is there and the way I see it it is OK to be in the book. Personally I don't see it as defect as preserving attributes (to the top level resulting NodeSeq) may be quite handy in certain situations even that contradicts David's design intent. But this is just a personal opinion. After David removes this, a helper to copy attributes is needed IMO. So Naftoli if you want to do this please go ahead ... or if you don't want it I'll do it. Br's, Marius On Aug 14, 7:43 pm, Naftoli Gugenheim naftoli...@gmail.com wrote: The book seems to think it's intentional! But why can't unprefixed nodes by preserved automatically? Maybe there could be a setting? Thanks. - David Pollakfeeder.of.the.be...@gmail.com wrote: On Fri, Aug 14, 2009 at 9:23 AM, Naftoli Gugenheim naftoli...@gmail.comwrote:
[Lift] Re: DB logging logs statements twice?
That's +2 to removing the logging from runPreparedStatement? Any other feelings one way or the other? Derek On Thu, Oct 15, 2009 at 8:13 AM, Viktor Klang viktor.kl...@gmail.comwrote: I vote for DB.exec On Thu, Oct 15, 2009 at 4:09 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: OK, I found what's happening. Logging is getting called in the private DB.runPreparedStatement, and also in the DB.exec method. Mapper uses exec within the runPreparedStatement call. It seems like exec is the more appropriate place to be running the logging, since you could have multiple execs on a prepared statement but you generally wouldn't prepare a statement without executing it. Thoughts on removing the logging from runPreparedStatement? Derek On Wed, Oct 14, 2009 at 11:42 PM, Derek Chen-Becker dchenbec...@gmail.com wrote: I don't think so. In this case I'm seeing a ResultSet in both log entries, which shouldn't show up in the part where it's being prepared. Derek On Tue, Oct 13, 2009 at 6:09 PM, Jonathan Ferguson j...@spiralarm.comwrote: Is this related to a previous query dated 15 Sept, the title was [Lift] Mapper: Why is every SQL query sent twice? (second time with NULL parameters) The response from @dpp was The SQL is not being sent twice. There are two different points (when the Statement is created and after the Statement is executed) that the same query is logged. Cheers Jono 2009/10/14 Derek Chen-Becker dchenbec...@gmail.com OK, I'm seeing the same thing here. I'll open an issue and work on it. Derek On Tue, Oct 13, 2009 at 10:07 AM, harryh har...@gmail.com wrote: I'm also seeing this double logging behavior (using PostgreSQL. I was under the impression that it was happening because the SQL statement is first prepared, and then executed (each of which cause a log entry). It's not critical or anything, but it would be nice if this could be fixed at some point. -harryh On Oct 13, 10:28 am, Derek Chen-Becker dchenbec...@gmail.com wrote: I'm not sure how that could be getting logged twice, especially since it's the exact same ResultSet being returned. When I tested this on my local app (against both PG and MySQL) I didn't get this behavior, but I'll try pulling from master and testing again just in case something changed. Derek On Tue, Oct 13, 2009 at 6:56 AM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote: Hi, Just wanted to update to the new db logging by adding the following to boot: DB.addLogFunc { case (query:DBLog, time) = { LogBoot.loggerByName(query).info( All queries took + time + ms: ) query.statementEntries.foreach({ case DBLogEntry(stmt, duration) = LogBoot.loggerByName(query).info(+stmt + took + duration + ms)}) LogBoot.loggerByName(query).info( End queries) } } But it seems all executed statements are logged twice. I have this snippet: def currentUser(xhtml: Group): NodeSeq = Text(User.currentUser.dmap(S.?(Anonym))(user = user.firstName + + user.lastName)) This logs: 14:46:09.068 [tp-1029120287-4] INFO query - All queries took 5ms: 14:46:09.068 [tp-1029120287-4] INFO query - Exec query SELECT users.id, users.firstname, users.lastname, users.email, users.locale, users.timezone, users.password_pw, users.password_slt, users.account_id, users.superuser, users.uniqueid, users.validated FROM users WHERE id = 2 (scale -5) : org.postgresql.jdbc4.jdbc4result...@77f31432 took 4ms 14:46:09.069 [tp-1029120287-4] INFO query - End queries 14:46:09.069 [tp-1029120287-4] INFO query - All queries took 8ms: 14:46:09.069 [tp-1029120287-4] INFO query - Exec query SELECT users.id, users.firstname, users.lastname, users.email, users.locale, users.timezone, users.password_pw, users.password_slt, users.account_id, users.superuser, users.uniqueid, users.validated FROM users WHERE id = 2 (scale -5) : org.postgresql.jdbc4.jdbc4result...@77f31432 took 4ms 14:46:09.069 [tp-1029120287-4] INFO query - End queries Note the same resultset. The postgres logs also shows that only a single statement is executed So, what did I miss? /Jeppe -- Viktor Klang Blog: klangism.blogspot.com Twttr: viktorklang Wave: viktor.kl...@googlewave.com Code: github.com/viktorklang AKKA Committer - akkasource.org Lift Committer - liftweb.com Atmosphere Committer - atmosphere.dev.java.net SoftPub founder: http://groups.google.com/group/softpub --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at
[Lift] Re: How much Scala knowledge is needed to start coding a simple blog with Lift?
David's Beginning Scala book is fantastic: it's perfectly paced, gets straight to the point, and is written in a nice voice. Peter Robinett On Oct 15, 4:41 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Thu, Oct 15, 2009 at 4:18 AM, Viktor Klang viktor.kl...@gmail.comwrote: I started Scala 2 years ago by reading the Lift code. so DPPs basically responsible for my Scala code... ;) So what you're saying is that you're all my fault... gak. ;-) On Thu, Oct 15, 2009 at 10:58 AM, opyate opy...@gmail.com wrote: Hello, I bought the Scala book in PDF format (Odersky/Spoon/Venners) and pretty much jumped around it (benefit of PDF is the hyperlinks) for about a week. I am probably proficient with everything in chapters 1-18 which is still pretty much beginner/novice level, but I need the web/book before I tackle most other concepts. But I just wanted to get my hands dirty with a couple of apps and dived straight in. You learn by doing. You learn by reading someone else's code, which is what I've been doing a lot with the Lift sources (I have a local Git clone, and set it up in Eclipse). So, in a nutshell: learn the Scala basics, and get your hands dirty. Open a console and faff about, then start writing apps! :-) What I've done so far can be found here: http://github.com/opyate/Ken http://github.com/opyate/yauser Happy coding! Juan On Oct 15, 6:07 am, ngocdaothanh ngocdaoth...@gmail.com wrote: Hi, I have experience with Rails and Java. I'm new to Scala and Lift. I want to ask how much Scala knowledge is needed to start coding a simple blog with Lift? Rails is easy to learn because it require little Ruby knowledge to get started. Having read the Lift book, I feel one must have some advanced Scala knowledge to get started. Could anyone provide some kind of guideline or curriculum of Scala and Lift to get started with Lift? I would like to write a simple blog to learn Lift. But don't know how much Scala knowledge I should have to jump in Lift. Thanks. -- Viktor Klang Blog: klangism.blogspot.com Twttr: viktorklang Wave: viktor.kl...@googlewave.com Code: github.com/viktorklang AKKA Committer - akkasource.org Lift Committer - liftweb.com Atmosphere Committer - atmosphere.dev.java.net SoftPub founder:http://groups.google.com/group/softpub -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Surf the harmonics --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Attributes question
Is that now part of the Lift library, or is that hand-coded? On Thu, Oct 15, 2009 at 12:59 PM, Timothy Perrett timo...@getintheloop.euwrote: Im using -% in production code and personally i think it looks fine! Cheers, Tim On 15 Oct 2009, at 19:12, Derek Chen-Becker wrote: Did this discussion ever lead to anything concrete? I just had to update part of the book that talks about this and I added a note to follow-up in case we need to document a change in 1.1. In particular, if people have 1.1 code that uses the current (according to David, broken) functionality, it's going to be a big surprise if the attributes suddenly disappear between releases. Can we at least do a deprecation and log a warning if we want to change the behavior? Derek On Mon, Aug 17, 2009 at 2:16 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: What's the advantage of -? That it looks more like an arrow?Personally I'm fine either way, but I think the important question is what most people find conveys the intent. I wish I would get more responses to the question! :) One the one hand - goes hand in hand with - for regular binds, while % doesn't look like an arrow but it does say attribute in it! Maybe %- ? -% ? %% ? Not sure what happened to the formatting! How do I make sure it stays? (I'm using GMail now.) Here's a screenshot :) tmp.jpg On Mon, Aug 17, 2009 at 4:07 PM, marius d. marius.dan...@gmail.comwrote: One small advice ... your code would probably be be read by more people if some minimal formatting is applied :) ... I can imagine you didn't do it on purpose though :) Actually I like it. Just something really unimportant and subjective: how do you feel about - instead of % ? (I understood your rationale of choosing %) Br's, Marius On Aug 17, 10:02 pm, Naftoli Gugenheim naftoli...@gmail.com wrote: Hi, sorry, not sure why I didn't see your message earlier. Strange... Has anyone written any code to address this topic in the meantime? In case not, here's all the code I've written for such purposes; tell me what you think. def keepAttrs(elem: Elem) = (ns: NodeSeq) = BindHelpers.currentNode match { case Full(inElem) = elem % inElem.attributes case other = elem } protected class Keepable(elem: Elem) { def %% = keepAttrs(elem) } implicit def elemToKeepable(elem: Elem): Keepable = new Keepable(elem) protected class KeepBind(name: String) { val emptyFn: NodeSeq=NodeSeq = _ = NodeSeq.Empty import scala.xml.{Node, Text} import net.liftweb.util.Bindable def %(in: Elem) = FuncBindParam(name, keepAttrs(in)) def %(in: Box[Elem]) = FuncBindParam(name, in.map(keepAttrs) openOr emptyFn) def %(in: Option[Elem]) = FuncBindParam(name, in.map(keepAttrs) getOrElse emptyFn) } implicit def strToKeepAssoc(name: String): KeepBind = new KeepBind(name) keepAttrs could actually be implemented shorter: elem currentNode.map(_.attributes).openOr(scala.xml.Null)) etc. On Fri, Aug 14, 2009 at 4:50 PM, marius d. marius.dan...@gmail.com wrote: IMHO: The problem with name some_new_operator_beside_- expr would lead to a handful of overloading as - in SuperArrowAssoc. Looks a little messy to me. Looks like we already have a way to do this: import Helpers._ name - {node: NodeSeq = mixinAttributes(expr _that_yields_an_Elem) (node)} Would that be too ... boilerplate for you? Br's, Marius On Aug 14, 11:18 pm, Naftoli Gugenheim naftoli...@gmail.com wrote: As I mentioned, I wrote some code that allows you to use % instead of - to preserve the attributes. (I chose it because the % symbol is used to merge attributes to an Elem.) The right side can be an Elem or a Box/Option of an Elem. What do people think of this syntax? P.S. Another way is to append .%% to an Elem making it into a NodeSeq function. - marius d.marius.dan...@gmail.com wrote: The book exposes current functionality for Lift 1.0. If functionality X was not intended to be there is a different story, but regardless it is there and the way I see it it is OK to be in the book. Personally I don't see it as defect as preserving attributes (to the top level resulting NodeSeq) may be quite handy in certain situations even that contradicts David's design intent. But this is just a personal opinion. After David removes this, a helper to copy attributes is needed IMO. So Naftoli if you want to do this please go ahead ... or if you don't want it I'll do it. Br's, Marius On Aug 14, 7:43 pm, Naftoli Gugenheim naftoli...@gmail.com wrote: The book seems to think it's intentional! But why can't unprefixed nodes by preserved automatically? Maybe there could be a setting? Thanks. - David Pollakfeeder.of.the.be...@gmail.com wrote: On Fri, Aug 14, 2009 at 9:23
[Lift] Re: How much Scala knowledge is needed to start coding a simple blog with Lift?
On Thu, Oct 15, 2009 at 12:02 PM, Peter Robinett pe...@bubblefoundry.comwrote: David's Beginning Scala book is fantastic: it's perfectly paced, gets straight to the point, and is written in a nice voice. Guess I owe you a beer for that promo :-) Peter Robinett On Oct 15, 4:41 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Thu, Oct 15, 2009 at 4:18 AM, Viktor Klang viktor.kl...@gmail.com wrote: I started Scala 2 years ago by reading the Lift code. so DPPs basically responsible for my Scala code... ;) So what you're saying is that you're all my fault... gak. ;-) On Thu, Oct 15, 2009 at 10:58 AM, opyate opy...@gmail.com wrote: Hello, I bought the Scala book in PDF format (Odersky/Spoon/Venners) and pretty much jumped around it (benefit of PDF is the hyperlinks) for about a week. I am probably proficient with everything in chapters 1-18 which is still pretty much beginner/novice level, but I need the web/book before I tackle most other concepts. But I just wanted to get my hands dirty with a couple of apps and dived straight in. You learn by doing. You learn by reading someone else's code, which is what I've been doing a lot with the Lift sources (I have a local Git clone, and set it up in Eclipse). So, in a nutshell: learn the Scala basics, and get your hands dirty. Open a console and faff about, then start writing apps! :-) What I've done so far can be found here: http://github.com/opyate/Ken http://github.com/opyate/yauser Happy coding! Juan On Oct 15, 6:07 am, ngocdaothanh ngocdaoth...@gmail.com wrote: Hi, I have experience with Rails and Java. I'm new to Scala and Lift. I want to ask how much Scala knowledge is needed to start coding a simple blog with Lift? Rails is easy to learn because it require little Ruby knowledge to get started. Having read the Lift book, I feel one must have some advanced Scala knowledge to get started. Could anyone provide some kind of guideline or curriculum of Scala and Lift to get started with Lift? I would like to write a simple blog to learn Lift. But don't know how much Scala knowledge I should have to jump in Lift. Thanks. -- Viktor Klang Blog: klangism.blogspot.com Twttr: viktorklang Wave: viktor.kl...@googlewave.com Code: github.com/viktorklang AKKA Committer - akkasource.org Lift Committer - liftweb.com Atmosphere Committer - atmosphere.dev.java.net SoftPub founder:http://groups.google.com/group/softpub -- 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 Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: How much Scala knowledge is needed to start coding a simple blog with Lift?
David, do you secretly work for a brewery somewhere? It seems like you either grant or receive beers on a regular basis ;-) -Ross On Oct 15, 2009, at 3:04 PM, David Pollak wrote: On Thu, Oct 15, 2009 at 12:02 PM, Peter Robinett pe...@bubblefoundry.com wrote: David's Beginning Scala book is fantastic: it's perfectly paced, gets straight to the point, and is written in a nice voice. Guess I owe you a beer for that promo :-) Peter Robinett On Oct 15, 4:41 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Thu, Oct 15, 2009 at 4:18 AM, Viktor Klang viktor.kl...@gmail.comwrote: I started Scala 2 years ago by reading the Lift code. so DPPs basically responsible for my Scala code... ;) So what you're saying is that you're all my fault... gak. ;-) On Thu, Oct 15, 2009 at 10:58 AM, opyate opy...@gmail.com wrote: Hello, I bought the Scala book in PDF format (Odersky/Spoon/Venners) and pretty much jumped around it (benefit of PDF is the hyperlinks) for about a week. I am probably proficient with everything in chapters 1-18 which is still pretty much beginner/novice level, but I need the web/book before I tackle most other concepts. But I just wanted to get my hands dirty with a couple of apps and dived straight in. You learn by doing. You learn by reading someone else's code, which is what I've been doing a lot with the Lift sources (I have a local Git clone, and set it up in Eclipse). So, in a nutshell: learn the Scala basics, and get your hands dirty. Open a console and faff about, then start writing apps! :-) What I've done so far can be found here: http://github.com/opyate/Ken http://github.com/opyate/yauser Happy coding! Juan On Oct 15, 6:07 am, ngocdaothanh ngocdaoth...@gmail.com wrote: Hi, I have experience with Rails and Java. I'm new to Scala and Lift. I want to ask how much Scala knowledge is needed to start coding a simple blog with Lift? Rails is easy to learn because it require little Ruby knowledge to get started. Having read the Lift book, I feel one must have some advanced Scala knowledge to get started. Could anyone provide some kind of guideline or curriculum of Scala and Lift to get started with Lift? I would like to write a simple blog to learn Lift. But don't know how much Scala knowledge I should have to jump in Lift. Thanks. -- Viktor Klang Blog: klangism.blogspot.com Twttr: viktorklang Wave: viktor.kl...@googlewave.com Code: github.com/viktorklang AKKA Committer - akkasource.org Lift Committer - liftweb.com Atmosphere Committer - atmosphere.dev.java.net SoftPub founder:http://groups.google.com/group/softpub -- 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 Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] run jetty
Hi all, I'm really excited with my recent finding of the wonderful, powerful lift. May be my question is too naive, but I did get: error executing database operation clean_insert, when I run jetty on my todo directory on Window XP machine. your help is highly appreciated! John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: How much Scala knowledge is needed to start coding a simple blog with Lift?
On Thu, Oct 15, 2009 at 12:05 PM, Ross Mellgren dri...@gmail.com wrote: David, do you secretly work for a brewery somewhere? It seems like you either grant or receive beers on a regular basis ;-) Nah... but it's a great currency, and always very liquid. ;-) -Ross On Oct 15, 2009, at 3:04 PM, David Pollak wrote: On Thu, Oct 15, 2009 at 12:02 PM, Peter Robinett pe...@bubblefoundry.comwrote: David's Beginning Scala book is fantastic: it's perfectly paced, gets straight to the point, and is written in a nice voice. Guess I owe you a beer for that promo :-) Peter Robinett On Oct 15, 4:41 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Thu, Oct 15, 2009 at 4:18 AM, Viktor Klang viktor.kl...@gmail.com wrote: I started Scala 2 years ago by reading the Lift code. so DPPs basically responsible for my Scala code... ;) So what you're saying is that you're all my fault... gak. ;-) On Thu, Oct 15, 2009 at 10:58 AM, opyate opy...@gmail.com wrote: Hello, I bought the Scala book in PDF format (Odersky/Spoon/Venners) and pretty much jumped around it (benefit of PDF is the hyperlinks) for about a week. I am probably proficient with everything in chapters 1-18 which is still pretty much beginner/novice level, but I need the web/book before I tackle most other concepts. But I just wanted to get my hands dirty with a couple of apps and dived straight in. You learn by doing. You learn by reading someone else's code, which is what I've been doing a lot with the Lift sources (I have a local Git clone, and set it up in Eclipse). So, in a nutshell: learn the Scala basics, and get your hands dirty. Open a console and faff about, then start writing apps! :-) What I've done so far can be found here: http://github.com/opyate/Ken http://github.com/opyate/yauser Happy coding! Juan On Oct 15, 6:07 am, ngocdaothanh ngocdaoth...@gmail.com wrote: Hi, I have experience with Rails and Java. I'm new to Scala and Lift. I want to ask how much Scala knowledge is needed to start coding a simple blog with Lift? Rails is easy to learn because it require little Ruby knowledge to get started. Having read the Lift book, I feel one must have some advanced Scala knowledge to get started. Could anyone provide some kind of guideline or curriculum of Scala and Lift to get started with Lift? I would like to write a simple blog to learn Lift. But don't know how much Scala knowledge I should have to jump in Lift. Thanks. -- Viktor Klang Blog: klangism.blogspot.com Twttr: viktorklang Wave: viktor.kl...@googlewave.com Code: github.com/viktorklang AKKA Committer - akkasource.org Lift Committer - liftweb.com Atmosphere Committer - atmosphere.dev.java.net SoftPub founder:http://groups.google.com/group/softpub -- 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 -- 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 liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Creating calculated fields in mapper
Have you made any progress? - Jeppe Nejsum Madsenje...@ingolfs.dk wrote: Naftoli Gugenheim naftoli...@gmail.com writes: What are you trying to do? Store a computed value in a database column? No Or have a fake MappedInt in your model whose value is not stored but calculated? Precisely. I think it would be nice to utilize the mapper machinery to display the data Does it work to just override 'is' or 'i_is' or one of those methods? Yes this does work if I just return some static value. The problem seems to occur when trying to use some of the values from the db fields. I thought it might have to do with all the values not being loaded yet, but when the object is being displayed in e.g. a list view, it should have been completely loaded? But yet I get -1 for both fieldOwner.id.is and id.is in the overridden is or toString /Jeppe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] [Sorta Not Related] Ummm.. at the risk of crashing my browser........
Who wants a wave invite? Not sure how long Google will take to process them.. but I have some! I just added the lifehack list to my wave account, and I think firefox nearly died. Quite amusing.. in many ways -- James A Barrows --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: How much Scala knowledge is needed to start coding a simple blog with Lift?
Can you outline the feature set it should have? And what is your time frame? - ngocdaothanhngocdaoth...@gmail.com wrote: Hi, I have experience with Rails and Java. I'm new to Scala and Lift. I want to ask how much Scala knowledge is needed to start coding a simple blog with Lift? Rails is easy to learn because it require little Ruby knowledge to get started. Having read the Lift book, I feel one must have some advanced Scala knowledge to get started. Could anyone provide some kind of guideline or curriculum of Scala and Lift to get started with Lift? I would like to write a simple blog to learn Lift. But don't know how much Scala knowledge I should have to jump in Lift. Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: run jetty
Some quick questions: Are you trying to follow the todo example in http://liftweb.net/docs/getting_started/mod_master.html ? Are you using an external database like mysql or are you using the built-in one? On Thu, Oct 15, 2009 at 3:03 PM, john banc...@gmail.com wrote: Hi all, I'm really excited with my recent finding of the wonderful, powerful lift. May be my question is too naive, but I did get: error executing database operation clean_insert, when I run jetty on my todo directory on Window XP machine. your help is highly appreciated! John -- Omnem crede diem tibi diluxisse supremum. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Sending a XML message to a Lift server
Both errors are because you broke up the line before the parenthesis. - GAmy_li...@me.com wrote: Hello Jon, your code is giving me two errors in the last two lines. (fragment of Main.scala):52: error: ambiguous reference to overloaded definition, both method fromInputStream in object Source of type (java.io.InputStream)scala.io.Source and method fromInputStream in object Source of type (java.io.InputStream,String)scala.io.Source match expected type ? scala.io.Source.fromInputStream ^ (fragment of Main.scala):53: error: value getLines is not a member of java.io.InputStream (conn.getInputStream).getLines.mkString ^ two errors found !!! discarding script preamble !!! discarding script preamble Any suggestions? Thanks, GA On Oct 14, 2009, at 8:35 PM, jon wrote: oh, if you want to parse directly into xml replace Source.fromInputStream(conn.getInputStream).getLines.mkString with XML.load(conn.getInputStream) On Oct 14, 2:32 pm, jon jonhoff...@gmail.com wrote: this should work: def post(url:URL, toPost:String):String = url.openConnection match { case conn: HttpURLConnection = { conn.setRequestMethod(POST) conn.setDoOutput(true) conn.connect conn.getOutputStream.write(toPost.getBytes()) scala.io.Source.fromInputStream (conn.getInputStream).getLines.mkString } } On Oct 14, 2:22 pm, GA my_li...@me.com wrote: Hello guys, I have created a small web service in Lift. It has two services: One reads a row from a table in a database and the other writes one. To test the API I am writing a small client application in scala to read and write from the Lift API. Since I am new to scala and lift, I am thinking the code in Java and writing in scala, and of course I am having some problems because of that. When I read from the Lift service, the service answers correctly, but my client method reads one line and ends the loop. I believe that the syntax of my for comprehension is not correct. This is my reader code: import java.net._ import java.io._ def read { val url = new URL(http://localhost:8080/api/getPerson/myrow ) var connection = url.openConnection connection.setDoOutput(true); var in = new BufferedReader(new InputStreamReader (connection.getInputStream())); var incomingMsg = **Loop with the problem*** for (decodedString - in.readLine) { incomingMsg = incomingMsg + decodedString } in.close(); println(incomingMsg) } My second problem is when i try to send a message to the API i receive the following java error: java.io.FileNotFoundException:http://localhost:8080/api/getPerson The error happens when the method tries to read the answers from the API. This is the code: def send { val message = root action/action person userNameJose/userName firstNameJose/firstName lastNamePerez/lastName passworda/password emaila...@.com/email createdon10/12/2009/createdon createdbyJose/createdby updatedon10/12/2009/updatedon updatedbyJose/updatedby /person /root val url = new URL(http://localhost:8080/api/getPerson;) var connection = url.openConnection connection.setDoOutput(true); var outgoingMsg = message.toString var out = new OutputStreamWriter (connection.getOutputStream()); out.write(string= + outgoingMsg); out.close(); ***The error happens in the next line** var in = new BufferedReader(new InputStreamReader (connection.getInputStream())); //var decodedString = for (decodedString - in.readLine) println(decodedString) in.close(); } Any ideas? and, by the way, are there scala packages to replace java.net and java.io? Thanks in advance, GA --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: URL in PlainMailBodyType to BlackBerry
Do you have evidence that it ever will auto-highlight URLs in plain text emails? E.g. some email from your client? -Ross On Oct 15, 2009, at 3:18 PM, Naftoli Gugenheim wrote: It isn't not handling the message, it's just not automatically hyperlinking the URL. Any other ideas? Thanks. - Derek Chen-Beckerdchenbec...@gmail.com wrote: The way that Lift uses the API we don't support sending non-multipart messages. I suppose that this could be refactored to support single part MIME messages, but I really have trouble believing that a BlackBerry can't handle it. Derek On Mon, Oct 12, 2009 at 9:38 PM, Naftoli Gugenheim naftoli...@gmail.com wrote: True, I may have to do that at some point, although I'm not super confident I'll find such specs. What do you say to Ross's comment? Why is it multipart? - David Pollakfeeder.of.the.be...@gmail.com wrote: On Mon, Oct 12, 2009 at 6:17 PM, Naftoli Gugenheim naftoli...@gmail.com wrote: Does this help? It's from GMail / Show original GMail munges things, so I don't know if that's the original message. You might want to figure out what the specs are for blackberry to convert messages and see why this kind of message is not being converted. Delivered-To: naftoli...@gmail.com Received: by 10.86.30.11 with SMTP id d11cs12302fgd; Wed, 7 Oct 2009 12:28:57 -0700 (PDT) Received: by 10.229.19.149 with SMTP id a21mr391667qcb. 29.1254943736364; Wed, 07 Oct 2009 12:28:56 -0700 (PDT) Return-Path: yehu...@lrbcol.org Received: from lrbcol (174-143-236-122.static.slicehost.net [174.143.236.122]) by mx.google.com with ESMTP id 1si71430296yxe.11.2009.10.07.12.28.55; Wed, 07 Oct 2009 12:28:56 -0700 (PDT) Received-SPF: neutral (google.com: 174.143.236.122 is neither permitted nor denied by best guess record for domain of yehu...@lrbcol.org) client-ip=174.143.236.122; Authentication-Results: mx.google.com; spf=neutral (google.com: 174.143.236.122 is neither permitted nor denied by best guess record for domain of yehu...@lrbcol.org) smtp.mail=yehu...@lrbcol.org Received: from lrbcol (localhost [127.0.0.1]) by lrbcol (Postfix) with ESMTP id CDB51A0055 for naftoli...@gmail.com; Wed, 7 Oct 2009 15:28:56 -0400 (EDT) From: yehu...@lrbcol.org To: naftoli...@gmail.com Message-ID: 2107786874.01254943736214.javamail.r...@lrbcol Subject: Detail of Transportation #843 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary==_Part_0_1227069312.1254943735894 Date: Wed, 7 Oct 2009 15:28:56 -0400 (EDT) --=_Part_0_1227069312.1254943735894 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit naftuli gugenheim; 617 6st ; M: 7325342893; From : ; To : 39 hearth ct; Request URL: [TODO] --=_Part_0_1227069312.1254943735894-- On Mon, Oct 12, 2009 at 6:15 PM, David Pollak feeder.of.the.be...@gmail.com wrote: Please send some test email to an account you can access using Thunderbird. Open the message and look at the message source. Is it really plain text? What do the headers say it is? On Mon, Oct 12, 2009 at 1:11 PM, Naftoli Gugenheim naftoli...@gmail.com wrote: Hi. I'm sending an email using PlainMailBodyType that contains a URL. Normally when a BlackBerry receives a plain text email it automatically hyperlinks URLS and potential phone numbers. For some reason this email is not being hyperlinked on the BlackBerry. Is it possible that it's somehow not purely plain text? How would I solve this? I don't want to send HTML messages because some recipients may not be able to view it. Thanks. -- 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 -- 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 liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Another Newbie Question (Last one for a while, Promise!)
I had a similar requirement, so I factored out ItemsListEditor. Subclass it and override its items with an ItemsList subclass. You can also override title, onInsert/Remove/Submit, sortFn, and fieldFilter. Actually you have to override items and title because they're abstract. Then use the ItemsListEditor instance's edit method as the snippet function. If you have any other questions please ask! - Davedavidtgoldb...@gmail.com wrote: After checking the table editor example, I was keen to try it out, and it works GREAT. So thanks for all of your hard work. Here is my problem though. I want to filter the table so that only entries linked to a certain user are displayed. So for instance say I have class foo: class Foo extends LongKeyedMapper[Foo] with IdPK { ... object owner extends MappedLongForeignKey(this, Owner) } I want the table to only display the Foo if (Foo.owner == CurrentUser.id). I figure I can override the reload (to something like current = metaMapper.findAll(By) and save methods (to include the currentUserId) in the ItemList implementation, but then I'm having trouble conceptually figuring out how to inject my new extended type back into the TableEditor code, or if this is possible at all. Any help would be much appreciated. Thanks in advance. Dave --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: How much Scala knowledge is needed to start coding a simple blog with Lift?
Generally for people new to scala but with primary intention to explore lift, I suggest the following Get David Pollak's Beginning Scala book, read ch 1-5. (I still think it's a good idea to read ch 6 to know how actors work, but for using lift, you can put it in the back burner.) Then start on lift tutorial. Since you already know java and rails. A bunch of David's comparions to Ruby/Java will feel right at home for you. Also with IntelliJ now have a opensource community edition with scala support. I highly recommend that as a Scala IDE. But for the purpose of learning, The Scala Repl will be enough for exploring. Good luck and have fun. On Thu, Oct 15, 2009 at 1:07 AM, ngocdaothanh ngocdaoth...@gmail.com wrote: Hi, I have experience with Rails and Java. I'm new to Scala and Lift. I want to ask how much Scala knowledge is needed to start coding a simple blog with Lift? Rails is easy to learn because it require little Ruby knowledge to get started. Having read the Lift book, I feel one must have some advanced Scala knowledge to get started. Could anyone provide some kind of guideline or curriculum of Scala and Lift to get started with Lift? I would like to write a simple blog to learn Lift. But don't know how much Scala knowledge I should have to jump in Lift. Thanks. -- Omnem crede diem tibi diluxisse supremum. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Help obtaining SQL Server version numbers
I don't have access to any SQL Server instances, so I was wondering if someone out there who does could help me. In order to do some version-specific behavior in Mapper/Schemifier, I need major and minor version numbers for SQL Server. I've been googling around, and I found this doc: http://support.microsoft.com/kb/321185 I would like to confirm that the major and minor versions returned in the JDBC metadata matches this document. The attached Scala script can be run to get the major and minor versions from a particular JDBC connection. Just run it like: $ scala -cp your jdbc driver JAR here JDBCVersioner.scala JDBC url user pass If you can let me know what the values returned are for your instance, and what the official name of your version is, that would help me a lot. Thanks! Derek --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~--- args match { case Array(url,user,pass) = { import java.sql.DriverManager val conn = DriverManager.getConnection(url,user,pass) val data = conn.getMetaData println(%s : %s, %s.format(data.getDatabaseProductName, data.getDatabaseMajorVersion, data.getDatabaseMinorVersion)) conn.close } case _ = { println(Usage: JDBCVersioner url user pass)} }
[Lift] Re: URL in PlainMailBodyType to BlackBerry
If you really want, you could send me a private message with your email address and I can send you a message that I'm absolutely sure is plain text so that you could verify. Derek On Thu, Oct 15, 2009 at 1:23 PM, Ross Mellgren dri...@gmail.com wrote: Do you have evidence that it ever will auto-highlight URLs in plain text emails? E.g. some email from your client? -Ross On Oct 15, 2009, at 3:18 PM, Naftoli Gugenheim wrote: It isn't not handling the message, it's just not automatically hyperlinking the URL. Any other ideas? Thanks. - Derek Chen-Beckerdchenbec...@gmail.com wrote: The way that Lift uses the API we don't support sending non-multipart messages. I suppose that this could be refactored to support single part MIME messages, but I really have trouble believing that a BlackBerry can't handle it. Derek On Mon, Oct 12, 2009 at 9:38 PM, Naftoli Gugenheim naftoli...@gmail.com wrote: True, I may have to do that at some point, although I'm not super confident I'll find such specs. What do you say to Ross's comment? Why is it multipart? - David Pollakfeeder.of.the.be...@gmail.com wrote: On Mon, Oct 12, 2009 at 6:17 PM, Naftoli Gugenheim naftoli...@gmail.com wrote: Does this help? It's from GMail / Show original GMail munges things, so I don't know if that's the original message. You might want to figure out what the specs are for blackberry to convert messages and see why this kind of message is not being converted. Delivered-To: naftoli...@gmail.com Received: by 10.86.30.11 with SMTP id d11cs12302fgd; Wed, 7 Oct 2009 12:28:57 -0700 (PDT) Received: by 10.229.19.149 with SMTP id a21mr391667qcb. 29.1254943736364; Wed, 07 Oct 2009 12:28:56 -0700 (PDT) Return-Path: yehu...@lrbcol.org Received: from lrbcol (174-143-236-122.static.slicehost.net [174.143.236.122]) by mx.google.com with ESMTP id 1si71430296yxe.11.2009.10.07.12.28.55; Wed, 07 Oct 2009 12:28:56 -0700 (PDT) Received-SPF: neutral (google.com: 174.143.236.122 is neither permitted nor denied by best guess record for domain of yehu...@lrbcol.org) client-ip=174.143.236.122; Authentication-Results: mx.google.com; spf=neutral (google.com: 174.143.236.122 is neither permitted nor denied by best guess record for domain of yehu...@lrbcol.org) smtp.mail=yehu...@lrbcol.org Received: from lrbcol (localhost [127.0.0.1]) by lrbcol (Postfix) with ESMTP id CDB51A0055 for naftoli...@gmail.com; Wed, 7 Oct 2009 15:28:56 -0400 (EDT) From: yehu...@lrbcol.org To: naftoli...@gmail.com Message-ID: 2107786874.01254943736214.javamail.r...@lrbcol Subject: Detail of Transportation #843 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary==_Part_0_1227069312.1254943735894 Date: Wed, 7 Oct 2009 15:28:56 -0400 (EDT) --=_Part_0_1227069312.1254943735894 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit naftuli gugenheim; 617 6st ; M: 7325342893; From : ; To : 39 hearth ct; Request URL: [TODO] --=_Part_0_1227069312.1254943735894-- On Mon, Oct 12, 2009 at 6:15 PM, David Pollak feeder.of.the.be...@gmail.com wrote: Please send some test email to an account you can access using Thunderbird. Open the message and look at the message source. Is it really plain text? What do the headers say it is? On Mon, Oct 12, 2009 at 1:11 PM, Naftoli Gugenheim naftoli...@gmail.com wrote: Hi. I'm sending an email using PlainMailBodyType that contains a URL. Normally when a BlackBerry receives a plain text email it automatically hyperlinks URLS and potential phone numbers. For some reason this email is not being hyperlinked on the BlackBerry. Is it possible that it's somehow not purely plain text? How would I solve this? I don't want to send HTML messages because some recipients may not be able to view it. Thanks. -- 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 -- 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 liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Problem with RedirectResponse not honoring excludeFromContextPathRewriting
Recently dpp addressed an issue I filed to allow excluding certain URLs from context rewriting -- http://github.com/dpp/liftweb/issues/closed/#issue/83 However, I think there might be a place that this change missed, or I'm doing something wrong. Overall, looking at the code I'm not sure why it doesn't work. The problem is when using RedirectResponse -- it seems like RedirectResponses are not subject to the new exclusion check, and I can't figure out where in the Lift code they're being rewritten. I have this code in Boot: LiftRules.excludePathFromContextPathRewriting.default.set(() = path = { ... path.startsWith(/login)|| ... }) And then elsewhere, I have a SiteMap LocParam called NeedAnyRole (here, along with the supporting functions): val unauthorized: Loc.FailMsg = () = RedirectResponse(/login/ errorauth.jsp) /** Wrap the given If failure message with logging statements if debug logging is enabled */ def maybeWrapForLogging(reason: String, fail: Loc.FailMsg): Loc.FailMsg = logger.isDebugEnabled match { case true = () = { logger.debug(Failing SiteMap check ( + reason + ) for + SPx.loggedInUser.pxuser.map(_.getUsername).openOr (anonymous user)); fail() } case false = fail } /** Test for a role and if it is not found bounces out with a Unauthorized (well, redirect to /login/errorauth.jsp) */ object NeedAnyRole { def apply(fail: Loc.FailMsg, roleNames: String*): If = If(() = roleNames.findIndexOf(roleName = SPx.hasRole(roleName)) = 0, maybeWrapForLogging(NeedAnyRole( + roleNames + ), fail)) def apply(roleNames: String*): If = apply(unauthorized, roleNames: _*) } When I fail this LocParam, here is what gets sent back to the browser (as seen by tcpdump) HTTP/1.1 302 Moved Temporarily Server: Apache-Coyote/1.1 P3P: policyref=/w3c/p3p.xml, CP=CAO DSP COR CURa ADMa DEVa CONo OUR IND PHY ONL UNI PUR FIN COM NAV DEM STA Location: /emailwizard/login/errorauth.jsp X-Lift-Version: 1.1-SNAPSHOT Content-Type: text/html;charset=utf-8 Content-Length: 1 Date: Wed, 14 Oct 2009 15:33:36.GMT The Location: field should be /login/errorauth.jsp since I have it excluded from context rewriting. This works with normal links and other things in HTML, just this redirect isn't working as expected. I did try to do a quick spelunk in the lift code, and it looks like it should be generating a correct InMemoryResponse with the location header set to whatever I pass in, however there's a comment there that indicates something later will touch it up: case class RedirectResponse(uri: String, cookies: HTTPCookie*) extends LiftResponse { // The Location URI is not resolved here, instead it is resolved with context path prior of sending the actual response def toResponse = InMemoryResponse(Array(0), List(Location - uri), cookies toList, 302) } Any ideas on where the problem is? -Ross --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: run jetty
yes, that is what I'm trying to do. Thank you for your quick response! On Thu, Oct 15, 2009 at 3:20 PM, Wilson MacGyver wmacgy...@gmail.comwrote: Some quick questions: Are you trying to follow the todo example in http://liftweb.net/docs/getting_started/mod_master.html ? Are you using an external database like mysql or are you using the built-in one? On Thu, Oct 15, 2009 at 3:03 PM, john banc...@gmail.com wrote: Hi all, I'm really excited with my recent finding of the wonderful, powerful lift. May be my question is too naive, but I did get: error executing database operation clean_insert, when I run jetty on my todo directory on Window XP machine. your help is highly appreciated! John -- Omnem crede diem tibi diluxisse supremum. -- John Zhang, Ph.D. 201-993-9089 Bancova www.bancova.com Power of E-Learning --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Problem with RedirectResponse not honoring excludeFromContextPathRewriting
I think this is caused by LiftServlet#sendResponse#fixHeaders code. Can you please open a ticket or re-open the existent one? I'll fix it if Dave doesn't do it faster. Br's, Marius On Oct 15, 10:47 pm, Ross Mellgren dri...@gmail.com wrote: Recently dpp addressed an issue I filed to allow excluding certain URLs from context rewriting --http://github.com/dpp/liftweb/issues/closed/#issue/83 However, I think there might be a place that this change missed, or I'm doing something wrong. Overall, looking at the code I'm not sure why it doesn't work. The problem is when using RedirectResponse -- it seems like RedirectResponses are not subject to the new exclusion check, and I can't figure out where in the Lift code they're being rewritten. I have this code in Boot: LiftRules.excludePathFromContextPathRewriting.default.set(() = path = { ... path.startsWith(/login) || ... }) And then elsewhere, I have a SiteMap LocParam called NeedAnyRole (here, along with the supporting functions): val unauthorized: Loc.FailMsg = () = RedirectResponse(/login/ errorauth.jsp) /** Wrap the given If failure message with logging statements if debug logging is enabled */ def maybeWrapForLogging(reason: String, fail: Loc.FailMsg): Loc.FailMsg = logger.isDebugEnabled match { case true = () = { logger.debug(Failing SiteMap check ( + reason + ) for + SPx.loggedInUser.pxuser.map(_.getUsername).openOr (anonymous user)); fail() } case false = fail } /** Test for a role and if it is not found bounces out with a Unauthorized (well, redirect to /login/errorauth.jsp) */ object NeedAnyRole { def apply(fail: Loc.FailMsg, roleNames: String*): If = If(() = roleNames.findIndexOf(roleName = SPx.hasRole(roleName)) = 0, maybeWrapForLogging(NeedAnyRole( + roleNames + ), fail)) def apply(roleNames: String*): If = apply(unauthorized, roleNames: _*) } When I fail this LocParam, here is what gets sent back to the browser (as seen by tcpdump) HTTP/1.1 302 Moved Temporarily Server: Apache-Coyote/1.1 P3P: policyref=/w3c/p3p.xml, CP=CAO DSP COR CURa ADMa DEVa CONo OUR IND PHY ONL UNI PUR FIN COM NAV DEM STA Location: /emailwizard/login/errorauth.jsp X-Lift-Version: 1.1-SNAPSHOT Content-Type: text/html;charset=utf-8 Content-Length: 1 Date: Wed, 14 Oct 2009 15:33:36.GMT The Location: field should be /login/errorauth.jsp since I have it excluded from context rewriting. This works with normal links and other things in HTML, just this redirect isn't working as expected. I did try to do a quick spelunk in the lift code, and it looks like it should be generating a correct InMemoryResponse with the location header set to whatever I pass in, however there's a comment there that indicates something later will touch it up: case class RedirectResponse(uri: String, cookies: HTTPCookie*) extends LiftResponse { // The Location URI is not resolved here, instead it is resolved with context path prior of sending the actual response def toResponse = InMemoryResponse(Array(0), List(Location - uri), cookies toList, 302) } Any ideas on where the problem is? -Ross --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Overriding date/time formatting
OK, I'm starting to dig into this and I'm finding that a lot of stuff in TimeHelpers essentially replicates stuff that's already in JodaTime. Does anyone see a problem with doing an overhaul of TimeHelpers in addition to the Mapper stuff? I'll keep the API the same, it should just reduce a lot of the actual impl code. For example, TimeHelpers.DateExtension exists purely to allow a Date with a time of 00:00. The code will change from: def noTime = { val calendar = Calendar.getInstance calendar.set(Calendar.HOUR_OF_DAY, 0) calendar.set(Calendar.MINUTE, 0) calendar.set(Calendar.SECOND, 0) calendar.set(Calendar.MILLISECOND, 0) calendar.getTime } to def noTime = new DateTime().withTime(0,0,0,0) Actually, I'm not sure that the original code is correct, either, since DateExtension takes a Date parameter that is never used in the original code. Derek On Fri, Oct 9, 2009 at 12:36 AM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote: Derek Chen-Becker dchenbec...@gmail.com writes: I'm planning on making the formatting easier to configure and also to move the Mapper stuff to Joda Time. I know I keep saying this but I hope to start working on this next week :P Awesome! /Jeppe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Welcome Dirk Louwers to the Lift committers
Welcome Dirk! On Thu, Oct 15, 2009 at 9:46 AM, David Pollak feeder.of.the.be...@gmail.com wrote: Folks, Please join me in welcoming Dirk to the Lift committers. Dirk is going to integrate Ext.Js (the MIT licensed part of it) into Lift. Welcome Dirk and we look forward to your contributions! 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 liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: URL in PlainMailBodyType to BlackBerry
Yes, sure. Most smartphones do, I believe. Now my client informed me as follows. When he receives this message the email view has an option to switch between HTML view and plain text view. When he switches to plain text it does hyperlink the URL. However if I send say an SMS to his email address there's no such choice; it knows it's plain text. So I'm guessing that it's a bug on RIM's part, that multipart messages default to HTML view even if they're plain text. This is on a brand new BlackBerry (5.0). So as a workaround it would be great if Lift would support non-multipart. Thanks. - Ross Mellgrendri...@gmail.com wrote: Do you have evidence that it ever will auto-highlight URLs in plain text emails? E.g. some email from your client? -Ross On Oct 15, 2009, at 3:18 PM, Naftoli Gugenheim wrote: It isn't not handling the message, it's just not automatically hyperlinking the URL. Any other ideas? Thanks. - Derek Chen-Beckerdchenbec...@gmail.com wrote: The way that Lift uses the API we don't support sending non-multipart messages. I suppose that this could be refactored to support single part MIME messages, but I really have trouble believing that a BlackBerry can't handle it. Derek On Mon, Oct 12, 2009 at 9:38 PM, Naftoli Gugenheim naftoli...@gmail.com wrote: True, I may have to do that at some point, although I'm not super confident I'll find such specs. What do you say to Ross's comment? Why is it multipart? - David Pollakfeeder.of.the.be...@gmail.com wrote: On Mon, Oct 12, 2009 at 6:17 PM, Naftoli Gugenheim naftoli...@gmail.com wrote: Does this help? It's from GMail / Show original GMail munges things, so I don't know if that's the original message. You might want to figure out what the specs are for blackberry to convert messages and see why this kind of message is not being converted. Delivered-To: naftoli...@gmail.com Received: by 10.86.30.11 with SMTP id d11cs12302fgd; Wed, 7 Oct 2009 12:28:57 -0700 (PDT) Received: by 10.229.19.149 with SMTP id a21mr391667qcb. 29.1254943736364; Wed, 07 Oct 2009 12:28:56 -0700 (PDT) Return-Path: yehu...@lrbcol.org Received: from lrbcol (174-143-236-122.static.slicehost.net [174.143.236.122]) by mx.google.com with ESMTP id 1si71430296yxe.11.2009.10.07.12.28.55; Wed, 07 Oct 2009 12:28:56 -0700 (PDT) Received-SPF: neutral (google.com: 174.143.236.122 is neither permitted nor denied by best guess record for domain of yehu...@lrbcol.org) client-ip=174.143.236.122; Authentication-Results: mx.google.com; spf=neutral (google.com: 174.143.236.122 is neither permitted nor denied by best guess record for domain of yehu...@lrbcol.org) smtp.mail=yehu...@lrbcol.org Received: from lrbcol (localhost [127.0.0.1]) by lrbcol (Postfix) with ESMTP id CDB51A0055 for naftoli...@gmail.com; Wed, 7 Oct 2009 15:28:56 -0400 (EDT) From: yehu...@lrbcol.org To: naftoli...@gmail.com Message-ID: 2107786874.01254943736214.javamail.r...@lrbcol Subject: Detail of Transportation #843 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary==_Part_0_1227069312.1254943735894 Date: Wed, 7 Oct 2009 15:28:56 -0400 (EDT) --=_Part_0_1227069312.1254943735894 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit naftuli gugenheim; 617 6st ; M: 7325342893; From : ; To : 39 hearth ct; Request URL: [TODO] --=_Part_0_1227069312.1254943735894-- On Mon, Oct 12, 2009 at 6:15 PM, David Pollak feeder.of.the.be...@gmail.com wrote: Please send some test email to an account you can access using Thunderbird. Open the message and look at the message source. Is it really plain text? What do the headers say it is? On Mon, Oct 12, 2009 at 1:11 PM, Naftoli Gugenheim naftoli...@gmail.com wrote: Hi. I'm sending an email using PlainMailBodyType that contains a URL. Normally when a BlackBerry receives a plain text email it automatically hyperlinks URLS and potential phone numbers. For some reason this email is not being hyperlinked on the BlackBerry. Is it possible that it's somehow not purely plain text? How would I solve this? I don't want to send HTML messages because some recipients may not be able to view it. Thanks. -- 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 -- 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] Re: Help obtaining SQL Server version numbers
Sadly I cannot -- we use XADataSource and so I have no idea what a working JDBC URL is ;-) I replicated what your script does in BeanShell and ran it against my running JBoss instance, so hopefully it's sufficient: conn = com.paytronix.server.api.common.ServiceLocator.get (com.paytronix.server.api.datasource.ConnectionService.class ).acquireTransactionalConnection(foo, 1); md = conn.getMetaData(); md.getDatabaseMajorVersion() + , + md.getDatabaseMinorVersion() + , + md.getDatabaseProductName(); //over //output //error //encodingExceptions //result ?xml version=1.0 encoding=UTF-8? java version=1.6.0_15 class=java.beans.XMLDecoder string9,0,Microsoft SQL Server/string /java //over Ignore the //* gunk -- it's part of the protocol we use for beanshell. -Ross On Oct 15, 2009, at 3:51 PM, Derek Chen-Becker wrote: Could you do me a favor and run the script to make sure that it returns 9, 0? The Mapper code currently uses the separate major and minor version numbers because other DBs (PG, for example), do have different functionality between minor releases. Thanks, Derek On Thu, Oct 15, 2009 at 1:45 PM, Ross Mellgren dri...@gmail.com wrote: I have SQL Server 2005 SP2 here, and it reports 9.00.3042. I did not run your script, this version comes from DatabaseMetaData.getDatabaseProductVersion. -Ross On Oct 15, 2009, at 3:38 PM, Derek Chen-Becker wrote: I don't have access to any SQL Server instances, so I was wondering if someone out there who does could help me. In order to do some version-specific behavior in Mapper/Schemifier, I need major and minor version numbers for SQL Server. I've been googling around, and I found this doc: http://support.microsoft.com/kb/321185 I would like to confirm that the major and minor versions returned in the JDBC metadata matches this document. The attached Scala script can be run to get the major and minor versions from a particular JDBC connection. Just run it like: $ scala -cp your jdbc driver JAR here JDBCVersioner.scala JDBC url user pass If you can let me know what the values returned are for your instance, and what the official name of your version is, that would help me a lot. Thanks! Derek JDBCVersioner.scala --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Help obtaining SQL Server version numbers
Awesome, thanks! It looks like the version numbers in the real tables don't match up, but their example does. If anyone else can verify the values for 2000 and 2008, that would be great, otherwise I'll assume that the doc's examples are valid. Thanks, Derek On Thu, Oct 15, 2009 at 2:04 PM, Ross Mellgren dri...@gmail.com wrote: Sadly I cannot -- we use XADataSource and so I have no idea what a working JDBC URL is ;-) I replicated what your script does in BeanShell and ran it against my running JBoss instance, so hopefully it's sufficient: conn = com.paytronix.server.api.common.ServiceLocator.get(com.paytronix.server.api.datasource.ConnectionService.class).acquireTransactionalConnection(foo, 1); md = conn.getMetaData(); md.getDatabaseMajorVersion() + , + md.getDatabaseMinorVersion() + , + md.getDatabaseProductName(); //over //output //error //encodingExceptions //result ?xml version=1.0 encoding=UTF-8? java version=1.6.0_15 class=java.beans.XMLDecoder string9,0,Microsoft SQL Server/string /java //over Ignore the //* gunk -- it's part of the protocol we use for beanshell. -Ross On Oct 15, 2009, at 3:51 PM, Derek Chen-Becker wrote: Could you do me a favor and run the script to make sure that it returns 9, 0? The Mapper code currently uses the separate major and minor version numbers because other DBs (PG, for example), do have different functionality between minor releases. Thanks, Derek On Thu, Oct 15, 2009 at 1:45 PM, Ross Mellgren dri...@gmail.com wrote: I have SQL Server 2005 SP2 here, and it reports 9.00.3042. I did not run your script, this version comes from DatabaseMetaData.getDatabaseProductVersion. -Ross On Oct 15, 2009, at 3:38 PM, Derek Chen-Becker wrote: I don't have access to any SQL Server instances, so I was wondering if someone out there who does could help me. In order to do some version-specific behavior in Mapper/Schemifier, I need major and minor version numbers for SQL Server. I've been googling around, and I found this doc: http://support.microsoft.com/kb/321185 I would like to confirm that the major and minor versions returned in the JDBC metadata matches this document. The attached Scala script can be run to get the major and minor versions from a particular JDBC connection. Just run it like: $ scala -cp your jdbc driver JAR here JDBCVersioner.scala JDBC url user pass If you can let me know what the values returned are for your instance, and what the official name of your version is, that would help me a lot. Thanks! Derek JDBCVersioner.scala --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Problem with RedirectResponse not honoring excludeFromContextPathRewriting
Frankly I have no clue how to reopen things in the github issue tracker (me and the github issue tracker don't get along terribly well ;-) ), so I opened a new one: http://github.com/dpp/liftweb/issues/#issue/105 Thanks! -Ross On Oct 15, 2009, at 3:55 PM, Marius wrote: I think this is caused by LiftServlet#sendResponse#fixHeaders code. Can you please open a ticket or re-open the existent one? I'll fix it if Dave doesn't do it faster. Br's, Marius On Oct 15, 10:47 pm, Ross Mellgren dri...@gmail.com wrote: Recently dpp addressed an issue I filed to allow excluding certain URLs from context rewriting --http://github.com/dpp/liftweb/issues/closed/#issue/83 However, I think there might be a place that this change missed, or I'm doing something wrong. Overall, looking at the code I'm not sure why it doesn't work. The problem is when using RedirectResponse -- it seems like RedirectResponses are not subject to the new exclusion check, and I can't figure out where in the Lift code they're being rewritten. I have this code in Boot: LiftRules.excludePathFromContextPathRewriting.default.set(() = path = { ... path.startsWith(/login)|| ... }) And then elsewhere, I have a SiteMap LocParam called NeedAnyRole (here, along with the supporting functions): val unauthorized: Loc.FailMsg = () = RedirectResponse(/login/ errorauth.jsp) /** Wrap the given If failure message with logging statements if debug logging is enabled */ def maybeWrapForLogging(reason: String, fail: Loc.FailMsg): Loc.FailMsg = logger.isDebugEnabled match { case true = () = { logger.debug(Failing SiteMap check ( + reason + ) for + SPx.loggedInUser.pxuser.map(_.getUsername).openOr (anonymous user)); fail() } case false = fail } /** Test for a role and if it is not found bounces out with a Unauthorized (well, redirect to /login/errorauth.jsp) */ object NeedAnyRole { def apply(fail: Loc.FailMsg, roleNames: String*): If = If(() = roleNames.findIndexOf(roleName = SPx.hasRole(roleName)) = 0, maybeWrapForLogging(NeedAnyRole( + roleNames + ), fail)) def apply(roleNames: String*): If = apply(unauthorized, roleNames: _*) } When I fail this LocParam, here is what gets sent back to the browser (as seen by tcpdump) HTTP/1.1 302 Moved Temporarily Server: Apache-Coyote/1.1 P3P: policyref=/w3c/p3p.xml, CP=CAO DSP COR CURa ADMa DEVa CONo OUR IND PHY ONL UNI PUR FIN COM NAV DEM STA Location: /emailwizard/login/errorauth.jsp X-Lift-Version: 1.1-SNAPSHOT Content-Type: text/html;charset=utf-8 Content-Length: 1 Date: Wed, 14 Oct 2009 15:33:36.GMT The Location: field should be /login/errorauth.jsp since I have it excluded from context rewriting. This works with normal links and other things in HTML, just this redirect isn't working as expected. I did try to do a quick spelunk in the lift code, and it looks like it should be generating a correct InMemoryResponse with the location header set to whatever I pass in, however there's a comment there that indicates something later will touch it up: case class RedirectResponse(uri: String, cookies: HTTPCookie*) extends LiftResponse { // The Location URI is not resolved here, instead it is resolved with context path prior of sending the actual response def toResponse = InMemoryResponse(Array(0), List(Location - uri), cookies toList, 302) } Any ideas on where the problem is? -Ross --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: run jetty
on which step does this happen when you are following the tutorial? I just tried it on my laptop. mvn archetype:generate -U \ -DarchetypeGroupId=net.liftweb \ -DarchetypeArtifactId=lift-archetype-basic \ -DarchetypeVersion=1.0 \ -DremoteRepositories=http://scala-tools.org/repo-releases \ -DgroupId=com.liftworkshop \ -DartifactId=todo \ -Dversion=0.1-SNAPSHOT this creates the todo directory correctly I then cd todo and run mvn jetty:run, it started correctly. It reports the database create table was successful. Did you get this far while following the tutorial? On Thu, Oct 15, 2009 at 3:52 PM, j...@bancova.com banc...@gmail.com wrote: yes, that is what I'm trying to do. Thank you for your quick response! On Thu, Oct 15, 2009 at 3:20 PM, Wilson MacGyver wmacgy...@gmail.com wrote: Some quick questions: Are you trying to follow the todo example in http://liftweb.net/docs/getting_started/mod_master.html ? Are you using an external database like mysql or are you using the built-in one? On Thu, Oct 15, 2009 at 3:03 PM, john banc...@gmail.com wrote: Hi all, I'm really excited with my recent finding of the wonderful, powerful lift. May be my question is too naive, but I did get: error executing database operation clean_insert, when I run jetty on my todo directory on Window XP machine. your help is highly appreciated! John -- Omnem crede diem tibi diluxisse supremum. -- John Zhang, Ph.D. 201-993-9089 Bancova www.bancova.com Power of E-Learning -- Omnem crede diem tibi diluxisse supremum. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: [Sorta Not Related] Ummm.. at the risk of crashing my browser........
I'd love to try it out. Derek On Thu, Oct 15, 2009 at 1:18 PM, Jim Barrows jim.barr...@gmail.com wrote: Who wants a wave invite? Not sure how long Google will take to process them.. but I have some! I just added the lifehack list to my wave account, and I think firefox nearly died. Quite amusing.. in many ways -- James A Barrows --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Extracting FieldIdentifer names from a list of FieldErrors
On Thu, Oct 15, 2009 at 5:05 PM, David Pollak feeder.of.the.be...@gmail.com wrote: [...] I would think that this could have a better default value, e.g. the same of the mapped field for instance Yep. Please open a ticket. Done. http://github.com/dpp/liftweb/issues/#issue/106 /Jeppe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Attributes question
Yes, David added it. - Derek Chen-Beckerdchenbec...@gmail.com wrote: Is that now part of the Lift library, or is that hand-coded? On Thu, Oct 15, 2009 at 12:59 PM, Timothy Perrett timo...@getintheloop.euwrote: Im using -% in production code and personally i think it looks fine! Cheers, Tim On 15 Oct 2009, at 19:12, Derek Chen-Becker wrote: Did this discussion ever lead to anything concrete? I just had to update part of the book that talks about this and I added a note to follow-up in case we need to document a change in 1.1. In particular, if people have 1.1 code that uses the current (according to David, broken) functionality, it's going to be a big surprise if the attributes suddenly disappear between releases. Can we at least do a deprecation and log a warning if we want to change the behavior? Derek On Mon, Aug 17, 2009 at 2:16 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: What's the advantage of -? That it looks more like an arrow?Personally I'm fine either way, but I think the important question is what most people find conveys the intent. I wish I would get more responses to the question! :) One the one hand - goes hand in hand with - for regular binds, while % doesn't look like an arrow but it does say attribute in it! Maybe %- ? -% ? %% ? Not sure what happened to the formatting! How do I make sure it stays? (I'm using GMail now.) Here's a screenshot :) tmp.jpg On Mon, Aug 17, 2009 at 4:07 PM, marius d. marius.dan...@gmail.comwrote: One small advice ... your code would probably be be read by more people if some minimal formatting is applied :) ... I can imagine you didn't do it on purpose though :) Actually I like it. Just something really unimportant and subjective: how do you feel about - instead of % ? (I understood your rationale of choosing %) Br's, Marius On Aug 17, 10:02 pm, Naftoli Gugenheim naftoli...@gmail.com wrote: Hi, sorry, not sure why I didn't see your message earlier. Strange... Has anyone written any code to address this topic in the meantime? In case not, here's all the code I've written for such purposes; tell me what you think. def keepAttrs(elem: Elem) = (ns: NodeSeq) = BindHelpers.currentNode match { case Full(inElem) = elem % inElem.attributes case other = elem } protected class Keepable(elem: Elem) { def %% = keepAttrs(elem) } implicit def elemToKeepable(elem: Elem): Keepable = new Keepable(elem) protected class KeepBind(name: String) { val emptyFn: NodeSeq=NodeSeq = _ = NodeSeq.Empty import scala.xml.{Node, Text} import net.liftweb.util.Bindable def %(in: Elem) = FuncBindParam(name, keepAttrs(in)) def %(in: Box[Elem]) = FuncBindParam(name, in.map(keepAttrs) openOr emptyFn) def %(in: Option[Elem]) = FuncBindParam(name, in.map(keepAttrs) getOrElse emptyFn) } implicit def strToKeepAssoc(name: String): KeepBind = new KeepBind(name) keepAttrs could actually be implemented shorter: elem currentNode.map(_.attributes).openOr(scala.xml.Null)) etc. On Fri, Aug 14, 2009 at 4:50 PM, marius d. marius.dan...@gmail.com wrote: IMHO: The problem with name some_new_operator_beside_- expr would lead to a handful of overloading as - in SuperArrowAssoc. Looks a little messy to me. Looks like we already have a way to do this: import Helpers._ name - {node: NodeSeq = mixinAttributes(expr _that_yields_an_Elem) (node)} Would that be too ... boilerplate for you? Br's, Marius On Aug 14, 11:18 pm, Naftoli Gugenheim naftoli...@gmail.com wrote: As I mentioned, I wrote some code that allows you to use % instead of - to preserve the attributes. (I chose it because the % symbol is used to merge attributes to an Elem.) The right side can be an Elem or a Box/Option of an Elem. What do people think of this syntax? P.S. Another way is to append .%% to an Elem making it into a NodeSeq function. - marius d.marius.dan...@gmail.com wrote: The book exposes current functionality for Lift 1.0. If functionality X was not intended to be there is a different story, but regardless it is there and the way I see it it is OK to be in the book. Personally I don't see it as defect as preserving attributes (to the top level resulting NodeSeq) may be quite handy in certain situations even that contradicts David's design intent. But this is just a personal opinion. After David removes this, a helper to copy attributes is needed IMO. So Naftoli if you want to do this please go ahead ... or if you don't want it I'll do it. Br's, Marius On Aug 14, 7:43 pm, Naftoli Gugenheim naftoli...@gmail.com wrote: The book seems to think it's intentional! But why can't unprefixed nodes by preserved automatically? Maybe there could be a setting? Thanks.
[Lift] Re: Attributes question
There's also the _id_ arrow, which uses the element's name as the id attribute. - Derek Chen-Beckerdchenbec...@gmail.com wrote: Is that now part of the Lift library, or is that hand-coded? On Thu, Oct 15, 2009 at 12:59 PM, Timothy Perrett timo...@getintheloop.euwrote: Im using -% in production code and personally i think it looks fine! Cheers, Tim On 15 Oct 2009, at 19:12, Derek Chen-Becker wrote: Did this discussion ever lead to anything concrete? I just had to update part of the book that talks about this and I added a note to follow-up in case we need to document a change in 1.1. In particular, if people have 1.1 code that uses the current (according to David, broken) functionality, it's going to be a big surprise if the attributes suddenly disappear between releases. Can we at least do a deprecation and log a warning if we want to change the behavior? Derek On Mon, Aug 17, 2009 at 2:16 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: What's the advantage of -? That it looks more like an arrow?Personally I'm fine either way, but I think the important question is what most people find conveys the intent. I wish I would get more responses to the question! :) One the one hand - goes hand in hand with - for regular binds, while % doesn't look like an arrow but it does say attribute in it! Maybe %- ? -% ? %% ? Not sure what happened to the formatting! How do I make sure it stays? (I'm using GMail now.) Here's a screenshot :) tmp.jpg On Mon, Aug 17, 2009 at 4:07 PM, marius d. marius.dan...@gmail.comwrote: One small advice ... your code would probably be be read by more people if some minimal formatting is applied :) ... I can imagine you didn't do it on purpose though :) Actually I like it. Just something really unimportant and subjective: how do you feel about - instead of % ? (I understood your rationale of choosing %) Br's, Marius On Aug 17, 10:02 pm, Naftoli Gugenheim naftoli...@gmail.com wrote: Hi, sorry, not sure why I didn't see your message earlier. Strange... Has anyone written any code to address this topic in the meantime? In case not, here's all the code I've written for such purposes; tell me what you think. def keepAttrs(elem: Elem) = (ns: NodeSeq) = BindHelpers.currentNode match { case Full(inElem) = elem % inElem.attributes case other = elem } protected class Keepable(elem: Elem) { def %% = keepAttrs(elem) } implicit def elemToKeepable(elem: Elem): Keepable = new Keepable(elem) protected class KeepBind(name: String) { val emptyFn: NodeSeq=NodeSeq = _ = NodeSeq.Empty import scala.xml.{Node, Text} import net.liftweb.util.Bindable def %(in: Elem) = FuncBindParam(name, keepAttrs(in)) def %(in: Box[Elem]) = FuncBindParam(name, in.map(keepAttrs) openOr emptyFn) def %(in: Option[Elem]) = FuncBindParam(name, in.map(keepAttrs) getOrElse emptyFn) } implicit def strToKeepAssoc(name: String): KeepBind = new KeepBind(name) keepAttrs could actually be implemented shorter: elem currentNode.map(_.attributes).openOr(scala.xml.Null)) etc. On Fri, Aug 14, 2009 at 4:50 PM, marius d. marius.dan...@gmail.com wrote: IMHO: The problem with name some_new_operator_beside_- expr would lead to a handful of overloading as - in SuperArrowAssoc. Looks a little messy to me. Looks like we already have a way to do this: import Helpers._ name - {node: NodeSeq = mixinAttributes(expr _that_yields_an_Elem) (node)} Would that be too ... boilerplate for you? Br's, Marius On Aug 14, 11:18 pm, Naftoli Gugenheim naftoli...@gmail.com wrote: As I mentioned, I wrote some code that allows you to use % instead of - to preserve the attributes. (I chose it because the % symbol is used to merge attributes to an Elem.) The right side can be an Elem or a Box/Option of an Elem. What do people think of this syntax? P.S. Another way is to append .%% to an Elem making it into a NodeSeq function. - marius d.marius.dan...@gmail.com wrote: The book exposes current functionality for Lift 1.0. If functionality X was not intended to be there is a different story, but regardless it is there and the way I see it it is OK to be in the book. Personally I don't see it as defect as preserving attributes (to the top level resulting NodeSeq) may be quite handy in certain situations even that contradicts David's design intent. But this is just a personal opinion. After David removes this, a helper to copy attributes is needed IMO. So Naftoli if you want to do this please go ahead ... or if you don't want it I'll do it. Br's, Marius On Aug 14, 7:43 pm, Naftoli Gugenheim naftoli...@gmail.com wrote: The book seems to think it's intentional! But why can't unprefixed nodes by preserved automatically? Maybe there
[Lift] Re: run jetty
simple answer, do it as one line like this mvn archetype:generate -U -DarchetypeGroupId=net.liftweb -DarchetypeArtifactId=lift-archetype-basic -DarchetypeVersion=1.0 -DremoteRepositories=http://scala-tools.org/repo-releases -DgroupId=com.liftworkshop -DartifactId=todo -Dversion=0.1-SNAPSHOT On Thu, Oct 15, 2009 at 5:23 PM, j...@bancova.com banc...@gmail.com wrote: my problem is: 1) when i issued mvn archetype:generate -U \, the machine begins to run, and then complains that -DarchetypeGroupId=net.liftweb \ is not recognized as an internal or external command 2) then I just issued mvn archetype:generate -U and hit return. then the system will ask for GroupId and artifactId etc...I answered every thing...then it says Build Successful. However, two things wired happened: a) it never asked for remoteRepositories=, b) it gave me errors when I issued mvn jetty:run later. 3) I copied exactly your commands into mvn_todo.bat, and tried to click the file.nothing happened! thank you so much for your patience and your wonderful help! john On Thu, Oct 15, 2009 at 4:27 PM, Wilson MacGyver wmacgy...@gmail.com wrote: on which step does this happen when you are following the tutorial? I just tried it on my laptop. mvn archetype:generate -U \ -DarchetypeGroupId=net.liftweb \ -DarchetypeArtifactId=lift-archetype-basic \ -DarchetypeVersion=1.0 \ -DremoteRepositories=http://scala-tools.org/repo-releases \ -DgroupId=com.liftworkshop \ -DartifactId=todo \ -Dversion=0.1-SNAPSHOT this creates the todo directory correctly I then cd todo and run mvn jetty:run, it started correctly. It reports the database create table was successful. Did you get this far while following the tutorial? On Thu, Oct 15, 2009 at 3:52 PM, j...@bancova.com banc...@gmail.com wrote: yes, that is what I'm trying to do. Thank you for your quick response! On Thu, Oct 15, 2009 at 3:20 PM, Wilson MacGyver wmacgy...@gmail.com wrote: Some quick questions: Are you trying to follow the todo example in http://liftweb.net/docs/getting_started/mod_master.html ? Are you using an external database like mysql or are you using the built-in one? On Thu, Oct 15, 2009 at 3:03 PM, john banc...@gmail.com wrote: Hi all, I'm really excited with my recent finding of the wonderful, powerful lift. May be my question is too naive, but I did get: error executing database operation clean_insert, when I run jetty on my todo directory on Window XP machine. your help is highly appreciated! John -- Omnem crede diem tibi diluxisse supremum. -- John Zhang, Ph.D. 201-993-9089 Bancova www.bancova.com Power of E-Learning -- Omnem crede diem tibi diluxisse supremum. -- John Zhang, Ph.D. 201-993-9089 Bancova www.bancova.com Power of E-Learning -- Omnem crede diem tibi diluxisse supremum. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: run jetty
The backslash works on Linux, not Windows, as a line continuator. - Wilson MacGyverwmacgy...@gmail.com wrote: simple answer, do it as one line like this mvn archetype:generate -U -DarchetypeGroupId=net.liftweb -DarchetypeArtifactId=lift-archetype-basic -DarchetypeVersion=1.0 -DremoteRepositories=http://scala-tools.org/repo-releases -DgroupId=com.liftworkshop -DartifactId=todo -Dversion=0.1-SNAPSHOT On Thu, Oct 15, 2009 at 5:23 PM, j...@bancova.com banc...@gmail.com wrote: my problem is: 1) when i issued mvn archetype:generate -U \, the machine begins to run, and then complains that -DarchetypeGroupId=net.liftweb \ is not recognized as an internal or external command 2) then I just issued mvn archetype:generate -U and hit return. then the system will ask for GroupId and artifactId etc...I answered every thing...then it says Build Successful. However, two things wired happened: a) it never asked for remoteRepositories=, b) it gave me errors when I issued mvn jetty:run later. 3) I copied exactly your commands into mvn_todo.bat, and tried to click the file.nothing happened! thank you so much for your patience and your wonderful help! john On Thu, Oct 15, 2009 at 4:27 PM, Wilson MacGyver wmacgy...@gmail.com wrote: on which step does this happen when you are following the tutorial? I just tried it on my laptop. mvn archetype:generate -U \ -DarchetypeGroupId=net.liftweb \ -DarchetypeArtifactId=lift-archetype-basic \ -DarchetypeVersion=1.0 \ -DremoteRepositories=http://scala-tools.org/repo-releases \ -DgroupId=com.liftworkshop \ -DartifactId=todo \ -Dversion=0.1-SNAPSHOT this creates the todo directory correctly I then cd todo and run mvn jetty:run, it started correctly. It reports the database create table was successful. Did you get this far while following the tutorial? On Thu, Oct 15, 2009 at 3:52 PM, j...@bancova.com banc...@gmail.com wrote: yes, that is what I'm trying to do. Thank you for your quick response! On Thu, Oct 15, 2009 at 3:20 PM, Wilson MacGyver wmacgy...@gmail.com wrote: Some quick questions: Are you trying to follow the todo example in http://liftweb.net/docs/getting_started/mod_master.html ? Are you using an external database like mysql or are you using the built-in one? On Thu, Oct 15, 2009 at 3:03 PM, john banc...@gmail.com wrote: Hi all, I'm really excited with my recent finding of the wonderful, powerful lift. May be my question is too naive, but I did get: error executing database operation clean_insert, when I run jetty on my todo directory on Window XP machine. your help is highly appreciated! John -- Omnem crede diem tibi diluxisse supremum. -- John Zhang, Ph.D. 201-993-9089 Bancova www.bancova.com Power of E-Learning -- Omnem crede diem tibi diluxisse supremum. -- John Zhang, Ph.D. 201-993-9089 Bancova www.bancova.com Power of E-Learning -- Omnem crede diem tibi diluxisse supremum. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Overriding date/time formatting
OK, more nits to pick. There are two formats in TimeHelpers: hour and time. They seem very related, so I'm not sure why there's a distinction between the two. The default for hour is HH:mm:ss and for time it's HH:mm zzz. Derek On Thu, Oct 15, 2009 at 1:56 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: OK, I'm starting to dig into this and I'm finding that a lot of stuff in TimeHelpers essentially replicates stuff that's already in JodaTime. Does anyone see a problem with doing an overhaul of TimeHelpers in addition to the Mapper stuff? I'll keep the API the same, it should just reduce a lot of the actual impl code. For example, TimeHelpers.DateExtension exists purely to allow a Date with a time of 00:00. The code will change from: def noTime = { val calendar = Calendar.getInstance calendar.set(Calendar.HOUR_OF_DAY, 0) calendar.set(Calendar.MINUTE, 0) calendar.set(Calendar.SECOND, 0) calendar.set(Calendar.MILLISECOND, 0) calendar.getTime } to def noTime = new DateTime().withTime(0,0,0,0) Actually, I'm not sure that the original code is correct, either, since DateExtension takes a Date parameter that is never used in the original code. Derek On Fri, Oct 9, 2009 at 12:36 AM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote: Derek Chen-Becker dchenbec...@gmail.com writes: I'm planning on making the formatting easier to configure and also to move the Mapper stuff to Joda Time. I know I keep saying this but I hope to start working on this next week :P Awesome! /Jeppe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] JSON... deserializing lists of parameterized case classes
Howdy, I've got something like: final case class Foo[T](name: String) final case class ManyFoos(who: List[Foo[_]])) If I do JSON serialization/deserialization using lift-json, of an instance of ManyFoos, the deserialization stuff throws an exception. Is this expected or should I file a ticket? 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 liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Are we willing to make a breaking change for Joda Time?
Just asking, since I'm looking at bolting a lot of java.util.Date methods onto the innards of TimeHelpers so that the specs pass. Derek --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Are we willing to make a breaking change for Joda Time?
I'd prefer not the break the apis without deprecating them first On Thu, Oct 15, 2009 at 4:09 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: Just asking, since I'm looking at bolting a lot of java.util.Date methods onto the innards of TimeHelpers so that the specs pass. Derek -- 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 liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Are we willing to make a breaking change for Joda Time?
OK, will do. On Thu, Oct 15, 2009 at 5:18 PM, David Pollak feeder.of.the.be...@gmail.com wrote: I'd prefer not the break the apis without deprecating them first On Thu, Oct 15, 2009 at 4:09 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: Just asking, since I'm looking at bolting a lot of java.util.Date methods onto the innards of TimeHelpers so that the specs pass. Derek -- 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 liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: run jetty
i got it running! i followed your suggestion and did some change - put every thing in one line and copy this ONE line to c:\ mvn archetype:generate -U -DarchetypeGroupId=net.liftweb -DarchetypeArtifactId=lift-archetype-basic -DarchetypeVersion=1.0 -DremoteRepositories=http://scala-tools.org/repo-releases-DgroupId=com.liftworkshop -DartifactId=todo -Dversion=0.1-SNAPSHOT thank you so much for supporting me to make the first step john On Thu, Oct 15, 2009 at 5:34 PM, Wilson MacGyver wmacgy...@gmail.comwrote: simple answer, do it as one line like this mvn archetype:generate -U -DarchetypeGroupId=net.liftweb -DarchetypeArtifactId=lift-archetype-basic -DarchetypeVersion=1.0 -DremoteRepositories=http://scala-tools.org/repo-releases -DgroupId=com.liftworkshop -DartifactId=todo -Dversion=0.1-SNAPSHOT On Thu, Oct 15, 2009 at 5:23 PM, j...@bancova.com banc...@gmail.com wrote: my problem is: 1) when i issued mvn archetype:generate -U \, the machine begins to run, and then complains that -DarchetypeGroupId=net.liftweb \ is not recognized as an internal or external command 2) then I just issued mvn archetype:generate -U and hit return. then the system will ask for GroupId and artifactId etc...I answered every thing...then it says Build Successful. However, two things wired happened: a) it never asked for remoteRepositories=, b) it gave me errors when I issued mvn jetty:run later. 3) I copied exactly your commands into mvn_todo.bat, and tried to click the file.nothing happened! thank you so much for your patience and your wonderful help! john On Thu, Oct 15, 2009 at 4:27 PM, Wilson MacGyver wmacgy...@gmail.com wrote: on which step does this happen when you are following the tutorial? I just tried it on my laptop. mvn archetype:generate -U \ -DarchetypeGroupId=net.liftweb \ -DarchetypeArtifactId=lift-archetype-basic \ -DarchetypeVersion=1.0 \ -DremoteRepositories=http://scala-tools.org/repo-releases \ -DgroupId=com.liftworkshop \ -DartifactId=todo \ -Dversion=0.1-SNAPSHOT this creates the todo directory correctly I then cd todo and run mvn jetty:run, it started correctly. It reports the database create table was successful. Did you get this far while following the tutorial? On Thu, Oct 15, 2009 at 3:52 PM, j...@bancova.com banc...@gmail.com wrote: yes, that is what I'm trying to do. Thank you for your quick response! On Thu, Oct 15, 2009 at 3:20 PM, Wilson MacGyver wmacgy...@gmail.com wrote: Some quick questions: Are you trying to follow the todo example in http://liftweb.net/docs/getting_started/mod_master.html ? Are you using an external database like mysql or are you using the built-in one? On Thu, Oct 15, 2009 at 3:03 PM, john banc...@gmail.com wrote: Hi all, I'm really excited with my recent finding of the wonderful, powerful lift. May be my question is too naive, but I did get: error executing database operation clean_insert, when I run jetty on my todo directory on Window XP machine. your help is highly appreciated! John -- Omnem crede diem tibi diluxisse supremum. -- John Zhang, Ph.D. 201-993-9089 Bancova www.bancova.com Power of E-Learning -- Omnem crede diem tibi diluxisse supremum. -- John Zhang, Ph.D. 201-993-9089 Bancova www.bancova.com Power of E-Learning -- Omnem crede diem tibi diluxisse supremum. -- John Zhang, Ph.D. 201-993-9089 Bancova www.bancova.com Power of E-Learning --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: run jetty
congrats, welcome to the beginning of lift. On Thu, Oct 15, 2009 at 7:22 PM, j...@bancova.com banc...@gmail.com wrote: i got it running! i followed your suggestion and did some change - put every thing in one line and copy this ONE line to c:\ mvn archetype:generate -U -DarchetypeGroupId=net.liftweb -DarchetypeArtifactId=lift-archetype-basic -DarchetypeVersion=1.0 -DremoteRepositories=http://scala-tools.org/repo-releases -DgroupId=com.liftworkshop -DartifactId=todo -Dversion=0.1-SNAPSHOT thank you so much for supporting me to make the first step john On Thu, Oct 15, 2009 at 5:34 PM, Wilson MacGyver wmacgy...@gmail.com wrote: simple answer, do it as one line like this mvn archetype:generate -U -DarchetypeGroupId=net.liftweb -DarchetypeArtifactId=lift-archetype-basic -DarchetypeVersion=1.0 -DremoteRepositories=http://scala-tools.org/repo-releases -DgroupId=com.liftworkshop -DartifactId=todo -Dversion=0.1-SNAPSHOT On Thu, Oct 15, 2009 at 5:23 PM, j...@bancova.com banc...@gmail.com wrote: my problem is: 1) when i issued mvn archetype:generate -U \, the machine begins to run, and then complains that -DarchetypeGroupId=net.liftweb \ is not recognized as an internal or external command 2) then I just issued mvn archetype:generate -U and hit return. then the system will ask for GroupId and artifactId etc...I answered every thing...then it says Build Successful. However, two things wired happened: a) it never asked for remoteRepositories=, b) it gave me errors when I issued mvn jetty:run later. 3) I copied exactly your commands into mvn_todo.bat, and tried to click the file.nothing happened! thank you so much for your patience and your wonderful help! john On Thu, Oct 15, 2009 at 4:27 PM, Wilson MacGyver wmacgy...@gmail.com wrote: on which step does this happen when you are following the tutorial? I just tried it on my laptop. mvn archetype:generate -U \ -DarchetypeGroupId=net.liftweb \ -DarchetypeArtifactId=lift-archetype-basic \ -DarchetypeVersion=1.0 \ -DremoteRepositories=http://scala-tools.org/repo-releases \ -DgroupId=com.liftworkshop \ -DartifactId=todo \ -Dversion=0.1-SNAPSHOT this creates the todo directory correctly I then cd todo and run mvn jetty:run, it started correctly. It reports the database create table was successful. Did you get this far while following the tutorial? On Thu, Oct 15, 2009 at 3:52 PM, j...@bancova.com banc...@gmail.com wrote: yes, that is what I'm trying to do. Thank you for your quick response! On Thu, Oct 15, 2009 at 3:20 PM, Wilson MacGyver wmacgy...@gmail.com wrote: Some quick questions: Are you trying to follow the todo example in http://liftweb.net/docs/getting_started/mod_master.html ? Are you using an external database like mysql or are you using the built-in one? On Thu, Oct 15, 2009 at 3:03 PM, john banc...@gmail.com wrote: Hi all, I'm really excited with my recent finding of the wonderful, powerful lift. May be my question is too naive, but I did get: error executing database operation clean_insert, when I run jetty on my todo directory on Window XP machine. your help is highly appreciated! John -- Omnem crede diem tibi diluxisse supremum. -- John Zhang, Ph.D. 201-993-9089 Bancova www.bancova.com Power of E-Learning -- Omnem crede diem tibi diluxisse supremum. -- John Zhang, Ph.D. 201-993-9089 Bancova www.bancova.com Power of E-Learning -- Omnem crede diem tibi diluxisse supremum. -- John Zhang, Ph.D. 201-993-9089 Bancova www.bancova.com Power of E-Learning -- Omnem crede diem tibi diluxisse supremum. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: How much Scala knowledge is needed to start coding a simple blog with Lift?
Can you outline the feature set it should have? And what is your time frame? I study Lift in my free time, so basically there's no strict time frame. For a start, I would like to just study enough Scala to be able to use Lift, and just enough Lift to be able to create a simple blog as an exercise. The blog only has 2 resources: user and article. Because I have Java experience and I am working with Erlang full-time now, I am familiar with most ideas of Scala. I just feel that its syntax is too complicated, so for a start I only want to study enough Scala to be able to use Lift. Lift is my final target, Scala is a by- product :D. Thank you all. On Oct 16, 4:34 am, Wilson MacGyver wmacgy...@gmail.com wrote: Generally for people new to scala but with primary intention to explore lift, I suggest the following Get David Pollak's Beginning Scala book, read ch 1-5. (I still think it's a good idea to read ch 6 to know how actors work, but for using lift, you can put it in the back burner.) Then start on lift tutorial. Since you already know java and rails. A bunch of David's comparions to Ruby/Java will feel right at home for you. Also with IntelliJ now have a opensource community edition with scala support. I highly recommend that as a Scala IDE. But for the purpose of learning, The Scala Repl will be enough for exploring. Good luck and have fun. On Thu, Oct 15, 2009 at 1:07 AM, ngocdaothanh ngocdaoth...@gmail.com wrote: Hi, I have experience with Rails and Java. I'm new to Scala and Lift. I want to ask how much Scala knowledge is needed to start coding a simple blog with Lift? Rails is easy to learn because it require little Ruby knowledge to get started. Having read the Lift book, I feel one must have some advanced Scala knowledge to get started. Could anyone provide some kind of guideline or curriculum of Scala and Lift to get started with Lift? I would like to write a simple blog to learn Lift. But don't know how much Scala knowledge I should have to jump in Lift. Thanks. -- Omnem crede diem tibi diluxisse supremum. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: How much Scala knowledge is needed to start coding a simple blog with Lift?
Ah, like some frameworks like CakePHP have as a basic tutorial? Look on GitHub under examples/hellolift -- it seems to be a blog demo. (In case you're not familiar with the maven layout, the source folder is src/main/scala.) It may be helpful to copy the code from there manually, and try to understand each line one at a time. Although it's not the simplest possible blog; apparently it tries to show off a range of lift's features. - ngocdaothanhngocdaoth...@gmail.com wrote: Can you outline the feature set it should have? And what is your time frame? I study Lift in my free time, so basically there's no strict time frame. For a start, I would like to just study enough Scala to be able to use Lift, and just enough Lift to be able to create a simple blog as an exercise. The blog only has 2 resources: user and article. Because I have Java experience and I am working with Erlang full-time now, I am familiar with most ideas of Scala. I just feel that its syntax is too complicated, so for a start I only want to study enough Scala to be able to use Lift. Lift is my final target, Scala is a by- product :D. Thank you all. On Oct 16, 4:34 am, Wilson MacGyver wmacgy...@gmail.com wrote: Generally for people new to scala but with primary intention to explore lift, I suggest the following Get David Pollak's Beginning Scala book, read ch 1-5. (I still think it's a good idea to read ch 6 to know how actors work, but for using lift, you can put it in the back burner.) Then start on lift tutorial. Since you already know java and rails. A bunch of David's comparions to Ruby/Java will feel right at home for you. Also with IntelliJ now have a opensource community edition with scala support. I highly recommend that as a Scala IDE. But for the purpose of learning, The Scala Repl will be enough for exploring. Good luck and have fun. On Thu, Oct 15, 2009 at 1:07 AM, ngocdaothanh ngocdaoth...@gmail.com wrote: Hi, I have experience with Rails and Java. I'm new to Scala and Lift. I want to ask how much Scala knowledge is needed to start coding a simple blog with Lift? Rails is easy to learn because it require little Ruby knowledge to get started. Having read the Lift book, I feel one must have some advanced Scala knowledge to get started. Could anyone provide some kind of guideline or curriculum of Scala and Lift to get started with Lift? I would like to write a simple blog to learn Lift. But don't know how much Scala knowledge I should have to jump in Lift. Thanks. -- Omnem crede diem tibi diluxisse supremum. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: run jetty
Thank you again! for future reference, here is the command on windows: mvn archetype:generate^ -U -DarchetypeGroupId=net.liftweb^ -DarchetypeArtifactId=lift-archetype-basic -DarchetypeVersion=1.0^ -DremoteRepositories=http://scala-tools.org/repo-releases^ -DgroupId=com.liftworkshop -DartifactId=todo -Dversion=0.1-SNAPSHOT^ On Thu, Oct 15, 2009 at 7:32 PM, Wilson MacGyver wmacgy...@gmail.comwrote: congrats, welcome to the beginning of lift. On Thu, Oct 15, 2009 at 7:22 PM, j...@bancova.com banc...@gmail.com wrote: i got it running! i followed your suggestion and did some change - put every thing in one line and copy this ONE line to c:\ mvn archetype:generate -U -DarchetypeGroupId=net.liftweb -DarchetypeArtifactId=lift-archetype-basic -DarchetypeVersion=1.0 -DremoteRepositories=http://scala-tools.org/repo-releases -DgroupId=com.liftworkshop -DartifactId=todo -Dversion=0.1-SNAPSHOT thank you so much for supporting me to make the first step john On Thu, Oct 15, 2009 at 5:34 PM, Wilson MacGyver wmacgy...@gmail.com wrote: simple answer, do it as one line like this mvn archetype:generate -U -DarchetypeGroupId=net.liftweb -DarchetypeArtifactId=lift-archetype-basic -DarchetypeVersion=1.0 -DremoteRepositories=http://scala-tools.org/repo-releases -DgroupId=com.liftworkshop -DartifactId=todo -Dversion=0.1-SNAPSHOT On Thu, Oct 15, 2009 at 5:23 PM, j...@bancova.com banc...@gmail.com wrote: my problem is: 1) when i issued mvn archetype:generate -U \, the machine begins to run, and then complains that -DarchetypeGroupId=net.liftweb \ is not recognized as an internal or external command 2) then I just issued mvn archetype:generate -U and hit return. then the system will ask for GroupId and artifactId etc...I answered every thing...then it says Build Successful. However, two things wired happened: a) it never asked for remoteRepositories=, b) it gave me errors when I issued mvn jetty:run later. 3) I copied exactly your commands into mvn_todo.bat, and tried to click the file.nothing happened! thank you so much for your patience and your wonderful help! john On Thu, Oct 15, 2009 at 4:27 PM, Wilson MacGyver wmacgy...@gmail.com wrote: on which step does this happen when you are following the tutorial? I just tried it on my laptop. mvn archetype:generate -U \ -DarchetypeGroupId=net.liftweb \ -DarchetypeArtifactId=lift-archetype-basic \ -DarchetypeVersion=1.0 \ -DremoteRepositories=http://scala-tools.org/repo-releases \ -DgroupId=com.liftworkshop \ -DartifactId=todo \ -Dversion=0.1-SNAPSHOT this creates the todo directory correctly I then cd todo and run mvn jetty:run, it started correctly. It reports the database create table was successful. Did you get this far while following the tutorial? On Thu, Oct 15, 2009 at 3:52 PM, j...@bancova.com banc...@gmail.com wrote: yes, that is what I'm trying to do. Thank you for your quick response! On Thu, Oct 15, 2009 at 3:20 PM, Wilson MacGyver wmacgy...@gmail.com wrote: Some quick questions: Are you trying to follow the todo example in http://liftweb.net/docs/getting_started/mod_master.html ? Are you using an external database like mysql or are you using the built-in one? On Thu, Oct 15, 2009 at 3:03 PM, john banc...@gmail.com wrote: Hi all, I'm really excited with my recent finding of the wonderful, powerful lift. May be my question is too naive, but I did get: error executing database operation clean_insert, when I run jetty on my todo directory on Window XP machine. your help is highly appreciated! John -- Omnem crede diem tibi diluxisse supremum. -- John Zhang, Ph.D. 201-993-9089 Bancova www.bancova.com Power of E-Learning -- Omnem crede diem tibi diluxisse supremum. -- John Zhang, Ph.D. 201-993-9089 Bancova www.bancova.com Power of E-Learning -- Omnem crede diem tibi diluxisse supremum. -- John Zhang, Ph.D. 201-993-9089 Bancova www.bancova.com Power of E-Learning -- Omnem crede diem tibi diluxisse supremum. -- John Zhang, Ph.D. 201-993-9089 Bancova www.bancova.com Power of E-Learning --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Are we willing to make a breaking change for Joda Time?
Well, actually, maybe I'll just make a JodaHelpers with the applicable methods on it and we can just deprecate the entire TimeHelpers object. If anyone else has a better idea I'm all ears. Derek On Thu, Oct 15, 2009 at 5:22 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: OK, will do. On Thu, Oct 15, 2009 at 5:18 PM, David Pollak feeder.of.the.be...@gmail.com wrote: I'd prefer not the break the apis without deprecating them first On Thu, Oct 15, 2009 at 4:09 PM, Derek Chen-Becker dchenbec...@gmail.com wrote: Just asking, since I'm looking at bolting a lot of java.util.Date methods onto the innards of TimeHelpers so that the specs pass. Derek -- 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 liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Are we willing to make a breaking change for Joda Time?
I personally like the DSLs that TimeHelpers provides. I'd hate to see it deprecated or go away without the ability to write 30 seconds later using some other DSL. On Thu, Oct 15, 2009 at 5:22 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: Well, actually, maybe I'll just make a JodaHelpers with the applicable methods on it and we can just deprecate the entire TimeHelpers object. If anyone else has a better idea I'm all ears. Derek On Thu, Oct 15, 2009 at 5:22 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: OK, will do. On Thu, Oct 15, 2009 at 5:18 PM, David Pollak feeder.of.the.be...@gmail.com wrote: I'd prefer not the break the apis without deprecating them first On Thu, Oct 15, 2009 at 4:09 PM, Derek Chen-Becker dchenbec...@gmail.com wrote: Just asking, since I'm looking at bolting a lot of java.util.Date methods onto the innards of TimeHelpers so that the specs pass. Derek -- 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 -- 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 liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Welcome Dirk Louwers to the Lift committers
Cool! Welcome Dirk! On Fri, Oct 16, 2009 at 12:46 AM, David Pollak feeder.of.the.be...@gmail.com wrote: Folks, Please join me in welcoming Dirk to the Lift committers. Dirk is going to integrate Ext.Js (the MIT licensed part of it) into Lift. Welcome Dirk and we look forward to your contributions! Thanks, David -- Atsuhiko Yamanaka JCraft,Inc. 1-14-20 HONCHO AOBA-KU, SENDAI, MIYAGI 980-0014 Japan. Tel +81-22-723-2150 +1-415-578-3454 Skype callto://jcraft/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Are we willing to make a breaking change for Joda Time?
Oh, I plan on incorporating the DSL. My thought was that JodaHelpers would define most of the same methods as TimeHelpers, just operating on DateTime instead of Date and Calendar. Then you could do import ...Helpers._ import ...JodaHelpers._ and the latter import would mask the TimeHelpers methods. Or you could just import JodaHelpers by itself. Actually, Joda Time has some very nice facilities for doing intervals that would simplify the DSLs a lot and possibly make it richer. Derek On Thu, Oct 15, 2009 at 7:19 PM, David Pollak feeder.of.the.be...@gmail.com wrote: I personally like the DSLs that TimeHelpers provides. I'd hate to see it deprecated or go away without the ability to write 30 seconds later using some other DSL. On Thu, Oct 15, 2009 at 5:22 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: Well, actually, maybe I'll just make a JodaHelpers with the applicable methods on it and we can just deprecate the entire TimeHelpers object. If anyone else has a better idea I'm all ears. Derek On Thu, Oct 15, 2009 at 5:22 PM, Derek Chen-Becker dchenbec...@gmail.com wrote: OK, will do. On Thu, Oct 15, 2009 at 5:18 PM, David Pollak feeder.of.the.be...@gmail.com wrote: I'd prefer not the break the apis without deprecating them first On Thu, Oct 15, 2009 at 4:09 PM, Derek Chen-Becker dchenbec...@gmail.com wrote: Just asking, since I'm looking at bolting a lot of java.util.Date methods onto the innards of TimeHelpers so that the specs pass. Derek -- 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 -- 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 liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: edit: What happened to JsonCmd?
On Thu, Oct 15, 2009 at 7:46 PM, Chris coldfusio...@gmail.com wrote: Well, I pulled all the files from http://scala-tools.org/repo-releases/net/liftweb/lift-util/1.1-M6/ and I do see Misc.scala in lift-util-1.1-M6-sources.jar but not in lift-util-1.1-M6.jar. The SHA1 sum matches what was on the server for that JAR. Could it have been packaged wrong? The correct answer is: import net.liftweb.util.{JsonCmd} Or more broadly: import net.liftweb.util._ Thanks On Oct 15, 7:55 am, David Pollak feeder.of.the.be...@gmail.com wrote: Ying-Kwang's got it right. On Wed, Oct 14, 2009 at 9:15 PM, Chris coldfusio...@gmail.com wrote: I get error: Misc is not a member of net.liftweb.util when I try that. I don't see the Misc class/object in the API docs either. Is there anything else I should try? Thanks -- 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 liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: edit: What happened to JsonCmd?
The class file names in the jar are determined by the class name / scope / access modifiers and other such nonsense, so unlike java there's not even a vague 1 : 1 correlation between source file names and class file names. So, JsonCmd is in Misc.scala, but it will be emitted as JsonCmd.class (along with HasParams.class, etc). -Ross On Oct 15, 2009, at 10:46 PM, Chris wrote: Well, I pulled all the files from http://scala-tools.org/repo-releases/net/liftweb/lift-util/1.1-M6/ and I do see Misc.scala in lift-util-1.1-M6-sources.jar but not in lift-util-1.1-M6.jar. The SHA1 sum matches what was on the server for that JAR. Could it have been packaged wrong? Thanks On Oct 15, 7:55 am, David Pollak feeder.of.the.be...@gmail.com wrote: Ying-Kwang's got it right. On Wed, Oct 14, 2009 at 9:15 PM, Chris coldfusio...@gmail.com wrote: I get error: Misc is not a member of net.liftweb.util when I try that. I don't see the Misc class/object in the API docs either. Is there anything else I should try? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---