[Lift] Lift and Lift Ticket
I don't know if anyone has noticed but I've basically been absent for a while now. My personal and day job commitments have simply become too much for me to spend much time on Lift or Lift Ticket. I can barely keep up with my email (currently 350+ unread messages! ), let alone tickets or coding. It's probably going to be 6 months to a year before my time starts to free up again, so I'm going to drop off the main Lift list for now (I'll stay on the committer list, since that's easier to keep up with). David, I'm more than happy to keep helping with the sysadmin and security stuff. That's relatively infrequent and not too time consuming. Feel free to send me email directly with questions, work to be done, etc. Lift Ticket is very close to a basic functionality release, and in the interest of having something useful come out of the time that I've already invested in it, I'm keeping it licensed Apache. If anyone (Ross?) wants to continue working on it I'm happy to add them as committers on the primary Git repo. In particular, I would appreciate people looking at what I've done with CRUDOps, since that's my own take on CRUDify with some differences in approach. I fully intend on coming back to Lift when things aren't so crazy here. In the meantime, keep up the good work everyone! The community here is what really drew me and kept me here, and I'm going to miss it in the interim. Cheers, Derek -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Date/Time/DateTime formatters and parsers
It got stuck in the debate concerning whether or not to use Joda Time. I might have some time next week to work on it. This ticket kind of covers the issue: http://github.com/dpp/liftweb/issues#issue/89 Derek On Tue, Dec 22, 2009 at 5:05 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: What ever happened to having separate formatters and parsers for MappedDate vs. MappedTime vs. MappedDateTime, or specifying them on a field by field basis? Thanks. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] re: How do I get the stacktrace when EntityManager fails to be instantiated
Are you using ScalaJPA? It shouldn't be absorbing any exceptions. Perhaps you have the log4j threshold at INFO instead of DEBUG? Derek On Tue, Dec 22, 2009 at 8:54 PM, James Black planiturth...@gmail.comwrote: I am having a problem with one entity trying to use @OneToMany, and I would like to see what the actual error is, but that seems to be getting absorbed. For more on my actual problem you can look at this: http://stackoverflow.com/questions/1947627/entitymanager-fails-to-instantiate-using-jpa-hibernate-when-i-add-a-onetomany-ann This is my values within persistence.xml: property name=hibernate.dialect value=org.hibernate.dialect.DerbyDialect/ property name=hibernate.connection.driver_class value=org.apache.derby.jdbc.EmbeddedDriver/ property name=hibernate.connection.url value=jdbc:derby:lift_example;create=true/ property name=hibernate.max_fetch_depth value=3/ property name=hibernate.show_sql value=true / property name=hibernate.hbm2ddl.auto value=create-drop / property name=hibernate.format_sql value=true/ All I get when I have deleted the database, and then do 'mvn clean compile install' at the end of my unit test is: 13853 [main] INFO org.hibernate.cfg.SettingsFactory - Deleted entity synthetic identifier rollback: disabled 13853 [main] INFO org.hibernate.cfg.SettingsFactory - Default entity- mode: pojo 13853 [main] INFO org.hibernate.cfg.SettingsFactory - Named query checking : enabled 13858 [main] INFO org.hibernate.impl.SessionFactoryImpl - building session factory [PersistenceUnit: jpaweb] Unable to build EntityManagerFactory I would like to see the exception that leads to it not being able to build the EntityManagerFactory. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] re: user_id has value, but get constraint exception of it being null, using JPA and Lift 1.1
OK, I see something really odd here. The exception is complaining about a missing USER_ID column, but there's no such column in either insert statement: Hibernate: insert into users (firstName, lastName, username, id) values (?, ?, ?, ?) Hibernate: insert into address (addressLineOne, city, state, user_fk, zipCode, id) values (?, ?, ?, ?, ?, ?) Out of curiosity, do you happen to have a user_id column in the address table in addition to user_fk? How did you generate the tables for this? If Hibernate is doing the generation, one thing to note is that it won't ever remove columns, so if you previously had the user_fk column named user_id, then you have both columns there now. Derek On Sat, Dec 19, 2009 at 12:24 AM, James Black planiturth...@gmail.comwrote: Hello, I have struggled with this for a few hours and hopefully someone can see what I am doing wrong. Basically, I insert into users, I then select the user, I then set that in my address and try to insert and get an error that the user_id cannot be null, but it has a value. I am including the two entities involved at the bottom, and the part of the test that is executed. The last line in the test is where the error is thrown. Hibernate: insert into users (firstName, lastName, username, id) values (?, ?, ?, ?) Hibernate: select user0_.id as id105_, user0_.firstName as firstName105_, user0_.lastName as lastName105_, user0_.username as username105_ from users user0_ where user0_.username=? Found User /* loaded from the database */ id: 11403264 firstName: Test lastName: User username: testuser_resume Address being persisted /*, user.id has a value */: id: 0 addressLineOne: Some street address user: id: 11403264 firstName: Test lastName: User username: testuser_resume Hibernate: insert into address (addressLineOne, city, state, user_fk, zipCode, id) values (?, ?, ?, ?, ?, ?) 13800 [main] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 2, SQLState: 23502 13800 [main] ERROR org.hibernate.util.JDBCExceptionReporter - Column 'USER_ID' cannot accept a NULL value. 13800 [main] ERROR org.hibernate.event.def.AbstractFlushingEventListener - Could not synchronize database state with session org.hibernate.exception.ConstraintViolationException: could not insert: [jblack.resumeapp.lift.model.Address] at org.hibernate.exception.SQLStateConverter.convert (SQLStateConverter.java:94) at org.hibernate.exception.JDBCExceptionHelper.convert (JDBCExceptionHelper.java:66) at org.hibernate.persister.entity.AbstractEntityPersister.insert (AbstractEntityPersister.java:2295) at org.hibernate.persister.entity.AbstractEntityPersister.insert (AbstractEntityPersister.java:2688) at org.hibernate.action.EntityInsertAction.execute (EntityInsertAction.java:79) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java: 263) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java: 167) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions (AbstractFlushingEventListener.java:321) at org.hibernate.event.def.DefaultFlushEventListener.onFlush (DefaultFlushEventListener.java:50) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027) at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:365) at org.hibernate.transaction.JDBCTransaction.commit (JDBCTransaction.java:137) at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:54) at jblack.resumeapp.lift.model.TestJPAWeb.save_resume (TestJPAWeb.scala:76) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall (FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run (ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively (FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate (InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate (RunBefores.java:28) at org.junit.internal.runners.statements.RunAfters.evaluate (RunAfters.java:31) at org.junit.runners.BlockJUnit4ClassRunner.runChild (BlockJUnit4ClassRunner.java:73) at org.junit.runners.BlockJUnit4ClassRunner.runChild (BlockJUnit4ClassRunner.java:46) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41) at
Re: [Lift] How to reRender the page via js in Chat demo of the lift ?
If you never want to show more than 5 chats, you need to move the logic for trimming to 5 chats into the line where you calculate the update. It looks like you're trying to just update the difference between the incoming updates and your current chats. Derek On Sat, Dec 19, 2009 at 3:47 AM, Neil.Lv anim...@gmail.com wrote: Hi all, How to reRender the page via js in Chat demo of the lift ? Here is an example: ### In the index page, show all the message that the users sent user 1: message 1 user 2: message 2 user 3: message 3 user 4: message 4 user 5: message 5 ### Here are 5 messages, then i want to refresh the messages when the message count 5, ### user 1: message 1 user 2: message 2 user 3: message 3 user 4: message 4 user 5: message 5 refresh: can't refresh, also show 6 messages, i want to show 5 messages. ### Here is code in the Comet: ### lass Chat extends CometActor with CometListener { ... override def lowPriority = { case ChatServerUpdate(value) = val update = (value -- chats).reverse.map(b = AppendHtml (infoId, line(b))) partialUpdate(update) chats = value.take(5) } ... } ### In the example, when the message counts =5, i set the count to 5 via ### chats = value.take(5) ### Is there a js function can do this, when the chats's size is bigger than 5, then refresh the messages. Thanks for any suggestion! Cheers, Neil -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Externalizing log4j configuration
That's probably the simplest way to do it. You can also use a system property (can't remember off the top of my head) to tell log4j where to get its props from, and then just disable Lift's config of log4j by setting LogBoot.logSetup = () = false in your bootstrap. Derek On Mon, Dec 21, 2009 at 2:54 PM, Mark Feeney mark.fee...@gmail.com wrote: Hi, all. I'm building a web app in Lift 1.0 and deploying to Jetty 6.1.22. I'm trying to figure out the best way (or any way) to externalize the log4j configuration. My ideal deployment would look like this: /usr/local/jetty/webapps/myapp.war /well/known/location/myapp-log4j.xml (i.e. not in the .war) If /well/known/location doesn't exist, a sane log4j.xml (possibly from within the .war) should be used. Anyone have advice on how to achieve this? I took a look at http://wiki.liftweb.net/index.php/HowTo_configure_logging, and the default.log4j.xml thing works, but I want config outside the .war. Is overrding LogBoot.defaultProps in Boot.scala -- as mentioned in the linked article -- the answer? (e.g. have it try to return the contents of /well/known/location/myapp-log4j.xml) Thanks, Mark. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] re: trying to get minimum needed for unit test to work using LIFT 1.1 and JPA
This line is troubling: [PersistenceUnit: jpaweb] Unable to build EntityManagerFactory But I'm not sure why that would be happening and not throwing some sort of exception or logging. I'm not going to be around much over the holidays, but I can definitely help next week if you're still running into this issue. Derek On Fri, Dec 18, 2009 at 12:06 AM, James Black planiturth...@gmail.comwrote: I am trying to test that my entities are working properly, but I get this at the end of the surefire output for the test: 1634 [main] INFO org.hibernate.cfg.annotations.CollectionBinder - Mapping collection: jblack.resumeapp.lift.model.Author.books - Book 1639 [main] INFO org.hibernate.cfg.AnnotationConfiguration - Hibernate Validator not found: ignoring 1739 [main] INFO org.hibernate.cfg.search.HibernateSearchEventListenerRegister - Unable to find org.hibernate.search.event.FullTextIndexEventListener on the classpath. Hibernate Search is not enabled. [PersistenceUnit: jpaweb] Unable to build EntityManagerFactory I only have defined my classes in jblack.resumeapp.lift.model and created my unit test. The EntityManagerFactory seems to process my models properly. I haven't done anything with the snippets, so there are no RequestVar implementations for my new models. I had created the jpa sample so all I did was add my new classes there. Do I need to finish the steps in chapter 10 of the lift book to get my unit tests to pass at all? In an unchanged jpa sample I am missing the next lines, and I am not certain what must be done to resolve this, as the driver information isn't being processed at all. I use 'mvn clean install' to run my tests from the top level of my project, but if I do 'cd spa' then 'mvn install' I get the same results. 1805 [main] INFO org.hibernate.cfg.search.HibernateSearchEventListenerRegister - Unable to find org.hibernate.search.event.FullTextIndexEventListener on the classpath. Hibernate Search is not enabled. 1977 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - Using Hibernate built-in connection pool (not for production use!) 1977 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - Hibernate connection pool size: 20 I am trying to get my test working so I can put back in my @OneToOne, @OneToMany and related columns and @PostLoad and related annotations, as I had another error when using these, so I have commented them out until I get the test working so far. Thank you. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] DB connection fail after upgrade from 1.1M7 to 1.1M8
I've been fixing quite a few mapper bugs lately, but nothing that should have anything to do with connection handling... On Thu, Dec 17, 2009 at 5:16 PM, Timothy Perrett timo...@getintheloop.euwrote: This is funny - I actually recently started getting a strange drop in connection on one of my applications. Others that use mapper are fine, but this one in particular seems to bone after a while. I changed the connection info to localhost as the sql server is on the same machine, and that appears to have corrected the problem... to that end, has any of the connection stuff changed in mapper of late? If so, potentially there is a problem. Cheers, Tim On 18 Dec 2009, at 00:05, David Pollak wrote: Please try doing a mvn clean and then retry your application. I have seen no problems with the dozen+ Lift apps I work with related to connections not working between M7 and M8. On Thu, Dec 17, 2009 at 5:59 AM, Jarod Liu liuyuan...@gmail.com wrote: The same code works fine in 1.1M7. Anyone know what causes the problem. Or maybe a bug in 1.1M8? boot.scala: DB.defineConnectionManager(DefaultConnectionIdentifier, new StandardDBVendor (com.mysql.jdbc.Driver, jdbc:mysql:// localhost/mydb?autoReconnectForPools=true, root, )) the error message: Looking for Connection Identifier ConnectionIdentifier(lift) but failed to find either a JNDI data source with the name lift or a lift connection manager with the correct name/pre/ph3Caused by:/ h3prejava.lang.NullPointerException: Looking for Connection Identifier ConnectionIdentifier(lift) but failed to find either a JNDI data source with the name lift or a lift connection manager with the correct name at net.liftweb.mapper.DB$$anonfun$2$$anonfun$apply$8.apply(DB.scala: 97) at net.liftweb.mapper.DB$$anonfun$2$$anonfun$apply$8.apply(DB.scala: 97) at net.liftweb.common.EmptyBox.openOr(Box.scala:372) at net.liftweb.mapper.DB$$anonfun$2.apply(DB.scala:96) at net.liftweb.mapper.DB$$anonfun$2.apply(DB.scala:96) at net.liftweb.common.EmptyBox.openOr(Box.scala:372) at net.liftweb.mapper.DB$.newConnection(DB.scala:90) at net.liftweb.mapper.DB$.getConnection(DB.scala:186) at net.liftweb.mapper.DB$.use(DB.scala:446) at net.liftweb.mapper.DB$$anon$1$$anonfun$apply$9.recurseMe$1 (DB.scala:160) at net.liftweb.mapper.DB$$anon$1$$anonfun$apply$9.apply(DB.scala:162) at net.liftweb.util.DynoVar$class.run(ThreadGlobal.scala:91) at net.liftweb.mapper.DB$$anon$1$DepthCnt$.run(DB.scala:143) at net.liftweb.mapper.DB$$anon$1.apply(DB.scala:146) at net.liftweb.http.S$.net$liftweb$http$S$$doAround(S.scala:912) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_nest2InnerInit $1.apply(S.scala:1112) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67) at net.liftweb.http.S$.net$liftweb$http$S$$_nest2InnerInit(S.scala: ) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$ $anonfun$apply$28$$anonfun$apply$29$$anonfun$apply$30$$anonfun$apply $31.apply(S.scala:1133) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$ $anonfun$apply$28$$anonfun$apply$29$$anonfun$apply$30.apply(S.scala: 1132) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$ $anonfun$apply$28$$anonfun$apply$29.apply(S.scala:1131) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$ $anonfun$apply$28.apply(S.scala:1130) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1.apply (S.scala:1129) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67) at net.liftweb.http.S$.net$liftweb$http$S$$_innerInit(S.scala:1128) at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$38$$anonfun $apply$39$$anonfun$apply$40$$anonfun$apply$41$$anonfun$apply$42.apply (S.scala:1175) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67) at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$38$$anonfun $apply$39$$anonfun$apply$40$$anonfun$apply$41.apply(S.scala:1174) at net.liftweb.http.CoreRequestVarHandler$class.apply(Vars.scala:325) at net.liftweb.http.RequestVarHandler$.apply(Vars.scala:248) at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$38$$anonfun $apply$39$$anonfun$apply$40.apply(S.scala:1173) at net.liftweb.http.CoreRequestVarHandler$class.apply(Vars.scala:325) at
Re: [Lift] Foreign Key constraints are not created by schemify
The code in the spec is: person.companies ++= companies person.save // Break some joins companies(3).delete_! // delete 4 companies(6).delete_! // delete 7 person.companies.refresh // reload joins so joinEntity.company.obj isn't cached person My plan is to make FKs an optional feature of Schemifier, so I'll modify your spec to run without the FKs and then duplicate it to one with FKs that expects an exception to be thrown. Derek On Mon, Dec 14, 2009 at 1:04 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: Ah, I see. Where does MappedManyToMany delete anything not in the join table? If you mean the spec feel free to change it or comment out the whole thing and ask me to fix it. By the way it's hardcoded to use H2MemoryProvider. Is OneToMany doing anything bad? Thanks. - Derek Chen-Beckerdchenbec...@gmail.com wrote: Currently ensureConstraints calls DriverType.supportsForeignKeys_?, defaulting to false. The ticket that I'm working on is because none of the drivers seem to override that. The current MappedManyToMany throws an FK violation exception because it tries to delete one side of the Many-To-Many without first deleting the join table entry. Derek On Sun, Dec 13, 2009 at 5:45 PM, Naftoli Gugenheim naftoli...@gmail.com wrote: Are FKs not created using a Driver that supports it? schemify calls ensureConstraints which seems to do it, no? - Derek Chen-Beckerdchenbec...@gmail.com wrote: If FKs are enabled then the spec fails because you're intentionally trying to break the joins by deleting the Companys that are on the other side of the many-to-many. I'm not sure that FKs should be enabled by default, but if I add the option to introduce them with schemify then I could write another spec that assumes FKs are enabled and expects an exception if you try to delete a joined entity. Derek On Thu, Dec 10, 2009 at 3:22 PM, Naftoli Gugenheim naftoli...@gmail.com wrote: What about that spec I threw together in a hurry implies that foreign keys would conflict with mapper? See a recent (few weeks ago) thread discussing how many-to-many should deal with broken joins. Why would one not want them to be created by default? P.S. Sorry I never made that ticket for H2 FK support. On 12/8/09, Derek Chen-Becker dchenbec...@gmail.com wrote: OK, I've run into a snag. Schemifier does support foreign key creation, as do most of the database vendors. The ManyToMany Mapper support, however, seems to expect no foreign key constraints, since it's explicitly testing broken refs in the ManyToManySpecs tests: ManyToMany should { skip broken joins in children in { setupDB val person = createPerson person.companies.joins.length must_== 10 person.companies.all.length must_== 8 } ... I wonder if we should have FK generation be a configuration parameter for schemify. I could change the code so that the default schemify method continues to generate DDL without FK constraints, but add a second schemify method that takes a boolean parameter controlling whether FKs are generated. That, coupled with the DriverType.supportsForeignKeys_?, would allow people to add FKs if they want. Thoughts? Derek On Sun, Dec 6, 2009 at 5:40 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: Absolutely. I have a PG 8.0, 8.1 and 8.3 instance set up for testing on my home box because of the last time I made a PG-related change. Derek On Thu, Dec 3, 2009 at 2:48 PM, David Pollak feeder.of.the.be...@gmail.com wrote: On Thu, Dec 3, 2009 at 1:47 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: I agree on both points (foreign keys and documentation). Please open a ticket asking for proper foreign key support and I'll work on it next week. Please make sure it works on PG 8.0/8.1 as there is at least 1 Lift app in production against 8.0 Derek On Wed, Dec 2, 2009 at 6:05 PM, Julian Backes julianbac...@googlemail.com wrote: Hi Derek, It's been a long time since I looked at that particular code, so I may have misspoke. Having said that, if it's currently disabled in the driver I'm not sure why and I would want to review it before saying that it works properly in all cases. I think the problem here is that the user expects (like I did) foreign keys to be created if he uses mapper classes referencing other mapper classes. This behaviour should at least be mentioned somewhere in the documentation (btw, the documentation is in my opinion the biggest problems of Lift at the moment). I think, using a relational database without
Re: [Lift] Foreign Key constraints are not created by schemify
Currently ensureConstraints calls DriverType.supportsForeignKeys_?, defaulting to false. The ticket that I'm working on is because none of the drivers seem to override that. The current MappedManyToMany throws an FK violation exception because it tries to delete one side of the Many-To-Many without first deleting the join table entry. Derek On Sun, Dec 13, 2009 at 5:45 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: Are FKs not created using a Driver that supports it? schemify calls ensureConstraints which seems to do it, no? - Derek Chen-Beckerdchenbec...@gmail.com wrote: If FKs are enabled then the spec fails because you're intentionally trying to break the joins by deleting the Companys that are on the other side of the many-to-many. I'm not sure that FKs should be enabled by default, but if I add the option to introduce them with schemify then I could write another spec that assumes FKs are enabled and expects an exception if you try to delete a joined entity. Derek On Thu, Dec 10, 2009 at 3:22 PM, Naftoli Gugenheim naftoli...@gmail.com wrote: What about that spec I threw together in a hurry implies that foreign keys would conflict with mapper? See a recent (few weeks ago) thread discussing how many-to-many should deal with broken joins. Why would one not want them to be created by default? P.S. Sorry I never made that ticket for H2 FK support. On 12/8/09, Derek Chen-Becker dchenbec...@gmail.com wrote: OK, I've run into a snag. Schemifier does support foreign key creation, as do most of the database vendors. The ManyToMany Mapper support, however, seems to expect no foreign key constraints, since it's explicitly testing broken refs in the ManyToManySpecs tests: ManyToMany should { skip broken joins in children in { setupDB val person = createPerson person.companies.joins.length must_== 10 person.companies.all.length must_== 8 } ... I wonder if we should have FK generation be a configuration parameter for schemify. I could change the code so that the default schemify method continues to generate DDL without FK constraints, but add a second schemify method that takes a boolean parameter controlling whether FKs are generated. That, coupled with the DriverType.supportsForeignKeys_?, would allow people to add FKs if they want. Thoughts? Derek On Sun, Dec 6, 2009 at 5:40 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: Absolutely. I have a PG 8.0, 8.1 and 8.3 instance set up for testing on my home box because of the last time I made a PG-related change. Derek On Thu, Dec 3, 2009 at 2:48 PM, David Pollak feeder.of.the.be...@gmail.com wrote: On Thu, Dec 3, 2009 at 1:47 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: I agree on both points (foreign keys and documentation). Please open a ticket asking for proper foreign key support and I'll work on it next week. Please make sure it works on PG 8.0/8.1 as there is at least 1 Lift app in production against 8.0 Derek On Wed, Dec 2, 2009 at 6:05 PM, Julian Backes julianbac...@googlemail.com wrote: Hi Derek, It's been a long time since I looked at that particular code, so I may have misspoke. Having said that, if it's currently disabled in the driver I'm not sure why and I would want to review it before saying that it works properly in all cases. I think the problem here is that the user expects (like I did) foreign keys to be created if he uses mapper classes referencing other mapper classes. This behaviour should at least be mentioned somewhere in the documentation (btw, the documentation is in my opinion the biggest problems of Lift at the moment). I think, using a relational database without foreign keys is somehow not very useful because you never really know whether you have referential integrity... It would be great if you looked at the code and enabled it. This would really be an improvement for the mapper stuff in Lift 1.1 Julian -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com liftweb%252bunsubscr...@googlegroups.comliftweb%25252bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group
Re: [Lift] Multi-Ćolumn MappedField
IMHO this doesn't sound like an ideal way to do this. At a high level what are you trying to do? Is this a legacy DB or starting from scratch? If I had to do something like this I would instead use something like MappedLongForeignKey so that you have a direct reference to the other tables instead of having to do it manually. Something like: class C extends LongKeyedMapper[C] with IdPK { def getSingleton = C object refA extends MappedLongForeignKey(this,A) object refB extends MappedLongForeignKey(this,B) def getRef = refA.obj or refB.obj def setRef(obj : A) = refA(obj); refB(Empty) def setRef(obj : B) = refB(obj); refA(Empty) } Derek On Wed, Dec 9, 2009 at 9:44 PM, Joern joern.bernha...@gmx.net wrote: Hi there, I want to create a MappedField, which has one column as Type Long and another column as Type Boolean, but I don't know, what I should put into dbFieldClass and/or targetSQLType. If I look at MappedPassword for example, I just see classOf[String] or Types.VARCHAR, which somehow makes sense, because all columns of the MappedPassword are Strings. How can I create such a MappedField ? Or maybe there is a completely different and/or better way to approach my problem: I have two tables (A and B), which are represented by my own mapper classes having IdPK. In a third table (let's call it C), I want to reference an instance of A or B in table C. As mentioned above, I want to say for example that Boolean false means look in table A for the Long (=index) and true - look in table B. Any tips, pointers or links to more documentation about multi-column mappedfields? :) Thanks, Joern -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Foreign Key constraints are not created by schemify
If FKs are enabled then the spec fails because you're intentionally trying to break the joins by deleting the Companys that are on the other side of the many-to-many. I'm not sure that FKs should be enabled by default, but if I add the option to introduce them with schemify then I could write another spec that assumes FKs are enabled and expects an exception if you try to delete a joined entity. Derek On Thu, Dec 10, 2009 at 3:22 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: What about that spec I threw together in a hurry implies that foreign keys would conflict with mapper? See a recent (few weeks ago) thread discussing how many-to-many should deal with broken joins. Why would one not want them to be created by default? P.S. Sorry I never made that ticket for H2 FK support. On 12/8/09, Derek Chen-Becker dchenbec...@gmail.com wrote: OK, I've run into a snag. Schemifier does support foreign key creation, as do most of the database vendors. The ManyToMany Mapper support, however, seems to expect no foreign key constraints, since it's explicitly testing broken refs in the ManyToManySpecs tests: ManyToMany should { skip broken joins in children in { setupDB val person = createPerson person.companies.joins.length must_== 10 person.companies.all.length must_== 8 } ... I wonder if we should have FK generation be a configuration parameter for schemify. I could change the code so that the default schemify method continues to generate DDL without FK constraints, but add a second schemify method that takes a boolean parameter controlling whether FKs are generated. That, coupled with the DriverType.supportsForeignKeys_?, would allow people to add FKs if they want. Thoughts? Derek On Sun, Dec 6, 2009 at 5:40 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: Absolutely. I have a PG 8.0, 8.1 and 8.3 instance set up for testing on my home box because of the last time I made a PG-related change. Derek On Thu, Dec 3, 2009 at 2:48 PM, David Pollak feeder.of.the.be...@gmail.com wrote: On Thu, Dec 3, 2009 at 1:47 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: I agree on both points (foreign keys and documentation). Please open a ticket asking for proper foreign key support and I'll work on it next week. Please make sure it works on PG 8.0/8.1 as there is at least 1 Lift app in production against 8.0 Derek On Wed, Dec 2, 2009 at 6:05 PM, Julian Backes julianbac...@googlemail.com wrote: Hi Derek, It's been a long time since I looked at that particular code, so I may have misspoke. Having said that, if it's currently disabled in the driver I'm not sure why and I would want to review it before saying that it works properly in all cases. I think the problem here is that the user expects (like I did) foreign keys to be created if he uses mapper classes referencing other mapper classes. This behaviour should at least be mentioned somewhere in the documentation (btw, the documentation is in my opinion the biggest problems of Lift at the moment). I think, using a relational database without foreign keys is somehow not very useful because you never really know whether you have referential integrity... It would be great if you looked at the code and enabled it. This would really be an improvement for the mapper stuff in Lift 1.1 Julian -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com
Re: [Lift] LiftConsole and JPA
I'm not sure why the console would need JTA, especially if you've set things to RESOURCE_LOCAL. If you could send a full stack trace of the exception that might help pinpoint it. Derek On Wed, Dec 9, 2009 at 2:35 AM, Janico Greifenberg jgre...@googlemail.comwrote: I had excluded JTA in the pom.xml, because I copied the dependencies from the JPADemo example. After I removed that exclusion, the console works, so the practical problem is solved. I'm still a bit confused, however, why I need JTA when I use RESOURCE_LOCAL as transaction-type. And why does it work under jetty, but not in the console? So long Janico On Tue, Dec 8, 2009 at 9:59 PM, Derek Chen-Becker dchenbec...@gmail.com wrote: It looks like the JTA jar isn't being added to the classpath for the LiftConsole runner. I've never touched scala:console, so I'm not sure what you would need to do to make it work. Off the top of my head, you might need to put the dependencies for JPA into the plugin config, but I'm not positive. Derek On Tue, Dec 8, 2009 at 1:16 PM, Janico Greifenberg j...@acm.org wrote: Hi, I've started to experiment with a Lift project that uses JPA for persistence. While it works just fine in the web application run with mvn jetty:run, I cannot use the model classes from the LiftConsole (mvn scala:console -DmainConsole=LiftConsole). When I try for example Model.find(classOf[Article], 1) I get the following error: java.lang.ClassNotFoundException: javax.transaction.SystemException at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:315) at java.lang.ClassLoader.loadClass(ClassLoader.java:250) at java.lang.Clas... Model is the EntityManager that I created accorting to chapter 10 from the Lift book. Article is an entity class and 1 is an id that exists in the database. I'm using lift version 1.1-M7 and the following persistence.xml persistence persistence-unit name=jpa-dossier transaction-type=RESOURCE_LOCAL properties property name=hibernate.dialect value=org.hibernate.dialect.MySQLDialect/ property name=hibernate.connection.driver_class value=com.mysql.jdbc.Driver/ property name=hibernate.connection.url value=jdbc:mysql://localhost/dossier/ property name=hibernate.max_fetch_depth value=3/ property name=hibernate.show_sql value=true / property name=hibernate.hbm2ddl.auto value=update /property name=hibernate.connection.username value=*** /property property name=hibernate.connection.password value=***/property /properties /persistence-unit /persistence Is there something that I need to initialize to get this to work? So long Janico -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- http://jgre.org -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] I was giving a short interview for JavaBooks.org about Lift Scala
Great interview! Your crappy English is better than some Americans I've heard speak, so don't sweat it :) Derek On Mon, Dec 7, 2009 at 12:59 AM, Marius marius.dan...@gmail.com wrote: Hi, After a long day I ended up giving this interview. http://vimeo.com/7986506 Br's, Marius P.S. Please forgive my crappy English. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] LiftConsole and JPA
The exception is being thrown by Hibernate: java.lang.NoClassDefFoundError: javax/transaction/SystemException at org.hibernate.ejb.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:39) at org.hibernate.ejb.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:34) For whatever reason, Hibernate wants to load JTA even though your persistence unit is marked RESOURCE_LOCAL. This seems like a bug in Hibernate. All that ScalaJPA does is try to create the EM, but the creation should be controlled entirely by the persistence.xml metadata. Derek On Wed, Dec 9, 2009 at 10:21 AM, Janico Greifenberg jgre...@googlemail.comwrote: The stack trace is attached. So long Janico On Wed, Dec 9, 2009 at 4:05 PM, Derek Chen-Becker dchenbec...@gmail.com wrote: I'm not sure why the console would need JTA, especially if you've set things to RESOURCE_LOCAL. If you could send a full stack trace of the exception that might help pinpoint it. Derek On Wed, Dec 9, 2009 at 2:35 AM, Janico Greifenberg jgre...@googlemail.com wrote: I had excluded JTA in the pom.xml, because I copied the dependencies from the JPADemo example. After I removed that exclusion, the console works, so the practical problem is solved. I'm still a bit confused, however, why I need JTA when I use RESOURCE_LOCAL as transaction-type. And why does it work under jetty, but not in the console? So long Janico On Tue, Dec 8, 2009 at 9:59 PM, Derek Chen-Becker dchenbec...@gmail.com wrote: It looks like the JTA jar isn't being added to the classpath for the LiftConsole runner. I've never touched scala:console, so I'm not sure what you would need to do to make it work. Off the top of my head, you might need to put the dependencies for JPA into the plugin config, but I'm not positive. Derek On Tue, Dec 8, 2009 at 1:16 PM, Janico Greifenberg j...@acm.org wrote: Hi, I've started to experiment with a Lift project that uses JPA for persistence. While it works just fine in the web application run with mvn jetty:run, I cannot use the model classes from the LiftConsole (mvn scala:console -DmainConsole=LiftConsole). When I try for example Model.find(classOf[Article], 1) I get the following error: java.lang.ClassNotFoundException: javax.transaction.SystemException at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:315) at java.lang.ClassLoader.loadClass(ClassLoader.java:250) at java.lang.Clas... Model is the EntityManager that I created accorting to chapter 10 from the Lift book. Article is an entity class and 1 is an id that exists in the database. I'm using lift version 1.1-M7 and the following persistence.xml persistence persistence-unit name=jpa-dossier transaction-type=RESOURCE_LOCAL properties property name=hibernate.dialect value=org.hibernate.dialect.MySQLDialect/ property name=hibernate.connection.driver_class value=com.mysql.jdbc.Driver/ property name=hibernate.connection.url value=jdbc:mysql://localhost/dossier/ property name=hibernate.max_fetch_depth value=3/ property name=hibernate.show_sql value=true / property name=hibernate.hbm2ddl.auto value=update /property name=hibernate.connection.username value=*** /property property name=hibernate.connection.password value=***/property /properties /persistence-unit /persistence Is there something that I need to initialize to get this to work? So long Janico -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- http://jgre.org -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb
Re: [Lift] Welcome Peter Robinett to the Lift committers
Welcome Peter! On Wed, Dec 9, 2009 at 3:08 PM, David Pollak feeder.of.the.be...@gmail.comwrote: Folks, Please join me in welcoming Peter Robinett to the Lift committers. Peter's been active on the Lift list helping people and asking questions (a great combo.) As Peter's project has progressed, he's developed artifacts that he is looking to contribute to Lift and I for one am looking forward to enhancements (e.g., to the flot stuff) as well as other stuff that he's got in his bag of tricks. ;-) Welcome Peter! Thanks, David -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] A question on radio button
Off the top of my head, I don't think that SHtml.radio supports putting attributes on just one of the items. This seems like a reasonable thing to want, so please open a ticket. Derek On Tue, Dec 1, 2009 at 10:45 PM, sunanda sunanda.pa...@gmail.com wrote: Hi, I have got two radio button fields(Yes,No) In my form I need to display an input field onclick of the button Yes else the field needs to be hidden. How can I achieve this inside the form. Regards, Sunanda -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Foreign Key constraints are not created by schemify
OK, I've run into a snag. Schemifier does support foreign key creation, as do most of the database vendors. The ManyToMany Mapper support, however, seems to expect no foreign key constraints, since it's explicitly testing broken refs in the ManyToManySpecs tests: ManyToMany should { skip broken joins in children in { setupDB val person = createPerson person.companies.joins.length must_== 10 person.companies.all.length must_== 8 } ... I wonder if we should have FK generation be a configuration parameter for schemify. I could change the code so that the default schemify method continues to generate DDL without FK constraints, but add a second schemify method that takes a boolean parameter controlling whether FKs are generated. That, coupled with the DriverType.supportsForeignKeys_?, would allow people to add FKs if they want. Thoughts? Derek On Sun, Dec 6, 2009 at 5:40 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: Absolutely. I have a PG 8.0, 8.1 and 8.3 instance set up for testing on my home box because of the last time I made a PG-related change. Derek On Thu, Dec 3, 2009 at 2:48 PM, David Pollak feeder.of.the.be...@gmail.com wrote: On Thu, Dec 3, 2009 at 1:47 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: I agree on both points (foreign keys and documentation). Please open a ticket asking for proper foreign key support and I'll work on it next week. Please make sure it works on PG 8.0/8.1 as there is at least 1 Lift app in production against 8.0 Derek On Wed, Dec 2, 2009 at 6:05 PM, Julian Backes julianbac...@googlemail.com wrote: Hi Derek, It's been a long time since I looked at that particular code, so I may have misspoke. Having said that, if it's currently disabled in the driver I'm not sure why and I would want to review it before saying that it works properly in all cases. I think the problem here is that the user expects (like I did) foreign keys to be created if he uses mapper classes referencing other mapper classes. This behaviour should at least be mentioned somewhere in the documentation (btw, the documentation is in my opinion the biggest problems of Lift at the moment). I think, using a relational database without foreign keys is somehow not very useful because you never really know whether you have referential integrity... It would be great if you looked at the code and enabled it. This would really be an improvement for the mapper stuff in Lift 1.1 Julian -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] how to keep last submited form field value
I think he might just mean the last submitted value for this particular form instance, in which case you want a RequestVar, not a SessionVar. On Tue, Dec 8, 2009 at 8:22 AM, Alex Boisvert alex.boisv...@gmail.comwrote: You should use a SessionVar or a stateful snippet. Here's how you would use a SessionVar, object lastSubmittedDate extends SessionVar[Date](new Date) ... bind(..., date - SHtml.text(lastSubmittedDate.is, lastSubmittedDate(_), class - datepicker), alex On Tue, Dec 8, 2009 at 1:42 AM, Jarod Liu liuyuan...@gmail.com wrote: I want the date field keep the last submited value. I tried with below code, but it's dosn't work. The date value(display in page) awalys the date of today. the form: lift:mySnippet.form1 form=POST f:date/ f:submit/ /lift:mySnippet.form1 MySnippet: class MySnippet extends StatefulSnippet { val dfmt = new SimpleDateFormat(-MM-dd) var date = dfmt.format(new Date) val dispatch: DispatchIt = { case form1 = form1 _ } def form1(in: NodeSeq): NodeSeq = { bind(f, in, date - SHtml.text(date, date = _, class - datepicker), submit - SHtml.submit(submit, println(submit: + date)) ) } -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] LiftConsole and JPA
It looks like the JTA jar isn't being added to the classpath for the LiftConsole runner. I've never touched scala:console, so I'm not sure what you would need to do to make it work. Off the top of my head, you might need to put the dependencies for JPA into the plugin config, but I'm not positive. Derek On Tue, Dec 8, 2009 at 1:16 PM, Janico Greifenberg j...@acm.org wrote: Hi, I've started to experiment with a Lift project that uses JPA for persistence. While it works just fine in the web application run with mvn jetty:run, I cannot use the model classes from the LiftConsole (mvn scala:console -DmainConsole=LiftConsole). When I try for example Model.find(classOf[Article], 1) I get the following error: java.lang.ClassNotFoundException: javax.transaction.SystemException at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:315) at java.lang.ClassLoader.loadClass(ClassLoader.java:250) at java.lang.Clas... Model is the EntityManager that I created accorting to chapter 10 from the Lift book. Article is an entity class and 1 is an id that exists in the database. I'm using lift version 1.1-M7 and the following persistence.xml persistence persistence-unit name=jpa-dossier transaction-type=RESOURCE_LOCAL properties property name=hibernate.dialect value=org.hibernate.dialect.MySQLDialect/ property name=hibernate.connection.driver_class value=com.mysql.jdbc.Driver/ property name=hibernate.connection.url value=jdbc:mysql://localhost/dossier/ property name=hibernate.max_fetch_depth value=3/ property name=hibernate.show_sql value=true / property name=hibernate.hbm2ddl.auto value=update /property name=hibernate.connection.username value=*** /property property name=hibernate.connection.password value=***/property /properties /persistence-unit /persistence Is there something that I need to initialize to get this to work? So long Janico -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Foreign Key constraints are not created by schemify
Absolutely. I have a PG 8.0, 8.1 and 8.3 instance set up for testing on my home box because of the last time I made a PG-related change. Derek On Thu, Dec 3, 2009 at 2:48 PM, David Pollak feeder.of.the.be...@gmail.comwrote: On Thu, Dec 3, 2009 at 1:47 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: I agree on both points (foreign keys and documentation). Please open a ticket asking for proper foreign key support and I'll work on it next week. Please make sure it works on PG 8.0/8.1 as there is at least 1 Lift app in production against 8.0 Derek On Wed, Dec 2, 2009 at 6:05 PM, Julian Backes julianbac...@googlemail.com wrote: Hi Derek, It's been a long time since I looked at that particular code, so I may have misspoke. Having said that, if it's currently disabled in the driver I'm not sure why and I would want to review it before saying that it works properly in all cases. I think the problem here is that the user expects (like I did) foreign keys to be created if he uses mapper classes referencing other mapper classes. This behaviour should at least be mentioned somewhere in the documentation (btw, the documentation is in my opinion the biggest problems of Lift at the moment). I think, using a relational database without foreign keys is somehow not very useful because you never really know whether you have referential integrity... It would be great if you looked at the code and enabled it. This would really be an improvement for the mapper stuff in Lift 1.1 Julian -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Foreign Key constraints are not created by schemify
I agree on both points (foreign keys and documentation). Please open a ticket asking for proper foreign key support and I'll work on it next week. Derek On Wed, Dec 2, 2009 at 6:05 PM, Julian Backes julianbac...@googlemail.comwrote: Hi Derek, It's been a long time since I looked at that particular code, so I may have misspoke. Having said that, if it's currently disabled in the driver I'm not sure why and I would want to review it before saying that it works properly in all cases. I think the problem here is that the user expects (like I did) foreign keys to be created if he uses mapper classes referencing other mapper classes. This behaviour should at least be mentioned somewhere in the documentation (btw, the documentation is in my opinion the biggest problems of Lift at the moment). I think, using a relational database without foreign keys is somehow not very useful because you never really know whether you have referential integrity... It would be great if you looked at the code and enabled it. This would really be an improvement for the mapper stuff in Lift 1.1 Julian -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Re: Oracle DB connection in 1.1-m7
It should be in place now. Can you verify that it's working for you? On Fri, Nov 27, 2009 at 6:49 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: http://reviewboard.liftweb.net/r/129/ I'll check this in to master in the morning. On Fri, Nov 27, 2009 at 8:53 AM, Derek Chen-Becker dchenbec...@gmail.comwrote: I should have a fix in 30 minutes or so. On Thu, Nov 26, 2009 at 9:56 AM, Mathias Sulser s...@suls.org wrote: I think the MappedBoolean isn't properly done in the OracleDriver: scala User.findAll(By(User.superUser, false)) java.sql.SQLException: Invalid column type at oracle.jdbc.driver.DatabaseError.throwSqlException (DatabaseError.java:112) at oracle.jdbc.driver.DatabaseError.throwSqlException (DatabaseError.java:146) at oracle.jdbc.driver.DatabaseError.throwSqlException (DatabaseError.java:208) at oracle.jdbc.driver.OraclePreparedStatement.setObjectCritical (OraclePreparedStatement.java:9168) at ora... And if you look at the generated DDL: CREATE TABLE USERS ( ... SUPERUSER decimal(22), ... ); Any hints on how to solve this? Btw, it's a 10g data base On Nov 26, 4:14 pm, Mathias Sulser s...@suls.org wrote: All right. Figuring out the proper JDBC string was all. Schemifyer seems to then pick the right driver and produce DDL for the specific DB. Great stuff. On Nov 26, 3:17 pm, suls s...@suls.org wrote: Hi, I see that there is a DriverType and OracleDriver in 1.1-m7 but again I don't know how to connect the dots. How would a DB.defineConnectionManager method call that uses an oracle db look like? Thanks, suls -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Foreign Key constraints are not created by schemify
It's been a long time since I looked at that particular code, so I may have misspoke. Having said that, if it's currently disabled in the driver I'm not sure why and I would want to review it before saying that it works properly in all cases. Derek On Sun, Nov 29, 2009 at 1:11 PM, Julian Backes julianbac...@googlemail.comwrote: Hi Lift Community, this is a reply to my own question: I'm trying to get my first scala/lift app working and I have a problem: Schemifier.schemify(...) creates everything, i.e. tables, primary keys, indices but it does not create the foreign key constraints. After hours of compiling and testing, I stumbled across some messages here on the mailing lists which discussed the same problem (I have no idea why I haven't seen them before). In one message, Derek said At this time we don't support it, but feel free to file an issue. I'll have time at some point to work on it, and I think that it would be useful to generate. What does he mean by we don't support it? I've seen the code for generating foreign key constraints in Schemifier.scala I just needed to set supportsForeignKeys_? in the postgresql driver class to true and... it works now. The generated foreign key constraints are perfectly ok. Is there a reason that this code is not used? Julian -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Re: Oracle DB connection in 1.1-m7
I should have a fix in 30 minutes or so. On Thu, Nov 26, 2009 at 9:56 AM, Mathias Sulser s...@suls.org wrote: I think the MappedBoolean isn't properly done in the OracleDriver: scala User.findAll(By(User.superUser, false)) java.sql.SQLException: Invalid column type at oracle.jdbc.driver.DatabaseError.throwSqlException (DatabaseError.java:112) at oracle.jdbc.driver.DatabaseError.throwSqlException (DatabaseError.java:146) at oracle.jdbc.driver.DatabaseError.throwSqlException (DatabaseError.java:208) at oracle.jdbc.driver.OraclePreparedStatement.setObjectCritical (OraclePreparedStatement.java:9168) at ora... And if you look at the generated DDL: CREATE TABLE USERS ( ... SUPERUSER decimal(22), ... ); Any hints on how to solve this? Btw, it's a 10g data base On Nov 26, 4:14 pm, Mathias Sulser s...@suls.org wrote: All right. Figuring out the proper JDBC string was all. Schemifyer seems to then pick the right driver and produce DDL for the specific DB. Great stuff. On Nov 26, 3:17 pm, suls s...@suls.org wrote: Hi, I see that there is a DriverType and OracleDriver in 1.1-m7 but again I don't know how to connect the dots. How would a DB.defineConnectionManager method call that uses an oracle db look like? Thanks, suls -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] derby
Derby has inferior support for binary data types (32k limit) and has a couple of other issues that I can't remember off the top of my head. On Thu, Nov 26, 2009 at 1:54 PM, jlist9 jli...@gmail.com wrote: Hi David, Would you care to elaborate in what way Derby is inferior? I understand H2 is probably faster as speed is one of its main design goals. Does Derby have any other issues? Are there any potential issues with using H2 for production? Thanks, Jack Derby is inferior in every way to H2 (another open source pure Java relational database). If you're building something for production, Postgresql is your best choice. If you need a simple database that needs no separate process and just works H2 is your best choice. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Re: Oracle DB connection in 1.1-m7
http://reviewboard.liftweb.net/r/129/ I'll check this in to master in the morning. On Fri, Nov 27, 2009 at 8:53 AM, Derek Chen-Becker dchenbec...@gmail.comwrote: I should have a fix in 30 minutes or so. On Thu, Nov 26, 2009 at 9:56 AM, Mathias Sulser s...@suls.org wrote: I think the MappedBoolean isn't properly done in the OracleDriver: scala User.findAll(By(User.superUser, false)) java.sql.SQLException: Invalid column type at oracle.jdbc.driver.DatabaseError.throwSqlException (DatabaseError.java:112) at oracle.jdbc.driver.DatabaseError.throwSqlException (DatabaseError.java:146) at oracle.jdbc.driver.DatabaseError.throwSqlException (DatabaseError.java:208) at oracle.jdbc.driver.OraclePreparedStatement.setObjectCritical (OraclePreparedStatement.java:9168) at ora... And if you look at the generated DDL: CREATE TABLE USERS ( ... SUPERUSER decimal(22), ... ); Any hints on how to solve this? Btw, it's a 10g data base On Nov 26, 4:14 pm, Mathias Sulser s...@suls.org wrote: All right. Figuring out the proper JDBC string was all. Schemifyer seems to then pick the right driver and produce DDL for the specific DB. Great stuff. On Nov 26, 3:17 pm, suls s...@suls.org wrote: Hi, I see that there is a DriverType and OracleDriver in 1.1-m7 but again I don't know how to connect the dots. How would a DB.defineConnectionManager method call that uses an oracle db look like? Thanks, suls -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Beef with LiftRules.explicitlyParsedSuffixes
Was that what was preventing your dispatch from working? On Wed, Nov 25, 2009 at 4:43 AM, Timothy Perrett timo...@getintheloop.euwrote: Guys, I have some major issues with LiftRules.explicitlyParsedSuffixes - I just wasted almost a whole day yesterday chasing around what I thought were bugs in my code but were actually issues with the new suffix handling. The list of defaults are just wa to narrow. Missing out standard web formats like pdf, swf and that little know format .txt ;-) This is causing me all sorts of hard-to-debug issues - no errors, no warnings etc; just blank screens. Can I suggest the list of defaults is made much larger and encompasses all manner of formats and that some warning log messages are added to Req so that if what you want is not in the list it gives you some note to that effect. Ones that are obviously missing: pdf txt tif tiff Cheers, Tim -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Beef with LiftRules.explicitlyParsedSuffixes
I would agree. In general I would lean toward being overly verbose about what's happening in Lift when in dev mode. On Wed, Nov 25, 2009 at 6:49 AM, Timothy Perrett timo...@getintheloop.euwrote: Yeah :-) I had not realised that there was this list of approved extensions. I actually have a custom mime type and extension in my application and upgrading from M6 to SNAPSHOT caused this extremely difficult to debug situation. As below, some warnings or something like that would really really help. Cheers, Tim On 25 Nov 2009, at 13:35, Derek Chen-Becker wrote: Was that what was preventing your dispatch from working? On Wed, Nov 25, 2009 at 4:43 AM, Timothy Perrett timo...@getintheloop.eu wrote: Guys, I have some major issues with LiftRules.explicitlyParsedSuffixes - I just wasted almost a whole day yesterday chasing around what I thought were bugs in my code but were actually issues with the new suffix handling. The list of defaults are just wa to narrow. Missing out standard web formats like pdf, swf and that little know format .txt ;-) This is causing me all sorts of hard-to-debug issues - no errors, no warnings etc; just blank screens. Can I suggest the list of defaults is made much larger and encompasses all manner of formats and that some warning log messages are added to Req so that if what you want is not in the list it gives you some note to that effect. Ones that are obviously missing: pdf txt tif tiff Cheers, Tim -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Is there a togglable ajax button in lift?
I haven't tried it, but I'm pretty sure that if you give the button an id you should be able to fire the text change from the AJAX handler. Something like: import net.liftweb.http.js._ import JE._ SHtml.ajaxButton(Click me!, () = { doSomethingServerSide(); JsCmds.SetElemById(myButton, Click me again!, innerHtml)}, id - myButton) That's off the top of my head, so let me know if that doesn't work. Derek On Tue, Nov 24, 2009 at 4:23 PM, Jonathan Ferguson j...@spiralarm.comwrote: I've looked through the API and couldn't find anything that seemed suitable. We need an ajax button that when clicked will fire an event to the server and then toggle the button text. This could be by having two different buttons and only showing one. Cheers Jono -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Looking for an example of how to do master detail, on the view side
I don't think that that should be happening, but I would need to see the code for PersonSnippets to really see what's going on. Derek On Wed, Nov 25, 2009 at 4:16 PM, Jim Barrows jim.barr...@gmail.com wrote: I'm using JPA, and need to do a One-Many, or master detail view. So I tried the obvious: lift:PersonSnippets.save form=post !-- form -- /lift:PersonSnippets.save lift:PersonSnippets.addContactMechanism form=post /lift:PersonSnippets.addContactMechanism However, the HTML that gets generated is the same form for both. Is there an example somewhere I've missed about how to do this? -- James A Barrows -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Looking for an example of how to do master detail, on the view side
That markup should be in a template file somewhere, which would then call the snippets appropriately. I don't see markup for a second form, but I might just be missing it. A couple of other notes: - Generally, on links, omit the suffix and Lift will then do I18N lookup for you as needed. That means use /contact/person/edit instead of /contact/person/edit.html - When you're deleting in JPA, there's no need to do a merge first. Just obtain a reference instead and delete that. It's more efficient. Your code would look like: def doDelete() = { try { Model.removeAndFlush(Model.getReference(classOf[Person], person.getId()); notice(Deleted + person.getFirstName() + + person.getLastName()) redirectTo(/contact/list) } catch { case pe: PersistenceException = error(Error removing person); Log.error(Error removing person, pe); } } On Wed, Nov 25, 2009 at 4:26 PM, Timothy Perrett timo...@getintheloop.euwrote: Lift does not use markup like that - there is no magic mapping between persistence and view. You would most likly have to construct the appropriate master - detail code in your snippets and work like that. Cheers, Tim On 25 Nov 2009, at 23:16, Jim Barrows wrote: I'm using JPA, and need to do a One-Many, or master detail view. So I tried the obvious: lift:PersonSnippets.save form=post !-- form -- /lift:PersonSnippets.save lift:PersonSnippets.addContactMechanism form=post /lift:PersonSnippets.addContactMechanism However, the HTML that gets generated is the same form for both. Is there an example somewhere I've missed about how to do this? -- James A Barrows -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Problem with issue 182
I was thinking something along the lines of: override def menus = super[MegaMetaProtoUser].menus ::: super[CRUDify].menus if you need both, but I suppose it's simpler to just remove it. I'll code up the change and send out a breaking changes announcement. Derek On Tue, Nov 24, 2009 at 2:15 AM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote: Derek Chen-Becker dchenbec...@gmail.com writes: OK, thinking about this a little further, technically it would be a breaking change to remove the menus method from MetaMegaProtoUser. Yes, but is that really an issue here? Would it be better to simply introduce a MenuGenerator trait, a la trait MenuGenerator { def menus : List[Menu] } And add that to CRUDify and MetaMegaProtoUser? Maybe I'm overlooking something obvious, but how will this solve the problem? I guess I can override the menus method in my singleton, but I would still need to get the menus from both CRUDify and MetaMegaProtoUser so they'll have to be named something different in order not to clash, no? /Jeppe -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Problem with issue 182
Anyone else want to chime in with an opinion on this? I've got the code in place to remove the menus def from MetaMegaProtoUser, but if there's a desire it would be equally simple to add a MenuGenerator trait to net.liftweb.sitemap and apply it to the relevant traits. Derek On Tue, Nov 24, 2009 at 9:52 AM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote: Derek Chen-Becker dchenbec...@gmail.com writes: I was thinking something along the lines of: override def menus = super[MegaMetaProtoUser].menus ::: super[CRUDify].menus Ahh yes, didn't think of this super syntax if you need both, but I suppose it's simpler to just remove it. I'll code up the change and send out a breaking changes announcement. Dunno. It seems like there's a (perhaps rare) need for something that could unify this mixin style. Eventually I would like to see e.g CRUDify broken down into smaller traits that can be mixed and matched (and then the default CRUDify that just contains everything). But I think this will require each little trait to hook up to the menuing system if usage should be easy. /Jeppe -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Re: Feature Request: deleteMenuLocParams in CRUDify
Just curious, but what are you using the LocParams for in this case? I'm writing my own CRUDOps trait that takes a different approach to permissions and menus, so I'm trying to figure out the use cases besides my own. Thanks, Derek On Tue, Nov 24, 2009 at 11:01 AM, Peter Robinett pe...@bubblefoundry.comwrote: I had this exact need for deleteMenuLocParams the other day. I'd love to see this added! Peter Robinett On Nov 24, 5:40 am, David Pollak feeder.of.the.be...@gmail.com wrote: On Tue, Nov 24, 2009 at 1:03 AM, tommycli tommy...@ucla.edu wrote: Amazing - great. For future reference - what's the preferred method for asking for code/feature to be integrated? Discuss on this list, once everyone is happy, open a ticket at GitHub. On Nov 23, 9:46 pm, Ross Mellgren dri...@gmail.com wrote: Added an issue for you: http://github.com/dpp/liftweb/issues#issue/205 and it's on review board:http://reviewboard.liftweb.net/r/121/ So it will (probably) be in 1.1-SNAPSHOT in a day or two, assuming the change isn't unacceptable for whatever reason. -Ross On Nov 23, 2009, at 11:50 PM, tommycli wrote: Add deleteMenuLocParams to CRUDify. Patch below. (I tried github, but you guys don't pull apparently). pre diff --git a/lift-persistence/lift-mapper/src/main/scala/net/liftweb/ mapper/CRUDify.scala b/lift-persistence/lift-mapper/src/main/scala/net/ liftweb/mapper/CR index 21e5a3b..5aae123 100644 --- a/lift-persistence/lift-mapper/src/main/scala/net/liftweb/mapper/ CRUDify.scala +++ b/lift-persistence/lift-mapper/src/main/scala/net/liftweb/mapper/ CRUDify.scala @@ -265,7 +265,7 @@ trait CRUDify[KeyType, CrudType : KeyedMapper [KeyType, CrudType]] { def defaultValue = Empty - def params = Nil + def params = deleteMenuLocParams /** * What's the text of the link? @@ -297,6 +297,11 @@ trait CRUDify[KeyType, CrudType : KeyedMapper [KeyType, CrudType]] { })) } + /** + * Override to include new Params for the show all menu + */ + def deleteMenuLocParams: List[Loc.AnyLocParam] = Nil + def deleteMenuName = S.??(Delete)+ +displayName def deleteTemplate(): NodeSeq = pageWrapper(_deleteTemplate) /pre -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com . For more options, visit this group athttp:// groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Surf the harmonics -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Re: Feature Request: deleteMenuLocParams in CRUDify
OK, I'm actually doing that in my CRUDOps with a partial function, so that sounds like one of the use cases I've already covered. Thanks, Derek On Tue, Nov 24, 2009 at 11:56 AM, Peter Robinett pe...@bubblefoundry.comwrote: We've built an access control system that uses an If LocParam to enforce whether the current user can access the requested location. Peter On Nov 24, 10:12 am, Derek Chen-Becker dchenbec...@gmail.com wrote: Just curious, but what are you using the LocParams for in this case? I'm writing my own CRUDOps trait that takes a different approach to permissions and menus, so I'm trying to figure out the use cases besides my own. Thanks, Derek On Tue, Nov 24, 2009 at 11:01 AM, Peter Robinett pe...@bubblefoundry.comwrote: I had this exact need for deleteMenuLocParams the other day. I'd love to see this added! Peter Robinett On Nov 24, 5:40 am, David Pollak feeder.of.the.be...@gmail.com wrote: On Tue, Nov 24, 2009 at 1:03 AM, tommycli tommy...@ucla.edu wrote: Amazing - great. For future reference - what's the preferred method for asking for code/feature to be integrated? Discuss on this list, once everyone is happy, open a ticket at GitHub. On Nov 23, 9:46 pm, Ross Mellgren dri...@gmail.com wrote: Added an issue for you: http://github.com/dpp/liftweb/issues#issue/205 and it's on review board:http://reviewboard.liftweb.net/r/121/ So it will (probably) be in 1.1-SNAPSHOT in a day or two, assuming the change isn't unacceptable for whatever reason. -Ross On Nov 23, 2009, at 11:50 PM, tommycli wrote: Add deleteMenuLocParams to CRUDify. Patch below. (I tried github, but you guys don't pull apparently). pre diff --git a/lift-persistence/lift-mapper/src/main/scala/net/liftweb/ mapper/CRUDify.scala b/lift-persistence/lift-mapper/src/main/scala/net/ liftweb/mapper/CR index 21e5a3b..5aae123 100644 --- a/lift-persistence/lift-mapper/src/main/scala/net/liftweb/mapper/ CRUDify.scala +++ b/lift-persistence/lift-mapper/src/main/scala/net/liftweb/mapper/ CRUDify.scala @@ -265,7 +265,7 @@ trait CRUDify[KeyType, CrudType : KeyedMapper [KeyType, CrudType]] { def defaultValue = Empty - def params = Nil + def params = deleteMenuLocParams /** * What's the text of the link? @@ -297,6 +297,11 @@ trait CRUDify[KeyType, CrudType : KeyedMapper [KeyType, CrudType]] { })) } + /** + * Override to include new Params for the show all menu + */ + def deleteMenuLocParams: List[Loc.AnyLocParam] = Nil + def deleteMenuName = S.??(Delete)+ +displayName def deleteTemplate(): NodeSeq = pageWrapper(_deleteTemplate) /pre -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com liftweb%252bunsubscr...@googlegroups.comliftweb%25252bunsubscr...@googlegroups.com . For more options, visit this group athttp:// groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com liftweb%252bunsubscr...@googlegroups.comliftweb%25252bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Surf the harmonics -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received
Re: [Lift] Re: Page flows in Lift
Rockstar! On Tue, Nov 24, 2009 at 3:25 PM, David Pollak feeder.of.the.be...@gmail.com wrote: See http://demo.liftweb.net/wiz2 The back button is acting hinky... it's not forcing a reload of the page... something's funky with the headers Lift sends back... but that's a separate issue On Tue, Nov 24, 2009 at 9:30 AM, klr8 erva...@gmail.com wrote: Tim, Thanks for the interest in trying the challenge! I'm sorry if I misunderstood your explanation at Devoxx. I certainly do not want to put down on Lift. If anything I want Lift to pass this challenge with ease! Anyway, I did a follow-up post to clarify the test scenario a bit: http://ev9d9.blogspot.com/2009/11/page-flow-challenge-clarification.html This should help you in implementing it correctly. As an aside: somebody submitted a provisional Wicket implementation which runs all steps of the scenario except for step 11 (and 12). However, they're still working on it so I haven't put it up yet. Good luck with the challenge! Erwin On Nov 23, 10:00 pm, Timothy Perrett timo...@getintheloop.eu wrote: Just to update this thread - im waiting for DPP to merge his wizard branch into master then I'll make this little sample app. Cheers, Tim On Nov 22, 4:20 pm, Timothy Perrett timo...@getintheloop.eu wrote: Erwin, Sorry, I just seen your picture on the blog link and it was indeed you who had this conversation with! Perhaps I miss communicated at the conference, but we can do this - as above, i'll put together an example of where we are up to right now. Cheers, Tim On Nov 22, 4:09 pm, Timothy Perrett timo...@getintheloop.eu wrote: Erwin, Interesting challenge - I think we could replicate this pretty easily using the lift-wizard:http://is.gd/516re Right now, the code in lift-wizard is really really first pass and its something that we plan on working on quite a bit before 1.1. However, would it be useful for me to put an example together so you can essentially see how it works? The general concept with the wizard is to control page flow. Potentially it needs another name lift-pageflow perhaps? Cheers, Tim PS: Did you talk to me at Devoxx about this? If so, im really glad you checked out Lift! If not, sorry, just had a very similar conversation at the conference ;-) On Nov 22, 11:09 am, klr8 erva...@gmail.com wrote: Hello, Would somebody of the Life community be interested in trying to implement the Page Flow Challenge in Lift? You can find more details in the following blog post: http://ev9d9.blogspot.com/2009/11/page-flow-challenge.html I'd love to get a Lift entry posted! Erwin -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Lift on Azure
I really thought that you were talking about Azul, which is something I would *love* to run Lift on :) http://www.azulsystems.com/ Derek On Thu, Nov 19, 2009 at 3:20 PM, David Pollak feeder.of.the.be...@gmail.com wrote: On Thu, Nov 19, 2009 at 1:51 PM, Matt Harrington mbh.li...@gmail.comwrote: Java apps have gotten a lot easier to run on Azure this week. Here's a video on developing a simple app with Eclipse and deploying in Tomcat on Azure: http://microsoftpdc.com/Sessions/SVC50 Cool! I don't believe Java on Azure has the same restrictions as Java on GAE. For example, you can write to the local filesystem and use threads. Using the REST-based Azure Tables datastore (non-RDBMS) with Lift's ORM might be tricky, But maybe the Record stuff could work. but SQL Azure is available via JDBC. Or, as far as I know Derby should work. It'd be interesting to support SQL Azure... I'm betting it's not a material deviation from SQL Server. I think you need to be on Windows to develop though, even though the example in the video just uses Eclipse. For one thing, the desktop version of Azure is Windows-only. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=. -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=.
Re: [Lift] Problem with issue 182
OK, thinking about this a little further, technically it would be a breaking change to remove the menus method from MetaMegaProtoUser. Would it be better to simply introduce a MenuGenerator trait, a la trait MenuGenerator { def menus : List[Menu] } And add that to CRUDify and MetaMegaProtoUser? On Thu, Nov 19, 2009 at 3:36 PM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote: Derek Chen-Becker dchenbec...@gmail.com writes: I hadn't though about mixing in CRUDify with users. I suppose we should just pull it out and leave sitemap as the sole menuing method. Jeppe, can you open a ticket? Sure: http://github.com/dpp/liftweb/issues/#issue/200 /Jeppe -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=.
Re: [Lift] Problem with issue 182
I hadn't though about mixing in CRUDify with users. I suppose we should just pull it out and leave sitemap as the sole menuing method. Jeppe, can you open a ticket? On Tue, Nov 17, 2009 at 9:50 AM, David Pollak feeder.of.the.be...@gmail.com wrote: On Tue, Nov 17, 2009 at 7:01 AM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote: Hi, Just updated to latest snapshot and noticed http://github.com/dpp/liftweb/issues/closed/#issue/182 Imo, this is a bad idea since it makes it impossible to mixin Crudify to get easy user editing/listing. It's not a big problem for me since I have made my own Crudifyjust noticed it since I started out based on the original code :-) Good catch. Derek opened the ticket... it's his call as to what to do about this one. /jeppe -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=. -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=.
Re: [Lift] H2 foreign keys
Open a ticket and I'll see if I can get it done. I've been fighting a fire at work pretty much the entire week so far, so needless to say I'm behind on Lift tickets (and LiftTicket :( ) Derek On Wed, Nov 18, 2009 at 7:04 AM, Naftoli Gugenheim naftoli...@gmail.comwrote: I don't think I ended up creating the ticket, but do you want to volunteer to fix this? IIRC the H2 syntax was like the currently used syntax but without the firsy to words or so. Search the H2 SQL Grammar page. Thanks. P.S. I wonder which other DBs use H2's syntax. - Derek Chen-Beckerdchenbec...@gmail.com wrote: That's what I've been doing as we have to make changes. For instance, we needed to change how schemifier creates index columns to accomodate Oracle sequences, so I moved that to DriverType. On Sun, Nov 15, 2009 at 10:24 AM, Naftoli Gugenheim naftoli...@gmail.com wrote: The H2 DriverType does not indicate H2 supports foreign key constraints. However it does, albeit with a different syntax than Schemifier uses. I'll try to file a ticket later. If I decide to work on it, what would be the best way? Refactor the SQL in Schemifier to be generated by the DriverType? --~--~-~--~~~---~--~~ 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.comliftweb%2bunsubscr...@googlegroups.com liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~--- -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=.
Re: [Lift] Re: Lift Mapper support for Oracle Sequences
I think that the change was committed pre-M7, so you should have it. On Thu, Nov 19, 2009 at 12:12 AM, aw anth...@whitford.com wrote: Thank you Derek... Clever trick! I'm not using 1.1-SNAPSHOT -- I am using 1.1-M7... But that shouldn't matter to me since I am not using Schemifier to create and manage the database... (I am using LiquiBase.) I had imagined an alternative strategy whereby I would provide a sequence name to the id object and then it would simply create statements like: insert into Table (id, colA, colB, colC) values (Table_Sequence.NextVal, colA, colB, colC) but the more I think about it... I'm thinking your strategy insulates my code from declaring anything Oracle specific in my mapper objects... I will give this a go. Thanks! -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=.
Re: [Lift] H2 foreign keys
Great. No pressure now! ;) On Thu, Nov 19, 2009 at 3:17 PM, David Pollak feeder.of.the.be...@gmail.com wrote: On Thu, Nov 19, 2009 at 2:08 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: Open a ticket and I'll see if I can get it done. I've been fighting a fire at work pretty much the entire week so far, so needless to say I'm behind on Lift tickets (and LiftTicket :( ) I so want LiftTicket... I'm waiting with baited breath... maybe it'll be an early birthday present... Derek On Wed, Nov 18, 2009 at 7:04 AM, Naftoli Gugenheim naftoli...@gmail.comwrote: I don't think I ended up creating the ticket, but do you want to volunteer to fix this? IIRC the H2 syntax was like the currently used syntax but without the firsy to words or so. Search the H2 SQL Grammar page. Thanks. P.S. I wonder which other DBs use H2's syntax. - Derek Chen-Beckerdchenbec...@gmail.com wrote: That's what I've been doing as we have to make changes. For instance, we needed to change how schemifier creates index columns to accomodate Oracle sequences, so I moved that to DriverType. On Sun, Nov 15, 2009 at 10:24 AM, Naftoli Gugenheim naftoli...@gmail.comwrote: The H2 DriverType does not indicate H2 supports foreign key constraints. However it does, albeit with a different syntax than Schemifier uses. I'll try to file a ticket later. If I decide to work on it, what would be the best way? Refactor the SQL in Schemifier to be generated by the DriverType? --~--~-~--~~~---~--~~ 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.comliftweb%2bunsubscr...@googlegroups.com liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~--- -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=. -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=.
Re: [Lift] H2 foreign keys
That's what I've been doing as we have to make changes. For instance, we needed to change how schemifier creates index columns to accomodate Oracle sequences, so I moved that to DriverType. On Sun, Nov 15, 2009 at 10:24 AM, Naftoli Gugenheim naftoli...@gmail.comwrote: The H2 DriverType does not indicate H2 supports foreign key constraints. However it does, albeit with a different syntax than Schemifier uses. I'll try to file a ticket later. If I decide to work on it, what would be the best way? Refactor the SQL in Schemifier to be generated by the DriverType? --~--~-~--~~~---~--~~ 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.comliftweb%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~--- -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=.
Re: [Lift] Re: Possible lift error in lift:form tag
This was my fault when I added the post-submit ajax handling. It had worked fine on my test app, so I'm not sure what happened here, but I'm sorry for the hassle. On Sun, Nov 15, 2009 at 12:50 PM, David Pollak feeder.of.the.be...@gmail.com wrote: Marius, Thanks for turning this fix around so quickly! David On Sun, Nov 15, 2009 at 7:58 AM, Marius marius.dan...@gmail.com wrote: Pushed a fix to master. Please let me if there are other issues here. On Nov 15, 2:38 pm, Marius marius.dan...@gmail.com wrote: Pushed a suggested fix on reviewboard Br's, Marius On Nov 15, 2:24 pm, Marius marius.dan...@gmail.com wrote: What is the exact JS error? On Nov 15, 2:04 pm, Marius marius.dan...@gmail.com wrote: I don't think my commits may have caused this. Derek ? Br's, Marius On Nov 14, 11:36 pm, David Pollak feeder.of.the.be...@gmail.com wrote: Looks like a bug. Please open a ticket athttp:// github.com/dpp/liftweb/issues Marius Derek: could this have anything to do with your recent changes? If so, could you get a fix into the repo, asap? On Sat, Nov 14, 2009 at 1:31 PM, Richard Hirsch hirsch.d...@gmail.comwrote: I think I might have found a lift bug in the lift:form tag I just did a update and certain HTML buttons (for example, Add in creating a new action, etc.) no longer work. A javascript syntax error is thrown. The file in question is \trunk\server\src\main\webapp\action_view\index.html. The code is here: div class=ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide id=tabs-2 lift:form lift:main table This is code currently generated and which causes the syntax error. form id=F1008082309036RKD action=javascript:// onsubmit=liftAjax.lift_ajaxHandler(jQuery('#'+quot;F1008082309036RKDquot;).serialize(), , null, quot;javascriptquot;);return false; This older generated code is currently deployed on stax are works correctly. form id=F444961682037I0I action=javascript:// onsubmit=liftAjax.lift_ajaxHandler(jQuery('#'+quot;F444961682037I0Iquot;).serialize(), null, null, null);return false; Notice the difference in the onsubmit value. D. -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Surf the harmonics -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~--- -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=.
[Lift] Re: MegaProtoUser + MappedPassword question
Open a ticket, as this should be configurable. In case you didn't find it, the ** is taken from the MappedPassword object, field blankPw. This should be a var and there should probably be a per-MappedPassword field override as well. Derek On Sun, Nov 8, 2009 at 6:48 AM, george geo...@mattandgeorge.com wrote: I'm using MegaProtoUser which has a MappedPassword field. When the sign up form is displayed, the password field is pre- populated to '***' which is proving very confusing for some users. I would like to display the password field as a completely empty field, but I can not see a way to override this behavior. MegaProtoUser is mostly suiting my needs pretty well right now, so I am reluctant to roll my own for the sake of such a small detail. Does anyone have any ideas how I can achieve this? thanks george --~--~-~--~~~---~--~~ 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: Changes to transaction handling since M6?
That's really odd. As far as I know the only thing JPA related that might have changed is for the JPA Demo site (pom Hibernate version change). The transaction handling code is all in ScalaJPA, which also hasn't changed. JndiEMF explicitly opens a transaction before it even retrieves the EM from JNDI, so I don't know how you could be getting that kind of error. If you could give me more details (on-list or privately) I'd like to figure out what's going on here. Derek On Thu, Nov 12, 2009 at 5:49 PM, Kris Nuttycombe kris.nuttyco...@gmail.comwrote: Hi, all (Derek! :), Have there been significant changes in how transactions are handled by lift-jpa since M6? Due to the rearrangement of the repository, I'm having a hard time figuring out if the code has changed. I have a repeatable issue that shows up when changing between M6 and SNAPSHOT wherein I now get javax.persistence.TransactionRequiredExceptions when doing a merge using a JndiEMF with RequestVarEM in an AJAX callback. Has anything major changed in this timeframe? Kris --~--~-~--~~~---~--~~ 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: Build Broken?
I don't know how others feel, but I would like all bugs, even for unit tests, to go through issue tracking and review board. Mostly this is so that we have good documentation of what is happening to the codebase and why. Derek On Sat, Nov 7, 2009 at 11:45 AM, Joni Freeman freeman.j...@gmail.comwrote: Thanks for the test results. It looked like a charset problem in unit test. I changed the assertion in test to use more robust case class comparison instead of String comparison. Please let us know if this fixes the build on your machine. Committers, I pushed this small fix directly into master, skipping Review Board. Please let me know if this is not allowed even if the change is very small and just for unit tests. Cheers Joni On 7 marras, 07:22, aw anth...@whitford.com wrote: OK, found Hudson: http://hudson.scala-tools.org/job/Lift/ But now if that isn't broken, why is my fresh clone failing? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: How to specify the SELECT statement in the Mapper ?
MetaMapper.findAllFields may work for what you're doing, but with the DAYOFWEEK conversion you may just have to go directly against the DB. Derek On Sun, Nov 8, 2009 at 11:44 PM, Neil.Lv anim...@gmail.com wrote: Hi all, There is some example code: ### SELECT id, name, sex, created_at, DAYOFWEEK(created_at,) as week, (CURRENT_DATE) as t FROM users WHERE created_at (CURRENT_DATE ) AND created_at (CURRENT_DATE + interval 2 day) ORDER BY created_at ASC ### How can i specify the SELECT statement that i don't want all the columns and i want add the column as week in the example code ? Any help would be much appreciated! Cheers, Neil --~--~-~--~~~---~--~~ 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: S.uri not including query params
You should be able to specify the redirect, so this may be a bug. Where are you setting the loginRedirect? It gets reset to the referred page when a login is required, so you'll have to set it after that point. Derek On Mon, Nov 9, 2009 at 3:12 AM, opyate opy...@gmail.com wrote: Hello guys, I thought the purpose of loginRedirect was to be able to override where the newly logged-in user gets redirected to. I'm doing it like so, in model/User: loginRedirect(Full(/loadPrivateKey)) ..but it just goes to the page I accessed before I clicked on / user_mgt/login Is there another way I should be aware of to reach my goal? I guess I could be more specific: once a user is logged in I need to load his/her private key into memory with which to decrypt sensitive data from the database (previously encrypted with a public key). I have all the code written using BouncyCastle, but was wondering if Lift offers something built-in. I'd be happy to forward my code on if this could be a useful extension to the Lift code. Thanks, Juan On Oct 21, 2:18 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: http://github.com/dpp/liftweb/issues/#issue/121 If I have some time this afternoon I'll fix it. On Tue, Oct 20, 2009 at 8:07 PM, Naftoli Gugenheim naftoli...@gmail.com wrote: Then my addition to MetaMegaProtoUser of loginRedirect has a bug, because loginFirst sets it based on S.uri. Since I'm not usually around an internet connection, I won't be able to go through filing a ticket, putting a diff on Review Board, and pushing it, in any small amount of time. - David Pollakfeeder.of.the.be...@gmail.com wrote: On Tue, Oct 20, 2009 at 2:48 PM, Naftoli Gugenheim naftoli...@gmail.com wrote: Is S.uri supposed to return the part of the URL after '?'? No -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Surf the harmonics --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Lift Mapper support for Oracle Sequences
The code in 1.1-SNAPSHOT already uses sequences for Oracle. Here's the relevant code: override def primaryKeySetup(tableName : String, columnName : String) : List[String] = { /* * This trigger and sequence setup is taken from http://www.databaseanswers.org/sql_scripts/ora_sequence.htm */ super.primaryKeySetup(tableName, columnName) ::: List(CREATE SEQUENCE + tableName + _sequence START WITH 1 INCREMENT BY 1, CREATE OR REPLACE TRIGGER + tableName + _trigger BEFORE INSERT ON + tableName + + FOR EACH ROW + WHEN (new. + columnName + is null) + BEGIN + SELECT + tableName + _sequence.nextval INTO :new. + columnName + FROM DUAL; + END;) } Are you running into an issue with it? Derek On Tue, Nov 10, 2009 at 1:46 AM, aw anth...@whitford.com wrote: For Oracle database tables, one typically creates a Sequence to provide primary key values. For example: create table WIDGET ( id Number(8,0) not null, name varchar2(50) not null, ... constraint WIDGET_PK primary key (id), ... ) create sequence WIDGET_ID_SEQ When creating records using Mapper, is there a convenient way to get Mapper to automatically leverage the corresponding sequence to populate the id column? (Why Oracle doesn't do this automatically in 2009 like SQL Server, Sybase, and other database systems, is beyond me...) --~--~-~--~~~---~--~~ 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: Changes to scala-tools.org Hudson
Josh, ScalaJPA has the following distribution setup: distributionManagement repository idscala-tools.org/id urlhttp://nexus.scala-tools.org/content/repositories/releases/url /repository snapshotRepository idscala-tools.org/id urlhttp://nexus.scala-tools.org/content/repositories/snapshots/url uniqueVersiontrue/uniqueVersion /snapshotRepository site idscala-tools.org/id url http://nexus.scala-tools.org/content/repositories/mvnsites/${project.artifactId} /url /site /distributionManagement Does that look correct? On Thu, Nov 5, 2009 at 5:58 PM, Josh Suereth joshua.suer...@gmail.comwrote: Scala-tools.org's Hudson server will no longer allow local deployment to the repository. You *must* submit all snapshot/release artifacts through the nexus webapp. The hudson server will provide a server id ( nexus.scala-tools.org) that will have appropriate (and appropriately hidden) credentials for nightly deployments of snapshots. As such, the following changes should be made to lift's pom.xml (I'm trying to update your hudson lift configuration to cause the least amount of disruption): I have a forked repo (jsuereth/liftweb) with the changes as well (if you want to use github's fork queue feature): --- a/pom.xml +++ b/pom.xml @@ -806,16 +806,16 @@ idhudson/id distributionManagement repository - idhudson.scala-tools.org/id - urlfile:///home/scala-tools.org/www/repo-snapshots/url + idnexus.scala-tools.org/id + urlhttp://nexus.scala-tools.org/content/repositories/releases /url /repository snapshotRepository - idhudson.scala-tools.org/id - urlfile:///home/scala-tools.org/www/repo-snapshots/url + idnexus.scala-tools.org/id + url http://nexus.scala-tools.org/content/repositories/snapshots/url uniqueVersionfalse/uniqueVersion /snapshotRepository site - idhudson.scala-tools.org/id + idnexus.scala-tools.org/id urlfile:///home/ scala-tools.org/www/mvnsites-snapshots/liftweb/url /site /distributionManagement --~--~-~--~~~---~--~~ 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] Neat GitHub trick
Sorry if I'm the only one who didn't realize this before, but if you include the text Closes #xxx in your Git commit message, Git will automatically close the xxx ticket using your commit message. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: URL in PlainMailBodyType to BlackBerry
Actually, I thought that Dumbster was more sophisticated than it is. I think that your approach is fine for verifying that the message is created properly. On Thu, Nov 12, 2009 at 2:37 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: What's the advantage/purpose over they method I chose? On Thu, Nov 12, 2009 at 4:36 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: Have you ever used Dumbster? On Thu, Nov 12, 2009 at 2:59 PM, Derek Chen-Becker dchenbec...@gmail.com wrote: I would like to see an integrated dumbster test. You can pick an arbitrary port to run the test on just by attempting to bind and iterating until you succeed. Something (roughly) like this: def openSmtpServer (startPort : Int, endPort : Int) : (Int,SimpleSmtpServer) = { var port = startPort var server : SimpleSmtpServer = null while (port = endPort (server eq null)) { try { server = SimpleSmtpServer.start(port) } catch { case _ = port += 1 } } return (port,server) } Then you can configure Lift's mailer to send to that port on localhost and go from there. Derek On Fri, Nov 6, 2009 at 11:54 AM, Naftoli Gugenheim naftoli...@gmail.com wrote: Can someone confirm or give other feedback? Are my tests good? http://reviewboard.liftweb.net/r/83/ On Wed, Nov 4, 2009 at 8:45 PM, Naftoli Gugenheim naftoli...@gmail.com wrote: Okay. Unit test are now on Review Board too (and they pass). I'm hoping someone will be able to confirm my work so that my client, a medical assistance volunteer-based charity organization, will have email working properly along with the rest of Lift's great features, so that the volunteer dispatchers will be able to click the links and help sick people. On Wed, Nov 4, 2009 at 2:04 AM, Naftoli Gugenheim naftoli...@gmail.com wrote: I thought of a smarter way to test it. Please tell me if you have any objections. I noticed that some of the specs extend the class they test. The idea is to refactor the call to actually send the email into an outside method. Then, after making some private members of Mailer protected, the spec can override the behavior of the method that sends it, to instead check the message object. This has the advantages of not adding another dependency to Lift, or relying on a given port being available to run an SMTP server on whoever builds Lift's computer. - David Pollakfeeder.of.the.be...@gmail.com wrote: On Tue, Nov 3, 2009 at 3:00 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: I verified locally via dumbster that the content type is test/plain; charset=us-ascii for a single PlainMailBodyType. For two, or an XHTMLMailBodyType, it's multipart/alternative. Do I still need to contribute a test to Lift? Yes. This is the last time I will state this criteria or otherwise engage on this subject. - David Pollakfeeder.of.the.be...@gmail.com wrote: On Tue, Nov 3, 2009 at 1:47 PM, Naftoli Gugenheim naftoli...@gmail.com wrote: Wait a minute. You want me to test that my change works--that simple messages are not multipart--or that other messages still are multipart? Both. Test that mail sent as plain text is not multipart and that all other mail is multipart and that all the mail actually makes it through the system. It's 2 or 3 tests. Why am I imposing this burden on you? Almost every site that uses Lift uses the Mailer. I have given my cell phone number to some of these sites with the message I stand behind Lift... if you're experiencing a problem, please call me any time day or night. So, I'm on the hook if something goes wrong. My gut says, there could be more problems with this apparently simple change than meet the eye, so I'm asking you to write the tests. Or something else? - David Pollakfeeder.of.the.be...@gmail.com wrote: On Tue, Nov 3, 2009 at 1:30 PM, Naftoli Gugenheim naftoli...@gmail.com wrote: I asked you how to write one. I have no clue how to unit test email, or what content type an email is. And the test has to not fail on computers that don't have an SMTP server, I presume? I don't know how to write tests against mailers, but you're the one that made a change, so you have to figure out how to test it. I know no more about testing mailers than you do, so it's one of us that has to do the work. As I mentioned on review board, I did test it manually though and it works fine. Do most commits include a unit test? If this change breaks the mailer, the break impacts lots and lots of people. The mailer code has been stable and untouched for a long time (except for the change to LiftActors). So, my criteria for accepting this change is to have a test associated
[Lift] Re: Neat GitHub trick
Ah. I hadn't realized that part :( On Fri, Nov 13, 2009 at 9:28 AM, David Pollak feeder.of.the.be...@gmail.com wrote: On Fri, Nov 13, 2009 at 8:07 AM, Derek Chen-Becker dchenbec...@gmail.comwrote: Sorry if I'm the only one who didn't realize this before, but if you include the text Closes #xxx in your Git commit message, Git will automatically close the xxx ticket using your commit message. Yes... it's very cool... unfortunately, sometimes tickets get closed when the checkin is to a branch other than master... -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Changes to transaction handling since M6?
Looking at 81f1715f671e8b5ee4f6d3ce242cc9da272611d1, maybe the RequestVar needs to be changed to an UnboundRequestVar. It's not clear from the scaladocs on UnboundRequestVar, though, that this is the intent. It looks like those scaladocs were just copied and pasted from RequestVar. If this sounds like the right change to make I can fix RequestVarEM and update the scaladocs for UnboundRequestVar. Derek On Fri, Nov 13, 2009 at 11:24 AM, Kris Nuttycombe kris.nuttyco...@gmail.com wrote: On Thu, Nov 12, 2009 at 5:57 PM, David Pollak feeder.of.the.be...@gmail.com wrote: Kris, There was a bunch of changes in the net.liftweb.mapper.DB code for transaction management, but I don't think that would impact JPA. Also, in M7, there were changes in how RequestVars are handled during Ajax requests... basically, state is snapshotted when the Ajax request is created and then that snapshot state is restored during the servicing of the Ajax request. If the RequestVarEM stuff is being snapshotted, that could cause issues. Thanks, David That sounds like it could very likely be the culprit, but I'm going to have to dig a bit more to know for certain. the RequestVarEM trait uses the following RequestVar: object emVar extends RequestVar[EntityManager](openEM()) { this.registerGlobalCleanupFunc(ignore = closeEM(this.is)) override def __nameSalt = net.liftweb.util.Helpers.randomString(10) } openEM() is supplied in my case by JndiEMF. If this would not be called during handling of an AJAX request, that's definitely the issue. This brings to mind an issue I'd worried about a long time ago, back when I had my own implementation of a JNDI resource acquisition trait for persistence. We can tie into the cleanup phase of the RequestVar's lifecycle with a cleanup func, but if the RequestVar is going to be persisted across actual HTTP requests in the AJAX case, we will also need additional lifecycle hooks. I'm actually kind of concerned about this decision; it seems like it could really complicate usage of RequestVar in cases where the container has additional stuff it does related to the lifecycle of the HTTP request (like JTA). Maybe there should be a separate AnyVar subclass that is intended for this sort of persist-for-ajax situation? Kris On Thu, Nov 12, 2009 at 4:49 PM, Kris Nuttycombe kris.nuttyco...@gmail.com wrote: Hi, all (Derek! :), Have there been significant changes in how transactions are handled by lift-jpa since M6? Due to the rearrangement of the repository, I'm having a hard time figuring out if the code has changed. I have a repeatable issue that shows up when changing between M6 and SNAPSHOT wherein I now get javax.persistence.TransactionRequiredExceptions when doing a merge using a JndiEMF with RequestVarEM in an AJAX callback. Has anything major changed in this timeframe? Kris -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Changes to transaction handling since M6?
Looks like it. Probably private[liftweb] would work, too. In any case, the scaladocs need to be updated to reflect what it's for. On Fri, Nov 13, 2009 at 12:26 PM, Kris Nuttycombe kris.nuttyco...@gmail.com wrote: Hmmm is this now TransientRequestVar? It's private[http], but could it be protected instead? Kris On Fri, Nov 13, 2009 at 11:22 AM, Kris Nuttycombe kris.nuttyco...@gmail.com wrote: Let me just try it out since I've got a test case, and if need be I'll file the ticket commit. Kris On Fri, Nov 13, 2009 at 10:45 AM, Derek Chen-Becker dchenbec...@gmail.com wrote: Looking at 81f1715f671e8b5ee4f6d3ce242cc9da272611d1, maybe the RequestVar needs to be changed to an UnboundRequestVar. It's not clear from the scaladocs on UnboundRequestVar, though, that this is the intent. It looks like those scaladocs were just copied and pasted from RequestVar. If this sounds like the right change to make I can fix RequestVarEM and update the scaladocs for UnboundRequestVar. Derek On Fri, Nov 13, 2009 at 11:24 AM, Kris Nuttycombe kris.nuttyco...@gmail.com wrote: On Thu, Nov 12, 2009 at 5:57 PM, David Pollak feeder.of.the.be...@gmail.com wrote: Kris, There was a bunch of changes in the net.liftweb.mapper.DB code for transaction management, but I don't think that would impact JPA. Also, in M7, there were changes in how RequestVars are handled during Ajax requests... basically, state is snapshotted when the Ajax request is created and then that snapshot state is restored during the servicing of the Ajax request. If the RequestVarEM stuff is being snapshotted, that could cause issues. Thanks, David That sounds like it could very likely be the culprit, but I'm going to have to dig a bit more to know for certain. the RequestVarEM trait uses the following RequestVar: object emVar extends RequestVar[EntityManager](openEM()) { this.registerGlobalCleanupFunc(ignore = closeEM(this.is)) override def __nameSalt = net.liftweb.util.Helpers.randomString(10) } openEM() is supplied in my case by JndiEMF. If this would not be called during handling of an AJAX request, that's definitely the issue. This brings to mind an issue I'd worried about a long time ago, back when I had my own implementation of a JNDI resource acquisition trait for persistence. We can tie into the cleanup phase of the RequestVar's lifecycle with a cleanup func, but if the RequestVar is going to be persisted across actual HTTP requests in the AJAX case, we will also need additional lifecycle hooks. I'm actually kind of concerned about this decision; it seems like it could really complicate usage of RequestVar in cases where the container has additional stuff it does related to the lifecycle of the HTTP request (like JTA). Maybe there should be a separate AnyVar subclass that is intended for this sort of persist-for-ajax situation? Kris On Thu, Nov 12, 2009 at 4:49 PM, Kris Nuttycombe kris.nuttyco...@gmail.com wrote: Hi, all (Derek! :), Have there been significant changes in how transactions are handled by lift-jpa since M6? Due to the rearrangement of the repository, I'm having a hard time figuring out if the code has changed. I have a repeatable issue that shows up when changing between M6 and SNAPSHOT wherein I now get javax.persistence.TransactionRequiredExceptions when doing a merge using a JndiEMF with RequestVarEM in an AJAX callback. Has anything major changed in this timeframe? Kris -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Changes to scala-tools.org Hudson
Should I make these changes for the ScalaJPA project as well? Do we need to notify all of the people who are hosting projects on scala-tools.org, or is everyone pretty much on this list? Derek On Fri, Nov 6, 2009 at 11:23 AM, Josh Suereth joshua.suer...@gmail.comwrote: Great, Thanks! On Fri, Nov 6, 2009 at 11:23 AM, Indrajit Raychaudhuri indraj...@gmail.com wrote: Done. Hudson build triggered, we're good if no build fail mail comes in next half an hour. Cheers, Indrajit On 06/11/09 8:10 PM, Josh Suereth wrote: Anytime soon would be good. Im leaving the other option open for now (because there's a lot more work to fully disable) but I'm trying to move all projects into a state where they won't break before that change. SO once you're done, I'll send out the email scheduling when hudson is going into maintenance. Thanks! -Josh On Fri, Nov 6, 2009 at 2:11 AM, Indrajit Raychaudhuri indraj...@gmail.com mailto:indraj...@gmail.com wrote: Josh, thank you for driving us do the 'right thing' :) Hudson build would trigger when the pom.xml changes. So do you want your fork (b9588f...) to be applied right away. Or do you want us to wait for a pre-set time for the transition? Committers, do you insist a ticket/reviewboard for this. If yes, I'll do the needful? Cheers, Indrajit On 06/11/09 6:28 AM, Josh Suereth wrote: Scala-tools.org's Hudson server will no longer allow local deployment to the repository. You *must* submit all snapshot/release artifacts through the nexus webapp. The hudson server will provide a server id (nexus.scala-tools.org http://nexus.scala-tools.org http://nexus.scala-tools.org) that will have appropriate (and appropriately hidden) credentials for nightly deployments of snapshots. As such, the following changes should be made to lift's pom.xml (I'm trying to update your hudson lift configuration to cause the least amount of disruption): I have a forked repo (jsuereth/liftweb) with the changes as well (if you want to use github's fork queue feature): --- a/pom.xml +++ b/pom.xml @@ -806,16 +806,16 @@ idhudson/id distributionManagement repository - idhudson.scala-tools.org http://hudson.scala-tools.org http://hudson.scala-tools.org/id - urlfile:///home/scala-tools.org/www/repo-snapshots http://scala-tools.org/www/repo-snapshots http://scala-tools.org/www/repo-snapshots/url + idnexus.scala-tools.org http://nexus.scala-tools.org http://nexus.scala-tools.org/id + urlhttp://nexus.scala-tools.org/content/repositories/releases /url /repository snapshotRepository - idhudson.scala-tools.org http://hudson.scala-tools.org http://hudson.scala-tools.org/id - urlfile:///home/scala-tools.org/www/repo-snapshots http://scala-tools.org/www/repo-snapshots http://scala-tools.org/www/repo-snapshots/url + idnexus.scala-tools.org http://nexus.scala-tools.org http://nexus.scala-tools.org/id + urlhttp://nexus.scala-tools.org/content/repositories/snapshots /url uniqueVersionfalse/uniqueVersion /snapshotRepository site - idhudson.scala-tools.org http://hudson.scala-tools.org http://hudson.scala-tools.org/id + idnexus.scala-tools.org http://nexus.scala-tools.org http://nexus.scala-tools.org/id urlfile:///home/scala-tools.org/www/mvnsites-snapshots/liftweb http://scala-tools.org/www/mvnsites-snapshots/liftweb http://scala-tools.org/www/mvnsites-snapshots/liftweb/url /site /distributionManagement --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: URL in PlainMailBodyType to BlackBerry
: output from git diff -b, so applying it won't indent properly) On Fri, Oct 30, 2009 at 4:20 PM, Derek Chen-Becker dchenbec...@gmail.com wrote: Probably not until next week, unfortunately. If you don't mind looking at it, the main thing to change is in Mailer.scala, around line 156. There should be a check or match to see if info is a List(PlainMailBodyType), and if so, skip the Multipart mapping that follows and do a message.setText on the contents of the PlainMailBodyType instead. Derek On Fri, Oct 30, 2009 at 1:29 PM, Naftoli Gugenheim naftoli...@gmail.com wrote: I guess you didn't get around to it yet. Any idea when? Thanks. http://github.com/dpp/liftweb/issues/#issue/110 On Thu, Oct 15, 2009 at 3:03 PM, Derek Chen-Becker dchenbec...@gmail.com wrote: Looking at the code I don't think that it would be hard to do the right thing depending on whether someone calls sendMail with a sequence of MailBodyTypes or just a single PlainMailBodyType. If someone wants to open an issue on it I could make the change. Derek On Thu, Oct 15, 2009 at 8:45 AM, David Pollak feeder.of.the.be...@gmail.com wrote: In the deep dark recesses of my memory, I think we originally did text-only messages and there was some complaint about that... sigh. On Wed, Oct 14, 2009 at 10:36 PM, Derek Chen-Becker dchenbec...@gmail.com wrote: The way that Lift uses the API we don't support sending non-multipart messages. I suppose that this could be refactored to support single part MIME messages, but I really have trouble believing that a BlackBerry can't handle it. Derek On Mon, Oct 12, 2009 at 9:38 PM, Naftoli Gugenheim naftoli...@gmail.com wrote: True, I may have to do that at some point, although I'm not super confident I'll find such specs. What do you say to Ross's comment? Why is it multipart? - David Pollakfeeder.of.the.be...@gmail.com wrote: On Mon, Oct 12, 2009 at 6:17 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: Does this help? It's from GMail / Show original GMail munges things, so I don't know if that's the original message. You might want to figure out what the specs are for blackberry to convert messages and see why this kind of message is not being converted. Delivered-To: naftoli...@gmail.com Received: by 10.86.30.11 with SMTP id d11cs12302fgd; Wed, 7 Oct 2009 12:28:57 -0700 (PDT) Received: by 10.229.19.149 with SMTP id a21mr391667qcb.29.1254943736364; Wed, 07 Oct 2009 12:28:56 -0700 (PDT) Return-Path: yehu...@lrbcol.org Received: from lrbcol ( 174-143-236-122.static.slicehost.net [174.143.236.122]) by mx.google.com with ESMTP id 1si71430296yxe.11.2009.10.07.12.28.55; Wed, 07 Oct 2009 12:28:56 -0700 (PDT) Received-SPF: neutral (google.com: 174.143.236.122 is neither permitted nor denied by best guess record for domain of yehu...@lrbcol.org) client-ip=174.143.236.122; Authentication-Results: mx.google.com; spf=neutral ( google.com: 174.143.236.122 is neither permitted nor denied by best guess record for domain of yehu...@lrbcol.org) smtp.mail= yehu...@lrbcol.org Received: from lrbcol (localhost [127.0.0.1]) by lrbcol (Postfix) with ESMTP id CDB51A0055 for naftoli...@gmail.com; Wed, 7 Oct 2009 15:28:56 -0400 (EDT) From: yehu...@lrbcol.org To: naftoli...@gmail.com Message-ID: 2107786874.01254943736214.javamail.r...@lrbcol Subject: Detail of Transportation #843 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary==_Part_0_1227069312.1254943735894 Date: Wed, 7 Oct 2009 15:28:56 -0400 (EDT) --=_Part_0_1227069312.1254943735894 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit naftuli gugenheim; 617 6st ; M: 7325342893; From : ; To : 39 hearth ct; Request URL: [TODO] --=_Part_0_1227069312.1254943735894-- On Mon, Oct 12, 2009 at 6:15 PM, David Pollak feeder.of.the.be...@gmail.com wrote: Please send some test email to an account you can access using Thunderbird. Open the message and look at the message source. Is it really plain text? What do the headers say it is? On Mon, Oct 12, 2009 at 1:11 PM, Naftoli Gugenheim naftoli...@gmail.com wrote: Hi. I'm sending an email using PlainMailBodyType that contains a URL. Normally when a BlackBerry receives a plain text email it automatically hyperlinks URLS
[Lift] ReviewBoard upgrade
I'll be working in the morning (US Mountain time) on upgrading ReviewBoard, just in case anyone notices any hiccups. 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: Two how-to questions
I'm not sure how much complexity you want, but Quartz might be good for #1: http://www.opensymphony.com/quartz/ Derek On Mon, Nov 2, 2009 at 12:40 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: Could someone give me a quick code sample to get me started on each of the following? 1. A task that should run at a fixed time each day 2. (If it's possible.) Errors logged should be emailed. 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: Two how-to questions
That would probably work in the simple case. Derek On Thu, Nov 5, 2009 at 3:19 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: Hi. Thanks for responding. I haven't looked it up, but I don't really need anything very specialized. I didn't mean that the time it runs each day has to be very precise. The point is just to back up the database daily. Should I use java.util.Timer.scheduleAtFixedRate? - Derek Chen-Beckerdchenbec...@gmail.com wrote: I'm not sure how much complexity you want, but Quartz might be good for #1: http://www.opensymphony.com/quartz/ Derek On Mon, Nov 2, 2009 at 12:40 PM, Naftoli Gugenheim naftoli...@gmail.com wrote: Could someone give me a quick code sample to get me started on each of the following? 1. A task that should run at a fixed time each day 2. (If it's possible.) Errors logged should be emailed. 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: LiftTicket and AJAX
If there are no objections, I'll add that method to SHtml post-M7. I was thinking maybe calling it ajaxEditable, what does everything think? Also, any votes +/- for making some Mapper traits to simplify adding this behavior? Derek On Sun, Nov 1, 2009 at 7:38 AM, Marius marius.dan...@gmail.com wrote: I think it would be great to have the editable in SHtml. On Nov 1, 1:43 am, Derek Chen-Becker dchenbec...@gmail.com wrote: I have at least two different pieces of functionality here. The main workhorse is the AjaxUtils.editable method that actually generates the dynamic div. I was thinking that this might be good to put in SHtml (albeit with a different name). I also have the AjaxEditableField trait which mixes into a MappedField to provide a specialized asHtml, but I was thinking that maybe I should provide a trait that you could add to a Mapper that defines a list of fields that will be AJAXified, so that you can control which ones are editable via asHtml. I think I also need to add a boolean function parameter that lets you control whether the field becomes editable or not, so that you could easily tie it to a Loc.If or some other access control mechanism. Thoughts? Derek On Sat, Oct 31, 2009 at 8:08 AM, David Pollak feeder.of.the.be...@gmail.com wrote: Very cool! On Fri, Oct 30, 2009 at 4:44 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: I just committed some code for AJAX-editable fields that I think might be useful as a part of LiftWeb. Basically, if you've seen how ReviewBoard handles field editing, this is the same thing. It's a trait that can be mixed into any MappedField and as soon as M7 is release and I can merge the new ajaxForm postSubmit code into master, I'll have a demo that will work out of the box. If you're interested, take a look at it in GitHub: http://github.com/dchenbecker/LiftTicket/blob/master/src/main/scala/o. .. Constructive criticism would be appreciated. Derek -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Surf the harmonics --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: JPADemo 1.1-SNAPSHOT: id with auto-increment (MySQL or H2)
If updating the pom hibernate version fixes the problem, please file an issue and we'll update the Archetype. Thanks, Derek On Mon, Nov 2, 2009 at 6:23 AM, Chris Lewis burningodzi...@gmail.comwrote: Troy, I ran into the same problem. It seems to be a hibernate issue - that archetype uses an older version of hibernate that breaks with mysql. Change the version in your pom for hibernate (I don't remember the latest, maybe 3.4GA). I meant to post this a while ago, as it cost me an hour or more to figure out. chris Troy Noble wrote: I'm not even sure this is a Lift issue, could be Hibernate or Scala... but here goes... I get one test failure in TestJPAWeb.scala when I use JPA with MySQL (also confirmed with H2) with auto-increment id column. @Entity class Author { @Id @GeneratedValue(){val strategy = GenerationType.AUTO} var id : Long = _ ... } Note that I also tried adding @Column{val nullable = false, val insertable = false, val updatable = false} per another JPA+Scala page I read, just to see if it makes a difference. It didn't. I also tried GenerationType.IDENTITY. No difference. If I turn on showSql it appears that auto-increment columns are getting included in the SQL statement for some reason such as: insert into author (name, id) values (?, ?) And I get an error indicating no value is set for column 2. The Hibernate output using H2 database appears in spa/target/surefire- reports/com.foo.jpaweb.model.TestJPAWeb-output.txt is as follows: Hibernate: insert into Author (name, id) values (?, ?) Oct 31, 2009 7:05:48 AM org.hibernate.util.JDBCExceptionReporter logExceptions WARNING: SQL Error: 90012, SQLState: 90012 Oct 31, 2009 7:05:48 AM org.hibernate.util.JDBCExceptionReporter logExceptions SEVERE: Parameter #2 is not set; SQL statement: insert into Author (name, id) values (?, ?) [90012-121] A similar problem was reported in Hibernate 3.2.4 but was fixed in 3.2.6... so I'm assuming version 3.3.1GA that Liftweb presently uses should not be the source of this problem? That might not be a good assumption. I was going to try to do a stand-alone Scala + JPA test case apart from Lift, and then try with Java + JPA. But before I go too far down that path, I wanted to make sure I'm not doing something wrong or that it's not a lift issue. This is very easy to reproduce if you start by downloading a clean JPADemo as per the liftweb + JPA wiki page (or the liftbook example) and change the top level pom.xml to include: dependency groupIdcom.h2database/groupId artifactIdh2/artifactId version1.2.121/version /dependency or for MySQL: dependency groupIdmysql/groupId artifactIdmysql-connector-java/artifactId version5.0.8/version /dependency And then change the following entries in the spa/src/main/resources/ META-INF/persistence.xml to target an h2 database instead of the default derby: property name=hibernate.dialect value=org.hibernate.dialect.H2Dialect/ property name=hibernate.connection.driver_class value=org.h2.Driver/ property name=hibernate.connection.url value=jdbc:h2:testDB/ or if you want to use your local MySQL 5.0.x server instead (assumes local DB named JPADemo exists, and is writable by user named lifdev with password lift1234 (note the amp; is very important between the username the password=): property name=hibernate.dialect value=org.hibernate.dialect.MySQL5InnoDBDialect/ property name=hibernate.connection.driver_class value=com.mysql.jdbc.Driver/ property name=hibernate.connection.url value=jdbc:mysql:// localhost/JPADemo?user=liftdevamp;password=lift1234/ Then cd spa and type mvn clean install -Dscala.version=2.7.7 For what it's worth, if I open the H2 scheme with Squirrel SQL it all looks happy from the schema creation side and has auto-increment in the 'id' column. I can insert rows manually just fine. Similarly for MySQL even for the newly-created tables 'author' and 'book'. Thanks, Troy --~--~-~--~~~---~--~~ 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: regular expression
From the Scaladoc for scala.util.matching.Regex: You can use special pattern syntax construct (?idmsux-idmsux) to switch various regex compilation options like CASE_INSENSITIVE or UNICODE_CASE. See java.util.regex.Pattern javadoc for details. Probably better to ask Scala questions on the Scala list(s). On Mon, Nov 2, 2009 at 10:28 AM, jack jack.wid...@gmail.com wrote: I am using the findAllIn function for regular expressions. How do I make it ignore case? I know its simple but I can't find it. --~--~-~--~~~---~--~~ 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: LiftTicket and AJAX
I have at least two different pieces of functionality here. The main workhorse is the AjaxUtils.editable method that actually generates the dynamic div. I was thinking that this might be good to put in SHtml (albeit with a different name). I also have the AjaxEditableField trait which mixes into a MappedField to provide a specialized asHtml, but I was thinking that maybe I should provide a trait that you could add to a Mapper that defines a list of fields that will be AJAXified, so that you can control which ones are editable via asHtml. I think I also need to add a boolean function parameter that lets you control whether the field becomes editable or not, so that you could easily tie it to a Loc.If or some other access control mechanism. Thoughts? Derek On Sat, Oct 31, 2009 at 8:08 AM, David Pollak feeder.of.the.be...@gmail.com wrote: Very cool! On Fri, Oct 30, 2009 at 4:44 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: I just committed some code for AJAX-editable fields that I think might be useful as a part of LiftWeb. Basically, if you've seen how ReviewBoard handles field editing, this is the same thing. It's a trait that can be mixed into any MappedField and as soon as M7 is release and I can merge the new ajaxForm postSubmit code into master, I'll have a demo that will work out of the box. If you're interested, take a look at it in GitHub: http://github.com/dchenbecker/LiftTicket/blob/master/src/main/scala/org/liftticket/liftticket/model/AjaxEditableField.scala Constructive criticism would be appreciated. Derek -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] SHtml.ajaxForm postSubmit addition?
Hi, I'm working on a simple mixin trait that you can add to a MappedField to make it editable AJAX-style (like how Review Board does it). My first approach is to use an ajaxButton to allow the user to edit the field, and then use ajaxForm to handle submission of the data back so that the Mapper data can be updated. What I would like to do is have the form get replaced by the display HTML after form submission, but I don't see a simple way to do this with the existing methods. Currently, ajaxForm has an onSubmit param that allows some JavaScript to be executed before the form is submitted, but it would be nice if something could be executed after the submit completes to update things on the client side. Does this seem like a reasonable approach, or does someone have a better idea? Thanks, Derek --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: SHtml.ajaxForm postSubmit addition?
I'll open a ticket and start working on the issue. Derek On Fri, Oct 30, 2009 at 11:46 AM, David Pollak feeder.of.the.be...@gmail.com wrote: Sounds like a good idea. On Fri, Oct 30, 2009 at 10:03 AM, Derek Chen-Becker dchenbec...@gmail.com wrote: Hi, I'm working on a simple mixin trait that you can add to a MappedField to make it editable AJAX-style (like how Review Board does it). My first approach is to use an ajaxButton to allow the user to edit the field, and then use ajaxForm to handle submission of the data back so that the Mapper data can be updated. What I would like to do is have the form get replaced by the display HTML after form submission, but I don't see a simple way to do this with the existing methods. Currently, ajaxForm has an onSubmit param that allows some JavaScript to be executed before the form is submitted, but it would be nice if something could be executed after the submit completes to update things on the client side. Does this seem like a reasonable approach, or does someone have a better idea? Thanks, Derek -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: SHtml.ajaxForm postSubmit addition?
Another hopefully quick question. There are two ajaxForm signatures that are identical except for the argument order: def ajaxForm(onSubmit: JsCmd, body: NodeSeq) = (lift:form onsubmit={onSubmit.toJsCmd}{body}/lift:form) def ajaxForm(body: NodeSeq, onSubmit: JsCmd) = (lift:form onsubmit={onSubmit.toJsCmd}{body}/lift:form) I'm just wondering why it's like this and if we should deprecate one or the other... Thanks, Derek On Fri, Oct 30, 2009 at 1:29 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: I'll open a ticket and start working on the issue. Derek On Fri, Oct 30, 2009 at 11:46 AM, David Pollak feeder.of.the.be...@gmail.com wrote: Sounds like a good idea. On Fri, Oct 30, 2009 at 10:03 AM, Derek Chen-Becker dchenbec...@gmail.com wrote: Hi, I'm working on a simple mixin trait that you can add to a MappedField to make it editable AJAX-style (like how Review Board does it). My first approach is to use an ajaxButton to allow the user to edit the field, and then use ajaxForm to handle submission of the data back so that the Mapper data can be updated. What I would like to do is have the form get replaced by the display HTML after form submission, but I don't see a simple way to do this with the existing methods. Currently, ajaxForm has an onSubmit param that allows some JavaScript to be executed before the form is submitted, but it would be nice if something could be executed after the submit completes to update things on the client side. Does this seem like a reasonable approach, or does someone have a better idea? Thanks, Derek -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] LiftTicket and AJAX
I just committed some code for AJAX-editable fields that I think might be useful as a part of LiftWeb. Basically, if you've seen how ReviewBoard handles field editing, this is the same thing. It's a trait that can be mixed into any MappedField and as soon as M7 is release and I can merge the new ajaxForm postSubmit code into master, I'll have a demo that will work out of the box. If you're interested, take a look at it in GitHub: http://github.com/dchenbecker/LiftTicket/blob/master/src/main/scala/org/liftticket/liftticket/model/AjaxEditableField.scala Constructive criticism would be appreciated. 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: Proposal : Lift ticketing system
I had actually thought about the upgrade paths for DB schemas and I was thinking of coding up a schema executor that would store a schema version in the db and could then be used to apply appropriate diff or clean schemas against the DB as needed. I think schemifier generally does a very good job, but this would give more control over exactly what's going on in the DB. As for the custom fields, I think it sounds interesting but I think I want to start with the basic fields as I have them defined and I can look at it more in phase 2. Derek On Wed, Oct 28, 2009 at 3:20 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: I hear that. Personally I think it would be more maintainable, not less; there's just a bit more upfront complexity, although it's something I've already done and I can share my code. You could trivially have flexible user-defined fields. In my project you can edit the fields and the lookup tables via the web interface. Another consideration is, if you add more hardcoded MappedFields at some point and a user installs the new version, it will have to schemify. So you're running Schemifier on a populated production database. There isn't necessarily anything wrong with that though. (Although recently I corrupted a database that way: maven had upgraded H2 to a newer beta, which thought my tables didn't exist. So Schemifier created new ones, wiping it out!) But again, it depends what you want it to be. - Derek Chen-Beckerdchenbec...@gmail.com wrote: The goal is to have a system that we can use for Lift's issue tracking. I don't know that it has to be as big and bad as, say, JIRA, but it needs to work well, have a reasonable set of features, and be usable by other people if they want it. I'm open to suggestions on architecture, but at this point I would like to keep things relatively simple so that this doesn't grow into something that I can't finish. Derek On Wed, Oct 28, 2009 at 2:39 PM, Naftoli Gugenheim naftoli...@gmail.com wrote: What is the goal of this system? Is it to be a nice, useful ticketing system that will serve as a demo to Lift? Or is it also to be a product that will eventually compete with other issue trackers such as Lift? If you're thinking big then I would suggest to think in terms of flexibility and extensibility. In particular I would not hard code attributes of the ticket but, at the cost of more starting complexity, I would have the fields be looked up in a table. I have done this more or less in two projects. It's tricky with Mapper but when you get it right is very powerful. I'll try to upload my code later this week if you wish. Basically the idea is that you have a table or tables of fields. Fields come in different types, including lookup, which is what priority would be, except that instead of the choices being hard coded they are in a table that is editable. So lookup fields specify a lookup table. There can be number fields, etc. This way plugins can add fields. For example Trac has a plugin that tracks hours. Of course you could just include every single possible field hard coded. It all depends what you're aiming for. - Derek Chen-Beckerdchenbec...@gmail.com wrote: OK, I just pushed the initial revision of my model to GitHub at http://github.com/dchenbecker/LiftTicket. I think that this covers most of the features that Marius discussed in his response. I agree with all of it, although I'm not 100% sure about having both a severity and priority field on the ticket. This was kind of a code vomit, so I'm going to split the classes out into separate Scala files once I get some feedback and a better idea of what needs to be done. Cheers, Derek On Mon, Oct 26, 2009 at 12:29 AM, Derek Chen-Becker dchenbec...@gmail.comwrote: I'm a fan of Trac, which is one incarnation of Wiki+Tracking+Planning. I've set up a repo here: http://github.com/dchenbecker/LiftTicket My preference is for this to be an issue tracking system first and a Wiki/CMS second, but I'm open to any and all ideas on how this can be fleshed out. I would also like to plan on doing a couple of iterations to get it all working. I like Marius' list of features but I'd like to start with a subset of those and expand it. My first milestone would be getting it to the point where it could self-host its own planning for enhancements and bug tracking, and I think I can do that with a small set of initial features. Derek On Sat, Oct 24, 2009 at 9:17 PM, Naftoli Gugenheim naftoli...@gmail.com wrote: How about we integrate the wiki, blog, forum, and issue tracker into the CMS? ;) Seriously, maybe it would be a good idea to create a repo and list, and start serious discussion on all aspects of its design. Maybe it could become a big community
[Lift] Re: Proposal : Lift ticketing system
Thanks, I've never seen that before. I'll take a look at it. If you've used it, are there any features that it has that you really like? On Thu, Oct 29, 2009 at 4:11 AM, george geo...@mattandgeorge.com wrote: It might be worth taking a look at Redmine (http://www.redmine.org) for some inspiration. I think it has the features you want and a very nice, simple UI. george --~--~-~--~~~---~--~~ 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: Proposal : Lift ticketing system
The goal is to have a system that we can use for Lift's issue tracking. I don't know that it has to be as big and bad as, say, JIRA, but it needs to work well, have a reasonable set of features, and be usable by other people if they want it. I'm open to suggestions on architecture, but at this point I would like to keep things relatively simple so that this doesn't grow into something that I can't finish. Derek On Wed, Oct 28, 2009 at 2:39 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: What is the goal of this system? Is it to be a nice, useful ticketing system that will serve as a demo to Lift? Or is it also to be a product that will eventually compete with other issue trackers such as Lift? If you're thinking big then I would suggest to think in terms of flexibility and extensibility. In particular I would not hard code attributes of the ticket but, at the cost of more starting complexity, I would have the fields be looked up in a table. I have done this more or less in two projects. It's tricky with Mapper but when you get it right is very powerful. I'll try to upload my code later this week if you wish. Basically the idea is that you have a table or tables of fields. Fields come in different types, including lookup, which is what priority would be, except that instead of the choices being hard coded they are in a table that is editable. So lookup fields specify a lookup table. There can be number fields, etc. This way plugins can add fields. For example Trac has a plugin that tracks hours. Of course you could just include every single possible field hard coded. It all depends what you're aiming for. - Derek Chen-Beckerdchenbec...@gmail.com wrote: OK, I just pushed the initial revision of my model to GitHub at http://github.com/dchenbecker/LiftTicket. I think that this covers most of the features that Marius discussed in his response. I agree with all of it, although I'm not 100% sure about having both a severity and priority field on the ticket. This was kind of a code vomit, so I'm going to split the classes out into separate Scala files once I get some feedback and a better idea of what needs to be done. Cheers, Derek On Mon, Oct 26, 2009 at 12:29 AM, Derek Chen-Becker dchenbec...@gmail.comwrote: I'm a fan of Trac, which is one incarnation of Wiki+Tracking+Planning. I've set up a repo here: http://github.com/dchenbecker/LiftTicket My preference is for this to be an issue tracking system first and a Wiki/CMS second, but I'm open to any and all ideas on how this can be fleshed out. I would also like to plan on doing a couple of iterations to get it all working. I like Marius' list of features but I'd like to start with a subset of those and expand it. My first milestone would be getting it to the point where it could self-host its own planning for enhancements and bug tracking, and I think I can do that with a small set of initial features. Derek On Sat, Oct 24, 2009 at 9:17 PM, Naftoli Gugenheim naftoli...@gmail.com wrote: How about we integrate the wiki, blog, forum, and issue tracker into the CMS? ;) Seriously, maybe it would be a good idea to create a repo and list, and start serious discussion on all aspects of its design. Maybe it could become a big community project, with lots of feedback to Lift. - jlist9jli...@gmail.com wrote: CMS, wiki, blog, forum also sound more interesting than bug tracking system to me :-) On Sat, Oct 24, 2009 at 11:13 AM, aw anth...@whitford.com wrote: I don't mean to be negative, but are other options being considered besides a ticketing system? I kind of wonder if the effort is worth it when excellent alternatives exist (like JIRA -- their Git integration may interest you: https://plugins.atlassian.com/plugin/details/4984 -- I have used their Subversion integration and was very pleased). I would be far more interested in seeing something done for the benefit of the Lift Web Site. (Is it written with Lift?) I don't see a Lift CMS -- and that is something that could evolve well over time. I think it is important for a web framework to use their own stuff, and it should be indicative of the cool things that it can do, stability, scale, and performance... (I am amazed that I have seen rather poor demonstrations of this, specifically by Adobe and JBoss -- but again, I'm not trying to be negative...) I see the Lift site integrating Google Analytics... Is that something that could be out of the box with Lift? That could be a selling point to people making external web sites. Another area that would be neat to develop is instrumentation. Sort of the JMX-Console equivalent for Lift. For scalability and sizing analysis, this would be really useful. Having said that, one major feature that I feel
[Lift] Re: Dynamic radio button
I think that we should be able to provide an SHtml.ajaxRadio method that generates an AJAXified radio button. Please file an issue. Derek On Thu, Oct 22, 2009 at 4:06 PM, sunanda sunanda.pa...@gmail.com wrote: Hi Derek, I am displaying the contents of a table in ReadOnly mode as follows. The sample code is given below table tr td bDisplay Name/b/td td{coldef.displayname}/td /tr tr tdbRequire Cookies for Link/b /td td {coldef.requirecookies}/td /tr button onclick={SHtml.ajaxInvoke(getEditMode _)._2}Edit2/ button table onclick of Edit2 button I make it editable by making the coldef.displayname using ajaxText. But the coldef.requirecookies is a raidio button field(which has got two options Yes and No) Hence in editable mode I need to insert two radio buttons (with one button checked based on the value of coldef.requirecookies) . I was able to insert using Shtml.radio But I need to do ajax call on click of the button to modify the value of requirecookies field. Could you please suggest me how to achieve this. Thanks Sunanda On Oct 23, 1:39 am, Derek Chen-Becker dchenbec...@gmail.com wrote: I don't quite understand what you're trying to do. Could you give some more details? Are you trying to add more radios to an existing radio button set? On Wed, Oct 21, 2009 at 8:45 PM, sunanda sunanda.pa...@gmail.com wrote: Hi, I need to add radio button dynamically with one of the button checked and I need to invoke ajaxCall onclick of a radio button. How can I do this. Sunanda- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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: Foreign Key Constraints in PostgreSQL through MappedLongForeignKey fields?
At this time we don't support it, but feel free to file an issue. I'll have time at some point to work on it, and I think that it would be useful to generate. Derek On Fri, Oct 23, 2009 at 10:04 AM, yk ying.kwang...@gmail.com wrote: I was running the models of One-To-Many example from WiKi (http:// wiki.github.com/dpp/liftweb/how-to-work-with-one-to-many- relationships) against PostgreSQL hoping to see a foreign key constraint on the Book table. I got an index instead. Is there a way to get schemifier to acknowledge the foreign key constraints? --~--~-~--~~~---~--~~ 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: Proposal : Lift ticketing system
OK, I just pushed the initial revision of my model to GitHub at http://github.com/dchenbecker/LiftTicket. I think that this covers most of the features that Marius discussed in his response. I agree with all of it, although I'm not 100% sure about having both a severity and priority field on the ticket. This was kind of a code vomit, so I'm going to split the classes out into separate Scala files once I get some feedback and a better idea of what needs to be done. Cheers, Derek On Mon, Oct 26, 2009 at 12:29 AM, Derek Chen-Becker dchenbec...@gmail.comwrote: I'm a fan of Trac, which is one incarnation of Wiki+Tracking+Planning. I've set up a repo here: http://github.com/dchenbecker/LiftTicket My preference is for this to be an issue tracking system first and a Wiki/CMS second, but I'm open to any and all ideas on how this can be fleshed out. I would also like to plan on doing a couple of iterations to get it all working. I like Marius' list of features but I'd like to start with a subset of those and expand it. My first milestone would be getting it to the point where it could self-host its own planning for enhancements and bug tracking, and I think I can do that with a small set of initial features. Derek On Sat, Oct 24, 2009 at 9:17 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: How about we integrate the wiki, blog, forum, and issue tracker into the CMS? ;) Seriously, maybe it would be a good idea to create a repo and list, and start serious discussion on all aspects of its design. Maybe it could become a big community project, with lots of feedback to Lift. - jlist9jli...@gmail.com wrote: CMS, wiki, blog, forum also sound more interesting than bug tracking system to me :-) On Sat, Oct 24, 2009 at 11:13 AM, aw anth...@whitford.com wrote: I don't mean to be negative, but are other options being considered besides a ticketing system? I kind of wonder if the effort is worth it when excellent alternatives exist (like JIRA -- their Git integration may interest you: https://plugins.atlassian.com/plugin/details/4984 -- I have used their Subversion integration and was very pleased). I would be far more interested in seeing something done for the benefit of the Lift Web Site. (Is it written with Lift?) I don't see a Lift CMS -- and that is something that could evolve well over time. I think it is important for a web framework to use their own stuff, and it should be indicative of the cool things that it can do, stability, scale, and performance... (I am amazed that I have seen rather poor demonstrations of this, specifically by Adobe and JBoss -- but again, I'm not trying to be negative...) I see the Lift site integrating Google Analytics... Is that something that could be out of the box with Lift? That could be a selling point to people making external web sites. Another area that would be neat to develop is instrumentation. Sort of the JMX-Console equivalent for Lift. For scalability and sizing analysis, this would be really useful. Having said that, one major feature that I feel is missing from github is the lack of attachments for an issue. How do you attach test cases or patches for an issue? --~--~-~--~~~---~--~~ 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: Proposal : Lift ticketing system
Makes sense :) On Tue, Oct 27, 2009 at 3:28 PM, Marius marius.dan...@gmail.com wrote: In my mind the severity says the level of impact for the submitter, and priority is the result of comitters' bandwidth. But it's not a big issue. Br's, Marius On Oct 27, 11:23 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: OK, I just pushed the initial revision of my model to GitHub athttp:// github.com/dchenbecker/LiftTicket. I think that this covers most of the features that Marius discussed in his response. I agree with all of it, although I'm not 100% sure about having both a severity and priority field on the ticket. This was kind of a code vomit, so I'm going to split the classes out into separate Scala files once I get some feedback and a better idea of what needs to be done. Cheers, Derek On Mon, Oct 26, 2009 at 12:29 AM, Derek Chen-Becker dchenbec...@gmail.comwrote: I'm a fan of Trac, which is one incarnation of Wiki+Tracking+Planning. I've set up a repo here: http://github.com/dchenbecker/LiftTicket My preference is for this to be an issue tracking system first and a Wiki/CMS second, but I'm open to any and all ideas on how this can be fleshed out. I would also like to plan on doing a couple of iterations to get it all working. I like Marius' list of features but I'd like to start with a subset of those and expand it. My first milestone would be getting it to the point where it could self-host its own planning for enhancements and bug tracking, and I think I can do that with a small set of initial features. Derek On Sat, Oct 24, 2009 at 9:17 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: How about we integrate the wiki, blog, forum, and issue tracker into the CMS? ;) Seriously, maybe it would be a good idea to create a repo and list, and start serious discussion on all aspects of its design. Maybe it could become a big community project, with lots of feedback to Lift. - jlist9jli...@gmail.com wrote: CMS, wiki, blog, forum also sound more interesting than bug tracking system to me :-) On Sat, Oct 24, 2009 at 11:13 AM, aw anth...@whitford.com wrote: I don't mean to be negative, but are other options being considered besides a ticketing system? I kind of wonder if the effort is worth it when excellent alternatives exist (like JIRA -- their Git integration may interest you: https://plugins.atlassian.com/plugin/details/4984 -- I have used their Subversion integration and was very pleased). I would be far more interested in seeing something done for the benefit of the Lift Web Site. (Is it written with Lift?) I don't see a Lift CMS -- and that is something that could evolve well over time. I think it is important for a web framework to use their own stuff, and it should be indicative of the cool things that it can do, stability, scale, and performance... (I am amazed that I have seen rather poor demonstrations of this, specifically by Adobe and JBoss -- but again, I'm not trying to be negative...) I see the Lift site integrating Google Analytics... Is that something that could be out of the box with Lift? That could be a selling point to people making external web sites. Another area that would be neat to develop is instrumentation. Sort of the JMX-Console equivalent for Lift. For scalability and sizing analysis, this would be really useful. Having said that, one major feature that I feel is missing from github is the lack of attachments for an issue. How do you attach test cases or patches for an issue? --~--~-~--~~~---~--~~ 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: Proposal : Lift ticketing system
I'm a fan of Trac, which is one incarnation of Wiki+Tracking+Planning. I've set up a repo here: http://github.com/dchenbecker/LiftTicket My preference is for this to be an issue tracking system first and a Wiki/CMS second, but I'm open to any and all ideas on how this can be fleshed out. I would also like to plan on doing a couple of iterations to get it all working. I like Marius' list of features but I'd like to start with a subset of those and expand it. My first milestone would be getting it to the point where it could self-host its own planning for enhancements and bug tracking, and I think I can do that with a small set of initial features. Derek On Sat, Oct 24, 2009 at 9:17 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: How about we integrate the wiki, blog, forum, and issue tracker into the CMS? ;) Seriously, maybe it would be a good idea to create a repo and list, and start serious discussion on all aspects of its design. Maybe it could become a big community project, with lots of feedback to Lift. - jlist9jli...@gmail.com wrote: CMS, wiki, blog, forum also sound more interesting than bug tracking system to me :-) On Sat, Oct 24, 2009 at 11:13 AM, aw anth...@whitford.com wrote: I don't mean to be negative, but are other options being considered besides a ticketing system? I kind of wonder if the effort is worth it when excellent alternatives exist (like JIRA -- their Git integration may interest you: https://plugins.atlassian.com/plugin/details/4984 -- I have used their Subversion integration and was very pleased). I would be far more interested in seeing something done for the benefit of the Lift Web Site. (Is it written with Lift?) I don't see a Lift CMS -- and that is something that could evolve well over time. I think it is important for a web framework to use their own stuff, and it should be indicative of the cool things that it can do, stability, scale, and performance... (I am amazed that I have seen rather poor demonstrations of this, specifically by Adobe and JBoss -- but again, I'm not trying to be negative...) I see the Lift site integrating Google Analytics... Is that something that could be out of the box with Lift? That could be a selling point to people making external web sites. Another area that would be neat to develop is instrumentation. Sort of the JMX-Console equivalent for Lift. For scalability and sizing analysis, this would be really useful. Having said that, one major feature that I feel is missing from github is the lack of attachments for an issue. How do you attach test cases or patches for an issue? --~--~-~--~~~---~--~~ 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] Proposal : Lift ticketing system
Hi, I feel like I need to take a break from working *on* Lift for a little while, but I'd like to do something with my time that would still benefit Lift. Since we had a recent discussion on ticketing systems, and we had talked a long time ago about dogfooding a ticket system, I thought that this might make a good project to work on. I like the simplicity of the GitHub issue tracking, but I think it's missing some important things: 1. Email notifications 2. Duplicate tracking 3. Release planning fields like milestones, etc I do like the integration with Git commit hashes and other intelligent hyperlinking in the comment space, but I'm on the fence as to whether I like using tags as a generic tool for things like ownership and component classification. I could probably be persuaded either way. In any case, does this seem like a good project, and if so, do people have requirements, suggestions, comments, etc. on the functionality that should be in it? Thanks, Derek --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Testing for SQL Server drivers
The ticket is for Unicode text fields, so if you could try having a Lift app schemify a new table and enter some unicode text that should test it. Derek On Fri, Oct 23, 2009 at 4:11 PM, Timothy Perrett timo...@getintheloop.euwrote: Ahhh sorry I didn't see this before - I'm using lift mapper with SQL server at work. I can test this no worries. Just let me know what I should try ;-) Cheers, Tim Sent from my iPhone On 23 Oct 2009, at 21:18, Derek Chen-Becker dchenbec...@gmail.com wrote: I'm pretty much 100% linux at home. I can test any other database (Oracle, MySQL, PostgreSQL, etc), but SQL Server is the exception :) On Fri, Oct 23, 2009 at 2:14 PM, Naftoli Gugenheim naftoli...@gmail.com naftoli...@gmail.com wrote: 100%. Just curious. :) On Fri, Oct 23, 2009 at 4:05 PM, David Pollak feeder.of.the.be...@gmail.com feeder.of.the.be...@gmail.com wrote: On Fri, Oct 23, 2009 at 12:10 PM, Naftoli Gugenheim naftoli...@gmail.com naftoli...@gmail.com wrote: Don't you have a Windows machine that you can install SQL Server Express on? Even if Derek does have such a machine, he's been doing an awful lot of work on Lift. Recruiting people from the community to help is encouraged. On Wed, Oct 21, 2009 at 6:02 PM, Derek Chen-Becker dchenbec...@gmail.com dchenbec...@gmail.com wrote: Hi, I've made some changes to Mapper to better support SQL Server, particularly with Unicode text. Does anyone out there use SQL Server that would be willing to test the code on the wip-dcb-issue-16-sql-server branch to make sure nothing breaks? Thanks, Derek -- Lift, the simply functional web framework http://liftweb.net http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpphttp://twitter.com/dpp Surf the harmonics --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Proposal : Lift ticketing system
Feel free to suggest other ideas or vote on the ones proposed so far :) On Sat, Oct 24, 2009 at 12:20 PM, jlist9 jli...@gmail.com wrote: CMS, wiki, blog, forum also sound more interesting than bug tracking system to me :-) On Sat, Oct 24, 2009 at 11:13 AM, aw anth...@whitford.com wrote: I don't mean to be negative, but are other options being considered besides a ticketing system? I kind of wonder if the effort is worth it when excellent alternatives exist (like JIRA -- their Git integration may interest you: https://plugins.atlassian.com/plugin/details/4984 -- I have used their Subversion integration and was very pleased). I would be far more interested in seeing something done for the benefit of the Lift Web Site. (Is it written with Lift?) I don't see a Lift CMS -- and that is something that could evolve well over time. I think it is important for a web framework to use their own stuff, and it should be indicative of the cool things that it can do, stability, scale, and performance... (I am amazed that I have seen rather poor demonstrations of this, specifically by Adobe and JBoss -- but again, I'm not trying to be negative...) I see the Lift site integrating Google Analytics... Is that something that could be out of the box with Lift? That could be a selling point to people making external web sites. Another area that would be neat to develop is instrumentation. Sort of the JMX-Console equivalent for Lift. For scalability and sizing analysis, this would be really useful. Having said that, one major feature that I feel is missing from github is the lack of attachments for an issue. How do you attach test cases or patches for an issue? --~--~-~--~~~---~--~~ 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: Testing for SQL Server drivers
I have one virtual Win2K instance for some legacy software, but looking at the requirements that doesn't seem to be supported. On Fri, Oct 23, 2009 at 1:10 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: Don't you have a Windows machine that you can install SQL Server Express on? On Wed, Oct 21, 2009 at 6:02 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: Hi, I've made some changes to Mapper to better support SQL Server, particularly with Unicode text. Does anyone out there use SQL Server that would be willing to test the code on the wip-dcb-issue-16-sql-server branch to make sure nothing breaks? Thanks, Derek --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Testing for SQL Server drivers
I'm pretty much 100% linux at home. I can test any other database (Oracle, MySQL, PostgreSQL, etc), but SQL Server is the exception :) On Fri, Oct 23, 2009 at 2:14 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: 100%. Just curious. :) On Fri, Oct 23, 2009 at 4:05 PM, David Pollak feeder.of.the.be...@gmail.com wrote: On Fri, Oct 23, 2009 at 12:10 PM, Naftoli Gugenheim naftoli...@gmail.com wrote: Don't you have a Windows machine that you can install SQL Server Express on? Even if Derek does have such a machine, he's been doing an awful lot of work on Lift. Recruiting people from the community to help is encouraged. On Wed, Oct 21, 2009 at 6:02 PM, Derek Chen-Becker dchenbec...@gmail.com wrote: Hi, I've made some changes to Mapper to better support SQL Server, particularly with Unicode text. Does anyone out there use SQL Server that would be willing to test the code on the wip-dcb-issue-16-sql-server branch to make sure nothing breaks? Thanks, Derek -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Are we willing to make a breaking change for Joda Time?
Well, I had intended to write a JodaHelpers trait that is the same as Helpers except with JodaTimeHelpers and JodaTimeFormats replacing TimeHelpers and TimeFormats, respectively. The main reason is that I would like to have the time DSL be based on Periods instead of millisecond durations, and with TimeHelpers already in scope there would be ambiguous implicit conversions from Long/Int to TimeSpan or Period. Supposedly, 2.8 will have some support for masking or overriding implicits, but I don't want to rely on that in the short term. If a JodaHelpers trait that would replace a Helpers import isn't OK then I can just do this in my own repo. Thanks, Derek On Fri, Oct 23, 2009 at 2:52 PM, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Oct 21, 2009 at 7:20 AM, Derek Chen-Becker dchenbec...@gmail.comwrote: It sounds like you're pretty set against making separate impl traits and would prefer just putting things directly on TimeHelper. I'm OK with that, but I would really like to add a lift-joda module that contains the JodaHelpers, JodaTimeFormats and JodaTimeHelpers traits as I would like to use them. I should be able to delegate a good chunk of the methods to TimeHelpers.jt*, so there shouldn't be any *redundant* code. Is that a reasonable compromise? Yes, as long as import Helpers._ is not incompatible with importing whatever trait you come up with. Derek On Tue, Oct 20, 2009 at 11:35 PM, Derek Chen-Becker dchenbec...@gmail.com wrote: I agree that the goal isn't to remove java.util.Date. For trivial time handling it works just fine. What I'm trying to achieve here is a way to make Joda Time be the default impl while leaving the user a choice. By using separate traits instead of different names on the same trait, we achieve a few things: 1. A consistent API for both java.util and Joda Time in terms of method names. As Naftoli pointed out, people expect naming of functions consistent with what they do and having two different nows on the same trait is going to look a little strange to people, I think. 2. A clean *optional* usage of Joda Time. If we put code that utilizes Joda Time directly into TimeHelpers then it's not an optional dependency. Making a separate trait means that if someone doesn't use the Joda Time trait then they don't need to have the Joda Time jar in their classpath and they never know that it's not there. 3. A relatively simple code change path to move from java.util to Joda Time by simply changing imports. Your assertion that Date is a simple wrapper for a Long timestamp is pretty accurate, but really Joda Time's DateTime is a superset of *Calendar*, not Date. Just look at what we had to do with CalendarExtension to get some simple date manipulation functions, where those same methods are already defined on DateTime. The vast majority of Joda Time's classes are immutable, and the mutators return new instances instead of modifying the current instance. TimeSpan's current handling of duration addition doesn't cope with DST, which I'm sure will show up as a bug in someone's code if it hasn't already. Having done a fair amount of java.util.Date handling and then moving to Joda Time, I find it hard to call the difference between the two APIs marginal. In any case, I still feel that my proposal makes Joda Time available in a nicer way while leaving existing code completely untouched (by introducing a JodaHelpers trait that mirrors Helpers). Derek On Tue, Oct 20, 2009 at 9:25 PM, David Pollak feeder.of.the.be...@gmail.com wrote: On Tue, Oct 20, 2009 at 6:56 PM, Naftoli Gugenheim naftoli...@gmail.com wrote: I agree with this. My understanding is that the goal is that Lift should use Joda for its time functions rather than java.util. This is not the goal. The goal is to make JodeTime available. There is no reason to remove support for java.util.Date. None. JodaTime offers some advantages, but there's no reason, none, nada, to *remove* support for java.util.Date. I'm cool with different names (not jtNow, but choose something else). But I view removal of support for java.util.Date as gratuitous. Sure, if we were to make the clean-slate decision today, I'd opt for primary support of JodaTime and secondary support for java.util.Date. But we're making a decision based on legacy. We're not going to cut off java.util.Date just because something marginally better (and I'm not being facetious here... at the bottom, these are just wrappers for number of milliseconds since Jan 1, 1970). If the Joda methods have different and longer names, then it's existing side by side with the java.util implementation, not replacing it. To many people, it is important that methods etc. should be named properly and aesthetically. It's not pleasant to use names like jtNow in your code when that is the method that gets used normally. Sure, if 'now' was the usual method
[Lift] Re: Are we willing to make a breaking change for Joda Time?
Period is field-based, and therefore deals with non-linear time changes like daylight savings time. Periods can be converted to millisecond durations based on standard field durations (60 seconds == 1 minute, etc) if needed, so it's a superset of the current functionality of TimeSpan. On Fri, Oct 23, 2009 at 3:37 PM, David Pollak feeder.of.the.be...@gmail.com wrote: On Fri, Oct 23, 2009 at 2:35 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: Well, I had intended to write a JodaHelpers trait that is the same as Helpers except with JodaTimeHelpers and JodaTimeFormats replacing TimeHelpers and TimeFormats, respectively. The main reason is that I would like to have the time DSL be based on Periods instead of millisecond durations, and with TimeHelpers already in scope there would be ambiguous implicit conversions from Long/Int to TimeSpan or Period. What is the advantage of using Period internally instead of milliseconds? Supposedly, 2.8 will have some support for masking or overriding implicits, but I don't want to rely on that in the short term. If a JodaHelpers trait that would replace a Helpers import isn't OK then I can just do this in my own repo. Thanks, Derek On Fri, Oct 23, 2009 at 2:52 PM, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Oct 21, 2009 at 7:20 AM, Derek Chen-Becker dchenbec...@gmail.com wrote: It sounds like you're pretty set against making separate impl traits and would prefer just putting things directly on TimeHelper. I'm OK with that, but I would really like to add a lift-joda module that contains the JodaHelpers, JodaTimeFormats and JodaTimeHelpers traits as I would like to use them. I should be able to delegate a good chunk of the methods to TimeHelpers.jt*, so there shouldn't be any *redundant* code. Is that a reasonable compromise? Yes, as long as import Helpers._ is not incompatible with importing whatever trait you come up with. Derek On Tue, Oct 20, 2009 at 11:35 PM, Derek Chen-Becker dchenbec...@gmail.com wrote: I agree that the goal isn't to remove java.util.Date. For trivial time handling it works just fine. What I'm trying to achieve here is a way to make Joda Time be the default impl while leaving the user a choice. By using separate traits instead of different names on the same trait, we achieve a few things: 1. A consistent API for both java.util and Joda Time in terms of method names. As Naftoli pointed out, people expect naming of functions consistent with what they do and having two different nows on the same trait is going to look a little strange to people, I think. 2. A clean *optional* usage of Joda Time. If we put code that utilizes Joda Time directly into TimeHelpers then it's not an optional dependency. Making a separate trait means that if someone doesn't use the Joda Time trait then they don't need to have the Joda Time jar in their classpath and they never know that it's not there. 3. A relatively simple code change path to move from java.util to Joda Time by simply changing imports. Your assertion that Date is a simple wrapper for a Long timestamp is pretty accurate, but really Joda Time's DateTime is a superset of *Calendar*, not Date. Just look at what we had to do with CalendarExtension to get some simple date manipulation functions, where those same methods are already defined on DateTime. The vast majority of Joda Time's classes are immutable, and the mutators return new instances instead of modifying the current instance. TimeSpan's current handling of duration addition doesn't cope with DST, which I'm sure will show up as a bug in someone's code if it hasn't already. Having done a fair amount of java.util.Date handling and then moving to Joda Time, I find it hard to call the difference between the two APIs marginal. In any case, I still feel that my proposal makes Joda Time available in a nicer way while leaving existing code completely untouched (by introducing a JodaHelpers trait that mirrors Helpers). Derek On Tue, Oct 20, 2009 at 9:25 PM, David Pollak feeder.of.the.be...@gmail.com wrote: On Tue, Oct 20, 2009 at 6:56 PM, Naftoli Gugenheim naftoli...@gmail.com wrote: I agree with this. My understanding is that the goal is that Lift should use Joda for its time functions rather than java.util. This is not the goal. The goal is to make JodeTime available. There is no reason to remove support for java.util.Date. None. JodaTime offers some advantages, but there's no reason, none, nada, to *remove* support for java.util.Date. I'm cool with different names (not jtNow, but choose something else). But I view removal of support for java.util.Date as gratuitous. Sure, if we were to make the clean-slate decision today, I'd opt for primary support of JodaTime and secondary support for java.util.Date. But we're making a decision based on legacy. We're not going to cut off
[Lift] Re: Are we willing to make a breaking change for Joda Time?
I could do that, but I would still have an ambiguous definition of now, today, epoch, etc if I want to use Joda Time and the requirement is that an import Helpers._ cannot conflict. The whole reason that I want to write a separate trait is that Lift currently has some nice convenience methods and a DSL in TimeHelpers, but they all return java.util.{Calendar,Date}. I'm just trying to mirror the API usage, except have everything return Joda Time classes instead. That way, I can upgrade all of my current Lift apps to use Joda Time simply by changing the import. It's entirely subjective, but I just strongly dislike the idea of using method names like jtNow, etc. Anthony brings up a good point about Joda Time in large part becoming the new Java Date/Time API, but we can always deal with that when it comes along. Derek On Fri, Oct 23, 2009 at 4:00 PM, David Pollak feeder.of.the.be...@gmail.com wrote: On Fri, Oct 23, 2009 at 2:55 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: Period is field-based, and therefore deals with non-linear time changes like daylight savings time. Periods can be converted to millisecond durations based on standard field durations (60 seconds == 1 minute, etc) if needed, so it's a superset of the current functionality of TimeSpan. So, why not make TimeSpan use Period, but preserve the interface so you can build one with millis and get it to spit out millis or Period as the case may be? On Fri, Oct 23, 2009 at 3:37 PM, David Pollak feeder.of.the.be...@gmail.com wrote: On Fri, Oct 23, 2009 at 2:35 PM, Derek Chen-Becker dchenbec...@gmail.com wrote: Well, I had intended to write a JodaHelpers trait that is the same as Helpers except with JodaTimeHelpers and JodaTimeFormats replacing TimeHelpers and TimeFormats, respectively. The main reason is that I would like to have the time DSL be based on Periods instead of millisecond durations, and with TimeHelpers already in scope there would be ambiguous implicit conversions from Long/Int to TimeSpan or Period. What is the advantage of using Period internally instead of milliseconds? Supposedly, 2.8 will have some support for masking or overriding implicits, but I don't want to rely on that in the short term. If a JodaHelpers trait that would replace a Helpers import isn't OK then I can just do this in my own repo. Thanks, Derek On Fri, Oct 23, 2009 at 2:52 PM, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Oct 21, 2009 at 7:20 AM, Derek Chen-Becker dchenbec...@gmail.com wrote: It sounds like you're pretty set against making separate impl traits and would prefer just putting things directly on TimeHelper. I'm OK with that, but I would really like to add a lift-joda module that contains the JodaHelpers, JodaTimeFormats and JodaTimeHelpers traits as I would like to use them. I should be able to delegate a good chunk of the methods to TimeHelpers.jt*, so there shouldn't be any *redundant* code. Is that a reasonable compromise? Yes, as long as import Helpers._ is not incompatible with importing whatever trait you come up with. Derek On Tue, Oct 20, 2009 at 11:35 PM, Derek Chen-Becker dchenbec...@gmail.com wrote: I agree that the goal isn't to remove java.util.Date. For trivial time handling it works just fine. What I'm trying to achieve here is a way to make Joda Time be the default impl while leaving the user a choice. By using separate traits instead of different names on the same trait, we achieve a few things: 1. A consistent API for both java.util and Joda Time in terms of method names. As Naftoli pointed out, people expect naming of functions consistent with what they do and having two different nows on the same trait is going to look a little strange to people, I think. 2. A clean *optional* usage of Joda Time. If we put code that utilizes Joda Time directly into TimeHelpers then it's not an optional dependency. Making a separate trait means that if someone doesn't use the Joda Time trait then they don't need to have the Joda Time jar in their classpath and they never know that it's not there. 3. A relatively simple code change path to move from java.util to Joda Time by simply changing imports. Your assertion that Date is a simple wrapper for a Long timestamp is pretty accurate, but really Joda Time's DateTime is a superset of *Calendar*, not Date. Just look at what we had to do with CalendarExtension to get some simple date manipulation functions, where those same methods are already defined on DateTime. The vast majority of Joda Time's classes are immutable, and the mutators return new instances instead of modifying the current instance. TimeSpan's current handling of duration addition doesn't cope with DST, which I'm sure will show up as a bug in someone's code if it hasn't already. Having done a fair amount of java.util.Date handling and then moving to Joda
[Lift] Re: Are we willing to make a breaking change for Joda Time?
I'll make these changes and work on improving the internal implementation of TimeSpan and TimeHelpers to work better within the existing method signatures, but I want to be clear that I'm extremely unhappy that I can't be accommodated otherwise. Thanks, Derek On Fri, Oct 23, 2009 at 5:05 PM, David Pollak feeder.of.the.be...@gmail.com wrote: On Fri, Oct 23, 2009 at 3:53 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: I could do that, but I would still have an ambiguous definition of now, today, epoch, etc if I want to use Joda Time and the requirement is that an import Helpers._ cannot conflict. now, today and epoch are not part of TimeSpan. Update TimeSpan to *internally* use Periods. Don't break the interface to TimeSpan. If you add methods to TimeSpan, that's fine. Please add additional methods to TimeHelpers that support returning the JodaTime equivalents of what now, today, and epoch return. The whole reason that I want to write a separate trait is that Lift currently has some nice convenience methods and a DSL in TimeHelpers, but they all return java.util.{Calendar,Date}. I'm just trying to mirror the API usage, except have everything return Joda Time classes instead. That way, I can upgrade all of my current Lift apps to use Joda Time simply by changing the import. It's entirely subjective, but I just strongly dislike the idea of using method names like jtNow, etc. Anthony brings up a good point about Joda Time in large part becoming the new Java Date/Time API, but we can always deal with that when it comes along. Derek On Fri, Oct 23, 2009 at 4:00 PM, David Pollak feeder.of.the.be...@gmail.com wrote: On Fri, Oct 23, 2009 at 2:55 PM, Derek Chen-Becker dchenbec...@gmail.com wrote: Period is field-based, and therefore deals with non-linear time changes like daylight savings time. Periods can be converted to millisecond durations based on standard field durations (60 seconds == 1 minute, etc) if needed, so it's a superset of the current functionality of TimeSpan. So, why not make TimeSpan use Period, but preserve the interface so you can build one with millis and get it to spit out millis or Period as the case may be? On Fri, Oct 23, 2009 at 3:37 PM, David Pollak feeder.of.the.be...@gmail.com wrote: On Fri, Oct 23, 2009 at 2:35 PM, Derek Chen-Becker dchenbec...@gmail.com wrote: Well, I had intended to write a JodaHelpers trait that is the same as Helpers except with JodaTimeHelpers and JodaTimeFormats replacing TimeHelpers and TimeFormats, respectively. The main reason is that I would like to have the time DSL be based on Periods instead of millisecond durations, and with TimeHelpers already in scope there would be ambiguous implicit conversions from Long/Int to TimeSpan or Period. What is the advantage of using Period internally instead of milliseconds? Supposedly, 2.8 will have some support for masking or overriding implicits, but I don't want to rely on that in the short term. If a JodaHelpers trait that would replace a Helpers import isn't OK then I can just do this in my own repo. Thanks, Derek On Fri, Oct 23, 2009 at 2:52 PM, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Oct 21, 2009 at 7:20 AM, Derek Chen-Becker dchenbec...@gmail.com wrote: It sounds like you're pretty set against making separate impl traits and would prefer just putting things directly on TimeHelper. I'm OK with that, but I would really like to add a lift-joda module that contains the JodaHelpers, JodaTimeFormats and JodaTimeHelpers traits as I would like to use them. I should be able to delegate a good chunk of the methods to TimeHelpers.jt*, so there shouldn't be any *redundant* code. Is that a reasonable compromise? Yes, as long as import Helpers._ is not incompatible with importing whatever trait you come up with. Derek On Tue, Oct 20, 2009 at 11:35 PM, Derek Chen-Becker dchenbec...@gmail.com wrote: I agree that the goal isn't to remove java.util.Date. For trivial time handling it works just fine. What I'm trying to achieve here is a way to make Joda Time be the default impl while leaving the user a choice. By using separate traits instead of different names on the same trait, we achieve a few things: 1. A consistent API for both java.util and Joda Time in terms of method names. As Naftoli pointed out, people expect naming of functions consistent with what they do and having two different nows on the same trait is going to look a little strange to people, I think. 2. A clean *optional* usage of Joda Time. If we put code that utilizes Joda Time directly into TimeHelpers then it's not an optional dependency. Making a separate trait means that if someone doesn't use the Joda Time trait then they don't need to have the Joda Time jar in their classpath and they never know that it's not there. 3. A relatively simple code
[Lift] Re: Trouble With JPA Book Example
Are you using OpenJDK by any chance? IIRC the YUI compressor doesn't like it. Derek On Wed, Oct 21, 2009 at 6:58 PM, AndyM andrewdm...@gmail.com wrote: Sorry about the spam. I was using 2.75 not 2.7.5.. Feel free to delete the above posts. More errors though. spa builds fine, web does not... INFO] null [INFO] [INFO] Trace java.lang.RuntimeException at com.yahoo.platform.yui.compressor.JavaScriptCompressor.printSourceNumber (JavaScriptCompressor.java:299) at com.yahoo.platform.yui.compressor.JavaScriptCompressor.parse (JavaScriptCompressor.java:335) at com.yahoo.platform.yui.compressor.JavaScriptCompressor.init (JavaScriptCompressor.java:532) at net.sf.alchim.mojo.yuicompressor.YuiCompressorMojo.processFile (YuiCompressorMojo.java:178) at net.sf.alchim.mojo.yuicompressor.MojoSupport.processDir (MojoSupport.java:151) at net.sf.alchim.mojo.yuicompressor.MojoSupport.execute (MojoSupport.java:105) at org.apache.maven.plugin.DefaultPluginManager.executeMojo (DefaultPluginManager.java:451) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals (DefaultLifecycleExecuto .. On Oct 21, 8:44 pm, AndyM andrewdm...@gmail.com wrote: That gets me one step closer, thanks, but then I still have problem. The next mvn install that I do gives me the following: 1 required artifact is missing. for artifact: com.foo.jpaweb:spa:jar:1.0-SNAPSHOT Another post had the same problem, said to do mvn install. I tried doing mvn install in the spa directory as well, gives me the same error. So I'm missing the artifcact that I'm trying to build? This doesn't make any sense. Ideas? On Oct 21, 7:48 am, Steve Swing steve.sw...@gmail.com wrote: Does mvn -Dscala.version=2.7.5 install work for you? If so you can define this in pom.xml files to avoid typing on the cmd- line every time you build: properties scala.version2.7.5/scala.version /properties On Oct 20, 8:38 pm, AndyM andrewdm...@gmail.com wrote: Still getting the same issue, with mvn -U archetype:generate \ -DarchetypeRepository=http://scala-tools.org/repo-snapshots\ -DarchetypeGroupId=net.liftweb \ -DarchetypeArtifactId=lift-archetype-jpa-basic \ -DarchetypeVersion=1.1-SNAPSHOT \ -DgroupId=com.foo.jpaweb \ -DartifactId=JPADemo \ -Dversion=1.0-SNAPSHOT On Oct 20, 7:58 pm, David Pollak feeder.of.the.be...@gmail.com wrote: For some reason the pom.xml files in the JPA archetypes referred to lift M4 rather than SNAPSHOT. I've pushed a change. Once the build ( http://hudson.scala-tools.org/job/Lift/1298/) is done, try re-executing your mvn command (make sure you do a mvn -U to pull the latest). To the committers - sorry for not going through review board on this one, but it was a clear problem with a clear fix (kind of like pushing a fix to a type-o in documentation) On Tue, Oct 20, 2009 at 4:28 PM, AndyM andrewdm...@gmail.com wrote: I'm having trouble doing an mvn install on the JPA example from the book... mvn archetype:generate \ -DarchetypeRepository=http://scala-tools.org/repo-snapshots\ -DarchetypeGroupId=net.liftweb \ -DarchetypeArtifactId=lift-archetype-jpa-basic \ -DarchetypeVersion=1.1-SNAPSHOT \ -DgroupId=com.foo.jpaweb \ -DartifactId=JPADemo \ -Dversion=1.0-SNAPSHOT cd JPADemo mvn install org.apache.maven.reactor.MavenExecutionException: The POM expression: $ {scala.version} could not be evaluated. Reason: Expression value '$ {scala.version}' references itself in 'com.foo.jpaweb:JPADemo:pom:1.0- SNAPSHOT'. for project com.foo.jpaweb:JPADemo at /home/amast/lift/ bookexample/JPADemo/pom.xml at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:378) [deleted for brevity] at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.project.InvalidProjectModelException: The POM expression: ${scala.version} could not be evaluated. Reason: Expression value '${scala.version}' references itself in 'com.foo.jpaweb:JPADemo:pom:1.0-SNAPSHOT'. for project com.foo.jpaweb:JPADemo at /home/amast/lift/bookexample/JPADemo/pom.xml at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal (DefaultMavenProjectBuilder.java:882) at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInte rnal (DefaultMavenProjectBuilder.java:506) ... [deleted for brevity] Caused by: org.apache.maven.project.interpolation.ModelInterpolationException: The POM expression: ${scala.version} could not be evaluated. Reason: Expression value
[Lift] Re: Dynamic radio button
I don't quite understand what you're trying to do. Could you give some more details? Are you trying to add more radios to an existing radio button set? On Wed, Oct 21, 2009 at 8:45 PM, sunanda sunanda.pa...@gmail.com wrote: Hi, I need to add radio button dynamically with one of the button checked and I need to invoke ajaxCall onclick of a radio button. How can I do this. Sunanda --~--~-~--~~~---~--~~ 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: Fwd: Build failed in Hudson: Lift #1307
It builds for me locally... On Thu, Oct 22, 2009 at 5:25 AM, Timothy Perrett timo...@getintheloop.euwrote: Hmm how strange - it builds fine locally? Cheers, Tim On Oct 22, 10:56 am, David Pollak feeder.of.the.be...@gmail.com wrote: Anyone have a clue as to why the JTA stuff in Lift is unstable on Hudson? -- Forwarded message -- From: ad...@scala-tools.org Date: Thu, Oct 22, 2009 at 2:28 AM Subject: Build failed in Hudson: Lift #1307 See http://hudson.scala-tools.org/job/Lift/1307/changes Changes: [David Pollak] Temporary fix to allow Hudson to complete a build -- [...truncated 6079 lines...] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 [HUDSON] Recording test results [INFO] [jar:jar] [INFO] Building jar: http://hudson.scala-tools.org/job/Lift/ws/lift-testkit/target/lift-te... [INFO] Preparing source:jar [WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation. [INFO] No goals needed for project - skipping [INFO] [source:jar {execution: attach-sources}] [INFO] Building jar: http://hudson.scala-tools.org/job/Lift/ws/lift-testkit/target/lift-te... [INFO] [install:install] [INFO] Installing http://hudson.scala-tools.org/job/Lift/ws/lift-testkit/target/lift-te... to /home/scalatools/hudson/.m2/repository/net/liftweb/lift-testkit/1.1-SNAPSHO T/lift-testkit-1.1-SNAPSHOT.jar [INFO] Installing http://hudson.scala-tools.org/job/Lift/ws/lift-testkit/target/lift-te... to /home/scalatools/hudson/.m2/repository/net/liftweb/lift-testkit/1.1-SNAPSHO T/lift-testkit-1.1-SNAPSHOT-sources.jar [INFO] [deploy:deploy] [INFO] Retrieving previous build number from hudson.scala-tools.org Uploading: file:///home/ scala-tools.org/www/repo-snapshots/net/liftweb/lift-testkit/1.1-SNAPSHOT/lift-testkit-1.1-SNAPSHOT.jar 108K uploaded (lift-testkit-1.1-SNAPSHOT.jar) [INFO] Retrieving previous metadata from hudson.scala-tools.org [INFO] Uploading repository metadata for: 'artifact net.liftweb:lift-testkit' [INFO] Uploading project information for lift-testkit 1.1-SNAPSHOT [INFO] Retrieving previous metadata from hudson.scala-tools.org [INFO] Uploading repository metadata for: 'snapshot net.liftweb:lift-testkit:1.1-SNAPSHOT' [INFO] Retrieving previous build number from hudson.scala-tools.org Uploading: file:///home/ scala-tools.org/www/repo-snapshots/net/liftweb/lift-testkit/1.1-SNAPSHOT/lift-testkit-1.1-SNAPSHOT-sources.jar 10K uploaded (lift-testkit-1.1-SNAPSHOT-sources.jar) [INFO] Preparing surefire-report:report-only [INFO] No goals needed for project - skipping [INFO] [site:site] [INFO] Generating Project Team report. [INFO] Generating Issue Tracking report. [INFO] Generating Surefire Report report. [WARNING] Unable to locate Test Source XRef to link to - DISABLED [INFO] Generating Dependency Management report. [INFO] Generating Project Plugins report. [INFO] Generating Continuous Integration report. [INFO] Generating Dependencies report. [INFO] Generating Source Repository report. [INFO] Generating Plugin Management report. [INFO] Generating Mailing Lists report. [INFO] Generating Project Summary report. [INFO] Generating About report. [INFO] Generating ScalaDocs report. Downloading: http://scala-tools.org/repo-snapshots/org/scala-tools/vscaladoc/1.2-S... [INFO] load packageLinkDefs from : http://hudson.scala-tools.org/job/Lift/ws/lift-testkit/../vscaladocs-... [WARNING] Oct 22, 2009 2:28:10 AM org.scala_tools.vscaladoc.HtmlRenderer render [WARNING] INFO: write page for overview [WARNING] Oct 22, 2009 2:28:10 AM org.scala_tools.vscaladoc.HtmlRenderer render [WARNING] INFO: write page for all-classes (list) [WARNING] Oct 22, 2009 2:28:10 AM org.scala_tools.vscaladoc.HtmlRenderer render [WARNING] INFO: write index.html [WARNING] Oct 22, 2009 2:28:10 AM org.scala_tools.vscaladoc.HtmlRenderer render [WARNING] INFO: write doc for each classes [INFO] failed to find baseUri for (net.liftweb.common, Box, false [INFO] failed to find baseUri for (net.liftweb.common, Box, false [INFO] failed to find baseUri for (net.liftweb.common, Box, false [INFO] failed to find baseUri for (net.liftweb.common, Box, false [INFO] failed to find baseUri for (net.liftweb.common, Box, false [INFO] failed to find baseUri for (net.liftweb.common, Box, false [INFO] failed to find baseUri for (net.liftweb.common, Box, false [INFO] failed to find baseUri for (net.liftweb.common, Box, false [INFO] failed to find baseUri for (net.liftweb.common, Box, false [INFO] failed to find baseUri for (net.liftweb.common, Box, false [INFO] failed to find baseUri for (net.liftweb.common, Box, false [INFO] failed to find baseUri for (net.liftweb.common, Box, false [INFO] failed to find baseUri for (net.liftweb.common, Box, false [INFO] failed to find baseUri for
[Lift] Re: Fwd: Build failed in Hudson: Lift #1307
This is really odd. The 1.1 ScalaJPA doesn't have a def for getUnitName, that was added in 1.2-SNAPSHOT. The pom for lift-jta is specifying ScalaJPA 1.1, so I wonder if somehow a 1.2-SNAPSHOT jar is getting used instead. I'm going to remove the scalajpa stuff from ~hudson/.m2/repository on lion and see if that fixes it. Derek On Thu, Oct 22, 2009 at 8:47 AM, Derek Chen-Becker dchenbec...@gmail.comwrote: It builds for me locally... On Thu, Oct 22, 2009 at 5:25 AM, Timothy Perrett timo...@getintheloop.euwrote: Hmm how strange - it builds fine locally? Cheers, Tim On Oct 22, 10:56 am, David Pollak feeder.of.the.be...@gmail.com wrote: Anyone have a clue as to why the JTA stuff in Lift is unstable on Hudson? -- Forwarded message -- From: ad...@scala-tools.org Date: Thu, Oct 22, 2009 at 2:28 AM Subject: Build failed in Hudson: Lift #1307 See http://hudson.scala-tools.org/job/Lift/1307/changes Changes: [David Pollak] Temporary fix to allow Hudson to complete a build -- [...truncated 6079 lines...] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 [HUDSON] Recording test results [INFO] [jar:jar] [INFO] Building jar: http://hudson.scala-tools.org/job/Lift/ws/lift-testkit/target/lift-te... [INFO] Preparing source:jar [WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation. [INFO] No goals needed for project - skipping [INFO] [source:jar {execution: attach-sources}] [INFO] Building jar: http://hudson.scala-tools.org/job/Lift/ws/lift-testkit/target/lift-te... [INFO] [install:install] [INFO] Installing http://hudson.scala-tools.org/job/Lift/ws/lift-testkit/target/lift-te... to /home/scalatools/hudson/.m2/repository/net/liftweb/lift-testkit/1.1-SNAPSHO T/lift-testkit-1.1-SNAPSHOT.jar [INFO] Installing http://hudson.scala-tools.org/job/Lift/ws/lift-testkit/target/lift-te... to /home/scalatools/hudson/.m2/repository/net/liftweb/lift-testkit/1.1-SNAPSHO T/lift-testkit-1.1-SNAPSHOT-sources.jar [INFO] [deploy:deploy] [INFO] Retrieving previous build number from hudson.scala-tools.org Uploading: file:///home/ scala-tools.org/www/repo-snapshots/net/liftweb/lift-testkit/1.1-SNAPSHOT/lift-testkit-1.1-SNAPSHOT.jar 108K uploaded (lift-testkit-1.1-SNAPSHOT.jar) [INFO] Retrieving previous metadata from hudson.scala-tools.org [INFO] Uploading repository metadata for: 'artifact net.liftweb:lift-testkit' [INFO] Uploading project information for lift-testkit 1.1-SNAPSHOT [INFO] Retrieving previous metadata from hudson.scala-tools.org [INFO] Uploading repository metadata for: 'snapshot net.liftweb:lift-testkit:1.1-SNAPSHOT' [INFO] Retrieving previous build number from hudson.scala-tools.org Uploading: file:///home/ scala-tools.org/www/repo-snapshots/net/liftweb/lift-testkit/1.1-SNAPSHOT/lift-testkit-1.1-SNAPSHOT-sources.jar 10K uploaded (lift-testkit-1.1-SNAPSHOT-sources.jar) [INFO] Preparing surefire-report:report-only [INFO] No goals needed for project - skipping [INFO] [site:site] [INFO] Generating Project Team report. [INFO] Generating Issue Tracking report. [INFO] Generating Surefire Report report. [WARNING] Unable to locate Test Source XRef to link to - DISABLED [INFO] Generating Dependency Management report. [INFO] Generating Project Plugins report. [INFO] Generating Continuous Integration report. [INFO] Generating Dependencies report. [INFO] Generating Source Repository report. [INFO] Generating Plugin Management report. [INFO] Generating Mailing Lists report. [INFO] Generating Project Summary report. [INFO] Generating About report. [INFO] Generating ScalaDocs report. Downloading: http://scala-tools.org/repo-snapshots/org/scala-tools/vscaladoc/1.2-S... [INFO] load packageLinkDefs from : http://hudson.scala-tools.org/job/Lift/ws/lift-testkit/../vscaladocs-... [WARNING] Oct 22, 2009 2:28:10 AM org.scala_tools.vscaladoc.HtmlRenderer render [WARNING] INFO: write page for overview [WARNING] Oct 22, 2009 2:28:10 AM org.scala_tools.vscaladoc.HtmlRenderer render [WARNING] INFO: write page for all-classes (list) [WARNING] Oct 22, 2009 2:28:10 AM org.scala_tools.vscaladoc.HtmlRenderer render [WARNING] INFO: write index.html [WARNING] Oct 22, 2009 2:28:10 AM org.scala_tools.vscaladoc.HtmlRenderer render [WARNING] INFO: write doc for each classes [INFO] failed to find baseUri for (net.liftweb.common, Box, false [INFO] failed to find baseUri for (net.liftweb.common, Box, false [INFO] failed to find baseUri for (net.liftweb.common, Box, false [INFO] failed to find baseUri for (net.liftweb.common, Box, false [INFO] failed to find baseUri for (net.liftweb.common, Box, false [INFO] failed to find baseUri for (net.liftweb.common, Box, false [INFO] failed to find baseUri for (net.liftweb.common, Box, false [INFO] failed to find baseUri
[Lift] Re: lift:bind-at get warnings for every request
No, I think you're remembering something different. Right now I'm working on time formatting, double SQL logging and improved MS SQL server support. Derek On Tue, Oct 20, 2009 at 11:13 AM, Marius marius.dan...@gmail.com wrote: Yup please file a ticket. I think Derek worked on this a while ago. Derek, please correct me if I'm wrong Br's, Marius On Oct 20, 5:16 pm, Ross Mellgren dri...@gmail.com wrote: I encountered these and sent a message to the list last week or so. I didn't hear anything back, maybe the best route is to file an issue? http://github.com/dpp/liftweb/issues -Ross On Oct 20, 2009, at 5:30 AM, night_stalker wrote: Hi all. When using lift:bind-at, the result page is fine as I wished, yet these warnings run into the log for every request: WARN - Unused binding values for lift:bind: content, main WARN - Unused binding values for lift:bind: sidebar, main WARN - Unused binding values for lift:bind: sidebar Am I missing something, or, can I disable these warnings? The lift version is 1.1-M6, template code are like below: templates-hidden/someLayout.html ...begin stuff lift:bind name=sidebar/ ...between stuff lift:bind name=content/ ...end stuff somePage.html lift:surround with=someLayout lift:bind-at name=sidebar ...sidebar stuff /lift:bind-at lift:bind-at name=content ...content stuff /lift:bind-at /lift:surround --~--~-~--~~~---~--~~ 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: Rolling out the new Lift Actors code
I like making big changes on Wednesdays, so I would say push it now. I suppose tomorrow would work, too, but I would be very reluctant to do it on Friday. Derek On Tue, Oct 20, 2009 at 4:35 PM, David Pollak feeder.of.the.be...@gmail.com wrote: Folks, I've just pushed the completed Lift Actor code to the dpp_wip_actorize branch. Jonas and I coordinated on the Actor API and Akka Actors will use the same basic trait so Akka Actors could be used to power Lift's Comet. I am ready to push this code to SNAPSHOT. When I do this, there will be breaking changes to all Lift apps (basically, you'll have to import net.liftweb.base._) Does anyone have a timetable for this push? I'd like to have at least a week of solid testing before we do Milestone 7 (currently scheduled for November 4th). Please let me know your thoughts. Thanks, David -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: S.uri not including query params
http://github.com/dpp/liftweb/issues/#issue/121 If I have some time this afternoon I'll fix it. On Tue, Oct 20, 2009 at 8:07 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: Then my addition to MetaMegaProtoUser of loginRedirect has a bug, because loginFirst sets it based on S.uri. Since I'm not usually around an internet connection, I won't be able to go through filing a ticket, putting a diff on Review Board, and pushing it, in any small amount of time. - David Pollakfeeder.of.the.be...@gmail.com wrote: On Tue, Oct 20, 2009 at 2:48 PM, Naftoli Gugenheim naftoli...@gmail.com wrote: Is S.uri supposed to return the part of the URL after '?'? No -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Are we willing to make a breaking change for Joda Time?
It sounds like you're pretty set against making separate impl traits and would prefer just putting things directly on TimeHelper. I'm OK with that, but I would really like to add a lift-joda module that contains the JodaHelpers, JodaTimeFormats and JodaTimeHelpers traits as I would like to use them. I should be able to delegate a good chunk of the methods to TimeHelpers.jt*, so there shouldn't be any *redundant* code. Is that a reasonable compromise? Derek On Tue, Oct 20, 2009 at 11:35 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: I agree that the goal isn't to remove java.util.Date. For trivial time handling it works just fine. What I'm trying to achieve here is a way to make Joda Time be the default impl while leaving the user a choice. By using separate traits instead of different names on the same trait, we achieve a few things: 1. A consistent API for both java.util and Joda Time in terms of method names. As Naftoli pointed out, people expect naming of functions consistent with what they do and having two different nows on the same trait is going to look a little strange to people, I think. 2. A clean *optional* usage of Joda Time. If we put code that utilizes Joda Time directly into TimeHelpers then it's not an optional dependency. Making a separate trait means that if someone doesn't use the Joda Time trait then they don't need to have the Joda Time jar in their classpath and they never know that it's not there. 3. A relatively simple code change path to move from java.util to Joda Time by simply changing imports. Your assertion that Date is a simple wrapper for a Long timestamp is pretty accurate, but really Joda Time's DateTime is a superset of *Calendar*, not Date. Just look at what we had to do with CalendarExtension to get some simple date manipulation functions, where those same methods are already defined on DateTime. The vast majority of Joda Time's classes are immutable, and the mutators return new instances instead of modifying the current instance. TimeSpan's current handling of duration addition doesn't cope with DST, which I'm sure will show up as a bug in someone's code if it hasn't already. Having done a fair amount of java.util.Date handling and then moving to Joda Time, I find it hard to call the difference between the two APIs marginal. In any case, I still feel that my proposal makes Joda Time available in a nicer way while leaving existing code completely untouched (by introducing a JodaHelpers trait that mirrors Helpers). Derek On Tue, Oct 20, 2009 at 9:25 PM, David Pollak feeder.of.the.be...@gmail.com wrote: On Tue, Oct 20, 2009 at 6:56 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: I agree with this. My understanding is that the goal is that Lift should use Joda for its time functions rather than java.util. This is not the goal. The goal is to make JodeTime available. There is no reason to remove support for java.util.Date. None. JodaTime offers some advantages, but there's no reason, none, nada, to *remove* support for java.util.Date. I'm cool with different names (not jtNow, but choose something else). But I view removal of support for java.util.Date as gratuitous. Sure, if we were to make the clean-slate decision today, I'd opt for primary support of JodaTime and secondary support for java.util.Date. But we're making a decision based on legacy. We're not going to cut off java.util.Date just because something marginally better (and I'm not being facetious here... at the bottom, these are just wrappers for number of milliseconds since Jan 1, 1970). If the Joda methods have different and longer names, then it's existing side by side with the java.util implementation, not replacing it. To many people, it is important that methods etc. should be named properly and aesthetically. It's not pleasant to use names like jtNow in your code when that is the method that gets used normally. Sure, if 'now' was the usual method and a 'jtNow' method was called in special circumstances, it's an understandable name. But names that are used in ordinary circumstances should have straightforward names. (Names should be concise expressions of what they represent. This aids in memorization and code readability.) Also, it will be impossible to deprecate the java.util implementation and have a clean API instead. If we use separate traits with the same method names, then we will be able to. - Derek Chen-Beckerdchenbec...@gmail.com wrote: On Tue, Oct 20, 2009 at 4:59 PM, David Pollak feeder.of.the.be...@gmail.com wrote: What I checked in allows you to use JodaTime just as easily (well with 2 extra characters in a few method names) as java.util.Date. How is anything more default than that? My primary concern with this approach is that it makes changing between the two implementations something that requires
[Lift] Re: scalajpa - wrong database?
No worries, it happens. On Wed, Oct 21, 2009 at 11:02 AM, TSP tim.pig...@optrak.co.uk wrote: I tried to construct a test case and the problem seems to have mysteriously disappeared. Possibly something to do with clean builds. Sorry to cry wolf. Tim --~--~-~--~~~---~--~~ 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: html not being evalutated
Like David said, be very careful about using NodeSeqs if you're taking user-generated content, since that can lead directly to cross-site scripting attacks and other nastiness. Derek On Wed, Oct 21, 2009 at 7:41 AM, Jack Widman jack.wid...@gmail.com wrote: Oops. I just noticed I made source.body a String and not a NodeSeq. Sometimes source.body is text with html tags in it. Like - Hey dude, bwhat/b are you doing? I guess I should make it a NodeSeq. Sorry about that. Jack On Wed, Oct 21, 2009 at 9:33 AM, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Oct 21, 2009 at 6:32 AM, jack jack.wid...@gmail.com wrote: Let's say source.body is ahref=google.comSearch/a. If I put source.body in a span like this - span{source.body}/span source.body will be converted to text and the actual link tags will be displayed. What is the right way to do this? How was source.body generated? On Oct 21, 9:06 am, David Pollak feeder.of.the.be...@gmail.com wrote: On Tue, Oct 20, 2009 at 10:16 PM, jack jack.wid...@gmail.com wrote: OK, I see why this is happening. the {exp} in the NodeSeq convert exp to a String. So I did by creating a string and then converting it to a NodeSeq at the end. Is there a way to do this without using and intermediary string? I don't know what a source is, but you really, really have to be careful about promoting a String to a NodeSeq. If the String has user-generated content in it, then you've got a cross-site scripting vulnerability waiting to happen. For user-generated content, I suggest using Textile parser built into Lift. In any case, if you don't have a NodeSeq in your data structure, you'll have to parse it into XML before displaying it. On Oct 21, 1:03 am, jack jack.wid...@gmail.com wrote: I have the following method display. source.body has html tags in it but the actual tags are showing instead of being evaluated. e.g. I'm seeing things like 'bHey There/b' instead of 'Hey There' in bold. This method is in a CometActor and is running when the page is rendered. Am I missing something obvious? def display(sources:List[Source]):NodeSeq = { span id=jooptable { for {source - sources} yield trtd{source.body}/td/tr } /table /span } -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Surf the harmonics -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics -- Jack --~--~-~--~~~---~--~~ 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: multiple datasources and/or JNDI definitions
I think that you're making this more complicated that it needs to be, although I may be misunderstanding the question. The ConnectionIdentifier trait has a jndiName val on it. If you specify a valid JNDI name for that val, then you don't need to wire up a connection manager for it. You can simply do things like: object MyConnOne extends ConnectionIdentifier { val jndiName = jdbc/ConnOne } object MyConnTwo extends ConnectionIdentifier { val jndiName = jdbc/ConnTwo } // Wire up a default DB.defineConnectionManager(DefaultConnectionIdentifier, DerbyDBVendor) DB.use(MyConnOne) { conn = DB.exec(conn) { results = ... } } Lift will automatically handle retrieving the data source via JNDI if you specify a ConnectionIdentifier and you don't have a connection manager defined. Derek On Wed, Oct 21, 2009 at 10:38 AM, opyate opy...@gmail.com wrote: Hello Lift committers, I have a quick question about defining a datasource. I usually do it like this: DefaultConnectionIdentifier.jndiName = jdbc/myApp // use default internal Derby DB if there's not already a JNDI connection defined if (!DB.jndiJdbcConnAvailable_?) { // looks at DefaultConnectionIdentifier Log.warn(No JNDI configured - using default built-in Derby database.) DB.defineConnectionManager(DefaultConnectionIdentifier, DerbyDBVendor) } Is DerbyDBVendor in this case a fallback datasource? (Presumably it is, if the JNDI lookup is not available...) If so, this leads to my next question, relating to defining extra (i.e. non-default) datasources. The only way (it seems) for me to do it, is by using: DB.defineConnectionManager(CustomConnId1, SomeDBVendor1) DB.defineConnectionManager(CustomConnId2, SomeDBVendor2) // CustomConnId1/2 points to defined JNDI lookups Is there a way to define custom datasources without specifying a fallback SomeDBVendor1, SomeDBVendor2, etc? I couldn't see anything obvious in the latest checkout of DB.scala At the moment I'm forced to define these fallbacks, and when my app context reloads, poor Derby steps on its own toes: Caused by: java.nio.channels.OverlappingFileLockException at sun.nio.ch.FileChannelImpl$SharedFileLockTable.checkList (FileChannelImpl.java:1170) at sun.nio.ch.FileChannelImpl$SharedFileLockTable.add (FileChannelImpl.java:1072) at sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:878) at java.nio.channels.FileChannel.tryLock(FileChannel.java:962) at org.apache.derby.impl.io.DirFile4.getExclusiveFileLock(Unknown Source) I understand that SomeDBVendor1/2 could contain my db connection details, but I don't want to have db connection details specified in ConnectionManager instances in my code, and would rather keep them in JNDI lookups, and said ConnectionManager instances seems to be compulsory at this stage. Please shed some light - I might be missing the boat again completely :-) Ultimately I'd like to have the same control over my extra datasources than I do over DefaultConnectionIdentifier. Thanks, Juan --~--~-~--~~~---~--~~ 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: multiple datasources and/or JNDI definitions
Right. That message was concerning non-JNDI data sources, which is why I have to wire up connection managers in that example. If you're using JNDI it's a lot simpler. Derek On Wed, Oct 21, 2009 at 2:19 PM, opyate opy...@gmail.com wrote: Thanks Derek. I also just found this: http://groups.google.com/group/liftweb/browse_thread/thread/e75046eaf215e97/259da9d9ef22ca7a?lnk=gstq=%22extends+connectionmanager%22# On Oct 21, 9:15 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: I think that you're making this more complicated that it needs to be, although I may be misunderstanding the question. The ConnectionIdentifier trait has a jndiName val on it. If you specify a valid JNDI name for that val, then you don't need to wire up a connection manager for it. You can simply do things like: object MyConnOne extends ConnectionIdentifier { val jndiName = jdbc/ConnOne } object MyConnTwo extends ConnectionIdentifier { val jndiName = jdbc/ConnTwo } // Wire up a default DB.defineConnectionManager(DefaultConnectionIdentifier, DerbyDBVendor) DB.use(MyConnOne) { conn = DB.exec(conn) { results = ... } } Lift will automatically handle retrieving the data source via JNDI if you specify a ConnectionIdentifier and you don't have a connection manager defined. Derek On Wed, Oct 21, 2009 at 10:38 AM, opyate opy...@gmail.com wrote: Hello Lift committers, I have a quick question about defining a datasource. I usually do it like this: DefaultConnectionIdentifier.jndiName = jdbc/myApp // use default internal Derby DB if there's not already a JNDI connection defined if (!DB.jndiJdbcConnAvailable_?) { // looks at DefaultConnectionIdentifier Log.warn(No JNDI configured - using default built-in Derby database.) DB.defineConnectionManager(DefaultConnectionIdentifier, DerbyDBVendor) } Is DerbyDBVendor in this case a fallback datasource? (Presumably it is, if the JNDI lookup is not available...) If so, this leads to my next question, relating to defining extra (i.e. non-default) datasources. The only way (it seems) for me to do it, is by using: DB.defineConnectionManager(CustomConnId1, SomeDBVendor1) DB.defineConnectionManager(CustomConnId2, SomeDBVendor2) // CustomConnId1/2 points to defined JNDI lookups Is there a way to define custom datasources without specifying a fallback SomeDBVendor1, SomeDBVendor2, etc? I couldn't see anything obvious in the latest checkout of DB.scala At the moment I'm forced to define these fallbacks, and when my app context reloads, poor Derby steps on its own toes: Caused by: java.nio.channels.OverlappingFileLockException at sun.nio.ch.FileChannelImpl$SharedFileLockTable.checkList (FileChannelImpl.java:1170) at sun.nio.ch.FileChannelImpl$SharedFileLockTable.add (FileChannelImpl.java:1072) at sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:878) at java.nio.channels.FileChannel.tryLock(FileChannel.java:962) at org.apache.derby.impl.io.DirFile4.getExclusiveFileLock(Unknown Source) I understand that SomeDBVendor1/2 could contain my db connection details, but I don't want to have db connection details specified in ConnectionManager instances in my code, and would rather keep them in JNDI lookups, and said ConnectionManager instances seems to be compulsory at this stage. Please shed some light - I might be missing the boat again completely :-) Ultimately I'd like to have the same control over my extra datasources than I do over DefaultConnectionIdentifier. Thanks, Juan --~--~-~--~~~---~--~~ 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] Testing for SQL Server drivers
Hi, I've made some changes to Mapper to better support SQL Server, particularly with Unicode text. Does anyone out there use SQL Server that would be willing to test the code on the wip-dcb-issue-16-sql-server branch to make sure nothing breaks? Thanks, Derek --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---