Package io.jmix.flowui.component
Interface HasDataComponents
- All Known Subinterfaces:
FragmentData
,ViewData
- All Known Implementing Classes:
AbstractDataComponentsHolder
,FragmentDataImpl
,ViewDataImpl
public interface HasDataComponents
Interface defining methods for interacting with data API elements.
-
Method Summary
Modifier and TypeMethodDescription<T extends InstanceContainer<?>>
TgetContainer
(String id) Returns a container by its id.Returns ids of all registered containers.Returns view'sDataContext
.Returns view'sDataContext
or null if it is not defined.<T extends DataLoader>
TReturns a loader by its id.Returns ids of all registered loaders.void
loadAll()
PerformsDataLoader.load()
for all loaders registered in the view.void
registerContainer
(String id, InstanceContainer<?> container) Registers the given containervoid
registerLoader
(String id, DataLoader loader) Registers the given loadervoid
setDataContext
(DataContext dataContext) SetsDataContext
instance for the view.
-
Method Details
-
getDataContext
DataContext getDataContext()Returns view'sDataContext
.- Throws:
IllegalStateException
- if the DataContext is not defined
-
getDataContextOrNull
Returns view'sDataContext
or null if it is not defined. -
setDataContext
SetsDataContext
instance for the view. -
getContainer
Returns a container by its id.- Throws:
IllegalArgumentException
- if there is no such container
-
getLoader
Returns a loader by its id.- Throws:
IllegalArgumentException
- if there is no such loader
-
getContainerIds
Returns ids of all registered containers. -
getLoaderIds
Returns ids of all registered loaders. -
registerContainer
Registers the given container -
registerLoader
Registers the given loader -
loadAll
void loadAll()PerformsDataLoader.load()
for all loaders registered in the view.
-