Howdy,

Lift can do convention over configuration.  It can be a dangerous convention
to have any old method on a class be invoked, so when Lift does reflection
to determine which method to invoke on a snippet class, it only looks at the
public methods declared on the class.  You can update your snippet class to
a DispatchSnippet and write an explicit dispatch method to invoke the chosen
method.  It's a little more work, but as projects grow, it's the recommended
practice.

Thanks,

David

On Fri, May 15, 2009 at 4:02 AM, ivan <[email protected]> wrote:

>
> I have a snippet:
>
> class Naselja extends SimpleSifarnik[Naselje](new Naselje) {
> }
>
> that used to have a method that displayed some links on the page.
> Then I decided to move that snippet to SimpleSifarnik base class and
> it doesn't work any more.
>
> I can see this in the log:
> WARN - Snippet Failure: SnippetFailure(/pages/sifarnici/naselja/
> naseljaList -> ParsePath(List(pages, sifarnici, naselja,
> naseljaList),,true,false),Full(naselja.pager),Method Not Found)
>
> Adding override def pager(xhtml : NodeSeq) = super.pager(xhtml) to
> Naselja snippet fixes the problem but i don't understand why it
> doesn't wok without it.
>
> Thanks :)
>
>
>
>
> >
>


-- 
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to