Ah yeah it sure does, my quick test on the REPL used a single elem so it happened to work out:
scala> x.map(y => { <foo>{y}</foo> }) : NodeSeq res71: scala.xml.NodeSeq = <foo>1</foo><foo>2</foo><foo>3</foo> But bind: NodeSeq, not : Node or : Elem. -Ross On Sep 18, 2009, at 2:14 PM, Heiko Seeberger wrote: > Ross, > > I tries this yesterday and it did not work, but i must have been too > tired and screwed things up, because of course this is the way to go. > By the way: It has to be flatMap ;-) > > Thanks > > Heiko > > 2009/9/18 Ross Mellgren <dri...@gmail.com> > Oh I put in foreach, I should have said map ( questions.map(q => ... > { ) > > -Ross > > On Sep 18, 2009, at 11:35 AM, Ross Mellgren wrote: > >> Well I'm not sure what ID you want, but how about >> >> bind("question", xhtml, >> ... >> "row" -> { (ns: NodeSeq) => >> questions.foreach(q => { >> <tr id="someId">{ bind("question", ns, "id" -> >> q.id, ...) }</tr> >> } >> }) >> >> I'm presuming here that question:row will generate multiple rows, >> one for each question, but I'm not sure from your example. >> >> -Ross >> >> On Sep 18, 2009, at 3:05 AM, Heiko Seeberger wrote: >> >>> Hi, >>> >>> I would like to bind the following part form a template: >>> >>> <question:row> >>> <td><question:edit/> <question:delete/></td> >>> <td><question:id/></td> >>> <td><question:text/></td> >>> <td><question:answers/></td> >>> </question:row> >>> >>> The result should be a table row like that: >>> >>> <tr id="someId"> >>> <td>...</td> >>> ... >>> </tr> >>> >>> So in this case I want to replace the row-element itself (and add >>> an attribute value), but the contents (children) of the row- >>> element must be preserved! How can this be accomplished? >>> >>> Thank you! >>> >>> Heiko >>> >>> -- >>> My job: weiglewilczek.com >>> My blog: heikoseeberger.name >>> Follow me: twitter.com/hseeberger >>> OSGi on Scala: scalamodules.org >>> Lift, the simply functional web framework: liftweb.net >>> >>> >> > > > > > > > -- > Heiko Seeberger > > My job: weiglewilczek.com > My blog: heikoseeberger.name > Follow me: twitter.com/hseeberger > OSGi on Scala: scalamodules.org > Lift, the simply functional web framework: liftweb.net > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@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 -~----------~----~----~----~------~----~------~--~---