Browse Source

REPORT-96002【来源客户BUG REPORT-94898】FR11程序网络报表的demo类,更新文档和demo代码

pull/5/head
kerry 2 years ago
parent
commit
ee67e4df63
  1. 14
      src/main/java/com/fr/demo/SimpleReportletDemoFrm.java

14
src/main/java/com/fr/demo/SimpleReportletDemoFrm.java

@ -1,16 +1,15 @@
package com.fr.demo; package com.fr.demo;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import com.fr.form.main.DashboardTemplate;
import com.fr.form.main.Form; import com.fr.form.main.Form;
import com.fr.form.main.FormIO; import com.fr.form.main.FormIO;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.web.weblet.Formlet; import com.fr.web.weblet.Formlet;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
public class SimpleReportletDemoFrm extends Formlet { public class SimpleReportletDemoFrm extends Formlet {
@Override @Override
public void setParameterMap(Map arg0) { public void setParameterMap(Map arg0) {
// TODO Auto-generated method stub // TODO Auto-generated method stub
@ -18,17 +17,20 @@ public class SimpleReportletDemoFrm extends Formlet {
} }
@Override @Override
protected Form createForm(HttpServletRequest request) throws Exception { protected DashboardTemplate createDashboard(HttpServletRequest req) throws Exception {
Form form = null; Form form = null;
//模板的相对路径 //模板的相对路径
String tplPath = "//doc//frm//决策报表入门.frm"; String tplPath = "//doc//frm//决策报表入门.frm";
this.setTplPath(tplPath); this.setTplPath(tplPath);
try { try {
form = FormIO.readForm(tplPath); form = FormIO.readForm(tplPath);
} catch (Exception e) { } catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);
} }
return form; return form;
} }
}
}

Loading…
Cancel
Save