Browse Source

REPORT-62554 再打开设计器模板会空白

zheng-1641779399395
Henry.Wang 3 years ago
parent
commit
a992039144
  1. 16
      designer-realize/src/main/java/com/fr/design/mainframe/app/FormApp.java

16
designer-realize/src/main/java/com/fr/design/mainframe/app/FormApp.java

@ -73,15 +73,13 @@ class FormApp extends AbstractAppProvider {
@Override
public JTemplate<?, ?> call() throws Exception {
OpenResult<Form, Parameter[]> result = worker.getResult();
return (JTemplate<Form, ?>) StableFactory.getMarkedInstanceObjectFromClass(BaseJForm.XML_TAG,
new Object[]{result.getBaseBook(), tplFile, result.getRef()}, classType, BaseJForm.class);
return getJForm(result.getBaseBook(), tplFile, result.getRef());
}
});
worker.start(tplFile.getPath());
OpenResult<Form, Parameter[]> result = worker.getResult();
if (result != null) {
return (JTemplate<Form, ?>) StableFactory.getMarkedInstanceObjectFromClass(BaseJForm.XML_TAG,
new Object[]{result.getBaseBook(), tplFile, new Parameter[0]}, classType, BaseJForm.class);
return getJForm(result.getBaseBook(), tplFile, result.getRef());
}
return emptyForm;
} else {
@ -90,6 +88,16 @@ class FormApp extends AbstractAppProvider {
}
}
@Nullable
private JForm getJForm(Form form, FILE file, Parameter[] parameters) {
try {
return new JForm(form, file, parameters);
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e, e.getMessage());
return null;
}
}
@Nullable
private Form getForm(FILE tplFile) {
ReadXmlTypeLocalManager.setReadXmlType(ReadXmlType.DESIGN);

Loading…
Cancel
Save