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
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
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)
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
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
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:
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