[Lift] Re: Rails -> Lift

2009-04-10 Thread Alexander Kellett
well, fwiw :P i eventually chose ideavim with intellij. best of both worlds. thanks all for the input! On Thu, Apr 9, 2009 at 10:20 PM, TylerWeir wrote: > > It's not an editor/IDE war unless someone brings up Vim or Emacs, > so... > > I've been using Vim+Scala+Ctags since I started. > > I'd reco

[Lift] Re: Rails -> Lift

2009-04-10 Thread Timothy Perrett
I think a lot of people coming to scala from ruby are more familiar with the terminal and textmate style combination... using large IDE's with boat loads of features is more for people coming from a traditional java background. Thats not to say they don't have merit, of course they do, but I think

[Lift] Small archetype bug?

2009-04-10 Thread Tim Perrett
Just looked at the blank archetype because im wanting to build another one for my own purposes and noticed that there is a "lib" dir in the resources for the archetype, but its never actually created upon generation. Its not seriously important or anything but just an observation... --~--~---

[Lift] Re: Big Domain Model - Lift and Persistence

2009-04-10 Thread Tim P
more a scala question this: but with the JPA can I create Traits that encapsulate the annotations for example an Id trait that includes @Id. Any obvious drawbacks in doing so? Thanks Tim --~--~-~--~~~---~--~~ You received this message because you are subscribed to

[Lift] Re: Rails -> Lift

2009-04-10 Thread David Pollak
I think this thread points out something important about Lift... what matters most is what works for you. There are plenty of people on this list that use one editor or another... use mapper or JPA... use lots of comet/ajax or use very little. The only thing that's right is what works for you...

[Lift] Re: Big Domain Model - Lift and Persistence

2009-04-10 Thread Derek Chen-Becker
I've only ever done something like this with the joined subclass support in JPA, so I don't know if using raw traits for independent classes would work. Easy to test, though. Derek On Fri, Apr 10, 2009 at 5:38 AM, Tim P wrote: > > more a scala question this: but with the JPA can I create Traits

[Lift] Re: Rails -> Lift

2009-04-10 Thread Ben Diola
Does anyone know how to get a console in netbeans that I can run mvn scala:cc? On Apr 10, 8:12 am, David Pollak wrote: > I think this thread points out something important about Lift... what > matters most is what works for you.  There are plenty of people on this list > that use one editor or

[Lift] Re: Object typecast to Mapper

2009-04-10 Thread David Pollak
I think the .asJs method on all Mapper instances should give you the object in JavaScript representation. If you can post an entire file, I can work on helping you if the above doesn't work. On Thu, Apr 9, 2009 at 6:53 AM, Amit Kumar Verma wrote: > > copied the the same code but getting this erro

[Lift] directives versus snippets

2009-04-10 Thread bob
if I see , it could mean one of two things: a directive, e.g., or or shorthand for a snippet, eg represents i guess I would like to see these disambiguated a shorthand for snippets that doesn't overlap with the directive namespace. some possible solutions: 1. would be the directive and wo

[Lift] Re: directives versus snippets

2009-04-10 Thread David Pollak
Bob, They are actually the same thing. Lift's processing directives are simply built-in snippets. You can, if you dare, override their functionality. :-) Thanks, David On Fri, Apr 10, 2009 at 11:23 AM, bob wrote: > > if I see , it could mean one of two things: a directive, > e.g., or or sh

[Lift] Re: directives versus snippets

2009-04-10 Thread bob
ok, Jorge told me on IRC that bind and surround are hard-coded 11:16 bobinator so,if maps to Class HelloWorld#howdy,i assume and map to Class Bind and Class Msgs, with some special sauce for the method? 11:15 jorgeortiz85 actually, all the directives could be implemented as snippets 11:16 jorge

[Lift] Re: directives versus snippets

2009-04-10 Thread Jorge Ortiz
Huh? lift: snippet, surround, embed, ignore, comet, children, a, form, loc, and with-param are all built-in in liftTagProcessing. Yes, they're overrideable, but imo it'd be nicer if they were Just A Snippet, like, say, lift:msgs. lift:bind is just bad naming. it's not actually a directive, it's j

[Lift] Re: directives versus snippets

2009-04-10 Thread David Pollak
Who you gonna believe? :-) There's a dispatcher in Lift and it checks for user-supplied snippets before dispatching to the hard-coded snippet names. You can override the built-in names and there are a bunch of different snippet dispatch mechanisms (by convention, by partial function, hard-coded)

[Lift] Re: directives versus snippets

2009-04-10 Thread David Pollak
On Fri, Apr 10, 2009 at 11:31 AM, Jorge Ortiz wrote: > Huh? > > lift: snippet, surround, embed, ignore, comet, children, a, form, loc, and > with-param are all built-in in liftTagProcessing. Yes, they're overrideable, > but imo it'd be nicer if they were Just A Snippet, like, say, lift:msgs. It

[Lift] Re: Snippets; having trouble with a simple example

