MappedBirthYear......ok, MappedBirthDay?? and MappedBirthMonth?
Greetings
I'm using MappedBirthYear in my signupXhtml
object birth_year开发者_C百科 extends MappedBirthYear(this, 18) {
//
}
based on the api
http://scala-tools.org/mvnsites/liftweb-2.2/framework/scaladocs/lift-persistence/lift-mapper/src/main/scala/net/liftweb/mapper/MappedUniqueId.scala.html#Some%2851%29
What options do I have to put birth_day and birth_month, to set the date: dd/mm/aaaa, in my signupXhtml
help me please
object birth_month extends MappedInt(this) { // adapted from MappedUniqueId.scala
override def defaultValue = 1
override def _toForm: Box[NodeSeq] = {
val start = 1
val end = 31
Full(SHtml.selectObj((start to end).
toList.
map(y => (y, y.toString)),
Full(is), this.set) % ("id" -> fieldId))
}
}
or you simply take a MappedDate
…
精彩评论