I had that problem a number of times and the fix was changing
"bindlabel" -> entity.field
which uses implicits, to
... entity.field.is
and/or
... entity.field.toString

-------------------------------------
hexa<hex...@gmail.com> wrote:

Seems to work now I had a maybe weird way of getting an attribute from
a box...

I will try that next time

Thanks!


On Mar 8, 10:37 pm, "David Pollak"<feeder.of.the.be...@gmail.com>
wrote:
> Try doing and mvn clean compile
>
> There are known issues with the Scala 2.7.x compiler related to nested traits 
> and only partial recompilation.
>
> Connected by MOTOBLUR™ on T-Mobile
>
> -----Original message-----
> From: hexa <hex...@gmail.com>
> To: Lift <liftweb@googlegroups.com>
> Sent: Tue, Mar 9, 2010 03:15:31 GMT+00:00
> Subject: [Lift] Re: asHtml compiler exception traversing code ?
>
> Wow it seems that I now get that even without the asHtml...
>
> Using scala 2.7.7 with lift 1.1-M8 ...
>
> On Mar 8, 9:51 pm, hexa <hex...@gmail.com> wrote:
> > Hi all,
>
> >  I have this code :
>
> > class ViewClient
> > {
> >   val clientId = S.param ("id") openOr ""
>
> >   val client = try {
> >     Client.findByKey (clientId.toLong)
> >   }
> >   catch {
> >     case e:NumberFormatException => Empty
> >   }
>
> >   def view (inhtml: NodeSeq) : NodeSeq = {
>
> >     client map ( { c =>
> >       bind ("client", inhtml,
> >             "firstName" -> c.firstName,
> >             "lastName" -> c.lastName)
> >                } )  openOr Text ("Client invalide")
>
> >   }
>
> > }
>
> > class Client extends LongKeyedMapper [Client] with IdPK with OneToMany
> > [Long, Client]
> > {
> >   def getSingleton = Client
>
> >   object firstName extends MappedString (this, 256)
> >   object lastName extends MappedString (this, 256)
>
> > A fairly simple view ...
>
> > I would like to call :
> >     "firstName" -> c.firstName.asHtml
>
> > It would seem appropriate to me since c is a Client ...
>
> > But I get :
>
> > INFO] exception when traversing ((x$2: com.envirobiz.model.Client) => x
> > $2.firstName)
> > [INFO] exception when traversing client.map[object
> > com.envirobiz.model.Client#firstName](((x$2:
> > com.envirobiz.model.Client) => x$2.firstName))
> > [INFO] exception when traversing client.map[object
> > com.envirobiz.model.Client#firstName](((x$2:
> > com.envirobiz.model.Client) => x$2.firstName)).toString
> > [INFO] exception when traversing client.map[object
> > com.envirobiz.model.Client#firstName](((x$2:
> > com.envirobiz.model.Client) => x$2.firstName)).toString()
>
> > And more... until :
>
> > [ERROR] scala.tools.nsc.symtab.Types$TypeError: type mismatch;
> > [INFO]  found   : x$2.firstName.type (with underlying type object x
> > $2.firstName)
> > [INFO]  required: com.envirobiz.model.Client#firstName.type
>
> > If I do not do asHtml it works properly...
>
> > Also this works in other contexts like :
>
> >  toShow.flatMap (client =>
> >       bind ("client", inhtml,
> >             "firstName" -> client.firstName.asHtml,
>
> > In another list view ..  so i'm confused ...
>
> > Any ideas ?
>
> > Thanks
>
> > hexa
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to 
> liftweb+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/liftweb?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.

Reply via email to