<table class="lift:MySnippet"> <thead> <tr><th id="my_th">Field Name</th></tr> </thead> <tbody> <tr id="my_tr"><td>An item</td></tr> </tbody> </table>
object MySnippet { def render = { val (fieldNames: List[String], fieldValues: List[List[String]]) = DB.runQuery(...) "#my_th *" #> fieldNames & "#my_tr *" #> fieldValues.map(values => "td *" #> values) } }
(C) 2012 David Pollak