2009-04-10 Thread David Pollak
On Wed, Apr 8, 2009 at 4:13 PM, Douglas F Shearer wrote: > > I've found the solution to this. It seems that for some reason I > needed to provide the return type on the posts method, as so: > > def posts(html: NodeSeq): NodeSeq = { > ... > > Odd it should fail in such a manner without it, I would

[Lift] Re: directives versus snippets

2009-04-10 Thread bob
done. thanks guys On Apr 10, 11:36 am, David Pollak wrote: > On Fri, Apr 10, 2009 at 11:31 AM, Jorge Ortiz wrote: > > Huh? > > > lift: snippet, surround, embed, ignore, comet, children, a, form, loc, and > > with-param are all built-in in liftTagProcessing. Yes, they're overrideable, > > but im

[Lift] Re: Small archetype bug?

2009-04-10 Thread Timothy Perrett
Ignore me... im being dumb! Basic archetype has lib but the blank one doesnt. I'll add a lib dir to blank archetype tomorrow. Cheers, Tim On Apr 10, 12:22 pm, Tim Perrett wrote: > Just looked at the blank archetype because im wanting to build another > one for my own purposes and noticed that t

[Lift] Re: Small archetype bug?

2009-04-10 Thread David Bernard
Why adding a lib dir if it's useless ? /davidB On Fri, Apr 10, 2009 at 21:01, Timothy Perrett wrote: > > Ignore me... im being dumb! Basic archetype has lib but the blank one > doesnt. I'll add a lib dir to blank archetype tomorrow. > > Cheers, Tim > > On Apr 10, 12:22 pm, Tim Perrett wrote: >

[Lift] Re: Small archetype bug?

2009-04-10 Thread David Pollak
I put non-Lift related logic stuff in lib. On Fri, Apr 10, 2009 at 12:23 PM, David Bernard wrote: > Why adding a lib dir if it's useless ? > > /davidB > > > On Fri, Apr 10, 2009 at 21:01, Timothy Perrett wrote: > >> >> Ignore me... im being dumb! Basic archetype has lib but the blank one >> doesn

[Lift] Re: Small archetype bug?

2009-04-10 Thread Timothy Perrett
Agreed - this is exactly what I think most people do. On 10/04/2009 20:25, "David Pollak" wrote: > I put non-Lift related logic stuff in lib. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Lift" group. To pos

[Lift] Re: Big Domain Model - Lift and Persistence

2009-04-10 Thread Charles F. Munat
I've been wondering about this, too, but too busy to experiment. Please post your results if you try it. Chas. Derek Chen-Becker wrote: > I've only ever done something like this with the joined subclass support > in JPA, so I don't know if using raw traits for independent classes > would work

[Lift] (created|updated|deleted)_(by|at) trait

2009-04-10 Thread Franz Bettag
Hey guys, i had the (simple) idea of creating a trait for these fields: object created_by extends MappedLongForeignKey(this, User) object created_at extends MappedDateTime(this) object updated_by extends MappedLongForeignKey(this, User) object updated_at extends MappedDateTime(this) ob

[Lift] Re: (created|updated|deleted)_(by|at) trait

2009-04-10 Thread David Pollak
The not overly helpful answer... please look for the IdPK trait... you can see how to do stuff like this. If you're still stuck, I'll provide a more helpful answer. On Fri, Apr 10, 2009 at 4:39 PM, Franz Bettag wrote: > > Hey guys, > > i had the (simple) idea of creating a trait for these fields

[Lift] Re: (created|updated|deleted)_(by|at) trait

2009-04-10 Thread Franz Bettag
The trait as in http://scala-tools.org/scaladocs/liftweb/1.0/net/liftweb/mapper/Mapper.scala.html (line 296): trait IdPK extends BaseLongKeyedMapper { def primaryKeyField = id object id extends MappedLongIndex[MapperType](this.asInstanceOf [MapperType]) } i don't know how MapperType works,

[Lift] Re: (created|updated|deleted)_(by|at) trait

2009-04-10 Thread Franz Bettag
Ah, i tried a bit more, now it works ;) trait BaseModel extends BaseLongKeyedMapper { object created_by extends MappedLongForeignKey(this.asInstanceOf [MapperType], User) object created_at extends MappedDateTime(this.asInstanceOf [MapperType]) object updated_by extends MappedLongForeignKey

[Lift] Re: (created|updated|deleted)_(by|at) trait

2009-04-10 Thread Clemens Oertel
Hi Franz, Here's what I did, roughly: trait TimeStamped[OwnerType <: ExtMapper[OwnerType]] { this: ExtMapper[OwnerType] => private val thisTyped = this.asInstanceOf[MapperType] object createdOn extends ExtMappedDateTime(thisTyped) with LifecycleCallbacks { override def beforeCr

[Lift] stateful vs stateless snippet

2009-04-10 Thread Oliver Lambert
I have a stateful snippet that doesn't always appear to work with the back button. Sometimes, when the back button is used, a new stateful snippet instance appears to be created. Has this happened to anyone else? Anyway, I've converted what I had to use a SessionVar to store the state. Should I re