[Lift] CMS for Lift?
Hi, Has anyone made a CMS for Liftweb? or I should say, in liftweb. Thanks, Philip --~--~-~--~~~---~--~~ 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: Cookie not being removed for custom user logout
I just did a little test: 1. When redering page1 I'm setting a cookie. I'm also rendering a link like: SHtml.link(/page2, () = { S.deleteCookie(marius) }, Text(Got to /page1 and remove cookie)) 2. When I click the link page2 is rendered and in the HTTP header I am seeing the cookie being sent down to browser with no value and the expires is (1-1-1970 ). Which is correct. Br's, Marius On Aug 15, 1:30 pm, Richard Dallaway dalla...@gmail.com wrote: Thank you for the debugging clue (very handy function; I can see myself using that in other situations). What I see when the logout link is followed is: List() When I set the cookie originally, I do see a List(HTTPCookie(...)) I'm running all of this on 127.0.0.1:8080. Thanks Richard On Sat, Aug 15, 2009 at 8:37 AM, marius d.marius.dan...@gmail.com wrote: Your code looks fine to me. There is notmagic withXHtml.link just that when you click the link on server-side your function gets called before the /logout page gets rendered. Can you add a function to LiftRules.onEndServicing ? LiftRules.onEndServicing.append { case (req, Full(resp)) = val cookies = resp.toResponse.cookies // trace the cookies case _ = } Br's, Marius On Aug 14, 8:20 pm, Richard Dallaway dalla...@gmail.com wrote: I'm seeing some odd behaviour with a cookie I'm setting not being removed. I'm unsure which phase of my code is broken or how deep my misunderstandings are here... so I'm looking for some clues. I'm setting a keep me logged in cookie for users of my application. That works fine using... val c = HTTPCookie(COOKIE_NAME, encode(user)).setMaxAge(three_months_as_seconds) S.addCookie(c) The encode(user) is, when all is said and done, returning the user PK as the cookie value. I'm not using ProtoUser, I'm using the scheme outlined inhttp://groups.google.com/group/liftweb/msg/85a8e790d5efec26 That is, I have... object LoginContext { object userId extends SessionVar[Box[Long]](KeepMeLoggedIn.findUserId) // etc... } ...and the findUserId function tries to decode the cookie and find a matching user: def findUserId:Box[Long] = for { cookie - S.findCookie(COOKIE_NAME); cookie_value - cookie.value; (id, salt) - decode(cookie_value); u - User.find(By(User.id, id),By(User.salt,salt)) } yield { println(u) id } And that's all working for me. The problem comes when the user clicks the logout link, and I want to remove this cookie. The logout link is: SHtml.link(/logout, LoginContext.logout, spanLogout/span ) ... and LoginContext.logout is KeepMeLoggedIn.removeCookie() // the above is just: S.deleteCookie(COOKIE_NAME) userId.remove() currentUser.remove() S.request.foreach(_.request.session.terminate) And for completeness, my /logout page is a redirect to the home page: Menu(Loc(logout, List(logout) - false, Logout, Hidden, If( ()=false, ()=RedirectResponse(/index)) )) What I'm seeing is: - user clicks logout - logout function called, and Jetty tells me /logout took N milliseconds to render - then I'm seeing activity in the findUserId function, a result is found, and the user is logged back in again. - then Jetty tells me /index took N milliseconds to render. When I dig into HTTP headers, I'm not seeing the cookie value being set in the response header (which I believe is required to remove it). I'm guessing my confusion is perhaps over how the SHtml.link magic works? Any suggestions of where I might poke around next? I'm using 1.1-SNAPSHOT (updated a few hours ago). Thank you Richard --~--~-~--~~~---~--~~ 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: CMS for Lift?
Short answer: no. Long answer: There are a couple of efforts in progress, but this are early, early stages (not even runnable code). Cheers, Tim On Aug 16, 7:08 am, philip philip14...@gmail.com wrote: Hi, Has anyone made a CMS for Liftweb? or I should say, in liftweb. Thanks, Philip --~--~-~--~~~---~--~~ 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: Symlinks and Javascript Files
OK, this is not Lift's error message, but rather Jetty's. You need to set the following property to tell Jetty not to check symlinks: -Dorg.mortbay.util.FileResource.checkAliases=False Derek On Fri, Aug 14, 2009 at 1:28 PM, Peter Robinett pe...@bubblefoundry.comwrote: It is not in my site map. I did try the ResourceServer with the symlinked script in the 'js' subdir. Peter On Aug 14, 6:43 am, Derek Chen-Becker dchenbec...@gmail.com wrote: Is the path to that file defined in your SiteMap? In the case of using ResourceServer, the js that you've tried means that the script should be under a js subdir. Derek On Thu, Aug 13, 2009 at 7:57 PM, Peter Robinett pe...@bubblefoundry.com wrote: My Lift project is in a git repository and to the repository I've added a submodule. Since right now I only want one javascript file from this submodule, my thought was to make the directory src/main/ webroot/js and then make a symbolic link to the javascript file in question. Unfortunately, when I try to request the file at http://localhost:9090/js/jquery.sparkline.js, I get a 403 response that says the page is not defined in my sitemap. There was no note of the request in the stdout. Thinking that the js subdirectory is the problem, I then tried making the symlink in the webroot directory and got a 404 error. On stdout it said: 2009-08-13 18:38:23.051::WARN: Aliased resource: file:/Users/peter/ Sites/Equal%20Networks/server/src/main/webapp/ jquery.sparkline.js==file:/Users/peter/Sites/Equal%20Networks/server/ vendors/dashboard/www/jquery.sparkline.js From this I gather than Lift is troubled by the presence of a symlink and refused to acknowledge its presence. Is this true? If so, why? From the thread last week on ExtJS I see a discussion on loading files in webroot, including supporting a css directory by adding the following to Boot.scala: ResourceServer.allow { case css :: _ = true } I already have a css file being served from a directory in the exact same location without any additions to Boot.scala. Nonetheless, I tried the following: ResourceServer.allow { case js :: _ = true } Unfortunately, this had no effect. So, how can I get my symlinked javascript to be server? Or should I just give up on symlinks altogether (I'm not a git master, so perhaps that was the wrong approach anyway). Peter Robinett PS I'm on 1.1-SNAPSHOT. PPS The YUI Compressor works well. Very cool. --~--~-~--~~~---~--~~ 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: ScalaTest dependency
Yeah, I was actually thinking about that same angle last night. Perhaps I could provide some control var on DB to enable detailed or basic logging? I think that it would be very useful in some cases, for example, to know that underlying code is setting max rows or max fetch size, but I agree that most people will probably just want basic statements logged. Also, with a prepared statement someone *could* execute multiple queries in one go, so I can't get rid of the list of stuff. Another approach would be to give the logFuncs List to the Logging classes and then they could decide whether to log (and time) each execution individually or all at once (if someone sets batch mode, for example). What do you think? Derek On Sun, Aug 16, 2009 at 8:09 AM, marius d. marius.dan...@gmail.com wrote: Derek, I was looking to your code, GOOD stuff ! One thing though.The LoggedStatement.toString would return a List of log entries and not a query but the user's Log function expects a query and the time spent on that query so there is a little miss match between when user's function expects and what we're feeding to it. Also you are creating strings like: Exec query \%s\ : rs = %s.format(sql, rs) ...which may be perfect. But I wonder if user's won't expect just the query/update and nothing else and they will do their own logging and formatting. Br's, Marius On Aug 16, 3:07 am, Derek Chen-Becker dchenbec...@gmail.com wrote: I only fixed the groupId because maven was giving me a warning that it had changed. I can bump the versions to 0.9.5 this week and if that builds fine I'll check it in. On Sat, Aug 15, 2009 at 3:22 PM, Bill Venners b...@artima.com wrote: Hi Derek, I noticed you checked in a change to Lift that updated the Maven ScalaTest ref. However the ref is to version 0.9.4, whereas the current version is 0.9.5. Thanks. Bill Bill Venners Artima, Inc. http://www.artima.com On Aug 15, 2009, at 7:02 AM, Derek Chen-Becker dchenbec...@gmail.com wrote: OK, a preliminary version of log wrappers is checked in on wip-dcb-sql-log-wrappers. I'll merge it on Tuesday if no one sees any problems with it. Derek On Tue, Aug 11, 2009 at 11:08 AM, Derek Chen-Becker dchenbec...@gmail.com dchenbec...@gmail.com wrote: Will do. On Tue, Aug 11, 2009 at 2:33 AM, marius d. marius.dan...@gmail.com marius.dan...@gmail.com wrote: Please do so. If you need any help for some reason (time availability etc.) please let me know. As a note probably the wrappers should be only only when there is at least one log function registered. Br's, Marius On Aug 6, 11:48 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: If there's a consensus that we want our own JDBC wrappers I'll go ahead and write them. Derek On Thu, Aug 6, 2009 at 1:19 PM, marius d. marius.dan...@gmail.com wrote: Probably building our own wrappers would be more lightweight then 3-rd party. Jus' guessing Br's, Marius On Aug 6, 9:58 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: Well, I started looking at it and determined that the only way for us to truly log the queries would be to essentially make our own wrappers over Statement and PreparedStatement. There are projects (log4jdbc, notably) that already do this, and in a transparent manner. I'm not sure that adding a whole bunch of SQL logging directly to Lift is better than leveraging some existing libraries to do it. Derek On Thu, Aug 6, 2009 at 11:03 AM, marius d. marius.dan...@gmail.com wrote: Yeah we're aware of that. That is based on toString application which is JDBC driver dependent. I think Derek started some work on this to correct this behavior. Derek ? Br's, Marius On Aug 6, 8:01 pm, jon jonhoff...@gmail.com wrote: Hi, I have the following in boot: DB.addLogFunc((query, len) = Log.info(The query: +query+ took +len+ milliseconds)) I was expecting the query parameter to be sql, but it's actually some sort of guid INFO - The query: 6839c016-0122-f09a-9c96-003844e8 took 5 milliseconds Any ideas? I'm running with derby. Thanks, Jon --~--~-~--~~~---~--~~ 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: ScalaTest dependency
Also, I just pushed a bump to 0.9.5 for scalatest to 1.0_maint. It'll make it into 1.0.1. Derek On Sun, Aug 16, 2009 at 8:18 AM, Derek Chen-Becker dchenbec...@gmail.comwrote: Yeah, I was actually thinking about that same angle last night. Perhaps I could provide some control var on DB to enable detailed or basic logging? I think that it would be very useful in some cases, for example, to know that underlying code is setting max rows or max fetch size, but I agree that most people will probably just want basic statements logged. Also, with a prepared statement someone *could* execute multiple queries in one go, so I can't get rid of the list of stuff. Another approach would be to give the logFuncs List to the Logging classes and then they could decide whether to log (and time) each execution individually or all at once (if someone sets batch mode, for example). What do you think? Derek On Sun, Aug 16, 2009 at 8:09 AM, marius d. marius.dan...@gmail.comwrote: Derek, I was looking to your code, GOOD stuff ! One thing though.The LoggedStatement.toString would return a List of log entries and not a query but the user's Log function expects a query and the time spent on that query so there is a little miss match between when user's function expects and what we're feeding to it. Also you are creating strings like: Exec query \%s\ : rs = %s.format(sql, rs) ...which may be perfect. But I wonder if user's won't expect just the query/update and nothing else and they will do their own logging and formatting. Br's, Marius On Aug 16, 3:07 am, Derek Chen-Becker dchenbec...@gmail.com wrote: I only fixed the groupId because maven was giving me a warning that it had changed. I can bump the versions to 0.9.5 this week and if that builds fine I'll check it in. On Sat, Aug 15, 2009 at 3:22 PM, Bill Venners b...@artima.com wrote: Hi Derek, I noticed you checked in a change to Lift that updated the Maven ScalaTest ref. However the ref is to version 0.9.4, whereas the current version is 0.9.5. Thanks. Bill Bill Venners Artima, Inc. http://www.artima.com On Aug 15, 2009, at 7:02 AM, Derek Chen-Becker dchenbec...@gmail.com wrote: OK, a preliminary version of log wrappers is checked in on wip-dcb-sql-log-wrappers. I'll merge it on Tuesday if no one sees any problems with it. Derek On Tue, Aug 11, 2009 at 11:08 AM, Derek Chen-Becker dchenbec...@gmail.com dchenbec...@gmail.com wrote: Will do. On Tue, Aug 11, 2009 at 2:33 AM, marius d. marius.dan...@gmail.com marius.dan...@gmail.com wrote: Please do so. If you need any help for some reason (time availability etc.) please let me know. As a note probably the wrappers should be only only when there is at least one log function registered. Br's, Marius On Aug 6, 11:48 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: If there's a consensus that we want our own JDBC wrappers I'll go ahead and write them. Derek On Thu, Aug 6, 2009 at 1:19 PM, marius d. marius.dan...@gmail.com wrote: Probably building our own wrappers would be more lightweight then 3-rd party. Jus' guessing Br's, Marius On Aug 6, 9:58 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: Well, I started looking at it and determined that the only way for us to truly log the queries would be to essentially make our own wrappers over Statement and PreparedStatement. There are projects (log4jdbc, notably) that already do this, and in a transparent manner. I'm not sure that adding a whole bunch of SQL logging directly to Lift is better than leveraging some existing libraries to do it. Derek On Thu, Aug 6, 2009 at 11:03 AM, marius d. marius.dan...@gmail.com wrote: Yeah we're aware of that. That is based on toString application which is JDBC driver dependent. I think Derek started some work on this to correct this behavior. Derek ? Br's, Marius On Aug 6, 8:01 pm, jon jonhoff...@gmail.com wrote: Hi, I have the following in boot: DB.addLogFunc((query, len) = Log.info(The query: +query+ took +len+ milliseconds)) I was expecting the query parameter to be sql, but it's actually some sort of guid INFO - The query: 6839c016-0122-f09a-9c96-003844e8 took 5 milliseconds Any ideas? I'm running with derby. Thanks, Jon --~--~-~--~~~---~--~~ 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: Error adding expenses using Mysql
OK, verified. Looks like we have a case mismatch in the code somewhere, possibly Mapper. The table is created as expense, but the queries are for Expense, and MySQL is very unhappy with that. On Fri, Aug 14, 2009 at 9:21 AM, javier javierve...@yahoo.com wrote: In case it makes any difference, I am using MySQL 5.0.37 on a Mac On Aug 14, 7:43 am, Derek Chen-Becker dchenbec...@gmail.com wrote: I'll test against MySQL here and see if I can reproduce the issue. 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: ScalaTest dependency
On Aug 16, 5:18 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: Yeah, I was actually thinking about that same angle last night. Perhaps I could provide some control var on DB to enable detailed or basic logging? Yeah ... or maybe for the logFunc to not pass just a query string but an object (abstracted by a trait) and let the user extract from there whatever is needed. Just the plain query and/or other stuff. Yes this would mean a breaking change but I think a good one. I think that it would be very useful in some cases, for example, to know that underlying code is setting max rows or max fetch size, but I agree that most people will probably just want basic statements logged. Also, with a prepared statement someone *could* execute multiple queries in one go, so I can't get rid of the list of stuff. Totally agree, but please see my notes above. Another approach would be to give the logFuncs List to the Logging classes and then they could decide whether to log (and time) each execution individually or all at once (if someone sets batch mode, for example). What do you think? Based on the above I'd probably opt in for a trait rather then the List. Perhaps : trait LogStatement { def getStatement: (String, Long) // returns the statement and the tiem spent def getDetailedInfo: List[String] // /returns your list } ... or you may be thinking of a better abstraction. And logFuncs would become: logFuncs: List[(LogStatement) = Any] = Nil Br's, Marius Derek On Sun, Aug 16, 2009 at 8:09 AM, marius d. marius.dan...@gmail.com wrote: Derek, I was looking to your code, GOOD stuff ! One thing though.The LoggedStatement.toString would return a List of log entries and not a query but the user's Log function expects a query and the time spent on that query so there is a little miss match between when user's function expects and what we're feeding to it. Also you are creating strings like: Exec query \%s\ : rs = %s.format(sql, rs) ...which may be perfect. But I wonder if user's won't expect just the query/update and nothing else and they will do their own logging and formatting. Br's, Marius On Aug 16, 3:07 am, Derek Chen-Becker dchenbec...@gmail.com wrote: I only fixed the groupId because maven was giving me a warning that it had changed. I can bump the versions to 0.9.5 this week and if that builds fine I'll check it in. On Sat, Aug 15, 2009 at 3:22 PM, Bill Venners b...@artima.com wrote: Hi Derek, I noticed you checked in a change to Lift that updated the Maven ScalaTest ref. However the ref is to version 0.9.4, whereas the current version is 0.9.5. Thanks. Bill Bill Venners Artima, Inc. http://www.artima.com On Aug 15, 2009, at 7:02 AM, Derek Chen-Becker dchenbec...@gmail.com wrote: OK, a preliminary version of log wrappers is checked in on wip-dcb-sql-log-wrappers. I'll merge it on Tuesday if no one sees any problems with it. Derek On Tue, Aug 11, 2009 at 11:08 AM, Derek Chen-Becker dchenbec...@gmail.com dchenbec...@gmail.com wrote: Will do. On Tue, Aug 11, 2009 at 2:33 AM, marius d. marius.dan...@gmail.com marius.dan...@gmail.com wrote: Please do so. If you need any help for some reason (time availability etc.) please let me know. As a note probably the wrappers should be only only when there is at least one log function registered. Br's, Marius On Aug 6, 11:48 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: If there's a consensus that we want our own JDBC wrappers I'll go ahead and write them. Derek On Thu, Aug 6, 2009 at 1:19 PM, marius d. marius.dan...@gmail.com wrote: Probably building our own wrappers would be more lightweight then 3-rd party. Jus' guessing Br's, Marius On Aug 6, 9:58 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: Well, I started looking at it and determined that the only way for us to truly log the queries would be to essentially make our own wrappers over Statement and PreparedStatement. There are projects (log4jdbc, notably) that already do this, and in a transparent manner. I'm not sure that adding a whole bunch of SQL logging directly to Lift is better than leveraging some existing libraries to do it. Derek On Thu, Aug 6, 2009 at 11:03 AM, marius d. marius.dan...@gmail.com wrote: Yeah we're aware of that. That is based on toString application which is JDBC driver dependent. I think Derek started some work on this to correct this behavior. Derek ? Br's, Marius On Aug 6, 8:01 pm, jon jonhoff...@gmail.com wrote: Hi, I have the following in boot: DB.addLogFunc((query, len) = Log.info(The query: +query+
[Lift] Re: ScalaTest dependency
1.1-SNAPSHOT has been bumped to 0.9.5 as well. On Sun, Aug 16, 2009 at 8:22 AM, Derek Chen-Becker dchenbec...@gmail.comwrote: Also, I just pushed a bump to 0.9.5 for scalatest to 1.0_maint. It'll make it into 1.0.1. Derek On Sun, Aug 16, 2009 at 8:18 AM, Derek Chen-Becker dchenbec...@gmail.comwrote: Yeah, I was actually thinking about that same angle last night. Perhaps I could provide some control var on DB to enable detailed or basic logging? I think that it would be very useful in some cases, for example, to know that underlying code is setting max rows or max fetch size, but I agree that most people will probably just want basic statements logged. Also, with a prepared statement someone *could* execute multiple queries in one go, so I can't get rid of the list of stuff. Another approach would be to give the logFuncs List to the Logging classes and then they could decide whether to log (and time) each execution individually or all at once (if someone sets batch mode, for example). What do you think? Derek On Sun, Aug 16, 2009 at 8:09 AM, marius d. marius.dan...@gmail.comwrote: Derek, I was looking to your code, GOOD stuff ! One thing though.The LoggedStatement.toString would return a List of log entries and not a query but the user's Log function expects a query and the time spent on that query so there is a little miss match between when user's function expects and what we're feeding to it. Also you are creating strings like: Exec query \%s\ : rs = %s.format(sql, rs) ...which may be perfect. But I wonder if user's won't expect just the query/update and nothing else and they will do their own logging and formatting. Br's, Marius On Aug 16, 3:07 am, Derek Chen-Becker dchenbec...@gmail.com wrote: I only fixed the groupId because maven was giving me a warning that it had changed. I can bump the versions to 0.9.5 this week and if that builds fine I'll check it in. On Sat, Aug 15, 2009 at 3:22 PM, Bill Venners b...@artima.com wrote: Hi Derek, I noticed you checked in a change to Lift that updated the Maven ScalaTest ref. However the ref is to version 0.9.4, whereas the current version is 0.9.5. Thanks. Bill Bill Venners Artima, Inc. http://www.artima.com On Aug 15, 2009, at 7:02 AM, Derek Chen-Becker dchenbec...@gmail.com wrote: OK, a preliminary version of log wrappers is checked in on wip-dcb-sql-log-wrappers. I'll merge it on Tuesday if no one sees any problems with it. Derek On Tue, Aug 11, 2009 at 11:08 AM, Derek Chen-Becker dchenbec...@gmail.com dchenbec...@gmail.com wrote: Will do. On Tue, Aug 11, 2009 at 2:33 AM, marius d. marius.dan...@gmail.com marius.dan...@gmail.com wrote: Please do so. If you need any help for some reason (time availability etc.) please let me know. As a note probably the wrappers should be only only when there is at least one log function registered. Br's, Marius On Aug 6, 11:48 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: If there's a consensus that we want our own JDBC wrappers I'll go ahead and write them. Derek On Thu, Aug 6, 2009 at 1:19 PM, marius d. marius.dan...@gmail.com wrote: Probably building our own wrappers would be more lightweight then 3-rd party. Jus' guessing Br's, Marius On Aug 6, 9:58 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: Well, I started looking at it and determined that the only way for us to truly log the queries would be to essentially make our own wrappers over Statement and PreparedStatement. There are projects (log4jdbc, notably) that already do this, and in a transparent manner. I'm not sure that adding a whole bunch of SQL logging directly to Lift is better than leveraging some existing libraries to do it. Derek On Thu, Aug 6, 2009 at 11:03 AM, marius d. marius.dan...@gmail.com wrote: Yeah we're aware of that. That is based on toString application which is JDBC driver dependent. I think Derek started some work on this to correct this behavior. Derek ? Br's, Marius On Aug 6, 8:01 pm, jon jonhoff...@gmail.com wrote: Hi, I have the following in boot: DB.addLogFunc((query, len) = Log.info(The query: +query+ took +len+ milliseconds)) I was expecting the query parameter to be sql, but it's actually some sort of guid INFO - The query: 6839c016-0122-f09a-9c96-003844e8 took 5 milliseconds Any ideas? I'm running with derby. Thanks, Jon --~--~-~--~~~---~--~~ 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
[Lift] Re: ScalaTest dependency
I really like the idea of changing the logFunc type if everyone is OK with that. To further refine it, the trait could define three defs: def getStatements : List[(String,Long)] def getMetaCommands : List[(String,Long)] def getAll : List[(String,Long)] getAll would return the union of the first two, in proper sequential order. I could further refine this by making use of case classes instead of (String,Long): sealed abstract class DBLogEntry case class LoggedStatement(statement : String, duration : Long) extends DBLogEntry case class LoggedMetaCommand(statement : String, duration : Long) extends DBLogEntry I don't know enough detail on JDBC to know whether or not meta commands require round-trips to the DB or if the spec requires that they're all local, but it seems like we should just time everything. Thoughts? On Sun, Aug 16, 2009 at 8:31 AM, marius d. marius.dan...@gmail.com wrote: On Aug 16, 5:18 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: Yeah, I was actually thinking about that same angle last night. Perhaps I could provide some control var on DB to enable detailed or basic logging? Yeah ... or maybe for the logFunc to not pass just a query string but an object (abstracted by a trait) and let the user extract from there whatever is needed. Just the plain query and/or other stuff. Yes this would mean a breaking change but I think a good one. I think that it would be very useful in some cases, for example, to know that underlying code is setting max rows or max fetch size, but I agree that most people will probably just want basic statements logged. Also, with a prepared statement someone *could* execute multiple queries in one go, so I can't get rid of the list of stuff. Totally agree, but please see my notes above. Another approach would be to give the logFuncs List to the Logging classes and then they could decide whether to log (and time) each execution individually or all at once (if someone sets batch mode, for example). What do you think? Based on the above I'd probably opt in for a trait rather then the List. Perhaps : trait LogStatement { def getStatement: (String, Long) // returns the statement and the tiem spent def getDetailedInfo: List[String] // /returns your list } ... or you may be thinking of a better abstraction. And logFuncs would become: logFuncs: List[(LogStatement) = Any] = Nil Br's, Marius Derek On Sun, Aug 16, 2009 at 8:09 AM, marius d. marius.dan...@gmail.com wrote: Derek, I was looking to your code, GOOD stuff ! One thing though.The LoggedStatement.toString would return a List of log entries and not a query but the user's Log function expects a query and the time spent on that query so there is a little miss match between when user's function expects and what we're feeding to it. Also you are creating strings like: Exec query \%s\ : rs = %s.format(sql, rs) ...which may be perfect. But I wonder if user's won't expect just the query/update and nothing else and they will do their own logging and formatting. Br's, Marius On Aug 16, 3:07 am, Derek Chen-Becker dchenbec...@gmail.com wrote: I only fixed the groupId because maven was giving me a warning that it had changed. I can bump the versions to 0.9.5 this week and if that builds fine I'll check it in. On Sat, Aug 15, 2009 at 3:22 PM, Bill Venners b...@artima.com wrote: Hi Derek, I noticed you checked in a change to Lift that updated the Maven ScalaTest ref. However the ref is to version 0.9.4, whereas the current version is 0.9.5. Thanks. Bill Bill Venners Artima, Inc. http://www.artima.com On Aug 15, 2009, at 7:02 AM, Derek Chen-Becker dchenbec...@gmail.com wrote: OK, a preliminary version of log wrappers is checked in on wip-dcb-sql-log-wrappers. I'll merge it on Tuesday if no one sees any problems with it. Derek On Tue, Aug 11, 2009 at 11:08 AM, Derek Chen-Becker dchenbec...@gmail.com dchenbec...@gmail.com wrote: Will do. On Tue, Aug 11, 2009 at 2:33 AM, marius d. marius.dan...@gmail.com marius.dan...@gmail.com wrote: Please do so. If you need any help for some reason (time availability etc.) please let me know. As a note probably the wrappers should be only only when there is at least one log function registered. Br's, Marius On Aug 6, 11:48 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: If there's a consensus that we want our own JDBC wrappers I'll go ahead and write them. Derek On Thu, Aug 6, 2009 at 1:19 PM, marius d. marius.dan...@gmail.com wrote: Probably building our own wrappers would be more lightweight then 3-rd party. Jus' guessing Br's, Marius On Aug 6, 9:58 pm, Derek
[Lift] Re: ScalaTest dependency
On Aug 16, 6:56 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: I really like the idea of changing the logFunc type if everyone is OK with that. To further refine it, the trait could define three defs: def getStatements : List[(String,Long)] def getMetaCommands : List[(String,Long)] def getAll : List[(String,Long)] getAll would return the union of the first two, in proper sequential order. I could further refine this by making use of case classes instead of (String,Long): sealed abstract class DBLogEntry case class LoggedStatement(statement : String, duration : Long) extends DBLogEntry case class LoggedMetaCommand(statement : String, duration : Long) extends DBLogEntry I don't know enough detail on JDBC to know whether or not meta commands require round-trips to the DB or if the spec requires that they're all local, but it seems like we should just time everything. Thoughts? I like it ... and I'd go for concrete cases classes(LoggedStatement, LoggedMetaCommand ...) above as opposed to tupples. So at least you got my vote :) On Sun, Aug 16, 2009 at 8:31 AM, marius d. marius.dan...@gmail.com wrote: On Aug 16, 5:18 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: Yeah, I was actually thinking about that same angle last night. Perhaps I could provide some control var on DB to enable detailed or basic logging? Yeah ... or maybe for the logFunc to not pass just a query string but an object (abstracted by a trait) and let the user extract from there whatever is needed. Just the plain query and/or other stuff. Yes this would mean a breaking change but I think a good one. I think that it would be very useful in some cases, for example, to know that underlying code is setting max rows or max fetch size, but I agree that most people will probably just want basic statements logged. Also, with a prepared statement someone *could* execute multiple queries in one go, so I can't get rid of the list of stuff. Totally agree, but please see my notes above. Another approach would be to give the logFuncs List to the Logging classes and then they could decide whether to log (and time) each execution individually or all at once (if someone sets batch mode, for example). What do you think? Based on the above I'd probably opt in for a trait rather then the List. Perhaps : trait LogStatement { def getStatement: (String, Long) // returns the statement and the tiem spent def getDetailedInfo: List[String] // /returns your list } ... or you may be thinking of a better abstraction. And logFuncs would become: logFuncs: List[(LogStatement) = Any] = Nil Br's, Marius Derek On Sun, Aug 16, 2009 at 8:09 AM, marius d. marius.dan...@gmail.com wrote: Derek, I was looking to your code, GOOD stuff ! One thing though.The LoggedStatement.toString would return a List of log entries and not a query but the user's Log function expects a query and the time spent on that query so there is a little miss match between when user's function expects and what we're feeding to it. Also you are creating strings like: Exec query \%s\ : rs = %s.format(sql, rs) ...which may be perfect. But I wonder if user's won't expect just the query/update and nothing else and they will do their own logging and formatting. Br's, Marius On Aug 16, 3:07 am, Derek Chen-Becker dchenbec...@gmail.com wrote: I only fixed the groupId because maven was giving me a warning that it had changed. I can bump the versions to 0.9.5 this week and if that builds fine I'll check it in. On Sat, Aug 15, 2009 at 3:22 PM, Bill Venners b...@artima.com wrote: Hi Derek, I noticed you checked in a change to Lift that updated the Maven ScalaTest ref. However the ref is to version 0.9.4, whereas the current version is 0.9.5. Thanks. Bill Bill Venners Artima, Inc. http://www.artima.com On Aug 15, 2009, at 7:02 AM, Derek Chen-Becker dchenbec...@gmail.com wrote: OK, a preliminary version of log wrappers is checked in on wip-dcb-sql-log-wrappers. I'll merge it on Tuesday if no one sees any problems with it. Derek On Tue, Aug 11, 2009 at 11:08 AM, Derek Chen-Becker dchenbec...@gmail.com dchenbec...@gmail.com wrote: Will do. On Tue, Aug 11, 2009 at 2:33 AM, marius d. marius.dan...@gmail.com marius.dan...@gmail.com wrote: Please do so. If you need any help for some reason (time availability etc.) please let me know. As a note probably the wrappers should be only only when there is at least one log function registered. Br's, Marius On Aug 6, 11:48 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: If there's a consensus that we want our own JDBC wrappers I'll go
[Lift] Re: CMS for Lift?
Philip, I'm working on a cms system in Lift. Right now, it allows for content creation using wymeditor, which can be tagged and displayed as an atom feed. This code is runnable, simple as it is. I'm working on adding dynamic site map creation as well. Is this kind of what you have in mind by a CMS system. I'm very interested in workiing with others on a CMS that can compete with any of the PHP varieties out there, such as Drupal and Wordpress. Most of these simply use plugins from one ore more javascript libraries out there for site creation, and Lift certainly can do javascript as well as, if not better than, these systems. Glenn... On Aug 15, 11:08 pm, philip philip14...@gmail.com wrote: Hi, Has anyone made a CMS for Liftweb? or I should say, in liftweb. Thanks, Philip --~--~-~--~~~---~--~~ 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] Lift templates lack obvious stuff (?)
Greetings. I've googled quite a while for a very obvious feature that all templating engines out there have and it seems like Lift does not. I'm talking about multiple bind tags in a template. Example should explain best. html head titlelift:bind name=title//title body div id=featuredlift:bind name=featured//div div id=sociallift:bind name=social//div div id=contentlift:bind name=content//div div id=contentInfolift:bind name=content-info//div /body /html So how am I supposed to insert parts of contents into these bind locations? In Facelets the ui:composition/ui:insert/ui:define tags do the job. And I rather do not understand the intention to have multiple bind locations in template while the lift:surround tag only allows one 'at' attribute. Can somebody explain this design please? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Lift templates lack obvious stuff (?)
You can use multiple bind pointx by the means of lift:surround with=default lift:with-param name=socialYour tag soup/lift:with-param lift:with-param name=contentYour tag stue/lift:with-param ... l/ift:surround tag. Br's, Marius On Aug 16, 9:34 pm, incarn...@whiteants.net incarn...@whiteants.net wrote: Greetings. I've googled quite a while for a very obvious feature that all templating engines out there have and it seems like Lift does not. I'm talking about multiple bind tags in a template. Example should explain best. html head titlelift:bind name=title//title body div id=featuredlift:bind name=featured//div div id=sociallift:bind name=social//div div id=contentlift:bind name=content//div div id=contentInfolift:bind name=content-info//div /body /html So how am I supposed to insert parts of contents into these bind locations? In Facelets the ui:composition/ui:insert/ui:define tags do the job. And I rather do not understand the intention to have multiple bind locations in template while the lift:surround tag only allows one 'at' attribute. Can somebody explain this design please? --~--~-~--~~~---~--~~ 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: CMS for Lift?
I think Akka / GoatRodeo will make building such developments with Lift even more compelling thanks to persistence systems like Cassandra. @Glenn - is your project public? Cheers, Tim On 16/08/2009 19:13, glenn gl...@exmbly.com wrote: Philip, I'm working on a cms system in Lift. Right now, it allows for content creation using wymeditor, which can be tagged and displayed as an atom feed. This code is runnable, simple as it is. I'm working on adding dynamic site map creation as well. Is this kind of what you have in mind by a CMS system. I'm very interested in workiing with others on a CMS that can compete with any of the PHP varieties out there, such as Drupal and Wordpress. Most of these simply use plugins from one ore more javascript libraries out there for site creation, and Lift certainly can do javascript as well as, if not better than, these systems. Glenn... On Aug 15, 11:08 pm, philip philip14...@gmail.com wrote: Hi, Has anyone made a CMS for Liftweb? or I should say, in liftweb. Thanks, Philip --~--~-~--~~~---~--~~ 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] Debug log level
How do you set the log level to include debug output? --~--~-~--~~~---~--~~ 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: CMS for Lift?
@Glenn - is your project public? Seconded, toss it up on github and let the community start helping out. --~--~-~--~~~---~--~~ 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: Debug log level
Provide your own log4j configuration. IIRC, you should be able to create a default.log4j.xml or default.log4j.props file and put it in src/main/resources/props/ to customize the log4j config. Derek On Sun, Aug 16, 2009 at 3:48 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: How do you set the log level to include debug output? --~--~-~--~~~---~--~~ 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] lift-openid broken
Hello guys, It seems the HTTP refactoring around 10 days ago broke OpenId. Here's a small patch that made it work for me: --- dpp-liftweb-e845b3c129baf16bc35b46df9ee5b5049d4aee3a/lift-openid/ src/main/scala/net/liftweb/openid/OpenId.scala 2009-08-16 17:36:58.0 +0300 +++ dpp-liftweb-fixed/lift-openid/src/main/scala/net/liftweb/openid/ OpenId.scala2009-08-17 01:43:46.0 +0300 @@ -267,7 +267,7 @@ // retrieve the previously stored discovery information val discovered = httpReq.session.attribute(openid-disc) match { - case Full(d: DiscoveryInformation)= d + case d: DiscoveryInformation= d case _ = throw ResponseShortcutException.redirect(/) } @@ -275,7 +275,7 @@ var receivingURL = httpReq.url val queryString = httpReq.queryString openOr if (queryString != null queryString.length() 0) { - receivingURL += ? + httpReq.queryString; + receivingURL += ? + queryString; } --~--~-~--~~~---~--~~ 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: Debug log level
Thanks. The book makes it sound like the file should be called log4j.props, and the repository has files called log4j.properties. I haven't used log4j before, but apparently putting one of the log4j.properties files in, named default.log4j.props, worked, so I guess it needed that prefix. - Derek Chen-Beckerdchenbec...@gmail.com wrote: Provide your own log4j configuration. IIRC, you should be able to create a default.log4j.xml or default.log4j.props file and put it in src/main/resources/props/ to customize the log4j config. Derek On Sun, Aug 16, 2009 at 3:48 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: How do you set the log level to include debug output? --~--~-~--~~~---~--~~ 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] 1.1-SNAPSHOT broken in Google App Engine
First, I want to say that I'm really impressed with Lift. It's a pleasure to work with (now that I've figured it out) and it keeps getting better. I'm working on a Lift project that runs on Google App Engine. After an extended period of development on a local dev server, I uploaded my app and was surprised to discover it didn't work in the App Engine environment anymore. In the logs, I discovered that every request resulted in a HTTP 500 error. The root cause appeared to be a ClassNotFoundException thrown by com.google.apphosting.runtime.security.UserClassLoader while deserializing a net.liftweb.http.SessionToServletBridge. (Or possibly some object that contains a SessionToServletBridge?) I found an entry in the Google App Engine issue tracker noting problems with the deserialization of certain objects from a Session: http://code.google.com/p/googleappengine/issues/detail?id=1290 Some of the comments suggest that these objects are running afoul of App Engine's JRE White List: http://code.google.com/appengine/docs/java/jrewhitelist.html But I looked at the source for SessionToServletBridge and did not see any forbidden classes in the imports, so I'm not sure if that's the problem in this case. I was able get my app working again by reverting from the snapshot to version 1.1-M4, so presumably, the change that's causing the problem was introduced after the M4 milestone. I don't know if compatibility with App Engine is a priority for the Lift team, but if this doesn't get fixed, I face an ugly choice between remaining frozen at 1.1-M4 as Lift development moves forward, or migrating away from App Engine to another cloud solution. Is there anything I can do to assist the diagnosis/resolution of this issue? Thanks, Mark Here's the stack trace: javax.servlet.ServletException: java.lang.RuntimeException: java.lang.ClassNotFoundException: net.liftweb.http.SessionToServletBridge at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle (AppVersionHandlerMap.java:239) at org.mortbay.jetty.handler.HandlerWrapper.handle (HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:313) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 506) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete (HttpConnection.java:830) at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable (RpcRequestParser.java:76) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest (JettyServletEngineAdapter.java:139) at com.google.apphosting.runtime.JavaRuntime.handleRequest (JavaRuntime.java:235) at com.google.apphosting.base.RuntimePb$EvaluationRuntime $6.handleBlockingRequest(RuntimePb.java:4823) at com.google.apphosting.base.RuntimePb$EvaluationRuntime $6.handleBlockingRequest(RuntimePb.java:4821) at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest (BlockingApplicationHandler.java:24) at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java: 359) at com.google.net.rpc.impl.Server$2.run(Server.java:820) at com.google.tracing.LocalTraceSpanRunnable.run (LocalTraceSpanRunnable.java:56) at com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan (LocalTraceSpanBuilder.java:516) at com.google.net.rpc.impl.Server.startRpc(Server.java:775) at com.google.net.rpc.impl.Server.processRequest(Server.java:348) at com.google.net.rpc.impl.ServerConnection.messageReceived (ServerConnection.java:436) at com.google.net.rpc.impl.RpcConnection.parseMessages (RpcConnection.java:319) at com.google.net.rpc.impl.RpcConnection.dataReceived (RpcConnection.java:290) at com.google.net.async.Connection.handleReadEvent(Connection.java: 428) at com.google.net.async.EventDispatcher.processNetworkEvents (EventDispatcher.java:762) at com.google.net.async.EventDispatcher.internalLoop (EventDispatcher.java:207) at com.google.net.async.EventDispatcher.loop(EventDispatcher.java: 101) at com.google.net.rpc.RpcService.runUntilServerShutdown (RpcService.java:251) at com.google.apphosting.runtime.JavaRuntime$RpcRunnable.run (JavaRuntime.java:374) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: net.liftweb.http.SessionToServletBridge at com.google.apphosting.runtime.jetty.SessionManager.deserialize (SessionManager.java:362) at com.google.apphosting.runtime.jetty.SessionManager.loadSession (SessionManager.java:280) at com.google.apphosting.runtime.jetty.SessionManager.getSession (SessionManager.java:255) at org.mortbay.jetty.servlet.AbstractSessionManager.getHttpSession (AbstractSessionManager.java:237) at org.mortbay.jetty.Request.getSession(Request.java:998)
[Lift] Re: Getting started: Rendering a template (Definitive Guide)
Sorry, reread your post, I thought you were starting from a completely blank app. The problem is probably with the sitemap, you will have to add an entry for your new file. -- Derek Williams --~--~-~--~~~---~--~~ 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: Getting started: Rendering a template (Definitive Guide)
The lift:surround tag is used to reference another template that will contain your template. If you have only added index.html you can try removing the lift:surround tag and see if that works, or find the place in the Guide that explains how to create a template that can be used with surround. -- Derek Williams --~--~-~--~~~---~--~~ 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] Deploying
What's the best way to get a lift app running on a Ubuntu web server I can SSH into with full permissions? It came with almost nothing installed. 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] slow down ajax?
I am moving nicely with my 'save all dates as millis and let the client localize for display' project, learning while enhancing the ToDo sample app. I have added a 'dueOn' field, and that is displayed as swappable ajaxText, similar to the other fields in the tutorial. I have enabled datepicker for the ajaxText field via jQuery, and have a parsing function attached an event listener, so when datepicker finishes, the date is converted to millis, ready for Lift to send back to the server and save. So far, all good. The problem is that Lift's ajax starts ('onblur') before it has a chance to see the new date value, so the new value is never saved. What I need is a way to tell Lift to wait until after my parser has had a chance to write the changed value. I like the ajax style, so I don't want to make a 'submit' form, and 'onchange' won't do it either, because the value is actually changed twice (once to a formatted date, once to millis). What I need is some way to say, 'OK to start ajax now'! --~--~-~--~~~---~--~~ 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] IMPORTANT for H2 users
I fixed the H2 default schema to be PUBLIC (top level in H2 console is PUBLIC) rather than Empty (username). This bug prevented one from schemifying a new database without creating the schema of the username first, and using the schema in the url. However, if you use the schema in the URL lift may not be happy anymore. Please inform the list of any related problem. David, is there a way to override the connection's schema? 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: Getting started: Rendering a template (Definitive Guide)
Derek Williams wrote: The lift:surround tag is used to reference another template that will contain your template. If you have only added index.html you can try removing the lift:surround tag and see if that works, or find the place in the Guide that explains how to create a template that can be used with surround. Thanks for the response Derek! So I took out the lift:surround tag from my test file, and turned it into a basic HTML page with html and head and body elements and no Lift elements. Still the browser responds with: The Requested URL /mojo/index.html was not found on this server, though it's clearly there on the path. I guess the book is leaving something out, like having to add the path to the SiteMap or such? Or maybe there's another configuration missing that isn't mentioned in the chapter. Cheers, Mojo -- Morris Jones Monrovia, CA http://www.whiteoaks.com Old Town Astronomers: http://www.otastro.org http://twitter.com/mojo_la --~--~-~--~~~---~--~~ 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: Deploying
Naftoli Gugenheim wrote: What's the best way to get a lift app running on a Ubuntu web server I can SSH into with full permissions? It came with almost nothing installed. Thanks. I'll take a shot at this, since the answer primarily involves Java and an application server. It's not too difficult really. You'll need to have a Java runtime installed, the latest Java 6 release recommended. You can probably install this in /usr/local/java, and point JAVA_HOME to that directory. Or without any root access, install it to your home directory and point JAVA_HOME there. Try java -version and which java before you do that to see what's already on the machine. Then get the latest Tomcat and unpack it in a directory as well. Maven will build your WAR file with the mvn package command. Drop the WAR file in Tomcat's webapps directory, and start up Tomcat. By default your app will appear on the server's port 8080. Or you can use Jetty instead of Tomcat, just as the Maven plug-in does. Hope that helps a little ... Mojo -- Morris Jones Monrovia, CA http://www.whiteoaks.com Old Town Astronomers: http://www.otastro.org http://twitter.com/mojo_la --~--~-~--~~~---~--~~ 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: Getting started: Rendering a template (Definitive Guide)
I believe the book describes the SiteMap quite extensively. Yes, if you are using SiteMap then you have to add your new page to the SiteMap. Br's, Marius On Aug 17, 8:27 am, Morris Jones m...@whiteoaks.com wrote: Derek Williams wrote: The lift:surround tag is used to reference another template that will contain your template. If you have only added index.html you can try removing the lift:surround tag and see if that works, or find the place in the Guide that explains how to create a template that can be used with surround. Thanks for the response Derek! So I took out the lift:surround tag from my test file, and turned it into a basic HTML page with html and head and body elements and no Lift elements. Still the browser responds with: The Requested URL /mojo/index.html was not found on this server, though it's clearly there on the path. I guess the book is leaving something out, like having to add the path to the SiteMap or such? Or maybe there's another configuration missing that isn't mentioned in the chapter. Cheers, Mojo -- Morris Jones Monrovia, CAhttp://www.whiteoaks.com Old Town Astronomers:http://www.otastro.orghttp://twitter.com/mojo_la --~--~-~--~~~---~--~~ 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: slow down ajax?
Would you please post a code snippet with what you're doing? (a minimalistic example) Br's, Marius On Aug 17, 7:41 am, g-man gregor...@gmail.com wrote: I am moving nicely with my 'save all dates as millis and let the client localize for display' project, learning while enhancing the ToDo sample app. I have added a 'dueOn' field, and that is displayed as swappable ajaxText, similar to the other fields in the tutorial. I have enabled datepicker for the ajaxText field via jQuery, and have a parsing function attached an event listener, so when datepicker finishes, the date is converted to millis, ready for Lift to send back to the server and save. So far, all good. The problem is that Lift's ajax starts ('onblur') before it has a chance to see the new date value, so the new value is never saved. What I need is a way to tell Lift to wait until after my parser has had a chance to write the changed value. I like the ajax style, so I don't want to make a 'submit' form, and 'onchange' won't do it either, because the value is actually changed twice (once to a formatted date, once to millis). What I need is some way to say, 'OK to start ajax now'! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---