scala - Lift CRUD "list all" problem -


i'm trying follow this tutorial. i've got non empty db. table not propagated. tried debugging it: correct records returned toshow method, on each iteration of flatmap has correct, non-empty instance of item, result, method returns this: list(\n{16 spaces here},\n{16 spaces here}). , table not propagated. updated code follows:

listcar snippet:

class listcar {    def list(xhtml: nodeseq) : nodeseq = {     toshow.flatmap(car =>       bind("car", xhtml,         "name" -> car.name.is,         "owner" -> car.owner.name       )     )   }    private def toshow = {     car.findall();   }  } 

list.xhtml:

<table>     <thead>     <tr>         <th>name</th>         <th>owner</th>     </tr>     </thead>      <tbody>         <lift:list_car.list>             <tr>                 <td>                     <car:name/>                 </td>                  <td>                     <car:owner/>                 </td>             </tr>         </lift:list_car.list>     </tbody> </table> 

what problem here?

see example here (in bottom): http://www.assembla.com/spaces/liftweb/wiki/view_first . unfortunately can't try code right now. may try 2 more options:

  1. replace "name" -> car.name.is "name" --> car.name (--> instead of ->)
  2. replace "name" -> car.name.is "name" -> shtml.text(car.name.is)

Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -