made server gui work and auto generate xml imports
This commit is contained in:
parent
01b3b5cc54
commit
c259e28e44
69 changed files with 1669 additions and 1230 deletions
|
|
@ -34,7 +34,8 @@ import javax.servlet.http.HttpServletResponse;
|
|||
import net.forwardfire.vasc.core.VascController;
|
||||
import net.forwardfire.vasc.core.VascControllerProvider;
|
||||
import net.forwardfire.vasc.core.VascEntryLocal;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryExporter;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryExport;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryExportWriter;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
|
||||
/**
|
||||
|
|
@ -176,14 +177,16 @@ public class VascExportServlet extends HttpServlet {
|
|||
// Update total every time first
|
||||
Long total = ve.getVascFrontendController().getVascEntryState().getVascBackend().fetchTotalExecuteSize(ve.getVascFrontendController().getVascEntryState().getVascBackendState());
|
||||
ve.getVascFrontendController().getVascEntryState().setTotalBackendRecords(total);
|
||||
VascEntryExporter ex = vc.getVascEntryConfigController().getVascEntryExporterById(exportId);
|
||||
VascEntryExport ex = vc.getVascEntryConfigController().getVascEntryExporterById(exportId);
|
||||
VascEntryExportWriter exw = ex.createExportWriter();
|
||||
exw.doInit(ex, ve);
|
||||
|
||||
String filename = entryId+"-export."+ex.getFileType();
|
||||
String filename = entryId+"-export."+exw.getFileType();
|
||||
response.setHeader("Content-disposition", "attachment; filename=" + filename);
|
||||
String contentType = ex.getMineType();
|
||||
String contentType = exw.getMineType();
|
||||
response.setContentType(contentType);
|
||||
|
||||
ex.doExport(out, ve);
|
||||
exw.doExport(out);
|
||||
} catch (VascException e) {
|
||||
response.setStatus(500);
|
||||
response.setContentType("text/html");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue