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

Reply via email to