public static class InstanceLoader.PreLoadEvent<T>
extends java.util.EventObject
You can prevent load using the preventLoad() method of the event, for example:
@Subscribe(id = "fooDl", target = Target.DATA_LOADER)
private void onFooDlPreLoad(InstanceLoader.PreLoadEvent event) {
if (doNotLoad()) {
event.preventLoad();
}
}
| Constructor and Description |
|---|
PreLoadEvent(InstanceLoader<T> loader,
io.jmix.core.LoadContext<T> loadContext) |
| Modifier and Type | Method and Description |
|---|---|
io.jmix.core.LoadContext<T> |
getLoadContext()
Returns the load context of the current data loader.
|
InstanceLoader<T> |
getSource()
The data loader which sent the event.
|
boolean |
isLoadPrevented()
Returns true if
preventLoad() method was called and loading will be aborted. |
void |
preventLoad()
Invoke this method if you want to abort the loading.
|
public PreLoadEvent(InstanceLoader<T> loader, io.jmix.core.LoadContext<T> loadContext)
public InstanceLoader<T> getSource()
getSource in class java.util.EventObjectpublic io.jmix.core.LoadContext<T> getLoadContext()
public void preventLoad()
public boolean isLoadPrevented()
preventLoad() method was called and loading will be aborted.