use of com.haulmont.cuba.gui.sys.CompanionDependencyInjector in project cuba by cuba-platform.
the class WindowLoader method loadCompanions.
@Deprecated
protected void loadCompanions(Window resultComponent, Element element) {
Screen controller = resultComponent.getFrameOwner();
if (controller instanceof AbstractWindow) {
Element companionsElem = element.element("companions");
if (companionsElem != null) {
StopWatch companionStopWatch = createStopWatch(ScreenLifeCycle.COMPANION, controller.getId());
Object companion = initCompanion(companionsElem, (AbstractWindow) controller);
companionStopWatch.stop();
if (companion != null) {
getComponentContext().addInjectTask((c, w) -> {
CompanionDependencyInjector cdi = new CompanionDependencyInjector((LegacyFrame) controller, companion);
cdi.setBeanLocator(beanLocator);
cdi.inject();
});
}
}
}
}
Aggregations