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
|
|
@ -35,7 +35,8 @@ import net.forwardfire.vasc.core.VascEntryListOption;
|
|||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.actions.GlobalVascAction;
|
||||
import net.forwardfire.vasc.core.actions.RowVascAction;
|
||||
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.entry.VascEntryFrontendEventListener;
|
||||
import net.forwardfire.vasc.core.ui.VascOptionValueModelListener;
|
||||
import net.forwardfire.vasc.core.ui.VascUIComponent;
|
||||
|
|
@ -163,7 +164,7 @@ public class SwtVascFrontend extends AbstractVascFrontend {
|
|||
/** These filter extensions are used to filter which files are displayed. */
|
||||
private static final String[] FILTER_EXTS = { "*.*","*.csv","*.xls" };
|
||||
|
||||
public void renderExport(VascEntryExporter exporter) throws VascFrontendException {
|
||||
public void renderExport(VascEntryExport exporter) throws VascFrontendException {
|
||||
FileDialog dlg = new FileDialog(Display.getCurrent().getActiveShell(), SWT.SAVE);
|
||||
dlg.setFilterNames(FILTER_NAMES);
|
||||
dlg.setFilterExtensions(FILTER_EXTS);
|
||||
|
|
@ -175,13 +176,15 @@ public class SwtVascFrontend extends AbstractVascFrontend {
|
|||
}
|
||||
OutputStream out = null;
|
||||
try {
|
||||
VascEntryExportWriter veew = exporter.createExportWriter();
|
||||
veew.doInit(exporter, entry);
|
||||
out = new FileOutputStream(fileName);
|
||||
exporter.doExport(out, entry);
|
||||
veew.doExport(out);
|
||||
} catch (VascException e) {
|
||||
//MessageDialog.openError(Display.getCurrent().getActiveShell(),crudTable.i18n("crud.event.export.error.title"),crudTable.i18n("crud.event.export.error.message"));
|
||||
logger.log(Level.WARNING,"Error: "+e.getMessage(),e);
|
||||
throw new VascFrontendException(e);
|
||||
} catch (FileNotFoundException e) {
|
||||
} catch (IOException e) {
|
||||
throw new VascFrontendException(e);
|
||||
} finally {
|
||||
if (out!=null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue