This trait represents a Bridge between TheCrudType and the Crudify trait.
A generic representation of a field.
A generic representation of a field. For example, this represents the abstract "name" field and is used along with an instance of TheCrudType to compute the BaseField that is the "name" field on the specific instance of TheCrudType
The type of records we're manipulating
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
Based on a FieldPointer, build a FieldPointerBridge
Based on a FieldPointer, build a FieldPointerBridge
What's the prefix for this CRUD.
What's the prefix for this CRUD. Typically the table name.
Given an instance of TheCrudType and FieldPointerType, convert that to an actual instance of a BaseField on the instance of TheCrudType
Given an instance of TheCrudType and FieldPointerType, convert that to an actual instance of a BaseField on the instance of TheCrudType
Vend a new instance of TheCrudType
When displaying a record, what fields do we display
Given a range, find the records.
Given a range, find the records. Your implementation of this method should enforce ordering (e.g., on primary key).
Given a String that represents the primary key, find an instance of TheCrudType
The core template for creating.
The core template for creating. Does not include any page wrapping.
The core template for deleting.
The core template for deleting. Does not include any page wrapping.
The core template for editing.
The core template for editing. Does not include any page wrapping.
The core template for showing record.
The core template for showing record. Does not include any page wrapping
The core template for viewing.
The core template for viewing. Does not include any page wrapping.
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)
The menu item for creating items (make this "Empty" to disable)
Override to include new Params for the create menu
This is the template that's used to render the page after the optional wrapping of the template in the page wrapper.
Override this method to change how the next link is generated
Override this method to change how the next link is generated
Override this method to change how the previous link is generated
Override this method to change how the previous link is generated
Override this method to change how the delete screen is built
Override this method to change how the delete screen is built
The menu item for deleting an item (make this "Empty" to disable)
Override to include new Params for the delete menu
This is the template that's used to render the page after the optional wrapping of the template in the page wrapper
Customize the display of records for view menu loc
Customize the display of records for view menu loc
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
Override this method to customize how header items are treated
Override this method to customize how header items are treated
Override this method to customize how a crudAll line is generated
Override this method to customize how a crudAll line is generated
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
Override this method to change how fields are displayed for delete
Override this method to change how fields are displayed for delete
Override this method to change the behavior of deleting an item
Override this method to change the behavior of deleting an item
Customize the display of a row for displayRecord
Customize the display of a row for displayRecord
The menu item for editing an item (make this "Empty" to disable)
Override to include new Params for the edit menu
The String displayed for menu editing
This is the template that's used to render the page after the optional wrapping of the template in the page wrapper
The list of fields to present on a form form editing
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.
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.)
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 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.
The menu item for listing items (make this "Empty" to disable)
Override to include new Params for the show all menu
This is the template that's used to render the page after the optional wrapping of the template in the page wrapper
The menu item for viewing an item (make this "Empty" to disable)
Override to include new Params for the view menu
This is the template that's used to render the page after the optional wrapping of the template in the page wrapper
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".
This trait automatically adds CRUD (Create, read, update and delete) operations to an existing persistence mechanism. 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.