Package io.jmix.ui.model
Class CollectionLoader.PreLoadEvent<T>
java.lang.Object
java.util.EventObject
io.jmix.ui.model.CollectionLoader.PreLoadEvent<T>
- All Implemented Interfaces:
Serializable
- Enclosing interface:
- CollectionLoader<E>
Event sent before loading entities.
You can prevent load using the preventLoad()
method of the event, for example:
@Subscribe(id = "fooDl", target = Target.DATA_LOADER) private void onFooDlPreLoad(CollectionLoader.PreLoadEvent event) { if (doNotLoad()) { event.preventLoad(); } }
-
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the load context of the current data loader.The data loader which sent the event.boolean
Returns true ifpreventLoad()
method was called and loading will be aborted.void
Invoke this method if you want to abort the loading.Methods inherited from class java.util.EventObject
toString
-
Constructor Details
-
PreLoadEvent
-
-
Method Details
-
getSource
The data loader which sent the event.- Overrides:
getSource
in classEventObject
-
getLoadContext
Returns the load context of the current data loader. -
preventLoad
public void preventLoad()Invoke this method if you want to abort the loading. -
isLoadPrevented
public boolean isLoadPrevented()Returns true ifpreventLoad()
method was called and loading will be aborted.
-