That did the trick! I apologize for the hubris of a newbie, but I think this is a bug in LiftWeb.
It was getting executed, but I guess with out the declaration, the result was not getting implicitly converted from List[Node] to NodeSeq. The framework was finding & executing the method, but because the returned value was not NodeSeq, it did not replace the HTML, I'm guessing. Lift should check & replace if the result any Seq[Node], not just NodeSeq. Should I report this as a bug? On Apr 4, 4:26 pm, Derek Chen-Becker <[email protected]> wrote: > Change your list def to > > def list(xhtml : NodeSeq) : NodeSeq = { ... > > If you don't explicitly set the return type to NodeSeq, sometimes things > don't get properly applied. > > Derek > > On Sat, Apr 4, 2009 at 2:55 PM, mgm <[email protected]> wrote: > > > I added some more debug prints. The list method appears to be doing > > what I expected, though the empty list elements are odd. > > > ============ AP.scala (extract) > > def list(xhtml: NodeSeq) = { > > System.err.println("*************** list: " + xhtml) > > val r = Airport.findAll.flatMap(ap => { > > System.err.println("ap=" + ap) > > bind("ap", xhtml, > > "code" -> ap.code, "lat" -> ap.lattitude, "lon" -> > > ap.longitude) > > }) > > System.err.println("*** r=" + r) > > r > > } > > > ============ console log =========== > > *************** list: > > <tr> > > <td><ap:code>XYZ</ap:code></td> > > <td><ap:lat>0</ap:lat></td> > > <td><ap:lon>To Do</ap:lon></td> > > </tr> > > > ap=com.flyspy.bf.model.Airport= > > {id=1,code=ORD,lattitude=50.0,longitude=-60.0} > > ap=com.flyspy.bf.model.Airport= > > {id=2,code=MSP,lattitude=40.0,longitude=-60.0} > > *** r=List( > > , <tr> > > <td>ORD</td> > > <td>50.0</td> > > <td>-60.0</td> > > </tr>, > > , > > , <tr> > > <td>MSP</td> > > <td>40.0</td> > > <td>-60.0</td> > > </tr>, > > ) > > WARN - Snippet Failure: SnippetFailure(/airports -> ParsePath(List > > (airports),,true,false),Full(AP.list),Method Not Found) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
