mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-03 03:38:33 +08:00
Load main screen class before load components
This resolve issue with dynamic compilation when included frame's class is compiled before main class which cause class cast exceptions
This commit is contained in:
parent
a23233b19f
commit
dfe57b6c41
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user