net.liftweb.mapper.view.ItemsList

trait ItemsList

trait ItemsList[T <: Mapper[T]]

 extends ScalaObject


Keeps track of pending adds to and removes from a list of mappers. Supports in-memory sorting by a field. Usage: override metaMapper with a MetaMapper instance, call sortBy to specify the field to sort by. If it is already sorted by that field it will sort descending, otherwise ascending. Call save to actualize changes.
author
- nafg


Source: TableEditor.scala(46)

 Fields

added.. var added
The list of items pending to be added to the database
List[T]
ascending.. var ascending
The sort direction
Boolean
current.. var current
The list of items that correspond to items in the database
List[T]
items.. def items
Returns the items (current + added - removed), sorted [details]
Sorting sorts strings case-insensitive, as well as Ordered and java.lang.Comparable. Anything else where both values are nonnull are sorted via their toString method (case sensitive)
Seq[T]
metaMapper.. abstract def metaMapper
The MetaMapper that provides create and findAll functionality etc [details]
Must itself be a T (the mapper type it represents)
T with MetaMapper[T]
removed.. var removed
The list of items to be deleted from current
List[T]
sortField.. var sortField
The field to sort by, if any
Option[MappedField[Any, T]]
sortNullFirst.. var sortNullFirst
Whether the sorting algorithm should put null first or last
Boolean

 Methods

!=.. final def !=(arg0 : Object) Boolean AnyRef
!=.. final def !=(arg0 : Any) Boolean Any
==.. final def ==(arg0 : Any) Boolean Any
==.. final def ==(arg0 : Object) Boolean AnyRef
add.. def add
Adds a new, unsaved item
Unit
asInstanceOf.. final def asInstanceOf[T0] T0 Any
clone.. protected def clone Object AnyRef
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
ne.. final def ne(arg0 : Object) Boolean AnyRef
notify.. final def notify Unit AnyRef
notifyAll.. final def notifyAll Unit AnyRef
refresh.. def refresh
Reloads the contents of 'current' from the database
Unit
reload.. def reload
Reset the ItemsList from the database: calls refresh, and 'added' and 'removed' are cleared
Unit
remove.. def remove(i : T)
Marks an item pending for removal
Unit
save.. def save
Sends to the database: added is saved removed is deleted (current - removed) is saved
Unit
sortBy.. def sortBy(field : MappedField[Any, T]) Unit
sortFn.. def sortFn(field : MappedField[Any, T]) () => Unit
synchronized.. final def synchronized[T0](arg0 : T0) T0 AnyRef
toString.. def toString String AnyRef
wait.. final def wait(arg0 : Long, arg1 : Int) Unit AnyRef
wait.. final def wait(arg0 : Long) Unit AnyRef
wait.. final def wait Unit AnyRef
Copyright (c) 2006-2010 WorldWide Conferencing, LLC. All Rights Reserved.