net.liftweb.mapper.view.ModelView

class ModelView

class ModelView[T <: Mapper[T]](val entity : T, val snippet : ModelSnippet[T])

 extends ScalaObject


A wrapper around a Mapper that provides view-related utilities. Belongs to a parent snippet.
author
- nafg


Source: ModelView.scala(80)

Direct Known Subclasses

ModelView,

 Constructors

def this(entity : T, snippet : ModelSnippet[T])

 Fields

editAction.. lazy val editAction TheBindParam
idString.. def idString
returns a string that represents the id, or <new> if the entity is a new entity [details]
If the entity has been saved then the id is determined as follows: If it is a KeyedMapper then it calls toString on the entity's primaryKeyField. Otherwise it calls toString on a field named "id."
String
redirectOnSave.. var redirectOnSave
If Some(string), will redirect to string on a successful save [details]
If None, will load the same page. Defaults to Some("list"). This var is used by ModelSnippet.onSave, which is a ModelView=>Unit
Option[String]
remove.. def remove
Delete the entity
Boolean
removeAction.. lazy val removeAction TheBindParam

 Methods

!=.. final def !=(arg0 : Any) Boolean Any
!=.. final def !=(arg0 : Object) Boolean AnyRef
==.. final def ==(arg0 : Object) Boolean AnyRef
==.. final def ==(arg0 : Any) Boolean Any
asInstanceOf.. final def asInstanceOf[T0] T0 Any
clone.. protected def clone Object AnyRef
edit.. def edit(name : String)
Returns a BindParam that binds "name" to the field named "name [details]
" If the field has a Full toForm implementation then that is used; otherwise its asHtml is called.
TheBindParam
eq.. final def eq(arg0 : Object) Boolean AnyRef
equals.. def equals(arg0 : Any) Boolean AnyRef
finalize.. protected def finalize Unit AnyRef
getClass.. final def getClass Class[Any] AnyRef
hashCode.. def hashCode Int AnyRef
isInstanceOf.. final def isInstanceOf[T0] Boolean Any
load.. def load
Loads this entity into the snippet so it can be edited
Unit
ne.. final def ne(arg0 : Object) Boolean AnyRef
newOrEdit.. def newOrEdit(xhtml : NodeSeq)
This function is used as a snippet in the edit view to provide alternate text depending on whether an existing entity is being edited or a new one is being created
NodeSeq
notify.. final def notify Unit AnyRef
notifyAll.. final def notifyAll Unit AnyRef
save.. def save
This method checks whether the entity validates; if so it saves it, and if successful redirects to the location specified by redirectOnSave, if any [details]
If save or validation fails, the appropriate message(s) is/are displayed and no redirect is performed.
Unit
synchronized.. final def synchronized[T0](arg0 : T0) T0 AnyRef
toString.. def toString String AnyRef
wait.. final def wait(arg0 : Long) Unit AnyRef
wait.. final def wait Unit AnyRef
wait.. final def wait(arg0 : Long, arg1 : Int) Unit AnyRef
Copyright (c) 2006-2010 WorldWide Conferencing, LLC. All Rights Reserved.