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:
Eugeny Degtyarjov 2013-03-26 07:29:20 +00:00
parent a23233b19f
commit dfe57b6c41

View File

@ -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