Frage

I am calling this snippet

package org.palantir.snippet
import net.liftweb._
import util._
import Helpers._
import scala.xml._

object Kitchens
{
  def render(html: NodeSeq) : NodeSeq = <p>test</p>
}

With this xml

      <lift:Kitchens>
      </lift:Kitchens>

And getting this error: Error processing snippet: kitchens Reason: Method Not Found
What am I missing?

War es hilfreich?

Lösung

This occurs because the HTML5 parser Lift uses converts all tag and attribute names to lowercase. It is recommended to use either: class="lift:Snippet" or data-lift="Snippet" to avoid that. This was not an issue with the older XHTML parser as that was case sensitive, so you will find some older documentation that invokes snippets as a tag.

You can find more information here.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top