开发者

MappedBirthYear......ok, MappedBirthDay?? and MappedBirthMonth?

开发者 https://www.devze.com 2023-03-06 02:52 出处:网络
Greetings I\'m using MappedBirthYear in my signupXhtml object birth_year开发者_C百科 extends MappedBirthYear(this, 18) {

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

0

精彩评论

暂无评论...
验证码 换一张
取 消