Entity views
EntityModule has the ability to generate automatic views for entities. When AdminWebModule is present, automatic CRUD pages for entities will be generated using these views.
A view is an abstraction of web controller that allows you to take advantage of the EntityModule configuration system. Usually views are a rendering of one or more entities of a particular entity type.
Both EntityConfiguration
and EntityAssociation
can have their own views defined.
They do so by implementing the EntityViewRegistry
interface.
Every view has a unique name within an EntityViewRegistry
.
Default views
By default CRUD views will be created for every EntityConfiguration
with a CrudRepository
or an EntityQueryExecutor
registered.
Likewise CRUD views will be created for every EntityAssociation
with an AssociatedEntityQueryExecutor
attribute.
Query executor attributes should be registered automatically in most cases.
So you usually don’t need to worry about those.
See the chapter on EntityQueryExecutor for more information.
|
The following default views will be created for an entity type:
View name | View type | Description |
---|---|---|
listView
( |
list view |
Shows the list of entities. |
createView
( |
form view |
Renders and executes the form for creating a new entity. |
updateView
( |
form view |
Renders and executes the form for updating an entity. |
deleteView
( |
form view |
Shows the confirmation page and performs the delete if allowed. |
The default views all render markup using the ViewElement
infrastructure and the implementations provided by the BootstrapUiModule.