Is it possible to use Lift's CSS Selector Transforms together with DispatchSnippet? It does not seem to work for me.
1 Answer
Answering my own question... yeah, it is possible! My problem was the following: Snippet methods have to be of the type NodeSeq => NodeSeq but CSS Transformations return a () => CSSSel. A CSSSel is itself NodeSeq => NodeSeq, so the CSS Transformation is () => (NodeSeq => NodeSeq).
That means, in order to use it with DispatchSnippet it must be referenced like this in the dispatcher:
def dispatch: DispatchIt = {
case "method1" => normalSnippetMethod _
case "method2" => cssTransform // no _ !
}
Basically, I just had an extra _ sign at the end.
1 Comment
nafg
Css transformations are not () => NodeSeq => NodeSeq. Can you show more of your code?