diff --git a/modules/gui/src/com/haulmont/cuba/gui/WindowManager.java b/modules/gui/src/com/haulmont/cuba/gui/WindowManager.java index 1a69a768a4..25f8a89e5e 100644 --- a/modules/gui/src/com/haulmont/cuba/gui/WindowManager.java +++ b/modules/gui/src/com/haulmont/cuba/gui/WindowManager.java @@ -126,6 +126,8 @@ public abstract class WindowManager { XmlInheritanceProcessor processor = new XmlInheritanceProcessor(document, params); Element element = processor.getResultRoot(); + preloadMainScreenClass(element);//try to load main screen class to resolve dynamic compilation dependencies issues + WindowCreationHelper.deployViews(element); final DsContext dsContext = loadDsContext(element); @@ -168,6 +170,13 @@ public abstract class WindowManager { return windowWrapper; } + private void preloadMainScreenClass(Element element) { + final String screenClass = element.attributeValue("class"); + if (!StringUtils.isBlank(screenClass)) { + scripting.loadClass(screenClass); + } + } + protected void initDebugIds(final Window window) { ComponentsHelper.walkComponents(window, new ComponentVisitor() { @Override