class ModelView[T <: Mapper[T]] extends AnyRef
A wrapper around a Mapper that provides view-related utilities. Belongs to a parent ModelSnippet.
- Alphabetic
- By Inheritance
- ModelView
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new ModelView(entity: T, snippet: ModelSnippet[T])
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
edit(name: String): CssSel
Returns a CssSel that binds the contents of an element with class ".<name>" to the field named
name
.Returns a CssSel that binds the contents of an element with class ".<name>" to the field named
name
. If the field has a Full toForm implementation then that is used; otherwise its asHtml is called. -
lazy val
editAction: CssSel
Returns a CssSel that binds a link to ".edit" to load and edit this entity
- var entity: T
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
def
idString: String
returns a string that represents the id, or <new> if the entity is a new entity.
returns a string that represents the id, or <new> if the entity is a new entity. 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."
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
load: Unit
Loads this entity into the snippet so it can be edited
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
newOrEdit: CssSel
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.
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
var
redirectOnSave: Option[String]
If Some(string), will redirect to string on a successful save.
If Some(string), will redirect to string on a successful save. If None, will load the same page. Defaults to Some("list"). This var is used by ModelSnippet.onSave, which is a ModelView=>Unit
-
def
remove: Boolean
Delete the entity
-
lazy val
removeAction: CssSel
Returns a CssSel that binds a link to ".remove" that contains a link to delete this entity
-
def
save: Unit
This method checks whether the entity validates; if so it saves it, and if successful redirects to the location specified by redirectOnSave, if any.
This method checks whether the entity validates; if so it saves it, and if successful redirects to the location specified by redirectOnSave, if any. If save or validation fails, the appropriate message(s) is/are displayed and no redirect is performed.
- val snippet: ModelSnippet[T]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )