Package io.jmix.flowui.view
Interface DetailView<E>
- Type Parameters:
E
- type of entity
- All Superinterfaces:
ChangeTracker
- All Known Implementing Classes:
EntityAttributeResourcePolicyModelDetailView
,EntityInspectorDetailView
,EntityResourcePolicyModelDetailView
,GraphQLResourcePolicyModelDetailView
,MenuResourcePolicyModelDetailView
,ResourcePolicyModelDetailView
,ResourceRoleModelDetailView
,RowLevelPolicyModelDetailView
,RowLevelRoleModelDetailView
,SpecificResourcePolicyModelDetailView
,StandardDetailView
,ViewResourcePolicyModelDetailView
Interface of views that display an entity instance and can save changes made by the user.
-
Method Summary
Modifier and TypeMethodDescriptionDiscards changes and closes the view.Saves changes and closes the view.save()
Saves changes.void
setEntityToEdit
(E entity) Sets entity instance to the view.Methods inherited from interface io.jmix.flowui.view.ChangeTracker
hasUnsavedChanges
-
Method Details
-
save
OperationResult save()Saves changes. -
closeWithSave
OperationResult closeWithSave()Saves changes and closes the view. -
closeWithDiscard
OperationResult closeWithDiscard()Discards changes and closes the view. -
getEditedEntity
E getEditedEntity()- Returns:
- currently edited entity instance
- Throws:
IllegalStateException
- if the edited entity isn't initialized yet, for example inView.InitEvent
-
setEntityToEdit
Sets entity instance to the view.- Parameters:
entity
- entity to edit
-
getPessimisticLockStatus
PessimisticLockStatus getPessimisticLockStatus()- Returns:
- lock status of the currently edited entity instance. Possible variants:
PessimisticLockStatus.NOT_SUPPORTED
- if the entity does not support pessimistic lock.PessimisticLockStatus.LOCKED
- if the entity instance is successfully locked.PessimisticLockStatus.FAILED
- if the entity instance has been locked when the view is opened.
- See Also:
-