On Tue, Apr 21, 2009 at 11:27 AM, Franz Bettag <i...@fbettag.de> wrote:

>
> Idea 8 doesn't even list that in the Override List, in addition it
> doesn't work.
> Maybe it's because i use it in a trait?


I don't think so.  Here's code that compiles just fine:

class User extends MegaProtoUser[User] {
  def getSingleton = User // what's the "meta" server

  // define an additional field for a personal essay
  object textArea extends MappedTextarea(this, 2048) {
    override def textareaRows  = 10
    override def textareaCols = 50
    override def displayName = "Personal Essay"

  override def dbDisplay_? = false
  }
}



>
>
> import java.util.Date
> import model._
> import net.liftweb.mapper._
>
> trait TimeStamped[OwnerType <: Stamped[OwnerType]] {
>  this: Stamped[OwnerType] =>
>
>  private val thisTyped = this.asInstanceOf[MapperType]
>
>  object createdOn extends MappedDateTime(thisTyped) with
> LifecycleCallbacks {
>    override def beforeCreate = this(new Date)
>    override def dbDisplay_? = false
>  }
>  object updatedOn extends MappedDateTime(thisTyped) with
> LifecycleCallbacks {
>    override def beforeCreate = this(new Date)
>    override def beforeUpdate = this(new Date)
>    override def dbDisplay_? = false
>   }
> }
>
> On 21 Apr., 20:05, David Pollak <feeder.of.the.be...@gmail.com> wrote:
> > Franz,
> > In the createdOn field:
> >
> > object createdOn extends MappedLong(this) {
> >   override def dbDisplay_? = false
> >
> > }
> >
> > This will exclude the field from display.
> >
> > Does this help?
> >
> > Thanks,
> >
> > David
> >
> >
> >
> > On Mon, Apr 20, 2009 at 7:19 PM, Franz Bettag <i...@fbettag.de> wrote:
> >
> > > Hey there,
> >
> > > is there any way to hide fields (createdOn/createdBy...) from CRUDify?
> >
> > > I was digging through the code since google didn't turn up anything
> > > useful for this topic, but i didn't find anything (may be the lack of
> > > my scala skill).
> >
> > > best regards
> >
> > > -franz
> >
> > --
> > Lift, the simply functional web frameworkhttp://liftweb.net
> > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > Follow me:http://twitter.com/dpp
> > Git some:http://github.com/dpp
>
> >
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to