[Lift] Re: A coupel of quick questions

2008-10-09 Thread Charles F. Munat
David Pollak wrote: If you're cool with looking up the snippet by class/method name use the plain old snippet. If you want some control before the method gets invoked (e.g., changing the behavior based on current session state), use the dispatch snippet. Is there a good example of this

[Lift] Re: A coupel of quick questions

2008-10-09 Thread Tim Perrett
Is there a good example of this in the example sites somewhere? I'm a bit confused but intrigued. http://github.com/dpp/liftweb/tree/master/sites/example/src/main/scala/net/liftweb/example/snippet/CountGame.scala That should help you get started Cheers, Tim

[Lift] Re: A coupel of quick questions

2008-10-09 Thread Charles F. Munat
OK, I have two mapped classes: class Page extends KeyedMapper[Long, Page] { def findPageSections: List[PageSection] = PageSection.findAll(PageSection.page, this.id) } and class PageSection extends KeyedMapper[Long, PageSection] { object page extends MappedLongForeignKey(this, Page)

[Lift] Re: A coupel of quick questions

2008-10-09 Thread Charles F. Munat
Very helpful. Thanks! Tim Perrett wrote: Is there a good example of this in the example sites somewhere? I'm a bit confused but intrigued. http://github.com/dpp/liftweb/tree/master/sites/example/src/main/scala/net/liftweb/example/snippet/CountGame.scala That should help you get started

[Lift] Re: A coupel of quick questions

2008-10-09 Thread David Pollak
Charles F. Munat wrote: OK, I have two mapped classes: class Page extends KeyedMapper[Long, Page] { def findPageSections: List[PageSection] = PageSection.findAll(PageSection.page, this.id) } and class PageSection extends KeyedMapper[Long, PageSection] { object page extends

[Lift] Re: A coupel of quick questions

2008-10-09 Thread Charles F. Munat
Ah! I thought that's what the QueryParams were, but they weren't in your original post so I was confused. Excellent. Thanks a lot. Chas. David Pollak wrote: Charles F. Munat wrote: OK, I have two mapped classes: class Page extends KeyedMapper[Long, Page] { def findPageSections:

[Lift] Re: A coupel of quick questions

2008-10-08 Thread David Pollak
On Tue, Oct 7, 2008 at 1:28 PM, Charles F. Munat [EMAIL PROTECTED] wrote: What is the benefit of the Dispatch Snippet over the Snippet? When would I use one and when the other? If you're cool with looking up the snippet by class/method name use the plain old snippet. If you want some