net.liftweb.mapper

CRUDify

trait CRUDify[KeyType, CrudType <: KeyedMapper[KeyType, CrudType]] extends Crudify

This trait automatically adds CRUD (Create, read, update and delete) operations to an existing MetaMapper object. Various methods can be overridden to customize which operations are available to a user and how things are displayed. For example, you can disable deletion of entities by overriding deleteMenuLoc to Empty.

Note: Compilation will fail if you try to mix this into a Mapper instead of the associated MetaMapper. You have been warned.

Self Type
CRUDify[KeyType, CrudType] with CrudType with KeyedMetaMapper[KeyType, CrudType]
Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. CRUDify
  2. Crudify
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. trait CrudBridge extends AnyRef

    This trait represents a Bridge between TheCrudType and the Crudify trait.

  2. trait FieldPointerBridge extends AnyRef

    Attributes
    protected
    Definition Classes
    Crudify
  3. type FieldPointerType = MappedField[_, CrudType]

    What's a field pointer for the underlying CRUDify

    What's a field pointer for the underlying CRUDify

    Definition Classes
    CRUDifyCrudify
  4. class MyBridge extends (CRUDify.this)#CrudBridge

    Attributes
    protected
  5. class MyPointer extends (CRUDify.this)#FieldPointerBridge

    Attributes
    protected
  6. type TheCrudType = CrudType

    What's the record type for the underlying CRUDify?

    What's the record type for the underlying CRUDify?

    Definition Classes
    CRUDifyCrudify

