Sure, I know this :)
But what about CSS etc, how can they then become resolvable / includable in html (and/or scala view) code?
Thanks
TimTim,
Look in LiftRules for SnippetDispatchPF
Yes, you can dispatch snippets to objects defined in other JARs.
Thanks,
David
On Mon, Mar 23, 2009 at 11:03 AM, Tim Perrett <tim...@getintheloop.eu> wrote:
Guys,
Has anyone got a good strategy for packaging up components of logic
within lift?
At our company we have a particular application that im writing some
really nice logic for inside lift and im wondering how I can package
that up and re-use it (short of copy and paste snippet files and the
various css / js files)?
I know we have a snippet search path, and thats cool as we can just
bundle a bunch of logic into seperate JARs, but what about view / UI
content? Perhaps some specially formated JAR layout with some kind of
extension to LiftRules that says "also look here for stuff"?
Thanks
Tim
When you say "reference", are you referring to a style-sheet link or
> You could have the CSS reference generated in the Snippet.
the *actual* CSS itself?
I've seen ViewDispatchPF before - it is still somewhat mystical to me
> You can also have views in code (see ViewDispatchPF) and do <lift:embed />
> in your code to refer to the Scala-based view code.
i'm afraid! I understand that its possible to create new views etc -
any chance you can just give a quick example of how to use
ViewDispatchPF? Something like:
LiftRules.viewDispatch.append {
case "some" :: "path" :: Nil => ???
}
Cheers, Tim