I think that I don't understand the flow, maybe the error appears
because PaginaMarca can't
instantiate some value (for example "val id").
Well myClass2 is an invented name, I'll post the real code, but not
all (yes I suppose that the
problem will be in the no-pasted zone :p ):
class PaginaMarca extends BindHelpers {
val id = S.param("id").openOr("-1").toLong
def pagina : Int = try {
S.param("numero").openOr("no es un numero").toInt
} catch {
case nfe : NumberFormatException => 1
}
/*
* Estas son las marcas que queremos mostrar en los banners
*/
def listaMarcas (xhtml : NodeSeq) : NodeSeq = {
var marcas = (162, "giantmicrobes") ::
(178, "thumbthing") ::
(177, "invicta") ::
(181, "leatherman") ::
(149, "hotworks") ::
(179, "surefire") ::
(146, "techtionary") ::
(268, "no_starch_press") ::
Nil
marcas.flatMap( marca => bind("marca",xhtml,
"html" --> <li>
<a href={"/marca/"+ marca._1} title=
{"Buscar productos de " + marca._2}>
<img src={"http://
static.simpleoption.com/imagenes/marcas/nombres/"+marca._2+".png"} alt=
{"Logo de "+marca._2}/>
</a>
</li>))
}
}
On 2 sep, 16:36, David Pollak <
feeder.of.the.be...@gmail.com> wrote:
> Please post the source for myClass2
>
>
>
> On Wed, Sep 2, 2009 at 9:16 AM, José María <
josemariar...@gmail.com> wrote:
>
> > Hi.
>
> > I've a snippet in one of my HTML files and inside of it I put another
> > snippet like this:
>
> > <lift:myClass1.func>
> > <lift:myClass2.func2>
> > Hi
> > </lift:myClass2.func>
> > </lift:myClass1.func>
>
> > If I do that I get the error:
>
> > Error processing snippet myClass2:func2. Reason: Exception During
> > Snippet Instantiation
> > XML causing this error:
>
> > <lift:myClass2.func2>
> > Hi
> > </lift:myClass2.func2>
>
> > Following doc I put eager_eval="true" in <lift:myClass1.func> but I
> > got the same error.
>
> > What am I doing wrong?
>
> > Best regards.
>
> --
> Lift, the simply functional web frameworkhttp://
liftweb.net
> Beginning Scalahttp://
www.apress.com/book/view/1430219890