Doh!, very sorry about that.
On Nov 2, 11:14 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
On Sun, Nov 1, 2009 at 2:00 PM, Randinn rand...@gmail.com wrote:
I'm trying to generate a list of users onto the screen but am unable
to see the model here's me code so far
package com.scalalist.project.snippet
import com.scalalist.project.model.User
import net.liftweb.util.BindHelpers._
import scala.xml._
class ListUser {
def list(html: NodeSeq) : NodeSeq = {
toShow.flatMap(item =
This should read:
toShow.flatMap(user =
bind(user, html,
firstName - user.firstName,
lastName - user.lastName,
email - user.email,
locale - user.locale,
timezone - user.timezone,
FuncAttrBindParam(view_href, _ =
Text(view/+ (user.primaryKeyField)),href),
FuncAttrBindParam(edit_href, _ =
Text(edit/+ (user.primaryKeyField)),href),
FuncAttrBindParam(delete_href, _ =
Text(delete/+ (user.primaryKeyField)),href)
)
)
}
private def toShow =
User.findAll();
}
__
lift:surround with=default at=content
table
thead
tr
thFirst Name/th
thLast Name/th
thEmail/th
thLocale/th
thTimezone/th
thView/th
thEdit/th
thDelete/th
/tr
/thead
tbody class=stripeMe
lift:ListUser.list
tduser:firstName//td
tduser:lastName//td
tduser:email//td
tduser:locale/
tduser:timezone//td
tda user:view_href=View/a/td
tda user:edit_href=Edit/a/td
tda user:delete_href=Delete/a/td
/tr
/lift:ListUser.list
/tbody
/table
/lift:surround
How can I get it to see the model objects? I've noticed ModelView
would that be a better way?
--
Lift, the simply functional web frameworkhttp://liftweb.net
Beginning Scalahttp://www.apress.com/book/view/1430219890
Follow me:http://twitter.com/dpp
Surf the harmonics
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---