Skip to content

Instantly share code, notes, and snippets.

@jami-i
Created June 13, 2012 11:45
Show Gist options
  • Save jami-i/2923597 to your computer and use it in GitHub Desktop.
Save jami-i/2923597 to your computer and use it in GitHub Desktop.
Play2.0でListを持ったパラメータをバインドする
case class User(name: String, addresses: List[Address])
case class Address(street: String, city: String)
val f = Form(
mapping(
"name" -> text,
"addresses" -> list(
mapping(
"street"-> text,
"city" -> text
)(Address.apply)(Address.unapply)
)
)(User.apply)(User.unapply)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment