Oh yeah :-|  - thanks. The XML literal syntax is still a bit foreign.
When I just tried that I was getting:

ambiguous reference to overloaded definition

It was due to track.viewUrl being a mapper field - so
track.viewUrl.toString fixed it. Not a fan of the extra verbosity but
that way of creating the link is what I needed - thanks!



On Jul 13, 7:55 am, "marius d." <[email protected]> wrote:
> :) it is possible
>
>       bind("track", xhtml,
>         "name" -> Text(track.name),
>         "viewUrl" -> <a href={track.viewUrl}>{track.viewUrl}</a>
>       )
>
> Br's,
> Marius
>
> On Jul 13, 2:28 pm, chrislewis <[email protected]> wrote:
>
> > It's a value known at runtime; iie queried from a database, so that's
> > impossible. I
>
> > On Jul 13, 2:28 am, "marius d." <[email protected]> wrote:
>
> > > Just use <a href="">your text here</a>
>
> > > Br's,
> > > Marius
>
> > > On Jul 13, 1:26 am, chrislewis <[email protected]> wrote:
>
> > > > Hello list,
>
> > > > I need to generate a link from a field in a database. SHtml.link. I'm
> > > > using bind like so:
>
> > > >     Track.findAll.flatMap(track =>
> > > >       bind("track", xhtml,
> > > >         "name" -> Text(track.name),
> > > >         "viewUrl" -> link(track.viewUrl, () => { println
> > > > ("clicked!?") }, Text(track.name))
> > > >       )
> > > >     )
>
> > > > This works, but 1) I don't want to supply a function to handle the
> > > > click (it's purely external) and 2) lift is appending a generated
> > > > query parameter to the link (like ?F1127503780829KJK=_). Is there some
> > > > other way to create an external link? ExtLink won't work because I
> > > > need this in binding contexts. Thanks!

--~--~---------~--~----~------------~-------~--~----~
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