Field labeled Entity
authorTomas Zeman <tzeman@volny.cz>
Thu, 12 Apr 2012 13:40:49 +0200
changeset 53 a014c89210de
parent 52 f40c67ede33d
child 54 1bdcadfac1be
Field labeled Entity
src/main/scala/fis/base/model/Entity.scala
--- a/src/main/scala/fis/base/model/Entity.scala	Thu Apr 12 13:37:04 2012 +0200
+++ b/src/main/scala/fis/base/model/Entity.scala	Thu Apr 12 13:40:49 2012 +0200
@@ -18,7 +18,7 @@
 import net.liftweb.record.{MetaRecord, Record}
 import net.liftweb.record.field._
 import net.liftweb.squerylrecord.KeyedRecord
-import net.tz.lift.model.OptionalFieldDisplay
+import net.tz.lift.model.{FieldLabel, OptionalFieldDisplay}
 import org.squeryl.annotations.Column
 
 /**
@@ -27,9 +27,9 @@
 trait Entity[OwnerType <: Record[OwnerType]] extends KeyedRecord[Long] {
   @Column(name="id")
   val idField = new LongField(this.asInstanceOf[OwnerType])
-  val name = new StringField(this.asInstanceOf[OwnerType], "")
+  val name = new StringField(this.asInstanceOf[OwnerType], "") with FieldLabel
   val note = new OptionalTextareaField(this.asInstanceOf[OwnerType], 10240)
-    with OptionalFieldDisplay
+    with OptionalFieldDisplay with FieldLabel
 
   /** Display representation of this entity. */
   def linkName = name.get