Permalink
Browse files

Issue 1031 - Impossible to override MongoMapField.toForm

  • Loading branch information...
1 parent aa68597 commit d54b2587faadb3f2f4541f2cae5415032a605e00 @eltimn eltimn committed Jun 8, 2011
@@ -40,7 +40,7 @@ class MongoCaseClassField[OwnerType <: Record[OwnerType],CaseType](rec: OwnerTyp
def asXHtml = Text(value.toString)
- def toForm = Empty
+ def toForm: Box[NodeSeq] = Empty
override def defaultValue = null.asInstanceOf[MyType]
override def optional_? = true
@@ -85,7 +85,7 @@ class MongoCaseClassListField[OwnerType <: Record[OwnerType],CaseType](rec: Owne
def asXHtml = Text(value.toString)
- def toForm = Empty
+ def toForm: Box[NodeSeq] = Empty
override def defaultValue: MyType = Nil
override def optional_? = true
@@ -70,7 +70,7 @@ class MongoMapField[OwnerType <: BsonRecord[OwnerType], MapValueType](rec: Owner
case other => setBox(Failure("Error parsing String into a JValue: "+in))
}
- def toForm = Empty // FIXME
+ def toForm: Box[NodeSeq] = Empty
def asJValue = JObject(value.keys.map {
k =>
@@ -17,6 +17,7 @@ package record
package field
import java.util.regex.Pattern
+import scala.xml.NodeSeq
import net.liftweb.common.{Box, Empty, Failure, Full}
import net.liftweb.http.js.JE.{JsNull, Str}
@@ -62,7 +63,7 @@ class PatternField[OwnerType <: BsonRecord[OwnerType]](rec: OwnerType)
case other => setBox(Failure("Error parsing String into a JValue: "+in))
}
- def toForm = Empty
+ def toForm: Box[NodeSeq] = Empty
def asJs = asJValue match {
case JNothing => JsNull

0 comments on commit d54b258

Please sign in to comment.