Abstract Value Members

  1. abstract def create: (CRUDify.this)#TheCrudType

    Vend a new instance of TheCrudType

    Vend a new instance of TheCrudType

    Definition Classes
    Crudify

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. lazy val CreateItem: String

    Definition Classes
    Crudify
  7. lazy val DeleteItem: String

    Definition Classes
    Crudify
  8. lazy val EditItem: String

    Definition Classes
    Crudify
  9. lazy val ListItems: String

    Definition Classes
    Crudify
  10. lazy val Prefix: List[String]

    Definition Classes
    Crudify
  11. lazy val ViewItem: String

    Definition Classes
    Crudify
  12. def _createTemplate: Elem

    The core template for creating.

    The core template for creating. Does not include any page wrapping.

    Definition Classes
    Crudify
  13. def _deleteTemplate: Elem

    The core template for deleting.

    The core template for deleting. Does not include any page wrapping.

    Definition Classes
    Crudify
  14. def _editTemplate: Elem

    The core template for editing.

    The core template for editing. Does not include any page wrapping.

    Attributes
    protected
    Definition Classes
    Crudify
  15. def _showAllTemplate: Elem

    The core template for showing record.

    The core template for showing record. Does not include any page wrapping

    Definition Classes
    Crudify
  16. def _viewTemplate: Elem

    The core template for viewing.

    The core template for viewing. Does not include any page wrapping.

    Definition Classes
    Crudify
  17. def addlMenuLocParams: List[AnyLocParam]

    If there are any Loc.

    If there are any Loc.LocParams that need to be added to every menu (e.g., a guard for access control of the Crudify screens)

    Attributes
    protected
    Definition Classes
    Crudify
  18. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  19. implicit def buildBridge(from: (CRUDify.this)#TheCrudType): (CRUDify.this)#CrudBridge

    This method will instantiate a bridge from TheCrudType so that the appropriate logical operations can be performed on TheCrudType

    This method will instantiate a bridge from TheCrudType so that the appropriate logical operations can be performed on TheCrudType

    Attributes
    protected
    Definition Classes
    CRUDifyCrudify
  20. implicit def buildFieldBridge(from: (CRUDify.this)#FieldPointerType): (CRUDify.this)#FieldPointerBridge

    Based on a FieldPointer, build a FieldPointerBridge

    Based on a FieldPointer, build a FieldPointerBridge

    Attributes
    protected
    Definition Classes
    CRUDifyCrudify
  21. def calcCreateItem: String

    Definition Classes
    Crudify
  22. def calcDeleteItem: String

    Definition Classes
    Crudify
  23. def calcEditItem: String

    Definition Classes
    Crudify
  24. def calcListItems: String

    Definition Classes
    Crudify
  25. def calcPrefix: List[String]

    What's the prefix for this CRUD.

    What's the prefix for this CRUD. Typically the table name

    Definition Classes
    CRUDifyCrudify
  26. def calcViewItem: String

    Definition Classes
    Crudify
  27. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. def computeFieldFromPointer(instance: (CRUDify.this)#TheCrudType, pointer: (CRUDify.this)#FieldPointerType): Box[BaseField]

    Given a field pointer and an instance, get the field on that instance

    Given a field pointer and an instance, get the field on that instance

    Attributes
    protected
    Definition Classes
    CRUDifyCrudify
  29. def createButton: String

    Definition Classes
    Crudify
  30. def createClass: String

    Definition Classes
    Crudify
  31. def createId: String

    Definition Classes
    Crudify
  32. def createMenuLoc: Box[Menu]

    The menu item for creating items (make this "Empty" to disable)

    The menu item for creating items (make this "Empty" to disable)

    Definition Classes
    Crudify
  33. def createMenuLocParams: List[AnyLocParam]

    Override to include new Params for the create menu

    Override to include new Params for the create menu

    Definition Classes
    Crudify
  34. def createMenuName: String

    Definition Classes
    Crudify
  35. lazy val createPath: List[String]

    Definition Classes
    Crudify
  36. lazy val createPathString: String

    Definition Classes
    Crudify
  37. def createTemplate(): NodeSeq

    This is the template that's used to render the page after the optional wrapping of the template in the page wrapper.

    This is the template that's used to render the page after the optional wrapping of the template in the page wrapper.

    Definition Classes
    Crudify
  38. def crudAllNext(first: Long, list: List[(CRUDify.this)#TheCrudType])(in: NodeSeq): Node with Serializable { def child: Seq[scala.xml.Node] }

    Override this method to change how the next link is generated

    Override this method to change how the next link is generated

    Attributes
    protected
    Definition Classes
    Crudify
  39. def crudAllPrev(first: Long)(in: NodeSeq): Node with Serializable { def child: Seq[scala.xml.Node] }

    Override this method to change how the previous link is generated

    Override this method to change how the previous link is generated

    Attributes
    protected
    Definition Classes
    Crudify
  40. def crudDoForm(item: (CRUDify.this)#TheCrudType, noticeMsg: String)(in: NodeSeq): NodeSeq

    Definition Classes
    Crudify
  41. def crudyDelete(item: (CRUDify.this)#TheCrudType)(html: NodeSeq): NodeSeq

    Override this method to change how the delete screen is built

    Override this method to change how the delete screen is built

    Attributes
    protected
    Definition Classes
    Crudify
  42. def deleteButton: String

    Definition Classes
    Crudify
  43. def deleteClass: String

    Definition Classes
    Crudify
  44. def deleteId: String

    Definition Classes
    Crudify
  45. def deleteMenuLoc: Box[Menu]

    The menu item for deleting an item (make this "Empty" to disable)

    The menu item for deleting an item (make this "Empty" to disable)

    Definition Classes
    Crudify
  46. def deleteMenuLocParams: List[LocParam[(CRUDify.this)#TheCrudType]]

    Override to include new Params for the delete menu

    Override to include new Params for the delete menu

    Definition Classes
    Crudify
  47. def deleteMenuName: String

    Definition Classes
    Crudify
  48. lazy val deletePath: List[String]

    Definition Classes
    Crudify
  49. lazy val deletePathString: String

    Definition Classes
    Crudify
  50. def deleteTemplate(): NodeSeq

    This is the template that's used to render the page after the optional wrapping of the template in the page wrapper

    This is the template that's used to render the page after the optional wrapping of the template in the page wrapper

    Definition Classes
    Crudify
  51. def displayHtml: NodeSeq

    Definition Classes
    Crudify
  52. def displayName: String

    Definition Classes
    Crudify
  53. def displayRecord(entry: (CRUDify.this)#TheCrudType)(in: NodeSeq): NodeSeq

    Customize the display of records for view menu loc

    Customize the display of records for view menu loc

    Attributes
    protected
    Definition Classes
    Crudify
  54. def doCrudAll(in: NodeSeq): NodeSeq

    Override this method if you want to change the behavior of displaying records via the crud.

    Override this method if you want to change the behavior of displaying records via the crud.all snippet

    Attributes
    protected
    Definition Classes
    Crudify
  55. def doCrudAllHeaderItems(in: NodeSeq): NodeSeq

    Override this method to customize how header items are treated

    Override this method to customize how header items are treated

    Attributes
    protected
    Definition Classes
    Crudify
  56. def doCrudAllRowItem(c: (CRUDify.this)#TheCrudType)(in: NodeSeq): NodeSeq

    Override this method to customize how a crudAll line is generated

    Override this method to customize how a crudAll line is generated

    Attributes
    protected
    Definition Classes
    Crudify
  57. def doCrudAllRows(list: List[(CRUDify.this)#TheCrudType])(in: NodeSeq): NodeSeq

    Override this method to determine how all the rows on a crud page are displayed

    Override this method to determine how all the rows on a crud page are displayed

    Attributes
    protected
    Definition Classes
    Crudify
  58. def doDeleteFields(item: (CRUDify.this)#TheCrudType)(html: NodeSeq): NodeSeq

    Override this method to change how fields are displayed for delete

    Override this method to change how fields are displayed for delete

    Attributes
    protected
    Definition Classes
    Crudify
  59. def doDeleteSubmit(item: (CRUDify.this)#TheCrudType, from: String)(): Nothing

    Override this method to change the behavior of deleting an item

    Override this method to change the behavior of deleting an item

    Attributes
    protected
    Definition Classes
    Crudify
  60. def doDisplayRecordRow(entry: (CRUDify.this)#TheCrudType)(in: NodeSeq): NodeSeq

    Customize the display of a row for displayRecord

    Customize the display of a row for displayRecord

    Attributes
    protected
    Definition Classes
    Crudify
  61. def editButton: String

    Definition Classes
    Crudify
  62. def editClass: String

    Definition Classes
    Crudify
  63. def editErrorClass: String

    Definition Classes
    Crudify
  64. def editId: String

    Definition Classes
    Crudify
  65. def editMenuLoc: Box[Menu]

    The menu item for editing an item (make this "Empty" to disable)

    The menu item for editing an item (make this "Empty" to disable)

    Definition Classes
    Crudify
  66. def editMenuLocParams: List[LocParam[(CRUDify.this)#TheCrudType]]

    Override to include new Params for the edit menu

    Override to include new Params for the edit menu

    Definition Classes
    Crudify
  67. def editMenuName: String

    The String displayed for menu editing

    The String displayed for menu editing

    Definition Classes
    Crudify
  68. lazy val editPath: List[String]

    Definition Classes
    Crudify
  69. lazy val editPathString: String

    Definition Classes
    Crudify
  70. def editTemplate(): NodeSeq

    This is the template that's used to render the page after the optional wrapping of the template in the page wrapper

    This is the template that's used to render the page after the optional wrapping of the template in the page wrapper

    Definition Classes
    Crudify
  71. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  72. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  73. def fieldsForDisplay: List[MappedField[_, CrudType]]

    The fields to be displayed.

    The fields to be displayed. By default all the displayed fields, but this list can be shortened.

    Definition Classes
    CRUDifyCrudify
  74. def fieldsForEditing: List[(CRUDify.this)#FieldPointerType]

    The list of fields to present on a form form editing

    The list of fields to present on a form form editing

    Definition Classes
    Crudify
  75. def fieldsForList: List[(CRUDify.this)#FieldPointerType]

    The fields displayed on the list page.

    The fields displayed on the list page. By default all the displayed fields, but this list can be shortened.

    Definition Classes
    Crudify
  76. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  77. def findForList(start: Long, count: Int): List[(CRUDify.this)#TheCrudType]

    Get a List of items from the databased

    Get a List of items from the databased

    Definition Classes
    CRUDifyCrudify
  78. def findForListParams: List[QueryParam[CrudType]]

    What are the query parameters? Default to ascending on primary key

  79. def findForParam(in: String): Box[(CRUDify.this)#TheCrudType]

    Given a String that represents the primary key, find an instance of TheCrudType

    Given a String that represents the primary key, find an instance of TheCrudType

    Definition Classes
    CRUDifyCrudify
  80. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  81. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  82. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  83. lazy val listPath: List[String]

    Definition Classes
    Crudify
  84. lazy val listPathString: String

    Definition Classes
    Crudify
  85. lazy val locSnippets: DispatchLocSnippets { val dispatch: PartialFunction[String,scala.xml.NodeSeq => scala.xml.NodeSeq] }

    Definition Classes
    Crudify
  86. def menus: List[Menu]

    Definition Classes
    Crudify
  87. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  88. def nextWord: String

    Definition Classes
    Crudify
  89. final def notify(): Unit

    Definition Classes
    AnyRef
  90. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  91. def obscurePrimaryKey(in: String): String

    This method can be used to obscure the primary key.

    This method can be used to obscure the primary key. This is more secure because end users will not have access to the primary key. This method actually does the obfuscation. You can use Mapper's KeyObfuscator class to implement a nice implementation of this method for session-by-session obfuscation.

    By default, there's no obfuscation. Note that if you obfuscate the primary key, you need to update the findForParam method to accept the obfuscated keys (and translate them back.)

    Definition Classes
    Crudify
  92. def obscurePrimaryKey(in: (CRUDify.this)#TheCrudType): String

    This method can be used to obscure the primary key.

    This method can be used to obscure the primary key. This is more secure because end users will not have access to the primary key.

    Definition Classes
    Crudify
  93. def pageWrapper(body: NodeSeq): NodeSeq

    Definition Classes
    Crudify
  94. def previousWord: String

    Definition Classes
    Crudify
  95. def referer: String

    Definition Classes
    Crudify
  96. def rowsPerPage: Int

    This method defines how many rows are displayed per page.

    This method defines how many rows are displayed per page. By default, it's hard coded at 20, but you can make it session specific or change the default by overriding this method.

    Attributes
    protected
    Definition Classes
    Crudify
  97. def showAllClass: String

    Definition Classes
    Crudify
  98. def showAllId: String

    Definition Classes
    Crudify
  99. def showAllMenuLoc: Box[Menu]

    The menu item for listing items (make this "Empty" to disable)

    The menu item for listing items (make this "Empty" to disable)

    Definition Classes
    Crudify
  100. def showAllMenuLocParams: List[AnyLocParam]

    Override to include new Params for the show all menu

    Override to include new Params for the show all menu

    Definition Classes
    Crudify
  101. def showAllMenuName: String

    Definition Classes
    Crudify
  102. def showAllTemplate(): NodeSeq

    This is the template that's used to render the page after the optional wrapping of the template in the page wrapper

    This is the template that's used to render the page after the optional wrapping of the template in the page wrapper

    Definition Classes
    Crudify
  103. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  104. def toString(): String

    Definition Classes
    AnyRef → Any
  105. def viewClass: String

    Definition Classes
    Crudify
  106. def viewId: String

    Definition Classes
    Crudify
  107. def viewMenuLoc: Box[Menu]

    The menu item for viewing an item (make this "Empty" to disable)

    The menu item for viewing an item (make this "Empty" to disable)

    Definition Classes
    Crudify
  108. def viewMenuLocParams: List[LocParam[(CRUDify.this)#TheCrudType]]

    Override to include new Params for the view menu

    Override to include new Params for the view menu

    Definition Classes
    Crudify
  109. def viewMenuName: String

    Definition Classes
    Crudify
  110. lazy val viewPath: List[String]

    Definition Classes
    Crudify
  111. lazy val viewPathString: String

    Definition Classes
    Crudify
  112. def viewTemplate(): NodeSeq

    This is the template that's used to render the page after the optional wrapping of the template in the page wrapper

    This is the template that's used to render the page after the optional wrapping of the template in the page wrapper

    Definition Classes
    Crudify
  113. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  114. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  115. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  116. def wrapNameInRequired(fieldName: NodeSeq, required: Boolean): NodeSeq

    As the field names are being displayed for editing, this method is called with the XHTML that will be displayed as the field name and a flag indicating whether the field is required.

    As the field names are being displayed for editing, this method is called with the XHTML that will be displayed as the field name and a flag indicating whether the field is required. You can wrap the fieldName in a span with a css class indicating that the field is required or otherwise do something to update the field name indicating to the user that the field is required. By default the method wraps the fieldName in a span with the class attribute set to "required_field".

    Definition Classes
    Crudify

Inherited from Crudify

Inherited from AnyRef

Inherited from Any

Ungrouped