Browse Source

REPORT-61276 决策报表-最新的release包,打开决策报表会打开一个空cpt;新建frm正常

bugfix/11.0
Henry.Wang 3 years ago
parent
commit
a18f27c41a
  1. 11
      designer-form/src/main/java/com/fr/design/widget/ui/designer/NewFormPane.java
  2. 4
      designer-realize/src/main/java/com/fr/design/mainframe/app/FormApp.java

11
designer-form/src/main/java/com/fr/design/widget/ui/designer/NewFormPane.java

@ -282,7 +282,7 @@ public class NewFormPane extends BasicPane {
private void newForm(String path) {
BaseJForm jForm;
try {
Form form = initEmptyBodyForm();
Form form = Form.getEmptyBodyForm();
initLayoutInfo(form, path);
jForm = StableFactory.getMarkedInstanceObjectFromClass(BaseJForm.XML_TAG, new Object[]{form}, BaseJForm.class);
DesignerContext.getDesignerFrame().addAndActivateJTemplate((JTemplate<?, ?>) jForm);
@ -291,15 +291,6 @@ public class NewFormPane extends BasicPane {
}
}
private Form initEmptyBodyForm() {
WFitLayout body = new WFitLayout("body");
body.setContainerWidth(WBorderLayout.DEFAULT_WIDTH);
body.setContainerHeight(WBorderLayout.DEFAULT_HEIGHT);
WBorderLayout borderLayout = new WBorderLayout("form");
borderLayout.addCenter(body);
return new Form(borderLayout);
}
/**
* 通过布局文件的位置初始化Form对象的布局信息
*

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

@ -4,6 +4,7 @@ import com.fr.base.Parameter;
import com.fr.base.chart.exception.ChartNotFoundException;
import com.fr.base.io.XMLEncryptUtils;
import com.fr.design.DesignerEnvManager;
import com.fr.design.fit.NewJForm;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.AbstractAppProvider;
import com.fr.design.mainframe.BaseJForm;
@ -19,6 +20,7 @@ import com.fr.exception.TplLockedException;
import com.fr.file.FILE;
import com.fr.form.main.Form;
import com.fr.form.ui.container.WBorderLayout;
import com.fr.form.ui.container.WFitLayout;
import com.fr.general.ComparatorUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.report.util.ReadXmlType;
@ -59,7 +61,7 @@ class FormApp extends AbstractAppProvider {
*/
private JTemplate<Form, ?> compatibleForm(FILE tplFile, HashMap<String, Class> classType) {
classType.put(Constants.ARG_2, Parameter[].class);
JForm emptyForm = new JForm(new Form(new WBorderLayout("form")), tplFile);
NewJForm emptyForm = new NewJForm(Form.getEmptyBodyForm(), tplFile);
OpenWorker<OpenResult<Form, Parameter[]>> worker = new OpenWorker<>(
new Callable<OpenResult<Form, Parameter[]>>() {
@Override

Loading…
Cancel
Save