Running the Designer Jakarta EE
Наши примеры проектов и шаблоны отчётов помогут Вам разобраться в основах работы с нашими продуктами.The web designer is added to a JSP page through a
Implement the designer handler.
How it works. The handler bridges the designer and your storage, so users edit templates in the browser and saves are written back on the server.
На скриншоте ниже Вы можете увидеть результат выполнения данного кода:

StiWebDesigerHandler that supplies the report and persists it on save.Implement the designer handler.
StiWebDesignerOptions options = new StiWebDesignerOptions();
options.setTheme(StiWebDesignerTheme.Office2013DarkGrayBlue);
StiWebDesigerHandler handler = new StiWebDesigerHandler() {
public StiReport getEditedReport(HttpServletRequest request) throws Exception {
return StiSerializeManager.deserializeReport(new FileInputStream(reportPath));
}
public void onSaveReportTemplate(StiReport report, StiRequestParams params, HttpServletRequest request) throws Exception {
StiSerializeManager.serializeReport(report, new FileOutputStream(savePath + params.designer.fileName), true);
}
};
// <stiwebdesigner:webdesigner handler="${handler}" options="${options}" />getEditedReport— returns the template to open in the designer.onSaveReportTemplate— receives the edited report on save; serialize it wherever you need.<stiwebdesigner:webdesigner handler options />— the tag that renders the designer.
How it works. The handler bridges the designer and your storage, so users edit templates in the browser and saves are written back on the server.
На скриншоте ниже Вы можете увидеть результат выполнения данного кода:
