[Lift] Re: Anyone working on the flot widget?
Hi flot users, I am trying to copy the basic Flot example into my own code. I have no compile errors but the graph isn't rendered because /classpath/flot/ jquery.flot.js isn't found. Since I get no errors with the flot methods in my snippet, I assume lift-widgets is loading correctly. Am I missing something? Thanks, Peter On Jun 25, 5:13 am, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: On 25 Jun 2009, Francois Bertrand wrote: Hi Jeppe Great to see you are interested in the flot widget. My current to-do list for the flot widget, is: - create more Lift JsExp and JsCmd to modify a already displayed flot graph. They should be used in AJAX and Comet applications - update to a more recent version of the javascrrit widget I need this as well, especially since there are some patches that provides pie charts - create the test demo app, - make the creation of FlotOptions, FlotLinesOptions, etc, less verbose. I hope that Scala 2.8 Named and Default Arguments will help. Yeah, this would be nice :-) We probably need some working code within the next few weeks so probably can't wait for 2.8 though. - create a high level mechanism to display Lift's Record I appreciate any help. What's the best way to coordinate this? Just fork the code on github or? /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] Including jars into a liftweb project
Hey guys, i was wondering how (and where) i have to put jars in my liftweb project to get them included. i know it's a beginners question, but i've been playing around all night and i couldn't get it to work. Thanks in advance --~--~-~--~~~---~--~~ 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] Error attempting to persist Mapper
Hi all, I'm attempting to persist a Mapper used to join two tables. java.lang.NullPointerException: Trying to open an empty Box at net.liftweb.util.EmptyBox.open_$bang(Box.scala:370) at net.liftweb.util.EmptyBox.open_$bang(Box.scala:366) at net.liftweb.mapper.MetaMapper$$anonfun$12.apply(MetaMapper.scala: 583) at net.liftweb.mapper.MetaMapper$$anonfun$12.apply(MetaMapper.scala: 578) at net.liftweb.mapper.DB$.use(DB.scala:305) at net.liftweb.mapper.MetaMapper$class.save(MetaMapper.scala:577) The empty box is in the update statement, which confuses me as I should be performing an insert.( from MetaMapper ) val ret: Boolean = DB.prepareStatement(UPDATE +dbTableName+ SET +whatToSet(toSave)+ WHERE +indexMap.open_! + = ?, conn) I am assuming it is something to do with my understand of how to use a non-keyed Mapper. The exception is thrown when save is called in the join function. class AB extends Mapper[AB] { def getSingleton = AB object A extends MappedLongForeignKey(this, A) { override def dbColumnName = a_Bs_id } object B extends MappedLongForeignKey(this, B) { override def dbColumnName = B_id } object index extends MappedInt(this) { override def dbColumnName = Bs_idx } } object AB extends AB with MetaMapper[AB] { override def dbTableName = A_B def join (a : A, b : B):Boolean = { val list = AB.findAll(By(AB.a,a)) val i = list.isEmpty match { case true = 0 case false = list.size } this.create.A(a).B(b).index(i).save } } Any pointers would be appreciated, I can't change the data structure as the table is used by other applications. Jono --~--~-~--~~~---~--~~ 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: Anyone working on the flot widget?
On 26 Jun 2009, Peter Robinett wrote: Hi flot users, I am trying to copy the basic Flot example into my own code. I have no compile errors but the graph isn't rendered because /classpath/flot/ jquery.flot.js isn't found. Since I get no errors with the flot methods in my snippet, I assume lift-widgets is loading correctly. Am I missing something? Did you put a call to net.liftweb.widgets.flot.Flot.init in Boot? This is needed to make the javascript resources available... /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: Including jars into a liftweb project
On 26 Jun 2009, fbettag wrote: Hey guys, i was wondering how (and where) i have to put jars in my liftweb project to get them included. i know it's a beginners question, but i've been playing around all night and i couldn't get it to work. Normally, you would put jars in the WEB-INF/lib folder and they will be picked up by the servlet container They need to be available at compile time too... /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: Including jars into a liftweb project
On Fri, Jun 26, 2009 at 3:51 PM, Jeppe Nejsum Madsenje...@ingolfs.dk wrote: On 26 Jun 2009, fbettag wrote: Hey guys, i was wondering how (and where) i have to put jars in my liftweb project to get them included. i know it's a beginners question, but i've been playing around all night and i couldn't get it to work. Normally, you would put jars in the WEB-INF/lib folder and they will be picked up by the servlet container They need to be available at compile time too... /Jeppe Usually, jar files should be put under maven's dependency management, but you can try to add them by adding something like the following to pom.xml !-- local dependency -- dependency groupIdcom.xxx/groupId artifactIdcom.xxx.xxx/artifactId version4.7.1/version scopesystem/scope systemPath${basedir}/src/main/webapp/WEB-INF/lib/x-4.7.1.jar/systemPath /dependency --~--~-~--~~~---~--~~ 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: Including jars into a liftweb project
To clarify - you only need that system path if its a JAR not in a maven repository anywhere. What JAR are you trying to add? Cheers, Tim On Jun 26, 9:01 am, Caoyuan dcaoy...@gmail.com wrote: On Fri, Jun 26, 2009 at 3:51 PM, Jeppe Nejsum Madsenje...@ingolfs.dk wrote: On 26 Jun 2009, fbettag wrote: Hey guys, i was wondering how (and where) i have to put jars in my liftweb project to get them included. i know it's a beginners question, but i've been playing around all night and i couldn't get it to work. Normally, you would put jars in the WEB-INF/lib folder and they will be picked up by the servlet container They need to be available at compile time too... /Jeppe Usually, jar files should be put under maven's dependency management, but you can try to add them by adding something like the following to pom.xml !-- local dependency -- dependency groupIdcom.xxx/groupId artifactIdcom.xxx.xxx/artifactId version4.7.1/version scopesystem/scope systemPath${basedir}/src/main/webapp/WEB-INF/lib/x-4.7.1.jar/systemP ath /dependency --~--~-~--~~~---~--~~ 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: form element specific error messages
lift:Customer.newCustomer form=POST divnewCustomer:firstName/newCustomer:firstName/divlift:msg id=firstNameError/ divnewCustomer:lastName/newCustomer:lastName/divlift:msg id=lastNameError/ divnewCustomer:submit //div /lift:Customer.newCustomer In your snippet when you need to set the error message just call: S.error(firstname, an error message) br's, Marius On Jun 26, 3:10 am, Trav wilhel...@gmail.com wrote: I have a form such as: lift:Customer.newCustomer form=POST divnewCustomer:firstName/newCustomer:firstName/div divnewCustomer:lastName/newCustomer:lastName/div divnewCustomer:submit //div /lift:Customer.newCustomer and a bind: bind(newCustomer, xhtml, firstName - text(XXX), lastName - text(XXX), submit - submit(XXX) ) If I want to require that both first and last name are required, but the form is submitted with no last name, how anyone suggest that I put the error message *Required in the appropriate div tag next to the text box. --~--~-~--~~~---~--~~ 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: New mapper class: MappedEnumString
Oliver Lambert olambo...@gmail.com writes: [...] No this isn't what I'm suggesting, I don't think MappedEnum should be made flexible. I know this wasn't your suggestion, but any reason not to make MappedEnum flexible (if possible and backwards compatibility could be maintained) ? I was thinking perhaps your class could work with EnumWithDescription as shown below, which extends Enumeration#Values to include a description. This should be simple, but see below trait ValueWithDescription { def description: String def name: String } abstract class EnumWithDescription { type Value = enum.Value with ValueWithDescription private var _values: List[Value] = Nil def values = _values // possibly not a good idea using this directly val enum = new Enumeration { def Value(inName: String, inDescription: String): Value with ValueWithDescription = { new Val(nextId, inName) with ValueWithDescription { def description = inDescription def name = inName } } } def Value(name: String, description: String): Value = { val value = enum.Value(name, description) _values = _values ::: List(value) // build in order value } def Value(name: String): Value = Value(name, name) def valueOf(name: String) = values find (_.name == name) def nameDescriptionList = values map(x = (x.name, x.description) ) } At first I didn't understand why you don't just extend Enumeration like this: abstract class EnumWithDescription extends Enumeration { def Value(inName: String, inDescription: String): Value with ValueWithDescription = { new Val(nextId, inName) with ValueWithDescription { def description = inDescription def name = inName } } } but figure you would then have to cast all the values to ValueWithDescription. It seems Enumeration miss a type parameter to describe the types of Values in cases like this. Hmmm I see Enumerations have changed for 2.8 so maybe this is not impossible Back to the mapping. The way I see all these different solutions is: 1) We need to define Enumerations to get nice handling of predefined constants 2) The enumeration values need to be mapped to a database value (numeric or string) 3) The enumeration values need to be mapped to a display value (from code our property files) If the MappedEnum was parameterized on how to achieve 2+3 it seem all possibilities are open. If MappedEnum worked with ValueWithDescription values instead of Enumeration#Value, it might? be possible to define an implicit conversion from Enumeration#Value to ValueWithDescription I don't have much time in the days that are coming but will try to think of a solution to this. Input is welcome :-) /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: Anyone working on the flot widget?
Thanks, Jeppe, that's what I was missing. To continue to hijack this thread with my own questions, I'm having a problem creating the data List[(Double, Double)] that FlotSerie wants. I have: override val data = MyModel.findAll(By(MyMode.id, myId), OrderBy (MyModel.datetime, Ascending)).map(m = (m.datetime.getTime.toDouble, m.temperature.toDouble)) This gives me an error saying I'm missing arguments for toDouble in class MappedDouble (this is MyModel.temperature) and suggests treating it as a partially applied function. I'm not sure I want to do that but, trying it anyway (with m.temperature.toDouble _), I got an new error saying that List[(Double, (Any) = Double)] is an incompatible type. Any suggestions? I'm sure it's a REALLY simple fix. Thanks, Peter On Jun 26, 12:53 am, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: On 26 Jun 2009, Peter Robinett wrote: Hi flot users, I am trying to copy the basic Flot example into my own code. I have no compile errors but the graph isn't rendered because /classpath/flot/ jquery.flot.js isn't found. Since I get no errors with the flot methods in my snippet, I assume lift-widgets is loading correctly. Am I missing something? Did you put a call to net.liftweb.widgets.flot.Flot.init in Boot? This is needed to make the javascript resources available... /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: Anyone working on the flot widget?
What's the type of temperature and what's the signature of the toDouble method on it? On Fri, Jun 26, 2009 at 11:09 AM, Peter Robinett pe...@bubblefoundry.comwrote: Thanks, Jeppe, that's what I was missing. To continue to hijack this thread with my own questions, I'm having a problem creating the data List[(Double, Double)] that FlotSerie wants. I have: override val data = MyModel.findAll(By(MyMode.id, myId), OrderBy (MyModel.datetime, Ascending)).map(m = (m.datetime.getTime.toDouble, m.temperature.toDouble)) This gives me an error saying I'm missing arguments for toDouble in class MappedDouble (this is MyModel.temperature) and suggests treating it as a partially applied function. I'm not sure I want to do that but, trying it anyway (with m.temperature.toDouble _), I got an new error saying that List[(Double, (Any) = Double)] is an incompatible type. Any suggestions? I'm sure it's a REALLY simple fix. Thanks, Peter On Jun 26, 12:53 am, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: On 26 Jun 2009, Peter Robinett wrote: Hi flot users, I am trying to copy the basic Flot example into my own code. I have no compile errors but the graph isn't rendered because /classpath/flot/ jquery.flot.js isn't found. Since I get no errors with the flot methods in my snippet, I assume lift-widgets is loading correctly. Am I missing something? Did you put a call to net.liftweb.widgets.flot.Flot.init in Boot? This is needed to make the javascript resources available... /Jeppe -- Viktor Klang Scala Loudmouth --~--~-~--~~~---~--~~ 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: Anyone working on the flot widget?
Peter Robinett pe...@bubblefoundry.com writes: Thanks, Jeppe, that's what I was missing. To continue to hijack this thread with my own questions, I'm having a problem creating the data List[(Double, Double)] that FlotSerie wants. I have: override val data = MyModel.findAll(By(MyMode.id, myId), OrderBy (MyModel.datetime, Ascending)).map(m = (m.datetime.getTime.toDouble, m.temperature.toDouble)) If m.temperature is a MappedDouble you probably need m.temperature.is The toDouble method converts an Any to a double, not the value of the current mapped object. /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] JPA, Hibernate, c3p0
I'm using JPA and Hibernate for persistence, and I've configured Hibernate to use c3p0 for connection pooling. I'm using scalajpa as follows: object em extends LocalEMF(persistenceUnit) with ThreadLocalEM When Tomcat reloads the app, the following is logged: A C3P0Registry mbean is already registered. This probably means that an application using c3p0 was undeployed, but not all PooledDataSources were closed prior to undeployment. This may lead to resource leaks over time. Please take care to close all PooledDataSources. So I thought I would just add a function to LiftRules.unloadHooks to close the EntityManagerFactory, however I can't find any way to access the underlying factory. LocaEMF has an emf val, but it is private. Any ideas? --~--~-~--~~~---~--~~ 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: Including jars into a liftweb project
If I have an application thats not in a Maven repository, I usually put it in my local (or company) repository - for instance adding functionaljava.jar mvn install:install-file -DgroupId=org.other -DartifactId=functionaljava -Dversion=2.17 -Dpackaging=jar -Dfile=functionaljava.jar -DgeneratePom=true But, before you do this, as suggested below, you might want to google for the application (eg ibiblio functionaljava) to make sure its not in a maven repository. On Fri, Jun 26, 2009 at 6:16 PM, Timothy Perrett timo...@getintheloop.euwrote: To clarify - you only need that system path if its a JAR not in a maven repository anywhere. What JAR are you trying to add? Cheers, Tim On Jun 26, 9:01 am, Caoyuan dcaoy...@gmail.com wrote: On Fri, Jun 26, 2009 at 3:51 PM, Jeppe Nejsum Madsenje...@ingolfs.dk wrote: On 26 Jun 2009, fbettag wrote: Hey guys, i was wondering how (and where) i have to put jars in my liftweb project to get them included. i know it's a beginners question, but i've been playing around all night and i couldn't get it to work. Normally, you would put jars in the WEB-INF/lib folder and they will be picked up by the servlet container They need to be available at compile time too... /Jeppe Usually, jar files should be put under maven's dependency management, but you can try to add them by adding something like the following to pom.xml !-- local dependency -- dependency groupIdcom.xxx/groupId artifactIdcom.xxx.xxx/artifactId version4.7.1/version scopesystem/scope systemPath${basedir}/src/main/webapp/WEB-INF/lib/x-4.7.1.jar/systemP ath /dependency --~--~-~--~~~---~--~~ 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: Anyone working on the flot widget?
Thanks, Jeppe, that was it. So 'is' will give you the native type of any MappedType? Good to know! Peter On Jun 26, 3:47 am, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: Peter Robinett pe...@bubblefoundry.com writes: Thanks, Jeppe, that's what I was missing. To continue to hijack this thread with my own questions, I'm having a problem creating the data List[(Double, Double)] that FlotSerie wants. I have: override val data = MyModel.findAll(By(MyMode.id, myId), OrderBy (MyModel.datetime, Ascending)).map(m = (m.datetime.getTime.toDouble, m.temperature.toDouble)) If m.temperature is a MappedDouble you probably need m.temperature.is The toDouble method converts an Any to a double, not the value of the current mapped object. /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: Including jars into a liftweb project
Just further to this, as was discussed ages and ages ago, be carful when using system scope - a more portable alternative is an embedded repository: http://is.gd/1erQT Cheers, Tim On Jun 26, 3:07 pm, Oliver Lambert olambo...@gmail.com wrote: If I have an application thats not in a Maven repository, I usually put it in my local (or company) repository - for instance adding functionaljava.jar mvn install:install-file -DgroupId=org.other -DartifactId=functionaljava -Dversion=2.17 -Dpackaging=jar -Dfile=functionaljava.jar -DgeneratePom=true But, before you do this, as suggested below, you might want to google for the application (eg ibiblio functionaljava) to make sure its not in a maven repository. On Fri, Jun 26, 2009 at 6:16 PM, Timothy Perrett timo...@getintheloop.euwrote: To clarify - you only need that system path if its a JAR not in a maven repository anywhere. What JAR are you trying to add? Cheers, Tim On Jun 26, 9:01 am, Caoyuan dcaoy...@gmail.com wrote: On Fri, Jun 26, 2009 at 3:51 PM, Jeppe Nejsum Madsenje...@ingolfs.dk wrote: On 26 Jun 2009, fbettag wrote: Hey guys, i was wondering how (and where) i have to put jars in my liftweb project to get them included. i know it's a beginners question, but i've been playing around all night and i couldn't get it to work. Normally, you would put jars in the WEB-INF/lib folder and they will be picked up by the servlet container They need to be available at compile time too... /Jeppe Usually, jar files should be put under maven's dependency management, but you can try to add them by adding something like the following to pom.xml !-- local dependency -- dependency groupIdcom.xxx/groupId artifactIdcom.xxx.xxx/artifactId version4.7.1/version scopesystem/scope systemPath${basedir}/src/main/webapp/WEB-INF/lib/x-4.7.1.jar/systemP ath /dependency --~--~-~--~~~---~--~~ 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: JPA, Hibernate, c3p0
I'll look at adding a hook. Derek On Fri, Jun 26, 2009 at 6:43 AM, Ryan Donahue donahu...@gmail.com wrote: I'm using JPA and Hibernate for persistence, and I've configured Hibernate to use c3p0 for connection pooling. I'm using scalajpa as follows: object em extends LocalEMF(persistenceUnit) with ThreadLocalEM When Tomcat reloads the app, the following is logged: A C3P0Registry mbean is already registered. This probably means that an application using c3p0 was undeployed, but not all PooledDataSources were closed prior to undeployment. This may lead to resource leaks over time. Please take care to close all PooledDataSources. So I thought I would just add a function to LiftRules.unloadHooks to close the EntityManagerFactory, however I can't find any way to access the underlying factory. LocaEMF has an emf val, but it is private. Any ideas? --~--~-~--~~~---~--~~ 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 attempting to persist Mapper
Jono, The problem here is actually not with mapper. Look at your stack trace: java.lang.NullPointerException: Trying to open an empty Box at net.liftweb.util.EmptyBox.open_$bang(Box.scala:370) at net.liftweb.util.EmptyBox.open_$bang(Box.scala:366) UPDATE +dbTableName+ SET +whatToSet(toSave)+ WHERE +indexMap.open_! + = ? Whatever indexMap is, its of type Empty rather than Full[YourType] - try this: UPDATE +dbTableName+ SET +whatToSet(toSave)+ WHERE +indexMap.openOr(yourDefault) + = ? Essentially, your getting an NPE because your trying to read something that doesn't exist. Using openOr will make sure that if the box is empty your default value is used in its place rather than exploding like that. Does that help? Cheers, Tim On Jun 26, 3:33 am, Jonathan Ferguson j...@spiralarm.com wrote: Hi all, I'm attempting to persist a Mapper used to join two tables. java.lang.NullPointerException: Trying to open an empty Box at net.liftweb.util.EmptyBox.open_$bang(Box.scala:370) at net.liftweb.util.EmptyBox.open_$bang(Box.scala:366) at net.liftweb.mapper.MetaMapper$$anonfun$12.apply(MetaMapper.scala: 583) at net.liftweb.mapper.MetaMapper$$anonfun$12.apply(MetaMapper.scala: 578) at net.liftweb.mapper.DB$.use(DB.scala:305) at net.liftweb.mapper.MetaMapper$class.save(MetaMapper.scala:577) The empty box is in the update statement, which confuses me as I should be performing an insert.( from MetaMapper ) val ret: Boolean = DB.prepareStatement(UPDATE +dbTableName+ SET +whatToSet(toSave)+ WHERE +indexMap.open_! + = ?, conn) I am assuming it is something to do with my understand of how to use a non-keyed Mapper. The exception is thrown when save is called in the join function. class AB extends Mapper[AB] { def getSingleton = AB object A extends MappedLongForeignKey(this, A) { override def dbColumnName = a_Bs_id } object B extends MappedLongForeignKey(this, B) { override def dbColumnName = B_id } object index extends MappedInt(this) { override def dbColumnName = Bs_idx } } object AB extends AB with MetaMapper[AB] { override def dbTableName = A_B def join (a : A, b : B):Boolean = { val list = AB.findAll(By(AB.a,a)) val i = list.isEmpty match { case true = 0 case false = list.size } this.create.A(a).B(b).index(i).save } } Any pointers would be appreciated, I can't change the data structure as the table is used by other applications. Jono --~--~-~--~~~---~--~~ 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] Warnings for missing binds?
I just spent the better part of half a day trying to track down an issue with binding that ended up being a subtle typo. I'm thinking of adding in some logging (in dev mode) for the bind function to warn about unused bind elements and unused bind params, just to better help locate issues like this. Any objections? 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: Anyone working on the flot widget?
That's actually a common iddiom throughout lift - its the same for RequestVar and SessionVar etc etc Cheers, Tim On 26/06/2009 16:09, Peter Robinett pe...@bubblefoundry.com wrote: Thanks, Jeppe, that was it. So 'is' will give you the native type of any MappedType? Good to know! --~--~-~--~~~---~--~~ 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: Warnings for missing binds?
I'd like to see this - had a similar hour of headscratching myself this morning. I wouldn't be adverse to info logs on successful binds either. Derek Chen-Becker wrote: I just spent the better part of half a day trying to track down an issue with binding that ended up being a subtle typo. I'm thinking of adding in some logging (in dev mode) for the bind function to warn about unused bind elements and unused bind params, just to better help locate issues like this. Any objections? 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 -~--~~~~--~~--~--~--- begin:vcard fn:Matt Williams n:Williams;Matt org:Makeable Solutions Ltd adr;dom:;;113-116 Bute Street;Cardiff;;CF10 5EQ email;internet:m...@makeable.co.uk title:Chief Platform Architect tel;work:02920 007543 tel;cell:07958 208482 x-mozilla-html:FALSE url:http://www.makeable.co.uk version:2.1 end:vcard smime.p7s Description: S/MIME Cryptographic Signature
[Lift] Re: Warnings for missing binds?
That would be nice ... but still what was the problem with unused bind params? ... could you please elaborate a bit? Br's, Marius On Jun 26, 6:32 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: I just spent the better part of half a day trying to track down an issue with binding that ended up being a subtle typo. I'm thinking of adding in some logging (in dev mode) for the bind function to warn about unused bind elements and unused bind params, just to better help locate issues like this. Any objections? 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: Warnings for missing binds?
+1 - Derek Chen-Beckerdchenbec...@gmail.com wrote: I just spent the better part of half a day trying to track down an issue with binding that ended up being a subtle typo. I'm thinking of adding in some logging (in dev mode) for the bind function to warn about unused bind elements and unused bind params, just to better help locate issues like this. Any objections? 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: Error attempting to persist Mapper
I think he said that code is in MetaMapper - Timothy Perretttimo...@getintheloop.eu wrote: Jono, The problem here is actually not with mapper. Look at your stack trace: java.lang.NullPointerException: Trying to open an empty Box at net.liftweb.util.EmptyBox.open_$bang(Box.scala:370) at net.liftweb.util.EmptyBox.open_$bang(Box.scala:366) UPDATE +dbTableName+ SET +whatToSet(toSave)+ WHERE +indexMap.open_! + = ? Whatever indexMap is, its of type Empty rather than Full[YourType] - try this: UPDATE +dbTableName+ SET +whatToSet(toSave)+ WHERE +indexMap.openOr(yourDefault) + = ? Essentially, your getting an NPE because your trying to read something that doesn't exist. Using openOr will make sure that if the box is empty your default value is used in its place rather than exploding like that. Does that help? Cheers, Tim On Jun 26, 3:33 am, Jonathan Ferguson j...@spiralarm.com wrote: Hi all, I'm attempting to persist a Mapper used to join two tables. java.lang.NullPointerException: Trying to open an empty Box at net.liftweb.util.EmptyBox.open_$bang(Box.scala:370) at net.liftweb.util.EmptyBox.open_$bang(Box.scala:366) at net.liftweb.mapper.MetaMapper$$anonfun$12.apply(MetaMapper.scala: 583) at net.liftweb.mapper.MetaMapper$$anonfun$12.apply(MetaMapper.scala: 578) at net.liftweb.mapper.DB$.use(DB.scala:305) at net.liftweb.mapper.MetaMapper$class.save(MetaMapper.scala:577) The empty box is in the update statement, which confuses me as I should be performing an insert.( from MetaMapper ) val ret: Boolean = DB.prepareStatement(UPDATE +dbTableName+ SET +whatToSet(toSave)+ WHERE +indexMap.open_! + = ?, conn) I am assuming it is something to do with my understand of how to use a non-keyed Mapper. The exception is thrown when save is called in the join function. class AB extends Mapper[AB] { def getSingleton = AB object A extends MappedLongForeignKey(this, A) { override def dbColumnName = a_Bs_id } object B extends MappedLongForeignKey(this, B) { override def dbColumnName = B_id } object index extends MappedInt(this) { override def dbColumnName = Bs_idx } } object AB extends AB with MetaMapper[AB] { override def dbTableName = A_B def join (a : A, b : B):Boolean = { val list = AB.findAll(By(AB.a,a)) val i = list.isEmpty match { case true = 0 case false = list.size } this.create.A(a).B(b).index(i).save } } Any pointers would be appreciated, I can't change the data structure as the table is used by other applications. Jono --~--~-~--~~~---~--~~ 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 attempting to persist Mapper
Ah sorry I didn't realize. mapper is not really my area so I cant say what's causing that. Please raise an issue on github as we'll need to look into this properly. Thanks, Tim On Jun 26, 4:59 pm, Naftoli Gugenhem naftoli...@gmail.com wrote: I think he said that code is in MetaMapper --~--~-~--~~~---~--~~ 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: Warnings for missing binds?
I meant that it could warn you if your bind tag looks like: lift:bind name=content / But you made a mistake with your surround tag: lift:surround at=contet / (notice the misspelling) I was thinking that you would get two warnings: 1. One that nothing had matched the content name 2. One that there was an unused contet surround Derek On Fri, Jun 26, 2009 at 9:52 AM, marius d. marius.dan...@gmail.com wrote: That would be nice ... but still what was the problem with unused bind params? ... could you please elaborate a bit? Br's, Marius On Jun 26, 6:32 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: I just spent the better part of half a day trying to track down an issue with binding that ended up being a subtle typo. I'm thinking of adding in some logging (in dev mode) for the bind function to warn about unused bind elements and unused bind params, just to better help locate issues like this. Any objections? 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: Warnings for missing binds?
Nice proposal! I'm noodling on adding a bit of framework to widgets, I got a bit frustrated with a widget today... Aöso, would be cool to make them OSGI components to be able to add them without rebooting. But now I'm babbling again -- Viktor On Jun 26, 2009 7:11 PM, Derek Chen-Becker dchenbec...@gmail.com wrote: I meant that it could warn you if your bind tag looks like: lift:bind name=content / But you made a mistake with your surround tag: lift:surround at=contet / (notice the misspelling) I was thinking that you would get two warnings: 1. One that nothing had matched the content name 2. One that there was an unused contet surround Derek On Fri, Jun 26, 2009 at 9:52 AM, marius d. marius.dan...@gmail.com wrote: That would be ni... --~--~-~--~~~---~--~~ 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: Warnings for missing binds?
Ah right ... by all means please add this. On Jun 26, 7:57 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: I meant that it could warn you if your bind tag looks like: lift:bind name=content / But you made a mistake with your surround tag: lift:surround at=contet / (notice the misspelling) I was thinking that you would get two warnings: 1. One that nothing had matched the content name 2. One that there was an unused contet surround Derek On Fri, Jun 26, 2009 at 9:52 AM, marius d. marius.dan...@gmail.com wrote: That would be nice ... but still what was the problem with unused bind params? ... could you please elaborate a bit? Br's, Marius On Jun 26, 6:32 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: I just spent the better part of half a day trying to track down an issue with binding that ended up being a subtle typo. I'm thinking of adding in some logging (in dev mode) for the bind function to warn about unused bind elements and unused bind params, just to better help locate issues like this. Any objections? 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: Warnings for missing binds?
OK, pushed to master. If you typo your bind IDs, you'll get something like: WARN - No binding values match the lift:bind name attribute: content WARN - Unused binding values for lift:bind: contet Derek On Fri, Jun 26, 2009 at 1:09 PM, marius d. marius.dan...@gmail.com wrote: Ah right ... by all means please add this. On Jun 26, 7:57 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: I meant that it could warn you if your bind tag looks like: lift:bind name=content / But you made a mistake with your surround tag: lift:surround at=contet / (notice the misspelling) I was thinking that you would get two warnings: 1. One that nothing had matched the content name 2. One that there was an unused contet surround Derek On Fri, Jun 26, 2009 at 9:52 AM, marius d. marius.dan...@gmail.com wrote: That would be nice ... but still what was the problem with unused bind params? ... could you please elaborate a bit? Br's, Marius On Jun 26, 6:32 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: I just spent the better part of half a day trying to track down an issue with binding that ended up being a subtle typo. I'm thinking of adding in some logging (in dev mode) for the bind function to warn about unused bind elements and unused bind params, just to better help locate issues like this. Any objections? 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: Warnings for missing binds?
Indentation still looks horked. I give up :( On Fri, Jun 26, 2009 at 3:04 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: OK, just pushed again. Emacs did some weird things to indentation, so I fixed it. Derek On Fri, Jun 26, 2009 at 1:49 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: OK, pushed to master. If you typo your bind IDs, you'll get something like: WARN - No binding values match the lift:bind name attribute: content WARN - Unused binding values for lift:bind: contet Derek On Fri, Jun 26, 2009 at 1:09 PM, marius d. marius.dan...@gmail.comwrote: Ah right ... by all means please add this. On Jun 26, 7:57 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: I meant that it could warn you if your bind tag looks like: lift:bind name=content / But you made a mistake with your surround tag: lift:surround at=contet / (notice the misspelling) I was thinking that you would get two warnings: 1. One that nothing had matched the content name 2. One that there was an unused contet surround Derek On Fri, Jun 26, 2009 at 9:52 AM, marius d. marius.dan...@gmail.com wrote: That would be nice ... but still what was the problem with unused bind params? ... could you please elaborate a bit? Br's, Marius On Jun 26, 6:32 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: I just spent the better part of half a day trying to track down an issue with binding that ended up being a subtle typo. I'm thinking of adding in some logging (in dev mode) for the bind function to warn about unused bind elements and unused bind params, just to better help locate issues like this. Any objections? 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] unexpectedly abrupt end for such an innocent mistake
All, See the trace below. Is this how we'd like this error to be handled? Best wishes, --greg Welcome to Scala version 2.7.4.final (Java HotSpot(TM) Client VM, Java 1.5.0_16). Type in expressions to have them evaluated. Type :help for more information. scala List( 1, 2, 3 ) match { case List( 1, x* ) = x case _ = throw new Exception() } Exception in thread main java.lang.Error: symbol value x does not exist in line1$object$$iw$$iw.init at scala.tools.nsc.backend.icode.GenICode$ICodePhase.scala$tools$nsc$backend$icode$GenICode$ICodePhase$$genLoad(GenICode.scala:912) at scala.tools.nsc.backend.icode.GenICode$ICodePhase.scala$tools$nsc$backend$icode$GenICode$ICodePhase$$genLoad(GenICode.scala:402) at scala.tools.nsc.backend.icode.GenICode$ICodePhase.scala$tools$nsc$backend$icode$GenICode$ICodePhase$$genLoad(GenICode.scala:455) at scala.tools.nsc.backend.icode.GenICode$ICodePhase.scala$tools$nsc$backend$icode$GenICode$ICodePhase$$genLoad(GenICode.scala:939) at scala.tools.nsc.backend.icode.GenICode$ICodePhase.scala$tools$nsc$backend$icode$GenICode$ICodePhase$$genStat(GenICode.scala:171) at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$genStat$1.apply(GenICode.scala:146) at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$genStat$1.apply(GenICode.scala:145) at scala.List.foreach(List.scala:841) at scala.tools.nsc.backend.icode.GenICode$ICodePhase.genStat(GenICode.scala:145) at scala.tools.nsc.backend.icode.GenICode$ICodePhase.scala$tools$nsc$backend$icode$GenICode$ICodePhase$$genLoad(GenICode.scala:938) at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:114) at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$gen$1.apply(GenICode.scala:71) at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$gen$1.apply(GenICode.scala:71) at scala.List.foreach(List.scala:841) at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:71) at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:136) at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:90) at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$gen$1.apply(GenICode.scala:71) at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$gen$1.apply(GenICode.scala:71) at scala.List.foreach(List.scala:841) at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:71) at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:81) at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:67) at scala.tools.nsc.backend.icode.GenICode$ICodePhase.apply(GenICode.scala:63) at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:267) at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:246) at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:246) at scala.Iterator$class.foreach(Iterator.scala:414) at scala.collection.mutable.ListBuffer$$anon$1.foreach(ListBuffer.scala:266) at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:246) at scala.tools.nsc.backend.icode.GenICode$ICodePhase.run(GenICode.scala:56) at scala.tools.nsc.Global$Run.compileSources(Global.scala:574) at scala.tools.nsc.Interpreter$Request.compile(Interpreter.scala:820) at scala.tools.nsc.Interpreter.interpret(Interpreter.scala:505) at scala.tools.nsc.Interpreter.interpret(Interpreter.scala:494) at scala.tools.nsc.InterpreterLoop.interpretStartingWith(InterpreterLoop.scala:242) at scala.tools.nsc.InterpreterLoop.command(InterpreterLoop.scala:230) at scala.tools.nsc.InterpreterLoop.repl(InterpreterLoop.scala:142) at scala.tools.nsc.InterpreterLoop.main(InterpreterLoop.scala:298) at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:141) at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala) Process inferior-scala exited abnormally with code 1 -- L.G. Meredith Managing Partner Biosimilarity LLC 1219 NW 83rd St Seattle, WA 98117 +1 206.650.3740 http://biosimilarity.blogspot.com --~--~-~--~~~---~--~~ 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: [scala] implementation hiding
This does not hide the type of MSequitor, but: trait MBrace[C[X] : MBrace[C,X],A] { def nest( a : A ) : C[A] def flatten[T : C[C[A]]]( bsq : T ) : C[A] } // a monad that is a Seq trait MBraceSeq[C[X] : MBrace[C,X] with Seq[X],A] extends MBrace[C,A] trait MSequitor[A] extends Seq[A] with MBrace[MSequitor,A] object MBraceSequitor { // one of the simplest witnesses of monad i can find private case class MSequitorImpl[A]( a_ : A* ) extends MSequitor[A] { override def nest( a : A ) = new MSequitorImpl[A]( a ) override def flatten[T : MSequitor[MSequitor[A]]]( bsq : T ) : MSequitor[A] = { (new MSequitorImpl[A]( ) /: bsq)( { ( acc : MSequitor[A], e : MSequitor[A] ) = new MSequitorImpl[A]( acc ++ e : _* ) } ) } override def length = a_.length override def elements = a_.elements override def apply( n : Int ) = a_.apply( n ) } } // a statement of the instance relation class MBraceSequitor[A] extends MBraceSeq[MSequitor,A] { import MBraceSequitor._ val empty : MSequitor[A] = new MSequitorImpl[A]( ) override def nest( a : A ) = empty.nest( a ) override def flatten[T : MSequitor[MSequitor[A]]]( bsq : T ) : MSequitor[A] = empty.flatten( bsq ) } Kris On Fri, Jun 26, 2009 at 12:47 PM, Meredith Gregorylgreg.mered...@gmail.com wrote: All, Am i being stupid or is it impossible in the code below to construct a natural way to hide the concrete case class? Best wishes, --greg trait MBrace[C[X] : MBrace[C,X],A] { def nest( a : A ) : C[A] def flatten[T : C[C[A]]]( bsq : T ) : C[A] } // a monad that is a Seq trait MBraceSeq[C[X] : MBrace[C,X] with Seq[X],A] extends MBrace[C,A] // one of the simplest witnesses of monad i can find case class MSequitor[A]( a_ : A* ) extends Seq[A] with MBrace[MSequitor,A] { override def nest( a : A ) = new MSequitor[A]( a ) override def flatten[T : MSequitor[MSequitor[A]]]( bsq : T ) : MSequitor[A] = { (new MSequitor[A]( ) /: bsq)( { ( acc : MSequitor[A], e : MSequitor[A] ) = ( acc ++ e ).asInstanceOf[MSequitor[A]] } ) } override def length = a_.length override def elements = a_.elements override def apply( n : Int ) = a_.apply( n ) } // a statement of the instance relation class MBraceSequitor[A] extends MBraceSeq[MSequitor,A] { val empty : MSequitor[A] = new MSequitor[A]( ) override def nest( a : A ) = empty.nest( a ) override def flatten[T : MSequitor[MSequitor[A]]]( bsq : T ) : MSequitor[A] = empty.flatten( bsq ) } -- L.G. Meredith Managing Partner Biosimilarity LLC 1219 NW 83rd St Seattle, WA 98117 +1 206.650.3740 http://biosimilarity.blogspot.com --~--~-~--~~~---~--~~ 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: Cheap Hosting
we have recently been trying out http://en.gandi.net/hosting and it seems pretty good. there is also an offer on at the moment for free hosting until end August... George On Jun 24, 4:35 pm, anothertestapp test anothertest...@gmail.com wrote: I have account withhttp://javaprovider.netthey offer good service for java hosting Thanks Warren On Jun 16, 7:00 am, Harshad RJ harshad...@gmail.com wrote: Mark, Try VPSLink. http://vpslink.com/?ref=7J32ZZ The cheapest plan is about 6.6$ p/mo and you will get a discount of 10% if you use the above link (referral program). I have successfully run scala based servlets + postgresql db on it, with performance sufficient for my needs. I haven't tried Lift on it though. cheers, -- Harshad RJ WebHome » http://hrj.wikidot.com Classifieds » http://uproot.in --~--~-~--~~~---~--~~ 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: [scala] unexpectedly abrupt end for such an innocent mistake
Paul, Thanks for all your kind feedback. i wasn't really concerned about the long stack trace. i was concerned about the termination of the REPL process. Best wishes, --greg On Fri, Jun 26, 2009 at 2:44 PM, Paul Phillips pa...@improving.org wrote: On Fri, Jun 26, 2009 at 02:34:06PM -0700, Meredith Gregory wrote: See the trace below. Is this how we'd like this error to be handled? There was a fierce debate between outputting a brief error message and spewing a long stack trace, but in the end we went with the stack trace. (Perhaps you don't realize how Is this how we'd like this error to be handled? comes across.) Can I give some general encouragement to people to use the bug database to report bugs rather than sending them to the lists, unless there is something super unusual and fascinating about that particular bug, keeping in mind there are hundreds of open tickets which should be no less important for being a little (or a lot) older. -- Paul Phillips | Where there's smoke, there's mirrors! Apatheist | Empiricist | pal, i pill push |--* http://www.improving.org/paulp/*-- -- L.G. Meredith Managing Partner Biosimilarity LLC 1219 NW 83rd St Seattle, WA 98117 +1 206.650.3740 http://biosimilarity.blogspot.com --~--~-~--~~~---~--~~ 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: Anyone working on the flot widget?
Hello everyone involved, I am having a very annoying problem with the Flot widget: The automatically generated legend's auto-sizing feature is broken (it grows horizontally to the max allowed space while still adhering to the margin values specified, and it's not possible to create an external, custom legend) as demonstrated by this screenshot: http://bit.ly/uKE9o This bug is present in 1.1-M1 as well as 1.1-SNAPSHOT, isn't caused by me (since it is present int he demo app) and seems to originate from something on the client-side (obviously). Does anyone have a solution to this problem, or if not, can I make a fork of the widgets module, try to fix the problem, and commit it back? This little inconvenience removes much of the visual quality of plots, so a solution to it would be very much appreciated. /dflemstr On Jun 25, 2:13 pm, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: On 25 Jun 2009, Francois Bertrand wrote: Hi Jeppe Great to see you are interested in the flot widget. My current to-do list for the flot widget, is: - create more Lift JsExp and JsCmd to modify a already displayed flot graph. They should be used in AJAX and Comet applications - update to a more recent version of the javascrrit widget I need this as well, especially since there are some patches that provides pie charts - create the test demo app, - make the creation of FlotOptions, FlotLinesOptions, etc, less verbose. I hope that Scala 2.8 Named and Default Arguments will help. Yeah, this would be nice :-) We probably need some working code within the next few weeks so probably can't wait for 2.8 though. - create a high level mechanism to display Lift's Record I appreciate any help. What's the best way to coordinate this? Just fork the code on github or? /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] Turning on Logging for third-party libraries in Lift
I'm trying to enable log4j logging in a third party library (well third party to me.. it was developed in house) so that it logs it's output to the same place my Lift webapp logs. In the third party library, a log4j Logger is obtained and used but no setup is done, figuring the log4j config will be done by the app builder. Now I figured the root logger would catch it.. but it didn't seem to work. So I added a specific logger with the exact string used in the third party code.. Still no output.. Am I missing something about class loaders? Or is there something about start-up that's messing with the getLogger method (it's actually in the method so it should be happening after Lift initializes everything)? Or is there something else special about lift logging that won't let the library piggy back off of it? BTW, I should mention that Lift logging otherwise is working for me. By otherwise I mean when logging from any classes directly in the web- app classes directory. Alan --~--~-~--~~~---~--~~ 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 Username and Password from URL of form hxxp://user:passw...@foo.org
Problem solved! I knew how to get and decode the header style.. it's the http://username:passw...@foo.org that I couldn't get to. I didn't see how to get the string that contains the username and password in this case. I found it though.. if you get the HTTPServletRequest and then the URL from that has the complete string. Oh and for various reasons I can't use the built in authentication stuff. Alan On Jun 25, 4:17 am, Timothy Perrett timo...@getintheloop.eu wrote: Are you using the builtin support for basic authentication in lift? If not, please see my example here:http://is.gd/1cYhR The format you mention is standard HTTP Basic, and in accordance with the RFC's - it should be Base64 encoded. Lift supports both HTTP basic and HTTP digest. Cheers, Tim On Jun 25, 5:10 am, Alan M alan.morten...@gmail.com wrote: I can't seem to find anyway to get to those two values. I've been searching all over the request class/object and no luck. I'm writing a RESTful web service that uses basic auth and for some reason jQuery likes to send things in the above mentioned format (http://user:passw...@foo.org). I've tried to fix that on the Javascript side but I couldn't get anything to work. So instead I decided on the service to recognize either the header style or the URL style of passing the login info. Sounded simple enough, until I couldn't find how to get at that/those strings.. Any help would be greatly appreciated.. Alan Mortensen --~--~-~--~~~---~--~~ 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] suggestion: I'm a brand spanking new user....some first impressions on 'getting started'
Today is my very first day that I planned to take a serious look at Lift. I've coded webapps in many different frameworks and plan to do a simple Employee app and add my 'how to' to the site I host here http://www.learntechnology.net/content/main.jsp (which many of the examples there show the same application being built with different frameworks.) Some users like myself might want to start by looking at an existing examples before going through the exact step by step as described in the user manual (which has a broken link to the wiki by the way -yes, I submitted a bug report.) If I want to take that route there should be a quick way to find example projects with the source code. Finding these example was extremely tedious At some point a new user might go the wiki. .. you get to the wiki page looking for examples.. you look at the content menu.. you might try the 'cheat sheet getting started link'... cheat by examples has a link 'lift by examples', but that doesn't seem to really show example apps? BY CHANCE, I happened to see in a How To - how to run examples (which at first i thought why would I click this when I haven't even seen any examples?), but I clicked it anyway.. Then on the how to run examples' link I was excited to see a list of some examples (buried way to deep for a new user to find imo.) Yet only the war links work? None of the project links are active? Finding example apps to study and learn by is seemingly very difficult to do. Are there any out there? If so where? For new user, learning by examples is extremely important. I think a lot of new users will be turned off if it's difficult to find some example applications to study to learn from. I understand all of this is open source and I plan to write a tutorial once I learn it, but it would be nice to find some existing apps to start with. thanks for all the work done so far. -- Rick R --~--~-~--~~~---~--~~ 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: Modify CRUDify XHTML
Thanks, Derek and Jeppe, your responses were very helpful. I implemented Jeppe's solution and added my own snippet tag within _viewTemplate. Unfortunately, I spent the whole day trying to figure out how pass the current CRUDified object to my snippet. Do I retrieve it in _viewTemplate from S.params and add an attribute to the snippet tag? Or just retrieve it from S in the snippet? I think I'm missing something fundamental with the S object and snippets. As you can tell, I'm very new to Lift! Any advice is much appreciated. Peter On Jun 24, 11:01 am, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: On 24 Jun 2009, Peter Robinett wrote: Hi all, I'm using CRUDify on one of my models and I'd like to display some additional data on the view template. I believe that I need to override one of the model definitions with some sort of reference to my own XHTML file. Which one? _viewTemplate? Or perhaps the viewTemplate method? If you look at the source to CRUDify, you'll see def viewTemplate(): NodeSeq = pageWrapper(_viewTemplate) where def pageWrapper(body: NodeSeq): NodeSeq = lift:surround with=default at=content { body } /lift:surround def _viewTemplate = lift:crud.view table id={viewId} class={viewClass} crud:row tr tdcrud:name//td tdcrud:value//td /tr /crud:row /table /lift:crud.view So the simplest thing is to override _viewTemplate with something similar to the above. This should be done on the companion objects where CRUDify is mixed in /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 -~--~~~~--~~--~--~---