Package io.jmix.ui.model
Interface ScreenData
- All Known Implementing Classes:
ScreenDataImpl
public interface ScreenData
Interface defining methods for interacting with data API elements of a screen.
-
Method Summary
Modifier and TypeMethodDescription<T extends InstanceContainer>
TgetContainer
(String id) Returns a container by its id.Returns ids of all registered containers.Returns screen'sDataContext
.Returns screen'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 screen.void
registerContainer
(String id, InstanceContainer container) Registers the given container in the screen.void
registerLoader
(String id, DataLoader loader) Registers the given loader in the screen.void
setDataContext
(DataContext dataContext) SetsDataContext
instance for the screen.void
setScreenId
(String viewId)
-
Method Details
-
getScreenId
-
setScreenId
-
getDataContext
DataContext getDataContext()Returns screen'sDataContext
.- Throws:
IllegalStateException
- if the DataContext is not defined
-
getDataContextOrNull
Returns screen'sDataContext
or null if it is not defined. -
setDataContext
SetsDataContext
instance for the screen. -
loadAll
void loadAll()PerformsDataLoader.load()
for all loaders registered in the screen. -
getContainer
Returns a container by its id.- Throws:
IllegalArgumentException
- if there is no such container in the screen
-
getLoader
Returns a loader by its id.- Throws:
IllegalArgumentException
- if there is no such loader in the screen
-
getContainerIds
Returns ids of all registered containers. -
getLoaderIds
Returns ids of all registered loaders. -
registerContainer
Registers the given container in the screen. -
registerLoader
Registers the given loader in the screen.
-