[Lift] Re: openOr with a block to cover Nil in the middle of a chain?
...And that's why Box rocks ;-) On 28/03/2009 15:59, Derek Chen-Becker dchenbec...@gmail.com wrote: somThing.user.map(u = u.firstName.is http://u.firstName.is ) openOr no name --~--~-~--~~~---~--~~ 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] Bidirectional Record - JSON conversion
Folks, I just committed the Record/JSON conversion support. Here is a simple example: import net.liftweb.record.field._ import java.util._ object Main { def main(args : Array[String]) : Unit = { val rec = MyRecordMeta.createRecord.firstName(McLoud) // Change an existing record with the values from a given json val json = {'firstName': 'Johnson', 'birthDay': 'Sun, 29 Mar 2009 11:41:53 UTC', 'cars': 3, 'lastName': 'Doe'} rec.fromJSON(json) println(rec.birthDay.value.getTime) println(rec.firstName) println(rec.cars) // Construct a record out of the json(opne_! is used only for exemplification :)...) val rec2 = MyRecordMeta.createRecord(json).open_! println(rec2.firstName) println(rec2.birthDay.value.getTime) } } class MyRecord extends Record[MyRecord] { def meta = MyRecordMeta object firstName extends StringField(this, Smith) object lastName extends StringField(this, John) object birthDay extends DateTimeField(this, Calendar.getInstance); object cars extends IntField(this, 1); } object MyRecordMeta extends MyRecord with MetaRecord[MyRecord] { override def mutable_? = false } Br's, Marius --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to 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] chadwskinner
Yes. I've got a backlog of stuff to do a mile long. Don't expect anything on this item before Wednesday. David, Is this backlog something that is public or something we can read. I'm hoping to get a better idea of how things work (Lift, OSGi, application architecture / design, integration, etc. ) and how others with more experience think with regard to these issues. Since there are only two of us and not a lot of funding for training I do a lot of reading and it helps me learn ... I think ... --~--~-~--~~~---~--~~ 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 as a UI in server side OSGi
Yes. I've got a backlog of stuff to do a mile long. Don't expect anything on this item before Wednesday. David, Is this backlog something that is public or something we can read. I'm hoping to get a better idea of how things work (Lift, OSGi, application architecture / design, integration, etc. ) and how others with more experience think with regard to these issues. Since there are only two of us and not a lot of funding for training I do a lot of reading and it helps me learn ... I think ... --~--~-~--~~~---~--~~ 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: chadwskinner
Sorry, about double posting this. I am not certain how I replied in google and got the subject goofed up so it posted in the wrong thread. Normally, when you reply you don't even have a field to set the subject. Weird. On Sat, Mar 28, 2009 at 5:54 PM, Chad Skinner chadwskin...@gmail.comwrote: Yes. I've got a backlog of stuff to do a mile long. Don't expect anything on this item before Wednesday. David, Is this backlog something that is public or something we can read. I'm hoping to get a better idea of how things work (Lift, OSGi, application architecture / design, integration, etc. ) and how others with more experience think with regard to these issues. Since there are only two of us and not a lot of funding for training I do a lot of reading and it helps me learn ... I think ... --~--~-~--~~~---~--~~ 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: Bidirectional Record - JSON conversion
Very nice :) On Sun, Mar 29, 2009 at 6:07 AM, Marius marius.dan...@gmail.com wrote: Folks, I just committed the Record/JSON conversion support. Here is a simple example: import net.liftweb.record.field._ import java.util._ object Main { def main(args : Array[String]) : Unit = { val rec = MyRecordMeta.createRecord.firstName(McLoud) // Change an existing record with the values from a given json val json = {'firstName': 'Johnson', 'birthDay': 'Sun, 29 Mar 2009 11:41:53 UTC', 'cars': 3, 'lastName': 'Doe'} rec.fromJSON(json) println(rec.birthDay.value.getTime) println(rec.firstName) println(rec.cars) // Construct a record out of the json(opne_! is used only for exemplification :)...) val rec2 = MyRecordMeta.createRecord(json).open_! println(rec2.firstName) println(rec2.birthDay.value.getTime) } } class MyRecord extends Record[MyRecord] { def meta = MyRecordMeta object firstName extends StringField(this, Smith) object lastName extends StringField(this, John) object birthDay extends DateTimeField(this, Calendar.getInstance); object cars extends IntField(this, 1); } object MyRecordMeta extends MyRecord with MetaRecord[MyRecord] { override def mutable_? = false } Br's, Marius --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to 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: Bidirectional Record - JSON conversion
@marius, this is slick. However, its causing my build to error now... I get the following stack trace when building the entire lift project: [INFO] Compiling 22 source files to /Users/timperrett/repositories/ lift/lift-framework/lift-record/target/classes [WARNING] /Users/timperrett/repositories/lift/lift-framework/lift- record/src/main/scala/net/liftweb/record/MetaRecord.scala:238: error: type mismatch; [WARNING] found : net.liftweb.util.Box[net.liftweb.util.Box [net.liftweb.record.OwnedField[BaseRecord]#MyType]] [WARNING] required: Iterable[?] [WARNING] Note that implicit conversions are not applicable because they are ambiguous: [WARNING] both method box2Iterable in object Box of type [T] (net.liftweb.util.Box[T])Iterable[T] [WARNING] and method box2Iterable in object Box of type [T] (net.liftweb.util.Box[T])Iterable[T] [WARNING] are possible conversion functions from net.liftweb.util.Box [net.liftweb.util.Box[net.liftweb.record.OwnedField[BaseRecord] #MyType]] to Iterable[?] [WARNING]field - inst.fieldByName(k.toString)) yield field.setFromAny(v) [WARNING]^ [WARNING] one error found On Mar 29, 1:59 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: Very nice :) On Sun, Mar 29, 2009 at 6:07 AM, Marius marius.dan...@gmail.com wrote: Folks, I just committed the Record/JSON conversion support. Here is a simple example: import net.liftweb.record.field._ import java.util._ object Main { def main(args : Array[String]) : Unit = { val rec = MyRecordMeta.createRecord.firstName(McLoud) // Change an existing record with the values from a given json val json = {'firstName': 'Johnson', 'birthDay': 'Sun, 29 Mar 2009 11:41:53 UTC', 'cars': 3, 'lastName': 'Doe'} rec.fromJSON(json) println(rec.birthDay.value.getTime) println(rec.firstName) println(rec.cars) // Construct a record out of the json(opne_! is used only for exemplification :)...) val rec2 = MyRecordMeta.createRecord(json).open_! println(rec2.firstName) println(rec2.birthDay.value.getTime) } } class MyRecord extends Record[MyRecord] { def meta = MyRecordMeta object firstName extends StringField(this, Smith) object lastName extends StringField(this, John) object birthDay extends DateTimeField(this, Calendar.getInstance); object cars extends IntField(this, 1); } object MyRecordMeta extends MyRecord with MetaRecord[MyRecord] { override def mutable_? = false } Br's, Marius --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to 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: Bidirectional Record - JSON conversion
FYI - the job is also failing on Hudson http://scala-tools.org/hudson/job/lift/926/ On Mar 29, 9:29 pm, Timothy Perrett timo...@getintheloop.eu wrote: @marius, this is slick. However, its causing my build to error now... I get the following stack trace when building the entire lift project: [INFO] Compiling 22 source files to /Users/timperrett/repositories/ lift/lift-framework/lift-record/target/classes [WARNING] /Users/timperrett/repositories/lift/lift-framework/lift- record/src/main/scala/net/liftweb/record/MetaRecord.scala:238: error: type mismatch; [WARNING] found : net.liftweb.util.Box[net.liftweb.util.Box [net.liftweb.record.OwnedField[BaseRecord]#MyType]] [WARNING] required: Iterable[?] [WARNING] Note that implicit conversions are not applicable because they are ambiguous: [WARNING] both method box2Iterable in object Box of type [T] (net.liftweb.util.Box[T])Iterable[T] [WARNING] and method box2Iterable in object Box of type [T] (net.liftweb.util.Box[T])Iterable[T] [WARNING] are possible conversion functions from net.liftweb.util.Box [net.liftweb.util.Box[net.liftweb.record.OwnedField[BaseRecord] #MyType]] to Iterable[?] [WARNING] field - inst.fieldByName(k.toString)) yield field.setFromAny(v) [WARNING] ^ [WARNING] one error found On Mar 29, 1:59 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: Very nice :) On Sun, Mar 29, 2009 at 6:07 AM, Marius marius.dan...@gmail.com wrote: Folks, I just committed the Record/JSON conversion support. Here is a simple example: import net.liftweb.record.field._ import java.util._ object Main { def main(args : Array[String]) : Unit = { val rec = MyRecordMeta.createRecord.firstName(McLoud) // Change an existing record with the values from a given json val json = {'firstName': 'Johnson', 'birthDay': 'Sun, 29 Mar 2009 11:41:53 UTC', 'cars': 3, 'lastName': 'Doe'} rec.fromJSON(json) println(rec.birthDay.value.getTime) println(rec.firstName) println(rec.cars) // Construct a record out of the json(opne_! is used only for exemplification :)...) val rec2 = MyRecordMeta.createRecord(json).open_! println(rec2.firstName) println(rec2.birthDay.value.getTime) } } class MyRecord extends Record[MyRecord] { def meta = MyRecordMeta object firstName extends StringField(this, Smith) object lastName extends StringField(this, John) object birthDay extends DateTimeField(this, Calendar.getInstance); object cars extends IntField(this, 1); } object MyRecordMeta extends MyRecord with MetaRecord[MyRecord] { override def mutable_? = false } Br's, Marius --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to 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: Bidirectional Record - JSON conversion
Apologies ... fixing it now. On Mar 29, 11:34 pm, Timothy Perrett timo...@getintheloop.eu wrote: FYI - the job is also failing on Hudson http://scala-tools.org/hudson/job/lift/926/ On Mar 29, 9:29 pm, Timothy Perrett timo...@getintheloop.eu wrote: @marius, this is slick. However, its causing my build to error now... I get the following stack trace when building the entire lift project: [INFO] Compiling 22 source files to /Users/timperrett/repositories/ lift/lift-framework/lift-record/target/classes [WARNING] /Users/timperrett/repositories/lift/lift-framework/lift- record/src/main/scala/net/liftweb/record/MetaRecord.scala:238: error: type mismatch; [WARNING] found : net.liftweb.util.Box[net.liftweb.util.Box [net.liftweb.record.OwnedField[BaseRecord]#MyType]] [WARNING] required: Iterable[?] [WARNING] Note that implicit conversions are not applicable because they are ambiguous: [WARNING] both method box2Iterable in object Box of type [T] (net.liftweb.util.Box[T])Iterable[T] [WARNING] and method box2Iterable in object Box of type [T] (net.liftweb.util.Box[T])Iterable[T] [WARNING] are possible conversion functions from net.liftweb.util.Box [net.liftweb.util.Box[net.liftweb.record.OwnedField[BaseRecord] #MyType]] to Iterable[?] [WARNING] field - inst.fieldByName(k.toString)) yield field.setFromAny(v) [WARNING] ^ [WARNING] one error found On Mar 29, 1:59 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: Very nice :) On Sun, Mar 29, 2009 at 6:07 AM, Marius marius.dan...@gmail.com wrote: Folks, I just committed the Record/JSON conversion support. Here is a simple example: import net.liftweb.record.field._ import java.util._ object Main { def main(args : Array[String]) : Unit = { val rec = MyRecordMeta.createRecord.firstName(McLoud) // Change an existing record with the values from a given json val json = {'firstName': 'Johnson', 'birthDay': 'Sun, 29 Mar 2009 11:41:53 UTC', 'cars': 3, 'lastName': 'Doe'} rec.fromJSON(json) println(rec.birthDay.value.getTime) println(rec.firstName) println(rec.cars) // Construct a record out of the json(opne_! is used only for exemplification :)...) val rec2 = MyRecordMeta.createRecord(json).open_! println(rec2.firstName) println(rec2.birthDay.value.getTime) } } class MyRecord extends Record[MyRecord] { def meta = MyRecordMeta object firstName extends StringField(this, Smith) object lastName extends StringField(this, John) object birthDay extends DateTimeField(this, Calendar.getInstance); object cars extends IntField(this, 1); } object MyRecordMeta extends MyRecord with MetaRecord[MyRecord] { override def mutable_? = false } Br's, Marius --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to 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: Bidirectional Record - JSON conversion
Done ... The Box's implicits were not visible. Funny it was working on my Eclipse plugin 2.8.0 ... Sorry again and thanks for pointing it out ! Br's, Marius On Mar 29, 11:45 pm, marius d. marius.dan...@gmail.com wrote: Apologies ... fixing it now. On Mar 29, 11:34 pm, Timothy Perrett timo...@getintheloop.eu wrote: FYI - the job is also failing on Hudson http://scala-tools.org/hudson/job/lift/926/ On Mar 29, 9:29 pm, Timothy Perrett timo...@getintheloop.eu wrote: @marius, this is slick. However, its causing my build to error now... I get the following stack trace when building the entire lift project: [INFO] Compiling 22 source files to /Users/timperrett/repositories/ lift/lift-framework/lift-record/target/classes [WARNING] /Users/timperrett/repositories/lift/lift-framework/lift- record/src/main/scala/net/liftweb/record/MetaRecord.scala:238: error: type mismatch; [WARNING] found : net.liftweb.util.Box[net.liftweb.util.Box [net.liftweb.record.OwnedField[BaseRecord]#MyType]] [WARNING] required: Iterable[?] [WARNING] Note that implicit conversions are not applicable because they are ambiguous: [WARNING] both method box2Iterable in object Box of type [T] (net.liftweb.util.Box[T])Iterable[T] [WARNING] and method box2Iterable in object Box of type [T] (net.liftweb.util.Box[T])Iterable[T] [WARNING] are possible conversion functions from net.liftweb.util.Box [net.liftweb.util.Box[net.liftweb.record.OwnedField[BaseRecord] #MyType]] to Iterable[?] [WARNING] field - inst.fieldByName(k.toString)) yield field.setFromAny(v) [WARNING] ^ [WARNING] one error found On Mar 29, 1:59 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: Very nice :) On Sun, Mar 29, 2009 at 6:07 AM, Marius marius.dan...@gmail.com wrote: Folks, I just committed the Record/JSON conversion support. Here is a simple example: import net.liftweb.record.field._ import java.util._ object Main { def main(args : Array[String]) : Unit = { val rec = MyRecordMeta.createRecord.firstName(McLoud) // Change an existing record with the values from a given json val json = {'firstName': 'Johnson', 'birthDay': 'Sun, 29 Mar 2009 11:41:53 UTC', 'cars': 3, 'lastName': 'Doe'} rec.fromJSON(json) println(rec.birthDay.value.getTime) println(rec.firstName) println(rec.cars) // Construct a record out of the json(opne_! is used only for exemplification :)...) val rec2 = MyRecordMeta.createRecord(json).open_! println(rec2.firstName) println(rec2.birthDay.value.getTime) } } class MyRecord extends Record[MyRecord] { def meta = MyRecordMeta object firstName extends StringField(this, Smith) object lastName extends StringField(this, John) object birthDay extends DateTimeField(this, Calendar.getInstance); object cars extends IntField(this, 1); } object MyRecordMeta extends MyRecord with MetaRecord[MyRecord] { override def mutable_? = false } Br's, Marius --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to 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: Bidirectional Record - JSON conversion
That's strange about the eclipse plugin though for sure - I guess that's IDE voodoo for you! Cheers Marius Tim Sent from my iPhone On 29 Mar 2009, at 21:56, marius d. marius.dan...@gmail.com wrote: Done ... The Box's implicits were not visible. Funny it was working on my Eclipse plugin 2.8.0 ... Sorry again and thanks for pointing it out ! Br's, Marius On Mar 29, 11:45 pm, marius d. marius.dan...@gmail.com wrote: Apologies ... fixing it now. On Mar 29, 11:34 pm, Timothy Perrett timo...@getintheloop.eu wrote: FYI - the job is also failing on Hudson http://scala-tools.org/hudson/job/lift/926/ On Mar 29, 9:29 pm, Timothy Perrett timo...@getintheloop.eu wrote: @marius, this is slick. However, its causing my build to error now... I get the following stack trace when building the entire lift project: [INFO] Compiling 22 source files to /Users/timperrett/repositories/ lift/lift-framework/lift-record/target/classes [WARNING] /Users/timperrett/repositories/lift/lift-framework/lift- record/src/main/scala/net/liftweb/record/MetaRecord.scala:238: error: type mismatch; [WARNING] found : net.liftweb.util.Box[net.liftweb.util.Box [net.liftweb.record.OwnedField[BaseRecord]#MyType]] [WARNING] required: Iterable[?] [WARNING] Note that implicit conversions are not applicable because they are ambiguous: [WARNING] both method box2Iterable in object Box of type [T] (net.liftweb.util.Box[T])Iterable[T] [WARNING] and method box2Iterable in object Box of type [T] (net.liftweb.util.Box[T])Iterable[T] [WARNING] are possible conversion functions from net.liftweb.util.Box [net.liftweb.util.Box[net.liftweb.record.OwnedField[BaseRecord] #MyType]] to Iterable[?] [WARNING]field - inst.fieldByName(k.toString)) yield field.setFromAny(v) [WARNING]^ [WARNING] one error found On Mar 29, 1:59 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: Very nice :) On Sun, Mar 29, 2009 at 6:07 AM, Marius marius.dan...@gmail.com wrote: Folks, I just committed the Record/JSON conversion support. Here is a simple example: import net.liftweb.record.field._ import java.util._ object Main { def main(args : Array[String]) : Unit = { val rec = MyRecordMeta.createRecord.firstName(McLoud) // Change an existing record with the values from a given json val json = {'firstName': 'Johnson', 'birthDay': 'Sun, 29 Mar 2009 11:41:53 UTC', 'cars': 3, 'lastName': 'Doe'} rec.fromJSON(json) println(rec.birthDay.value.getTime) println(rec.firstName) println(rec.cars) // Construct a record out of the json(opne_! is used only for exemplification :)...) val rec2 = MyRecordMeta.createRecord(json).open_! println(rec2.firstName) println(rec2.birthDay.value.getTime) } } class MyRecord extends Record[MyRecord] { def meta = MyRecordMeta object firstName extends StringField(this, Smith) object lastName extends StringField(this, John) object birthDay extends DateTimeField(this, Calendar.getInstance); object cars extends IntField(this, 1); } object MyRecordMeta extends MyRecord with MetaRecord[MyRecord] { override def mutable_? = false } Br's, Marius --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] lift on vista
Hi there I've followed the getting started guide and managed to create the helloworld app, but when I try and open http://localhost:8080, the page is empty.. or rather, theres no connection. I can see that the jetty server is running though.. Any known problems with vista regarding lift or jetty? Or any suggestions otherwise? I've tried shutting down the firewall.. --~--~-~--~~~---~--~~ 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] importing model - permanently hidden?
I have two models in separate .scala files. One of them is a ForeignKey to the other. The problem I'm having is that it won't let me import the Foreign model, since I have not defined a companion object. And if I do define a companion object, I get a NetBeans warning saying, imported `Courses` is permanently hidden by definition of object Courses in package model. What do I need to change? === Courses.scala === package com.n.hello.model import _root_.net.liftweb.mapper._ class Courses extends KeyedMapper[Long, Courses] { def primaryKeyField = id object id extends MappedLongIndex(this) object name extends MappedString(this, 25) } object Courses extends Courses with KeyedMetaMapper[Long, Courses] { } === Teachers.scala === package com.n.hello.model import _root_.net.liftweb.mapper._ // import model.Courses // -- problem if I add this line w/ or w/out companion object defined in Courses class Teachers extends KeyedMapper[String, Teachers] { def primaryKeyField = nick object nick extends MappedStringIndex(this, 10) object course_id extends MappedLongForeignKey(this, Courses) } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] lift on vista
Hi there I've followed the Lift getting started guide and created the hello world project with maven, but after i start with 'mvn jetty::run'´ and enter http://localhost:8080/ in my browser, nothing happens.. the page is not available.. any suggestions? I've tried turning of my firewall and changing the port jetty uses with no luck.. --~--~-~--~~~---~--~~ 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] scala:console and then boot call hangs
I feel like I'm spamming the mailing list with all of my questions. I apologize if they are too many. It would be nice to see more people in IRC since these messages are moderated and take a while to post. mvn scala:compile scala new net.liftweb.Boot().boot hangs until I kill it (but, mvn jetty:run always works) Any ideas why? Thanks, Bradford --~--~-~--~~~---~--~~ 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] Mapper, defaults, and not null
Is there a way to specify the default value on a table column with Mapper? And is there a way to specify that the table column is not null with the Mapper? Thanks, Bradford --~--~-~--~~~---~--~~ 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 on vista
You typed mvn jetty::run with two colons, is that a typo. Also, does the console say something like this: 2009-03-29 16:59:13.557::INFO: No Transaction manager found - if your webapp requires one, please configure one. 2009-03-29 16:59:15.258::INFO: Started selectchannelconnec...@0.0.0.0:8080 [INFO] Started Jetty Server [INFO] Starting scanner at interval of 5 seconds. ??? On Mar 29, 3:10 pm, vpalle fredrik.skeel.loe...@gmail.com wrote: Hi there I've followed the Lift getting started guide and created the hello world project with maven, but after i start with 'mvn jetty::run'´ and enterhttp://localhost:8080/in my browser, nothing happens.. the page is not available.. any suggestions? I've tried turning of my firewall and changing the port jetty uses with no luck.. --~--~-~--~~~---~--~~ 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: Mapper, defaults, and not null
Check out: http://github.com/dpp/liftweb/blob/f5a24da9309be6d515540c63237e094debe12932/lift-mapper/src/main/scala/net/liftweb/mapper/MappedField.scala You're looking for: defaultValue, object name extends MappedString(this, 100) { override def defaultValue = bradford } On Mar 29, 4:36 pm, bradford fingerm...@gmail.com wrote: Is there a way to specify the default value on a table column with Mapper? And is there a way to specify that the table column is not null with the Mapper? Thanks, Bradford --~--~-~--~~~---~--~~ 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:Menu.group
This can probably be improved (and I've done little testing on it), but I've come up with something to satisfy my description above: def group(template: NodeSeq): NodeSeq = { val default = S.attr(default).openOr() val active_attrs = S.prefixedAttrsToMetaData(active) val names = template \\ bind filter(_.prefix == menu) flatMap(_.attributes.get(name)) def bind(xml: NodeSeq, currentPage: String): NodeSeq = { xml.flatMap { node = node match { case s : Elem if (node.prefix == menu node.label == bind) = { node.attributes.get(name) match { case None = bind(node.child, currentPage) case Some(ns) = { SiteMap.findLoc(ns.text) match { case Full(location) = val link: Elem = a href={location.createDefaultLink}{location.linkText.openOr()}/a // location.createDefaultLink.toList.firstOption.getOrElse(a / ).asInstanceOf[Elem] if (ns == currentPage) link % anchorAttributes(node.attributes) % active_attrs else link % anchorAttributes(node.attributes) case _ = bind (node.child, currentPage) } } } } case Group(nodes) = Group(bind(nodes, currentPage)) case s : Elem = Elem(node.prefix, node.label, node.attributes,node.scope, bind(node.child, currentPage) : _*) case n = node } } } for (request - S.request.toList; loc - request.location.toList) yield { val currentPage: String = if (names.contains(loc.name)) loc.name else default println(currentPage + currentPage) Group(bind(template, currentPage)) } } private def anchorAttributes(attributes : MetaData) : MetaData = { val amap = Map() ++ attributes.flatMap(attr = attr match { case ua : PrefixedAttribute = ua.pre match { case a = List(ua.key - ua.value.first.toString) case _ = Nil } case _ = Nil }) S.mapToAttrs(amap) } On Mar 28, 11:59 am, bradford fingerm...@gmail.com wrote: Hi Derek, Cool. I will still use your changes, but for this task I will need what I have described above. This will give me the ability to set attributes to the selected item or default to a selected item if there is no match. For example, let's say I have archives, music, and movies. If I am on music, I want to set a selected class or style on it. But if I embed movies into home, there will be no matches so I want it to default to movies. Thanks for your help and work, Bradford On Mar 28, 11:53 am, Derek Chen-Becker dchenbec...@gmail.com wrote: Argh, stupid mistake on not capturing attrs. I'm pushing a fix up to git in about 10 minutes. With this fix, is there still a reason that you need to build your own MyMenu.group snippet? Derek On Fri, Mar 27, 2009 at 7:02 PM, bradford fingerm...@gmail.com wrote: Derek, I saw the changes and noticed that it doesn't capture the a attributes anymore. I just wanted to point it out, because I wasn't sure if that was intended or not. Ok, I finally came up with a design for what I'm looking for: lift:MyMenu.group active:class=selected default=home limenu:bind name=home a:id=home //li limenu:bind name=archives a:id=archives //li limenu:bind name=music a:id=music a:style=margin-left: 10px; //li /lift:MyMenu.group I originally was going to try menu:home / and menu:archives / instead since I could probably just call bind straight up on them, but I couldn't figure out how to extract these sub-elements since they are prefixed. Regards, Bradford On Mar 27, 1:57 am, Derek Chen-Becker dchenbec...@gmail.com wrote: It's in trunk now. Add the donthide attribute to your Menu.item tags and you'll get the same text as you would normally, just not in link form. Derek On Wed, Mar 25, 2009 at 4:31 PM, bradford fingerm...@gmail.com wrote: Derek, that'll work :) Thanks, Bradford On Mar 25, 6:13 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: That seems reasonable to me. That's actually what the Menu.builder does, essentially. I don't think we want to modify the default behavior, but I could make it a donthide attribute instead of always
[Lift] annoying blanks at the line ends - another conversion error in the html version
the first maven call contains superfluous line breaks. This doesn't look very nice. The second maven call contains superfluous blanks. Both make copy-paste of the respective code impossible. mvn archetype:generate -U \ -DarchetypeGroupId=net.liftweb \ -DarchetypeArtifactId=lift-archetype-blank \ -DarchetypeVersion=1.0 \ -DremoteRepositories=http://scala-tools.org/repo-releases \ -DgroupId=demo.helloworld \ -DartifactId=helloworld \ -Dversion=1.0-SNAPSHOT mvn archetype:generate -U \ -DarchetypeGroupId=net.liftweb \ -DarchetypeArtifactId=lift-archetype-basic \ -DarchetypeVersion=1.0 \ -DremoteRepositories=http://scala-tools.org/repo-releases \ -DgroupId=com.liftworkshop \ -DartifactId=todo \ -Dversion=0.1-SNAPSHOT --~--~-~--~~~---~--~~ 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: chadwskinner
On Sat, Mar 28, 2009 at 3:54 PM, Chad Skinner chadwskin...@gmail.comwrote: Yes. I've got a backlog of stuff to do a mile long. Don't expect anything on this item before Wednesday. David, Is this backlog something that is public or something we can read. I'm hoping to get a better idea of how things work (Lift, OSGi, application architecture / design, integration, etc. ) and how others with more experience think with regard to these issues. Since there are only two of us and not a lot of funding for training I do a lot of reading and it helps me learn ... I think ... Between finishing Beginning Scala, doing QCon London and The Server Side and having sick kids, I have gotten very behind on many things in Lift-land, for my clients, and in my non-Scala-related life. So, no my backlog is not public and it's mostly non-Lift related. -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp --~--~-~--~~~---~--~~ 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] Scaladocs not updating?
I checked in some fairly large revisions to the built-in menu snippet Scaladocs, but it's not showing up on scala-tools.org. I confirmed that it's in there on GitHub, so I was wondering if the Hudson job maybe doesn't automatically build the docs? 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: importing model - permanently hidden?
I don't have an answer, but does it work if you import model._ ? Derek On Sun, Mar 29, 2009 at 12:23 PM, bradford fingerm...@gmail.com wrote: I have two models in separate .scala files. One of them is a ForeignKey to the other. The problem I'm having is that it won't let me import the Foreign model, since I have not defined a companion object. And if I do define a companion object, I get a NetBeans warning saying, imported `Courses` is permanently hidden by definition of object Courses in package model. What do I need to change? === Courses.scala === package com.n.hello.model import _root_.net.liftweb.mapper._ class Courses extends KeyedMapper[Long, Courses] { def primaryKeyField = id object id extends MappedLongIndex(this) object name extends MappedString(this, 25) } object Courses extends Courses with KeyedMetaMapper[Long, Courses] { } === Teachers.scala === package com.n.hello.model import _root_.net.liftweb.mapper._ // import model.Courses // -- problem if I add this line w/ or w/out companion object defined in Courses class Teachers extends KeyedMapper[String, Teachers] { def primaryKeyField = nick object nick extends MappedStringIndex(this, 10) object course_id extends MappedLongForeignKey(this, Courses) } --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---