Hi all
I'm totally new to Lift (as well as Scala) and using the available
books and documentation online I'm developing my first app. So please
bear with me for my simplistic questions.
I'm trying to show an entity with a list of it's onetomany
relationship. Here's the code I have:
def listAll(xhtml: NodeSeq) = Serial.findAll.flatMap { a =>
bind("serie", xhtml,
"name" ->
a.name,
"episodes" -> a.episodes.map(_.name.toString).mkString(", ")
)}
<ul class="lift:Series.listAll">
<li><serie:name /> (<serie:episodes>)</li>
</ul>
The serie:name shows up but the episodes don't.
Can someone please tell me what .map(_.name.toString).mkString(", ")
does and how I can show this in the html?